|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<MapValueResolver>
com.github.jknack.handlebars.context.MapValueResolver
public enum MapValueResolver
A Map value resolver.
| Enum Constant Summary | |
|---|---|
INSTANCE
A singleton instance. |
|
| Field Summary |
|---|
| Fields inherited from interface com.github.jknack.handlebars.ValueResolver |
|---|
UNRESOLVED, VALUE_RESOLVERS |
| Method Summary | |
|---|---|
Set<Map.Entry<String,Object>> |
propertySet(Object context)
List all the properties and their values for the given object. |
Object |
resolve(Object context,
String name)
Resolve the attribute's name in the context object. |
static MapValueResolver |
valueOf(String name)
Returns 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 |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final MapValueResolver INSTANCE
| Method Detail |
|---|
public static MapValueResolver[] values()
for (MapValueResolver c : MapValueResolver.values()) System.out.println(c);
public static MapValueResolver valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
public Object resolve(Object context,
String name)
ValueResolverValueResolver.UNRESOLVED is returned, the
context stack will
continue with the next value resolver in the chain.
resolve in interface ValueResolvercontext - The context object. Not null.name - The attribute's name. Not null.
ValueResolver.UNRESOLVED is returned, the context
stack will continue with the next value resolver in the chain.
Otherwise, it returns the associated value.public Set<Map.Entry<String,Object>> propertySet(Object context)
ValueResolver
propertySet in interface ValueResolvercontext - The context object. Not null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||