| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cayenne.util.Invocation
public class Invocation
Invocation represents a dynamic method invocation bound to a specific target. The target is kept with a WeakReference and can therefore be reclaimed by the Garbage Collector.
| Constructor Summary | |
|---|---|
| Invocation(Object target,
           String methodName)Constructor for an Invocation without arguments in the target's method. | |
| Invocation(Object target,
           String methodName,
           Class parameterType)Constructor for an Invocation with a single argument in the target's method. | |
| Invocation(Object target,
           String methodName,
           Class[] parameterTypes)Constructor for an Invocation with arbitrary arguments in the target's method. | |
| Method Summary | |
|---|---|
|  boolean | equals(Object obj) | 
|  boolean | fire()Invoke the target's method without any arguments. | 
|  boolean | fire(Object argument)Invoke the target's method with a single argument. | 
|  boolean | fire(Object[] arguments)Invoke the target's method with an arbitrary number of arguments. | 
|  Method | getMethod() | 
|  Class[] | getParameterTypes() | 
|  Object | getTarget() | 
|  int | hashCode() | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Invocation(Object target,
                  String methodName)
           throws NoSuchMethodException
NoSuchMethodExceptionInvocation(Object, String, Class[])
public Invocation(Object target,
                  String methodName,
                  Class parameterType)
           throws NoSuchMethodException
NoSuchMethodExceptionInvocation(Object, String, Class[])
public Invocation(Object target,
                  String methodName,
                  Class[] parameterTypes)
           throws NoSuchMethodException
target - methodName - parameterTypes - 
NoSuchMethodException - if methodName could not be found in
             the target
IllegalArgumentException - if target or methodName are null,
             or parameterTypes is empty or contains null elements| Method Detail | 
|---|
public boolean fire()
fire(Object[])public boolean fire(Object argument)
argument - an object passed to the target's methodfire(Object[])public boolean fire(Object[] arguments)
arguments - an array of objects passed to the target's method
true if invocation of the method succeeded, otherwise
         false.
IllegalArgumentException - if the passed arguments are inconsistent with the
             arguments passed to this instance's constructorfire(Object[])public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public Method getMethod()
public Object getTarget()
public Class[] getParameterTypes()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||