org.ijsberg.iglu.util.reflection
Class MethodInvocation

java.lang.Object
  extended by org.ijsberg.iglu.util.reflection.MethodInvocation

public class MethodInvocation
extends Object

Handles invocation of a method with a particular set of arguments.


Constructor Summary
MethodInvocation(InvocationHandler invocationHandler, Object impl, String methodName, Method[] methodSubset, Object... arguments)
           
MethodInvocation(Object impl, String methodName, Object... arguments)
          Arguments do not have to match exactly; they will be converted if possible.
 
Method Summary
 Object invoke()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInvocation

public MethodInvocation(InvocationHandler invocationHandler,
                        Object impl,
                        String methodName,
                        Method[] methodSubset,
                        Object... arguments)

MethodInvocation

public MethodInvocation(Object impl,
                        String methodName,
                        Object... arguments)
Arguments do not have to match exactly; they will be converted if possible.

Parameters:
impl - the object on which the method is invoked
methodName - name of method to be invoked
arguments - zero or more arguments
Method Detail

invoke

public Object invoke()
              throws InvocationTargetException,
                     NoSuchMethodException
Returns:
whatever the method returns
Throws:
InvocationTargetException - if the invoked method throws
NoSuchMethodException - if no suitable method is found


Copyright © 2011. All Rights Reserved.