com.interface21.aop.framework
Class MethodInvocationImpl
java.lang.Object
|
+--com.interface21.aop.framework.MethodInvocationImpl
- All Implemented Interfaces:
- org.aopalliance.Invocation, org.aopalliance.MethodInvocation
- public class MethodInvocationImpl
- extends java.lang.Object
- implements org.aopalliance.MethodInvocation
Spring implementation of AOP Alliance MethodInvocation interface
- Version:
- $Id: MethodInvocationImpl.java,v 1.4 2003/06/18 19:10:39 johnsonr Exp $
- Author:
- Rod Johnson
|
Field Summary |
java.util.List |
interceptors
Interceptors invoked in this list |
|
Constructor Summary |
MethodInvocationImpl(java.lang.Object proxy,
java.lang.Object target,
java.lang.Class targetInterface,
java.lang.reflect.Method m,
java.lang.Object[] arguments,
java.util.List pointcuts,
org.aopalliance.AttributeRegistry attributeRegistry)
Method Invocation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
interceptors
public final java.util.List interceptors
- Interceptors invoked in this list
MethodInvocationImpl
public MethodInvocationImpl(java.lang.Object proxy,
java.lang.Object target,
java.lang.Class targetInterface,
java.lang.reflect.Method m,
java.lang.Object[] arguments,
java.util.List pointcuts,
org.aopalliance.AttributeRegistry attributeRegistry)
- Method Invocation.
- Parameters:
proxy - target - may be nullm - arguments - pointcuts - list of MethodPointCutattList - TODO take interceptor chain as well?
getMethod
public java.lang.reflect.Method getMethod()
- Return the method invoked on the proxied interface.
May or may not correspond with a method invoked on an underlying
implementation of that interface.
- Specified by:
getMethod in interface org.aopalliance.MethodInvocation
- Returns:
- Method
getProxy
public java.lang.Object getProxy()
- Return the proxy that this interception was made through
- Specified by:
getProxy in interface org.aopalliance.Invocation
- Returns:
- Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
setResource
public java.lang.Object setResource(java.lang.String key,
java.lang.Object resource)
- Specified by:
setResource in interface org.aopalliance.Invocation
getResource
public java.lang.Object getResource(java.lang.String key)
- Specified by:
getResource in interface org.aopalliance.Invocation
- Returns:
- the resource or null
getArguments
public java.lang.Object[] getArguments()
- Private optimization method
- Returns:
- Object[]
getArgument
public java.lang.Object getArgument(int i)
- Specified by:
getArgument in interface org.aopalliance.MethodInvocation
- See Also:
MethodInvocation.getArgument(int)
getArgumentCount
public int getArgumentCount()
- Specified by:
getArgumentCount in interface org.aopalliance.MethodInvocation
- See Also:
MethodInvocation.getArgumentCount()
getCurrentInterceptorIndex
public int getCurrentInterceptorIndex()
- Specified by:
getCurrentInterceptorIndex in interface org.aopalliance.MethodInvocation
- See Also:
MethodInvocation.getCurrentInterceptorIndex()
getInterceptor
public org.aopalliance.Interceptor getInterceptor(int index)
- Specified by:
getInterceptor in interface org.aopalliance.MethodInvocation
- See Also:
MethodInvocation.getInterceptor(int)
getInterceptorCount
public int getInterceptorCount()
- Specified by:
getInterceptorCount in interface org.aopalliance.MethodInvocation
- See Also:
org.aopalliance.MethodInvocation#getNumberOfInterceptors()
getTargetInterface
public java.lang.Class getTargetInterface()
- See Also:
org.aopalliance.MethodInvocation#getTargetInterface()
invokeNext
public java.lang.Object invokeNext()
throws java.lang.Throwable
- Specified by:
invokeNext in interface org.aopalliance.MethodInvocation
- See Also:
Invocation.invokeNext()
detach
public org.aopalliance.Invocation detach()
- See Also:
org.aopalliance.Invocation#detach()
getAttributeRegistry
public org.aopalliance.AttributeRegistry getAttributeRegistry()
- Specified by:
getAttributeRegistry in interface org.aopalliance.Invocation
- See Also:
Invocation.getAttributeRegistry()
setTarget
public void setTarget(java.lang.Object object)
- Parameters:
object -
setArgument
public void setArgument(int index,
java.lang.Object argument)
- Specified by:
setArgument in interface org.aopalliance.MethodInvocation
- See Also:
MethodInvocation.setArgument(int, java.lang.Object)
getInvokedObject
public java.lang.Object getInvokedObject()
- Specified by:
getInvokedObject in interface org.aopalliance.Invocation
- See Also:
Invocation.getInvokedObject()
cloneInstance
public org.aopalliance.Invocation cloneInstance()
- Specified by:
cloneInstance in interface org.aopalliance.Invocation
- See Also:
Invocation.cloneInstance()
Rod Johnson and Spring contributors 2001-2003.