Class UberspectImpl.VelMethodImpl
java.lang.Object
org.apache.velocity.util.introspection.UberspectImpl.VelMethodImpl
- All Implemented Interfaces:
VelMethod
- Enclosing class:
UberspectImpl
Implementation of VelMethod
-
Constructor Summary
ConstructorsConstructorDescriptionVelMethodImpl(Method method, boolean wrapArray) VelMethodImpl(Method method, boolean wrapArray, Converter<?>[] converters) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectOffers an extension point for subclasses (in alternate Uberspects) to alter the invocation after any array wrapping or varargs handling has already been completed.returns the underlying Methodreturns the method name usedClass<?> returns the return type of the method invokedinvocation method - called when the method invocation should be performed and a value returnedbooleanspecifies if this VelMethod is cacheable and able to be reused for this class of object it was returned forbooleanisVarArg()
-
Constructor Details
-
VelMethodImpl
- Parameters:
m-
-
VelMethodImpl
- Parameters:
method-wrapArray-- Since:
- 1.6
-
VelMethodImpl
- Parameters:
method-wrapArray-converters-- Since:
- 2.0
-
-
Method Details
-
invoke
public Object invoke(Object o, Object[] actual) throws IllegalAccessException, InvocationTargetException Description copied from interface:VelMethodinvocation method - called when the method invocation should be performed and a value returned- Specified by:
invokein interfaceVelMethod- Parameters:
o-actual-- Returns:
- invocation result
- Throws:
IllegalAccessExceptionInvocationTargetException- See Also:
-
doInvoke
protected Object doInvoke(Object o, Object[] actual) throws IllegalAccessException, InvocationTargetException Offers an extension point for subclasses (in alternate Uberspects) to alter the invocation after any array wrapping or varargs handling has already been completed.- Parameters:
o- target objectactual- arguments- Returns:
- invocation result
- Throws:
IllegalAccessExceptionInvocationTargetException- Since:
- 1.6
-
isVarArg
public boolean isVarArg()- Returns:
- true if this method can accept a variable number of arguments
- Since:
- 1.6
-
isCacheable
public boolean isCacheable()Description copied from interface:VelMethodspecifies if this VelMethod is cacheable and able to be reused for this class of object it was returned for- Specified by:
isCacheablein interfaceVelMethod- Returns:
- true if can be reused for this class, false if not
- See Also:
-
getMethodName
Description copied from interface:VelMethodreturns the method name used- Specified by:
getMethodNamein interfaceVelMethod- Returns:
- The method name used
- See Also:
-
getMethod
Description copied from interface:VelMethodreturns the underlying Method -
getReturnType
Description copied from interface:VelMethodreturns the return type of the method invoked- Specified by:
getReturnTypein interfaceVelMethod- Returns:
- The return type of the method invoked
- See Also:
-