Class UberspectImpl.VelMethodImpl
- java.lang.Object
-
- org.apache.velocity.util.introspection.UberspectImpl.VelMethodImpl
-
- All Implemented Interfaces:
VelMethod
- Enclosing class:
- UberspectImpl
public static class UberspectImpl.VelMethodImpl extends java.lang.Object implements VelMethod
Implementation of VelMethod
-
-
Constructor Summary
Constructors Modifier Constructor Description privateVelMethodImpl()VelMethodImpl(java.lang.reflect.Method m)VelMethodImpl(java.lang.reflect.Method method, boolean wrapArray)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectdoInvoke(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.StringgetMethodName()returns the method name usedjava.lang.ClassgetReturnType()returns the return type of the method invokedprivate java.lang.Object[]handleVarArg(java.lang.Class type, int index, java.lang.Object[] actual)java.lang.Objectinvoke(java.lang.Object o, java.lang.Object[] actual)invocation method - called when the method invocation should be performed and a value returnedbooleanisCacheable()specifies if this VelMethod is cacheable and able to be reused for this class of object it was returned forbooleanisVarArg()
-
-
-
Method Detail
-
invoke
public java.lang.Object invoke(java.lang.Object o, java.lang.Object[] actual) throws java.lang.ExceptionDescription copied from interface:VelMethodinvocation method - called when the method invocation should be performed and a value returned- Specified by:
invokein interfaceVelMethod- Returns:
- The resulting object.
- Throws:
java.lang.Exception- See Also:
VelMethod.invoke(java.lang.Object, java.lang.Object[])
-
doInvoke
protected java.lang.Object doInvoke(java.lang.Object o, java.lang.Object[] actual) throws java.lang.ExceptionOffers an extension point for subclasses (in alternate Uberspects) to alter the invocation after any array wrapping or varargs handling has already been completed.- Throws:
java.lang.Exception- Since:
- 1.6
-
isVarArg
public boolean isVarArg()
- Returns:
- true if this method can accept a variable number of arguments
- Since:
- 1.6
-
handleVarArg
private java.lang.Object[] handleVarArg(java.lang.Class type, int index, java.lang.Object[] actual)- Parameters:
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 method
-
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:
VelMethod.isCacheable()
-
getMethodName
public java.lang.String getMethodName()
Description copied from interface:VelMethodreturns the method name used- Specified by:
getMethodNamein interfaceVelMethod- Returns:
- The method name used
- See Also:
VelMethod.getMethodName()
-
getReturnType
public java.lang.Class 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:
VelMethod.getReturnType()
-
-