public class AspectSystemImpl extends java.lang.Object implements AspectSystem
Constructor and Description |
---|
AspectSystemImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(Aspect aspect)
Adds the given aspect to the end of the global list of aspects.
|
void |
add(Pointcut pointcut,
Interceptor interceptor)
Creates the new aspect and adds it to the end of the list of aspects.
|
void |
addFirst(Aspect aspect)
Inserts the given aspect in the beginning of the list of aspects.
|
void |
addFirst(Pointcut pointcut,
Interceptor interceptor)
Creates the new aspect from the given pointcut and the interceptor
and inserts it in the beginning of the list of aspects.
|
void |
clear()
Clears the list of aspects for this AspectSystem
|
java.util.List |
findInterceptors(java.lang.reflect.Method proxyMethod,
java.lang.reflect.Method targetMethod)
Identifiesaspects whose pointcut matches the given source method or
target method.
|
java.util.List |
getAspectList()
Returns the list of aspects to the client.
|
protected void |
removeIfExists(Aspect aspect) |
public void add(Aspect aspect)
AspectSystem
add
in interface AspectSystem
aspect
- aspect to addAspectSystem.add(org.mockejb.interceptor.Aspect)
public void addFirst(Aspect aspect)
AspectSystem
addFirst
in interface AspectSystem
aspect
- aspect to addAspectSystem.addFirst(org.mockejb.interceptor.Aspect)
public void add(Pointcut pointcut, Interceptor interceptor)
AspectSystem
add
in interface AspectSystem
pointcut
- pointcut of the aspectinterceptor
- interceptor of the aspectAspectSystem.add(org.mockejb.interceptor.Pointcut, org.mockejb.interceptor.Interceptor)
public void addFirst(Pointcut pointcut, Interceptor interceptor)
AspectSystem
addFirst
in interface AspectSystem
pointcut
- pointcut of the aspectinterceptor
- interceptor of the aspectAspectSystem.addFirst(org.mockejb.interceptor.Pointcut, org.mockejb.interceptor.Interceptor)
protected void removeIfExists(Aspect aspect)
public java.util.List getAspectList()
AspectSystem
getAspectList
in interface AspectSystem
AspectSystem.getAspectList()
public void clear()
clear
in interface AspectSystem
public java.util.List findInterceptors(java.lang.reflect.Method proxyMethod, java.lang.reflect.Method targetMethod)
AspectSystem
findInterceptors
in interface AspectSystem
proxyMethod
- method invoked by the client on the proxy (interface method)targetMethod
- target method which will be called as the result of the proxy methodAspectSystem.findInterceptors(java.lang.reflect.Method, java.lang.reflect.Method)