|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdynaop.DispatchInterceptor
Dispatches to method in interceptor with the same signature
as the intercepted method. If none exists, simply proceeds with invocation.
The dispatch methods may throw Throwable
even when the
intercepted method does not. For example:
public class SetIdInterceptor extends DispatchInterceptor { public void setId(long id) throws Throwable { proceed(); Log.log("ID changed to " + id + "."); } }
Constructor Summary | |
DispatchInterceptor()
|
Method Summary | |
boolean |
equals(java.lang.Object o)
|
protected Invocation |
getInvocation()
Gets the invocation object. |
int |
hashCode()
|
java.lang.Object |
intercept(Invocation invocation)
Intercepts a method invocation. |
static MethodPointcut |
methodPointcut(java.lang.Class interceptorClass)
Creates a method pointcut for the given DispatchInterceptor
class. |
protected java.lang.Object |
proceed()
Proceeds with invocation. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DispatchInterceptor()
Method Detail |
protected Invocation getInvocation()
protected java.lang.Object proceed() throws java.lang.Throwable
java.lang.Throwable
public final java.lang.Object intercept(Invocation invocation) throws java.lang.Throwable
Interceptor
intercept
in interface Interceptor
java.lang.Throwable
public int hashCode()
public java.lang.String toString()
public boolean equals(java.lang.Object o)
public static MethodPointcut methodPointcut(java.lang.Class interceptorClass)
DispatchInterceptor
class. The pointcut picks methods implemented by the interceptor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |