public class ExternalState extends Object
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 and Description |
---|
ExternalState(String name)
Creates an
ExternalState object. |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of the object.
|
String |
toString()
Returns the string representation of this external state.
|
public ExternalState(String name)
ExternalState
object.name
- the name to assign to that stateHtmlParser
,
JavascriptParser
public String getName()
Copyright © 2010–2017 Google. All rights reserved.