Class ServletWriter
java.lang.Object
org.apache.sling.scripting.jsp.jasper.compiler.ServletWriter
This is what is used to generate servlets.
- Author:
- Anil K. Vijendran, Kin-man Chung
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
int
void
void
print
(char c) Prints the given char.void
print
(int i) Prints the given int.void
Prints the given string.void
printComment
(org.apache.sling.scripting.jsp.jasper.compiler.Mark start, org.apache.sling.scripting.jsp.jasper.compiler.Mark stop, char[] chars) Print a standard comment for echo outputed chunk.void
Prints the current indention, and then the string, and a '\n'.void
printin()
Prints the current indentionvoid
Prints the current indention, followed by the given stringvoid
println()
Prints a '\n'void
Prints the given string followed by '\n'void
Prints the given string.void
-
Field Details
-
TAB_WIDTH
public static int TAB_WIDTH -
SPACES
-
-
Constructor Details
-
ServletWriter
-
-
Method Details
-
close
- Throws:
IOException
-
getJavaLine
public int getJavaLine() -
pushIndent
public void pushIndent() -
popIndent
public void popIndent() -
printComment
public void printComment(org.apache.sling.scripting.jsp.jasper.compiler.Mark start, org.apache.sling.scripting.jsp.jasper.compiler.Mark stop, char[] chars) Print a standard comment for echo outputed chunk.- Parameters:
start
- The starting position of the JSP chunk being processed.stop
- The ending position of the JSP chunk being processed.
-
println
Prints the given string followed by '\n' -
println
public void println()Prints a '\n' -
printin
public void printin()Prints the current indention -
printin
Prints the current indention, followed by the given string -
printil
Prints the current indention, and then the string, and a '\n'. -
print
public void print(char c) Prints the given char. Use println() to print a '\n'. -
print
public void print(int i) Prints the given int. -
print
Prints the given string. The string must not contain any '\n', otherwise the line count will be off. -
printMultiLn
Prints the given string. If the string spans multiple lines, the line count will be adjusted accordingly.
-