org.springsource.loaded.ri
Class Invoker

java.lang.Object
  extended by org.springsource.loaded.ri.Invoker
Direct Known Subclasses:
JavaMethodInvoker, OriginalClassInvoker, ReloadedTypeInvoker

public abstract class Invoker
extends java.lang.Object

An invoker represents the result of a method lookup operation in the type hierarchy.

It encapsulates a reference to a resolved method implementation in a reloadable or non-reloadable type and provides an 'invoke' method suitable for invoking that method implementation, and a 'createJavaMethod' to create a Java Method instance that can be used to represent the method in the Java reflection API.

Since:
0.5.0

Constructor Summary
Invoker()
           
 
Method Summary
protected abstract  java.lang.reflect.Method createJavaMethod()
           
abstract  java.lang.String getClassName()
           
 java.lang.reflect.Method getJavaMethod()
           
abstract  java.lang.String getMethodDescriptor()
           
abstract  int getModifiers()
           
abstract  java.lang.String getName()
           
 java.lang.String getParamsDescriptor()
           
 java.lang.Class<?> getReturnType()
           
abstract  java.lang.Object invoke(java.lang.Object target, java.lang.Object... params)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Invoker

public Invoker()
Method Detail

invoke

public abstract java.lang.Object invoke(java.lang.Object target,
                                        java.lang.Object... params)
                                 throws java.lang.IllegalArgumentException,
                                        java.lang.IllegalAccessException,
                                        java.lang.reflect.InvocationTargetException
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

getModifiers

public abstract int getModifiers()

getName

public abstract java.lang.String getName()

getMethodDescriptor

public abstract java.lang.String getMethodDescriptor()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getClassName

public abstract java.lang.String getClassName()

createJavaMethod

protected abstract java.lang.reflect.Method createJavaMethod()

getParamsDescriptor

public java.lang.String getParamsDescriptor()

getReturnType

public java.lang.Class<?> getReturnType()

getJavaMethod

public final java.lang.reflect.Method getJavaMethod()