org.apache.jasper.compiler
类 ServletWriter

java.lang.Object
  继承者 org.apache.jasper.compiler.ServletWriter

public class ServletWriter
extends Object

This is what is used to generate servlets.

作者:
Anil K. Vijendran, Kin-man Chung

字段摘要
static String SPACES
           
static int TAB_WIDTH
           
 
构造方法摘要
ServletWriter(PrintWriter writer)
           
 
方法摘要
 void close()
           
 int getJavaLine()
           
 void popIndent()
           
 void print(char c)
          Prints the given char.
 void print(int i)
          Prints the given int.
 void print(String s)
          Prints the given string.
 void printComment(org.apache.jasper.compiler.Mark start, org.apache.jasper.compiler.Mark stop, char[] chars)
          Print a standard comment for echo outputed chunk.
 void printil(String s)
          Prints the current indention, and then the string, and a '\n'.
 void printin()
          Prints the current indention
 void printin(String s)
          Prints the current indention, followed by the given string
 void println()
          Prints a '\n'
 void println(String s)
          Prints the given string followed by '\n'
 void printMultiLn(String s)
          Prints the given string.
 void pushIndent()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

TAB_WIDTH

public static final int TAB_WIDTH
另请参见:
常量字段值

SPACES

public static final String SPACES
另请参见:
常量字段值
构造方法详细信息

ServletWriter

public ServletWriter(PrintWriter writer)
方法详细信息

close

public void close()
           throws IOException
抛出:
IOException

getJavaLine

public int getJavaLine()

pushIndent

public void pushIndent()

popIndent

public void popIndent()

printComment

public void printComment(org.apache.jasper.compiler.Mark start,
                         org.apache.jasper.compiler.Mark stop,
                         char[] chars)
Print a standard comment for echo outputed chunk.

参数:
start - The starting position of the JSP chunk being processed.
stop - The ending position of the JSP chunk being processed.

println

public void println(String s)
Prints the given string followed by '\n'


println

public void println()
Prints a '\n'


printin

public void printin()
Prints the current indention


printin

public void printin(String s)
Prints the current indention, followed by the given string


printil

public void printil(String s)
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

public void print(String s)
Prints the given string. The string must not contain any '\n', otherwise the line count will be off.


printMultiLn

public void printMultiLn(String s)
Prints the given string. If the string spans multiple lines, the line count will be adjusted accordingly.



Copyright © 2013. All Rights Reserved.