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 Boolean
containsKey
(Map<?, ?> map, Object key) private static Object
getDefaultValue
(Map<?, ?> map) getProperty
(Interpreter interp, ST self, Map<?, ?> model, Object property, String propertyName) Lookup property name ino
and 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:ModelAdaptor
Lookup property name ino
and return its value.property
is normally aString
but doesn't have to be. E.g., ifo
isMap
,property
could be any key type. If we need to convert toString
, then it's done byST
and passed in here.- Specified by:
getProperty
in interfaceModelAdaptor<Map<?,
?>> - Throws:
STNoSuchPropertyException
-
containsKey
-
getDefaultValue
-