Package net.jangaroo.jooc
Class JsStringLiteralWriter
- java.lang.Object
-
- java.io.Writer
-
- java.io.FilterWriter
-
- net.jangaroo.jooc.SubstitutingWriter
-
- net.jangaroo.jooc.JsStringLiteralWriter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
public class JsStringLiteralWriter extends SubstitutingWriter
- Author:
- Andreas Gawecki
-
-
Field Summary
Fields Modifier and Type Field Description protected booleaninsideScriptTag-
Fields inherited from class java.io.FilterWriter
out
-
-
Constructor Summary
Constructors Constructor Description JsStringLiteralWriter(Writer out, boolean insideScriptTag)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginString()voidendString()protected Stringsubstitute(char ch)What should be printed instead of characterc? This method is always called synchronized onout.-
Methods inherited from class net.jangaroo.jooc.SubstitutingWriter
write, write, write, writeReplacement
-
Methods inherited from class java.io.FilterWriter
close, flush
-
-
-
-
Constructor Detail
-
JsStringLiteralWriter
public JsStringLiteralWriter(Writer out, boolean insideScriptTag)
-
-
Method Detail
-
substitute
protected String substitute(char ch)
Description copied from class:SubstitutingWriterWhat should be printed instead of characterc? This method is always called synchronized onout. Changes to the substitution function should therefore also be synchronized onout.- Specified by:
substitutein classSubstitutingWriter- Parameters:
ch- the character- Returns:
- the string to be printed, or null for "no change", i.e. just
c
-
beginString
public void beginString() throws IOException- Throws:
IOException
-
endString
public void endString() throws IOException- Throws:
IOException
-
-