Package org.stringtemplate.v4.misc
Class MapModelAdaptor
java.lang.Object
org.stringtemplate.v4.misc.MapModelAdaptor
- All Implemented Interfaces:
ModelAdaptor<Map<?,?>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static BooleancontainsKey(Map<?, ?> map, Object key) private static ObjectgetDefaultValue(Map<?, ?> map) getProperty(Interpreter interp, ST self, Map<?, ?> model, Object property, String propertyName) Lookup property name inoand return its value.
-
Constructor Details
-
MapModelAdaptor
public MapModelAdaptor()
-
-
Method Details
-
getProperty
public Object getProperty(Interpreter interp, ST self, Map<?, ?> model, Object property, String propertyName) throws STNoSuchPropertyExceptionDescription 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<Map<?,?>> - Throws:
STNoSuchPropertyException
-
containsKey
-
getDefaultValue
-