Package org.stringtemplate.v4.misc
Class AggregateModelAdaptor
java.lang.Object
org.stringtemplate.v4.misc.AggregateModelAdaptor
- All Implemented Interfaces:
ModelAdaptor<Aggregate>
Deal with structs created via
ST.addAggr(java.lang.String, java.lang.Object...)("structname.{prop1, prop2}", ...);.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(Interpreter interp, ST self, Aggregate o, Object property, String propertyName) Lookup property name inoand return its value.
-
Field Details
-
mapAdaptor
-
-
Constructor Details
-
AggregateModelAdaptor
public AggregateModelAdaptor()
-
-
Method Details
-
getProperty
public Object getProperty(Interpreter interp, ST self, Aggregate o, Object property, String propertyName) throws STNoSuchPropertyException Description copied from interface:ModelAdaptorLookup property name inoand return its value.propertyis normally aStringbut doesn't have to be. E.g., ifoisMap,propertycould be any key type. If we need to convert toString, then it's done bySTand passed in here.- Specified by:
getPropertyin interfaceModelAdaptor<Aggregate>- Throws:
STNoSuchPropertyException
-