|
|||||||||
| 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(java.lang.Object target,
java.lang.String methodName)
Constructor for an Invocation without arguments in the target's method. |
|
Invocation(java.lang.Object target,
java.lang.String methodName,
java.lang.Class parameterType)
Constructor for an Invocation with a single argument in the target's method. |
|
Invocation(java.lang.Object target,
java.lang.String methodName,
java.lang.Class[] parameterTypes)
Constructor for an Invocation with arbitrary arguments in the target's method. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
boolean |
fire()
Invoke the target's method without any arguments. |
boolean |
fire(java.lang.Object argument)
Invoke the target's method with a single argument. |
boolean |
fire(java.lang.Object[] arguments)
Invoke the target's method with an arbitrary number of arguments. |
java.lang.reflect.Method |
getMethod()
|
java.lang.Class[] |
getParameterTypes()
|
java.lang.Object |
getTarget()
|
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Invocation(java.lang.Object target,
java.lang.String methodName)
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodExceptionInvocation(Object, String, Class[])
public Invocation(java.lang.Object target,
java.lang.String methodName,
java.lang.Class parameterType)
throws java.lang.NoSuchMethodException
java.lang.NoSuchMethodExceptionInvocation(Object, String, Class[])
public Invocation(java.lang.Object target,
java.lang.String methodName,
java.lang.Class[] parameterTypes)
throws java.lang.NoSuchMethodException
target - methodName - parameterTypes -
java.lang.NoSuchMethodException - if methodName could not be found in
the target
java.lang.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(java.lang.Object argument)
argument - an object passed to the target's methodfire(Object[])public boolean fire(java.lang.Object[] arguments)
arguments - an array of objects passed to the target's method
true if invocation of the method succeeded, otherwise
false.
java.lang.IllegalArgumentException - if the passed arguments are inconsistent with the
arguments passed to this instance's constructorfire(Object[])public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public java.lang.reflect.Method getMethod()
public java.lang.Object getTarget()
public java.lang.Class[] getParameterTypes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||