|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.millscript.render.AbstractRenderer
public abstract class AbstractRenderer
This abstract renderer provides the core functionality required by most renderer implementations.
| Field Summary | |
|---|---|
protected CharacterEntity |
availableEntities
The set of character entities that are available to this renderer. |
protected Configuration |
config
The configuration for this renderer. |
protected java.nio.charset.Charset |
outputCharset
The character set this renderer is using for output. |
protected java.nio.charset.CharsetEncoder |
outputEncoder
The character set encoder this renderer is using for output. |
protected org.millscript.commons.vfs.VFile |
outputVFile
The virtual file we are rendering to. |
protected java.io.Writer |
outputWriter
The writer we are rendering into. |
| Constructor Summary | |
|---|---|
AbstractRenderer(CharacterEntity ce,
Configuration conf,
java.nio.charset.Charset cs,
org.millscript.commons.vfs.VFile file)
Constructs a new abstract renderer, to render to the specified file, with the given set of character entities and output character set. |
|
AbstractRenderer(Configuration conf,
java.nio.charset.Charset cs,
org.millscript.commons.vfs.VFile file)
Constructs a new abstract renderer, to render to the specified file, with the no character entities and output character set. |
|
AbstractRenderer(Configuration conf,
org.millscript.commons.vfs.VFile file)
Constructs a new abstract renderer, to render to the specified file, with the no character entities and output character set. |
|
| Method Summary | |
|---|---|
void |
append(java.lang.CharSequence cs)
Appends the specified character sequence, allowing any the sequences characters to be escaped as appropriate for this renderer. |
void |
appendNoEscape(java.lang.CharSequence cs)
Appends the specified character sequence, without escaping any characters in the sequence. |
boolean |
canEncode(char ch)
Checks if the specified character can be encoded by this renderer. |
void |
render(java.lang.Object o)
Renders the specified object with this renderer. |
void |
renderAsDocument(java.lang.Object o)
Renders the specified object to the output file and then closes it. |
void |
renderAsFragment(org.millscript.commons.util.IList<?> l)
Renders the specified object to the output file as a fragment of a complete document. |
void |
renderCDATA(CDATA c)
Renders the specified CDATA object using this renderer. |
void |
renderXMLComment(XmlComment c)
Renders the specified XML comment using this renderer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.millscript.millscript.render.Renderer |
|---|
append, appendEscapeFor, appendNoEscape, renderDocumentFooter, renderDocumentHeader, renderObject, renderXMLElement |
| Field Detail |
|---|
protected final CharacterEntity availableEntities
protected final Configuration config
protected final java.nio.charset.Charset outputCharset
protected final java.nio.charset.CharsetEncoder outputEncoder
protected final java.io.Writer outputWriter
protected final org.millscript.commons.vfs.VFile outputVFile
| Constructor Detail |
|---|
public AbstractRenderer(CharacterEntity ce,
Configuration conf,
java.nio.charset.Charset cs,
org.millscript.commons.vfs.VFile file)
ce - the set of character entities to render withconf - the configuration for this renderercs - the output character setfile - the virtual output file
public AbstractRenderer(Configuration conf,
org.millscript.commons.vfs.VFile file)
conf - the configuration for this rendererfile - the virtual output file
public AbstractRenderer(Configuration conf,
java.nio.charset.Charset cs,
org.millscript.commons.vfs.VFile file)
cs - the output character setfile - the virtual output file| Method Detail |
|---|
public void append(java.lang.CharSequence cs)
throws java.io.IOException
Renderer
append in interface Rendererjava.io.IOException - thrown if an IO problem occursRenderer.append(java.lang.CharSequence)
public void appendNoEscape(java.lang.CharSequence cs)
throws java.io.IOException
Renderer
appendNoEscape in interface Rendererjava.io.IOException - thrown if an IO problem occursRenderer.appendNoEscape(java.lang.CharSequence)public final boolean canEncode(char ch)
canEncode in interface Rendererch - the character to check
true if the character can be encoded by this
renderer
public void render(java.lang.Object o)
throws java.io.IOException
Renderer
render in interface Renderero - the object to render
java.io.IOException - thrown if an IO problem occursRenderer.render(java.lang.Object)public final void renderAsDocument(java.lang.Object o)
Renderer
renderAsDocument in interface Renderero - the object to render to the fileRenderer.renderAsDocument(java.lang.Object)public final void renderAsFragment(org.millscript.commons.util.IList<?> l)
Renderer
renderAsFragment in interface Rendererl - the list of objects to write to the fileRenderer.renderAsFragment(org.millscript.commons.util.IList)
public void renderCDATA(CDATA c)
throws java.io.IOException
Renderer
renderCDATA in interface Rendererc - the CDATA object to render
java.io.IOException - thrown if an IO problem occursRenderer.renderCDATA(org.millscript.millscript.datatypes.CDATA)
public void renderXMLComment(XmlComment c)
throws java.io.IOException
Renderer
renderXMLComment in interface Rendererc - the XML comment to render
java.io.IOException - thrown if an IO problem occursRenderer.renderXMLComment(org.millscript.millscript.datatypes.XmlComment)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||