Package org.apache.velocity.util.introspection

# 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 Object implements VelMethod
Implementation of VelMethod

## Constructor Summary

Constructors
Constructor
Description
`VelMethodImpl(Method m)`
`VelMethodImpl(Method method, boolean wrapArray)`
`VelMethodImpl(Method method, boolean wrapArray, Converter<?>[] converters)`

## Method Summary

Modifier and Type
Method
Description
`protected Object`
`doInvoke(Object o, 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.
`Method`
`getMethod()`
returns the underlying Method
`String`
`getMethodName()`
returns the method name used
`Class<?>`
`getReturnType()`
returns the return type of the method invoked
`Object`
`invoke(Object o, 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()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### VelMethodImpl

public VelMethodImpl(Method m)

Parameters:
  `m` -

### VelMethodImpl

public VelMethodImpl(Method method, boolean wrapArray)

Parameters:
  `method` -
  `wrapArray` -
Since:
  1.6

### VelMethodImpl

public VelMethodImpl(Method method, boolean wrapArray, Converter<?>[] converters)

Parameters:
  `method` -
  `wrapArray` -
  `converters` -
Since:
  2.0

## Method Details

### invoke

public Object invoke(Object o, Object[] actual) throws IllegalAccessException, InvocationTargetException
Description copied from interface: `VelMethod`
invocation method - called when the method invocation should be performed and a value returned

Specified by:
  `invoke` in interface `VelMethod`
Parameters:
  `o` -
  `actual` -
Returns:
  invocation result
Throws:
  `IllegalAccessException`
  `InvocationTargetException`
See Also:
  - `VelMethod.invoke(java.lang.Object, java.lang.Object[])`

### 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 object
  `actual` - arguments
Returns:
  invocation result
Throws:
  `IllegalAccessException`
  `InvocationTargetException`
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: `VelMethod`
specifies if this VelMethod is cacheable and able to be reused for this class of object it was returned for

Specified by:
  `isCacheable` in interface `VelMethod`
Returns:
  true if can be reused for this class, false if not
See Also:
  - `VelMethod.isCacheable()`

### getMethodName

public String getMethodName()
Description copied from interface: `VelMethod`
returns the method name used

Specified by:
  `getMethodName` in interface `VelMethod`
Returns:
  The method name used
See Also:
  - `VelMethod.getMethodName()`

### getMethod

public Method getMethod()
Description copied from interface: `VelMethod`
returns the underlying Method

Specified by:
  `getMethod` in interface `VelMethod`
Returns:
  the method
See Also:
  - `VelMethod.getMethod()`

### getReturnType

public Class<?> getReturnType()
Description copied from interface: `VelMethod`
returns the return type of the method invoked

Specified by:
  `getReturnType` in interface `VelMethod`
Returns:
  The return type of the method invoked
See Also:
  - `VelMethod.getReturnType()`