Enum MapValueResolver
- All Implemented Interfaces:
ValueResolver,Serializable,Comparable<MapValueResolver>,java.lang.constant.Constable
A
Map value resolver.- Since:
- 0.1.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields inherited from interface com.github.jknack.handlebars.ValueResolver
UNRESOLVED -
Method Summary
Modifier and TypeMethodDescriptionpropertySet(Object context) List all the properties and their values for the given object.Resolve the the context object by optionally converting the value if necessary.Resolve the attribute's name in the context object.static MapValueResolverReturns the enum constant of this type with the specified name.static MapValueResolver[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
INSTANCE
A singleton instance.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
resolve
Description copied from interface:ValueResolverResolve the attribute's name in the context object. If aValueResolver.UNRESOLVEDis returned, thecontext stackwill continue with the next value resolver in the chain.- Specified by:
resolvein interfaceValueResolver- Parameters:
context- The context object. Not null.name- The attribute's name. Not null.- Returns:
- A
ValueResolver.UNRESOLVEDis returned, thecontext stackwill continue with the next value resolver in the chain. Otherwise, it returns the associated value.
-
resolve
Description copied from interface:ValueResolverResolve the the context object by optionally converting the value if necessary. If aValueResolver.UNRESOLVEDis returned, thecontext stackwill continue with the next value resolver in the chain.- Specified by:
resolvein interfaceValueResolver- Parameters:
context- The context object. Not null.- Returns:
- A
ValueResolver.UNRESOLVEDis returned, thecontext stackwill continue with the next value resolver in the chain. Otherwise, it returns the associated value.
-
propertySet
Description copied from interface:ValueResolverList all the properties and their values for the given object.- Specified by:
propertySetin interfaceValueResolver- Parameters:
context- The context object. Not null.- Returns:
- All the properties and their values for the given object.
-