public class MethodValueResolver extends MemberValueResolver<Method>
MemberValueResolver
with lookup and invocation
support for Method
.
It matches a public method.Modifier and Type | Field and Description |
---|---|
static ValueResolver |
INSTANCE
The default instance.
|
UNRESOLVED, VALUE_RESOLVERS
Constructor and Description |
---|
MethodValueResolver() |
Modifier and Type | Method and Description |
---|---|
protected Object |
invokeMember(Method member,
Object context)
Invoke the member in the given context.
|
boolean |
matches(Method method,
String name)
True, if the member matches the one we look for.
|
protected String |
memberName(Method member)
Get the name for the given member.
|
protected Set<Method> |
members(Class<?> clazz)
List all the possible members for the given class.
|
protected void |
members(Class<?> clazz,
Set<Method> members)
Collect all the method from the given class.
|
isPrivate, isProtected, isPublic, isStatic, propertySet, resolve, resolve
public static final ValueResolver INSTANCE
public boolean matches(Method method, String name)
MemberValueResolver
matches
in class MemberValueResolver<Method>
method
- The class Member
.name
- The attribute's name.protected Object invokeMember(Method member, Object context)
MemberValueResolver
invokeMember
in class MemberValueResolver<Method>
member
- The class member.context
- The context object.protected Set<Method> members(Class<?> clazz)
MemberValueResolver
members
in class MemberValueResolver<Method>
clazz
- The base class.protected void members(Class<?> clazz, Set<Method> members)
clazz
- The base class.members
- The members result set.protected String memberName(Method member)
MemberValueResolver
memberName
in class MemberValueResolver<Method>
member
- A class member.Copyright © 2021. All rights reserved.