|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.event.MethodLifecycleCallbacks
public class MethodLifecycleCallbacks
Callback adapter that invokes a callback method via reflection.
Constructor Summary | |
---|---|
MethodLifecycleCallbacks(java.lang.Class cls,
java.lang.String method,
boolean arg)
Constructor. |
|
MethodLifecycleCallbacks(java.lang.reflect.Method method,
boolean arg)
Constructor. |
Method Summary | |
---|---|
java.lang.reflect.Method |
getCallbackMethod()
The callback method. |
protected static java.lang.reflect.Method |
getMethod(java.lang.Class cls,
java.lang.String method,
java.lang.Class[] args)
Helper method to return the named method of the given class, throwing the proper exception on error. |
boolean |
hasCallback(java.lang.Object obj,
int eventType)
Return whether the given instance has a callback for the given event type. |
void |
makeCallback(java.lang.Object obj,
java.lang.Object arg,
int eventType)
Invoke the callback for the given event type on the given instance. |
boolean |
requiresArgument()
Returns if this callback expects another argument |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MethodLifecycleCallbacks(java.lang.Class cls, java.lang.String method, boolean arg)
public MethodLifecycleCallbacks(java.lang.reflect.Method method, boolean arg)
Method Detail |
---|
public java.lang.reflect.Method getCallbackMethod()
public boolean requiresArgument()
public boolean hasCallback(java.lang.Object obj, int eventType)
LifecycleCallbacks
hasCallback
in interface LifecycleCallbacks
public void makeCallback(java.lang.Object obj, java.lang.Object arg, int eventType) throws java.lang.Exception
LifecycleCallbacks
makeCallback
in interface LifecycleCallbacks
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
protected static java.lang.reflect.Method getMethod(java.lang.Class cls, java.lang.String method, java.lang.Class[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |