|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.streamhtmlparser.ExternalState
public class ExternalState
A representation of the parser state suitable for use by the caller
of the Parser. The meaning of each state and therefore which action
the caller should perform on that state is not self-evident. In particular,
it depends on which parser is used (currently HtmlParser
and
JavascriptParser
). For examples, you will have to look
at the Google Template System
and ClearSilver
both of which support Auto-Escaping by interfacing with our parser
(using the parser written in C++).
The caller of the Parser will query for the current parser state at points of interest during parsing of templates. Based on the parser's current state as represented by this class, the caller can determine the appropriate escaping to apply.
Note: Given this class is external-facing, I considered creating an interface but it is not likely we'll ever need to add more flexibility and the class is so simple, I figured it was not warranted.
HtmlParser
,
JavascriptParser
Constructor Summary | |
---|---|
ExternalState(String name)
Creates an ExternalState object. |
Method Summary | |
---|---|
String |
getName()
Returns the name of the object. |
String |
toString()
Returns the string representation of this external state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExternalState(String name)
ExternalState
object.
name
- the name to assign to that stateHtmlParser
,
JavascriptParser
Method Detail |
---|
public String getName()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |