|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.stringtemplate.language.Expr
org.antlr.stringtemplate.language.ASTExpr
A single string template expression enclosed in $...; separator=...$ parsed into an AST chunk to be evaluated.
Field Summary | |
static java.lang.String |
DEFAULT_ATTRIBUTE_NAME
|
static java.lang.String |
DEFAULT_ATTRIBUTE_NAME_DEPRECATED
|
static java.lang.String |
DEFAULT_INDEX_VARIABLE_NAME
|
static java.lang.String |
REFLECTION_ATTRIBUTES
When lint mode is on, this attribute contains a list of reflection objects that tell you about the attributes set by the user of the template. |
Constructor Summary | |
ASTExpr(StringTemplate enclosingTemplate,
antlr.collections.AST exprTree,
java.util.Map options)
|
Method Summary | |
java.lang.Object |
add(java.lang.Object a,
java.lang.Object b)
For strings or other objects, catenate and return. |
java.lang.Object |
applyListOfAlternatingTemplates(StringTemplate self,
java.lang.Object attributeValue,
java.util.List templatesToApply)
|
static java.lang.Object |
convertArrayToList(java.lang.Object value)
Do a standard conversion of array attributes to Lists. |
antlr.collections.AST |
getAST()
Return the tree interpreted when this template is written out. |
java.lang.Object |
getObjectProperty(StringTemplate self,
java.lang.Object o,
java.lang.String propertyName)
Return o.getPropertyName() given o and propertyName. |
StringTemplate |
getTemplateInclude(StringTemplate enclosing,
java.lang.String templateName,
StringTemplateAST argumentsAST)
Call a string template with args and return result. |
static boolean |
isValidMapInstance(java.lang.Class type)
|
static boolean |
isValidReturnTypeMapInstance(java.lang.Class type)
A property can be declared as Map, but the instance must be isValidMapInstance(). |
boolean |
testAttributeTrue(java.lang.Object a)
Normally StringTemplate tests presence or absence of attributes for adherence to my principles of separation, but some people disagree and want to change. |
int |
write(StringTemplate self,
StringTemplateWriter out)
To write out the value of an ASTExpr, invoke the evaluator in eval.g to walk the tree writing out the values. |
int |
writeAttribute(StringTemplate self,
java.lang.Object o,
StringTemplateWriter out)
How to spit out an object. |
Methods inherited from class org.antlr.stringtemplate.language.Expr |
getEnclosingTemplate, getIndentation, setIndentation |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_ATTRIBUTE_NAME
public static final java.lang.String DEFAULT_ATTRIBUTE_NAME_DEPRECATED
public static final java.lang.String DEFAULT_INDEX_VARIABLE_NAME
public static final java.lang.String REFLECTION_ATTRIBUTES
Constructor Detail |
public ASTExpr(StringTemplate enclosingTemplate, antlr.collections.AST exprTree, java.util.Map options)
Method Detail |
public antlr.collections.AST getAST()
public int write(StringTemplate self, StringTemplateWriter out) throws java.io.IOException
write
in class Expr
java.io.IOException
public java.lang.Object applyListOfAlternatingTemplates(StringTemplate self, java.lang.Object attributeValue, java.util.List templatesToApply)
public java.lang.Object getObjectProperty(StringTemplate self, java.lang.Object o, java.lang.String propertyName)
public boolean testAttributeTrue(java.lang.Object a)
public java.lang.Object add(java.lang.Object a, java.lang.Object b)
public StringTemplate getTemplateInclude(StringTemplate enclosing, java.lang.String templateName, StringTemplateAST argumentsAST)
public int writeAttribute(StringTemplate self, java.lang.Object o, StringTemplateWriter out)
public static java.lang.Object convertArrayToList(java.lang.Object value)
public static boolean isValidMapInstance(java.lang.Class type)
public static boolean isValidReturnTypeMapInstance(java.lang.Class type)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |