Class FieldValueResolver
- java.lang.Object
-
- com.github.jknack.handlebars.context.MemberValueResolver<FieldValueResolver.FieldWrapper>
-
- com.github.jknack.handlebars.context.FieldValueResolver
-
- All Implemented Interfaces:
ValueResolver
public class FieldValueResolver extends MemberValueResolver<FieldValueResolver.FieldWrapper>
A specialization ofMemberValueResolver
with lookup and invocation support forField
. It matches private, protected, package, public and no-static field.- Since:
- 0.1.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
FieldValueResolver.FieldWrapper
Workaround for accessing to the public attribute length of arrays.
-
Field Summary
Fields Modifier and Type Field Description static ValueResolver
INSTANCE
The default value resolver.-
Fields inherited from interface com.github.jknack.handlebars.ValueResolver
UNRESOLVED
-
-
Constructor Summary
Constructors Constructor Description FieldValueResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(FieldValueResolver.FieldWrapper field, java.lang.String name)
True, if the member matches the one we look for.-
Methods inherited from class com.github.jknack.handlebars.context.MemberValueResolver
propertySet, resolve, resolve
-
-
-
-
Field Detail
-
INSTANCE
public static final ValueResolver INSTANCE
The default value resolver.
-
-
Method Detail
-
matches
public boolean matches(FieldValueResolver.FieldWrapper field, java.lang.String name)
Description copied from class:MemberValueResolver
True, if the member matches the one we look for.- Specified by:
matches
in classMemberValueResolver<FieldValueResolver.FieldWrapper>
- Parameters:
field
- The classMember
.name
- The attribute's name.- Returns:
- True, if the member matches the one we look for.
-
-