Interface MethodHandle

All Known Implementing Classes:

public interface MethodHandle

Similiar to Method, this allows a method of a Plastic class to be invoked regardless of visibility. Plastic ensures that reflection is not necessary.

Method Summary
 MethodInvocationResult invoke(Object instance, Object... arguments)
          Invokes the method for this handle on the instance.

Method Detail


MethodInvocationResult invoke(Object instance,
                              Object... arguments)
Invokes the method for this handle on the instance.

instance - the instance containing the method to invoke
arguments - the arguments, if any, to pass to the method. Wrapper types will be unwrapped as necessary to perform the invocation.
result object encapsulating the actual return value or the checked exception thrown by the method
ClassCastException - if instance is not the correct type for this method.
RuntimeException - if the actual method throws a runtime exception

Copyright © 2003-2012 The Apache Software Foundation.