com.caucho.jsp.java
Class JspJavaWriter

java.lang.Object
  extended by java.io.Writer
      extended by com.caucho.java.JavaWriter
          extended by com.caucho.jsp.java.JspJavaWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class JspJavaWriter
extends JavaWriter

Writing class for generated Java code.


Field Summary
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
JspJavaWriter(WriteStream os, JavaJspGenerator gen)
           
 
Method Summary
 void addText(java.lang.String text)
          Adds text to the current buffer.
protected  void flushText()
          Generates the code for the static text
 void popDepth()
          Pops an indentation depth.
 void print(boolean b)
          Prints a boolean.
 void print(char ch)
          Prints a character.
 void print(int i)
          Prints an integer.
 void print(long l)
          Prints an long
 void print(java.lang.Object o)
          Prints an object.
 void print(java.lang.String s)
          Prints a string
 void printJavaString(java.lang.String s)
          Prints a Java escaped string
 void println()
          Prints a newline
 void println(boolean v)
          Prints a boolean with a new line
 void println(char ch)
          Prints a character.
 void println(int v)
          Prints an integer with a new line
 void println(long v)
          Prints an long with a new line
 void println(java.lang.Object v)
          Prints an object with a new line
 void println(java.lang.String s)
          Prints a string with a new line
 void pushDepth()
          Pushes an indentation depth.
 void setLocation(java.lang.String filename, int line)
          Sets the source filename and line.
 
Methods inherited from class com.caucho.java.JavaWriter
close, errorMessage, escapeJavaString, flush, generateId, generateSmap, getDestLine, getLineMap, getWriteStream, printClass, printIndent, printJavaChar, printJavaTypeToObject, printJavaTypeToObject, printType, printVarType, setLineMap, setPreferLast, write
 
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspJavaWriter

public JspJavaWriter(WriteStream os,
                     JavaJspGenerator gen)
Method Detail

addText

public void addText(java.lang.String text)
             throws java.io.IOException
Adds text to the current buffer.

Throws:
java.io.IOException

setLocation

public void setLocation(java.lang.String filename,
                        int line)
                 throws java.io.IOException
Sets the source filename and line.

Overrides:
setLocation in class JavaWriter
Parameters:
filename - the filename of the source file.
line - the line of the source file.
Throws:
java.io.IOException

flushText

protected void flushText()
                  throws java.io.IOException
Generates the code for the static text

Parameters:
out - the output writer for the generated java.
Throws:
java.io.IOException

printJavaString

public void printJavaString(java.lang.String s)
                     throws java.io.IOException
Prints a Java escaped string

Overrides:
printJavaString in class JavaWriter
Throws:
java.io.IOException

pushDepth

public void pushDepth()
               throws java.io.IOException
Pushes an indentation depth.

Overrides:
pushDepth in class JavaWriter
Throws:
java.io.IOException

popDepth

public void popDepth()
              throws java.io.IOException
Pops an indentation depth.

Overrides:
popDepth in class JavaWriter
Throws:
java.io.IOException

print

public void print(java.lang.String s)
           throws java.io.IOException
Prints a string

Overrides:
print in class JavaWriter
Throws:
java.io.IOException

print

public void print(char ch)
           throws java.io.IOException
Prints a character.

Overrides:
print in class JavaWriter
Throws:
java.io.IOException

print

public void print(boolean b)
           throws java.io.IOException
Prints a boolean.

Overrides:
print in class JavaWriter
Throws:
java.io.IOException

print

public void print(int i)
           throws java.io.IOException
Prints an integer.

Overrides:
print in class JavaWriter
Throws:
java.io.IOException

print

public void print(long l)
           throws java.io.IOException
Prints an long

Overrides:
print in class JavaWriter
Throws:
java.io.IOException

print

public void print(java.lang.Object o)
           throws java.io.IOException
Prints an object.

Overrides:
print in class JavaWriter
Throws:
java.io.IOException

println

public void println(java.lang.String s)
             throws java.io.IOException
Prints a string with a new line

Overrides:
println in class JavaWriter
Throws:
java.io.IOException

println

public void println(boolean v)
             throws java.io.IOException
Prints a boolean with a new line

Overrides:
println in class JavaWriter
Throws:
java.io.IOException

println

public void println(char ch)
             throws java.io.IOException
Prints a character.

Overrides:
println in class JavaWriter
Throws:
java.io.IOException

println

public void println(int v)
             throws java.io.IOException
Prints an integer with a new line

Overrides:
println in class JavaWriter
Throws:
java.io.IOException

println

public void println(long v)
             throws java.io.IOException
Prints an long with a new line

Overrides:
println in class JavaWriter
Throws:
java.io.IOException

println

public void println(java.lang.Object v)
             throws java.io.IOException
Prints an object with a new line

Overrides:
println in class JavaWriter
Throws:
java.io.IOException

println

public void println()
             throws java.io.IOException
Prints a newline

Overrides:
println in class JavaWriter
Throws:
java.io.IOException