|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.stringtemplate.language.AttributeReflectionController
This class knows how to recursively walk a StringTemplate and all of its attributes to dump a type tree out. STs contain attributes which can contain multiple values. Those values could be other STs or have types that are aggregates (have properties). Those types could have properties etc... I am not using ST itself to print out the text for $attributes$ because it kept getting into nasty self-recursive loops that made my head really hurt. Pretty hard to get ST to print itselt out. Oh well, it was a cool thought while I had it. I just dump raw text to an output buffer now. Easier to understand also.
Constructor Summary | |
AttributeReflectionController(StringTemplate st)
|
Method Summary | |
boolean |
isAtomicType(java.lang.Class type)
For now, assume only java.lang stuff is atomic as long as it's not a valid map. |
static java.lang.String |
terseType(java.lang.String typeName)
|
java.lang.String |
toString()
|
void |
walkAtomicType(java.lang.Class type)
|
void |
walkAttributes(StringTemplate st)
Walk all the attributes in this template, spitting them out. |
void |
walkAttributeValues(java.lang.Object attributeValue)
|
void |
walkMap(java.util.Map map)
Walk all the attributes in this template, spitting them out. |
void |
walkPropertiesList(java.lang.Object aggregateValue,
java.lang.Class type)
Get the list of properties by looking for get/isXXX methods. |
void |
walkStringTemplate(StringTemplate st)
|
void |
walkValue(java.lang.Object value,
java.lang.Class type)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AttributeReflectionController(StringTemplate st)
Method Detail |
public java.lang.String toString()
public void walkStringTemplate(StringTemplate st)
public void walkAttributes(StringTemplate st)
public void walkAttributeValues(java.lang.Object attributeValue)
public void walkPropertiesList(java.lang.Object aggregateValue, java.lang.Class type)
public void walkValue(java.lang.Object value, java.lang.Class type)
public void walkAtomicType(java.lang.Class type)
public void walkMap(java.util.Map map)
public boolean isAtomicType(java.lang.Class type)
public static java.lang.String terseType(java.lang.String typeName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |