public class MethodDescriptor extends Descriptor implements Getter, Setter
Modifier and Type | Field and Description |
---|---|
protected MapperFunction |
mapperFunction |
protected java.lang.reflect.Method |
method |
protected MethodParamDescriptor[] |
parameters |
protected java.lang.Class |
rawReturnComponentType |
protected java.lang.Class |
rawReturnKeyComponentType |
protected java.lang.Class |
rawReturnType |
protected java.lang.reflect.Type |
returnType |
classDescriptor, isPublic
Constructor and Description |
---|
MethodDescriptor(ClassDescriptor classDescriptor,
java.lang.reflect.Method method) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
getGetterRawComponentType() |
java.lang.Class |
getGetterRawKeyComponentType() |
java.lang.Class |
getGetterRawType() |
MapperFunction |
getMapperFunction()
Returns
MapperFunction if defined, or null otherwise. |
java.lang.reflect.Method |
getMethod()
Returns method.
|
java.lang.String |
getName()
Returns method name.
|
int |
getParameterCount()
Returns number of parameters.
|
MethodParamDescriptor[] |
getParameters()
Returns
method parameteres . |
java.lang.Class |
getRawReturnComponentType()
Returns raw component type of return type.
|
java.lang.Class |
getRawReturnKeyComponentType()
Returns raw component type of return type.
|
java.lang.Class |
getRawReturnType()
Returns raw return type.
|
java.lang.Class |
getSetterRawComponentType() |
java.lang.Class |
getSetterRawType() |
java.lang.Object |
invokeGetter(java.lang.Object target) |
void |
invokeSetter(java.lang.Object target,
java.lang.Object argument) |
java.lang.Class[] |
resolveRawReturnComponentTypes()
Resolves raw return component types
This value is NOT cached.
|
java.lang.String |
toString() |
getClassDescriptor, isPublic, matchDeclared
protected final java.lang.reflect.Method method
protected final java.lang.reflect.Type returnType
protected final java.lang.Class rawReturnType
protected final java.lang.Class rawReturnComponentType
protected final java.lang.Class rawReturnKeyComponentType
protected final MethodParamDescriptor[] parameters
protected final MapperFunction mapperFunction
public MethodDescriptor(ClassDescriptor classDescriptor, java.lang.reflect.Method method)
public java.lang.String getName()
getName
in class Descriptor
public java.lang.reflect.Method getMethod()
public java.lang.Class getRawReturnType()
public java.lang.Class getRawReturnComponentType()
null
if return type does not have
components.public java.lang.Class getRawReturnKeyComponentType()
null
if return type does not have
components.public java.lang.Class[] resolveRawReturnComponentTypes()
public MethodParamDescriptor[] getParameters()
method parameteres
.public int getParameterCount()
public java.lang.Object invokeGetter(java.lang.Object target) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
invokeGetter
in interface Getter
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
public java.lang.Class getGetterRawType()
getGetterRawType
in interface Getter
public java.lang.Class getGetterRawComponentType()
getGetterRawComponentType
in interface Getter
public java.lang.Class getGetterRawKeyComponentType()
getGetterRawKeyComponentType
in interface Getter
public void invokeSetter(java.lang.Object target, java.lang.Object argument) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
invokeSetter
in interface Setter
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public java.lang.Class getSetterRawType()
getSetterRawType
in interface Setter
public java.lang.Class getSetterRawComponentType()
getSetterRawComponentType
in interface Setter
public MapperFunction getMapperFunction()
MapperFunction
if defined, or null
otherwise.getMapperFunction
in interface Setter
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2003-present Jodd Team