public static class UberspectImpl.VelMethodImpl extends java.lang.Object implements VelMethod
Modifier and Type | Field and Description |
---|---|
(package private) Converter<?>[] |
converters |
(package private) java.lang.Boolean |
isVarArg |
(package private) java.lang.reflect.Method |
method |
(package private) boolean |
wrapArray |
Modifier | Constructor and Description |
---|---|
private |
VelMethodImpl() |
|
VelMethodImpl(java.lang.reflect.Method m) |
|
VelMethodImpl(java.lang.reflect.Method method,
boolean wrapArray) |
|
VelMethodImpl(java.lang.reflect.Method method,
boolean wrapArray,
Converter<?>[] converters) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
doInvoke(java.lang.Object o,
java.lang.Object[] actual)
Offers an extension point for subclasses (in alternate Uberspects)
to alter the invocation after any array wrapping or varargs handling
has already been completed.
|
java.lang.reflect.Method |
getMethod()
returns the underlying Method
|
java.lang.String |
getMethodName()
returns the method name used
|
java.lang.Class<?> |
getReturnType()
returns the return type of the method invoked
|
private java.lang.Object[] |
handleVarArg(java.lang.Class<?> type,
int index,
java.lang.Object[] actual) |
java.lang.Object |
invoke(java.lang.Object o,
java.lang.Object[] actual)
invocation method - called when the method invocation should be
performed and a value returned
|
boolean |
isCacheable()
specifies if this VelMethod is cacheable and able to be
reused for this class of object it was returned for
|
boolean |
isVarArg() |
final java.lang.reflect.Method method
java.lang.Boolean isVarArg
boolean wrapArray
Converter<?>[] converters
public VelMethodImpl(java.lang.reflect.Method m)
m
- public VelMethodImpl(java.lang.reflect.Method method, boolean wrapArray)
method
- wrapArray
- public VelMethodImpl(java.lang.reflect.Method method, boolean wrapArray, Converter<?>[] converters)
method
- wrapArray
- converters
- private VelMethodImpl()
public java.lang.Object invoke(java.lang.Object o, java.lang.Object[] actual) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
VelMethod
invoke
in interface VelMethod
o
- actual
- java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
VelMethod.invoke(java.lang.Object, java.lang.Object[])
protected java.lang.Object doInvoke(java.lang.Object o, java.lang.Object[] actual) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
o
- target objectactual
- argumentsjava.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public boolean isVarArg()
private java.lang.Object[] handleVarArg(java.lang.Class<?> type, int index, java.lang.Object[] actual)
type
- The vararg class type (aka component type
of the expected array arg)index
- The index of the vararg in the method declaration
(This will always be one less than the number of
expected arguments.)actual
- The actual parameters being passed to this methodpublic boolean isCacheable()
VelMethod
isCacheable
in interface VelMethod
VelMethod.isCacheable()
public java.lang.String getMethodName()
VelMethod
getMethodName
in interface VelMethod
VelMethod.getMethodName()
public java.lang.reflect.Method getMethod()
VelMethod
getMethod
in interface VelMethod
VelMethod.getMethod()
public java.lang.Class<?> getReturnType()
VelMethod
getReturnType
in interface VelMethod
VelMethod.getReturnType()