org.jboss.aop.joinpoint
Class MethodCalledByMethodInvocationWrapper

java.lang.Object
  extended byorg.jboss.aop.joinpoint.InvocationBase
      extended byorg.jboss.aop.joinpoint.CallerInvocation
          extended byorg.jboss.aop.joinpoint.MethodCalledByMethodInvocation
              extended byorg.jboss.aop.joinpoint.MethodCalledByMethodInvocationWrapper
All Implemented Interfaces:
Invocation, Serializable

public class MethodCalledByMethodInvocationWrapper
extends MethodCalledByMethodInvocation

Comment

Version:
$Revision: 1.8 $
Author:
Bill Burke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.aop.joinpoint.MethodCalledByMethodInvocation
arguments, calledMethod, callingClass, callingMethod, callingMethodHash, callingObject
 
Fields inherited from class org.jboss.aop.joinpoint.InvocationBase
advisor, currentInterceptor, instanceResolver, interceptors, metadata, responseContextInfo, targetObject
 
Constructor Summary
MethodCalledByMethodInvocationWrapper(MethodCalledByMethodInvocation wrapped, Interceptor[] interceptors)
           
 
Method Summary
 void addResponseAttachment(Object key, Object val)
           
 Invocation copy()
          Copies complete state of Invocation object.
 Advisor getAdvisor()
           
 Object[] getArguments()
           
 Method getCalledMethod()
           
 Class getCallingClass()
           
 Method getCallingMethod()
           
 Object getCallingObject()
           
 MetaDataResolver getInstanceResolver()
           
 Object getMetaData(Object group, Object attr)
          This method resolves metadata based on the context of the invocation.
 Object getResponseAttachment(Object key)
           
 Map getResponseContextInfo()
           
 Object getTargetObject()
           
 Object invokeNext()
          Invoke on the next interceptor in the chain.
 void setArguments(Object[] arguments)
          change the arguments to the called method
 void setMetaData(SimpleMetaData data)
          Set all the contextual data attached to this invocation
 void setResponseContextInfo(Map responseContextInfo)
           
 void setTargetObject(Object targetObject)
           
 
Methods inherited from class org.jboss.aop.joinpoint.MethodCalledByMethodInvocation
getWrapper
 
Methods inherited from class org.jboss.aop.joinpoint.InvocationBase
getCurrentInterceptor, getInterceptors, getMetaData, invokeNext, resolveAnnotation, resolveAnnotation, resolveClassAnnotation, resolveClassMetaData, setAdvisor, setInstanceResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodCalledByMethodInvocationWrapper

public MethodCalledByMethodInvocationWrapper(MethodCalledByMethodInvocation wrapped,
                                             Interceptor[] interceptors)
Method Detail

getMetaData

public Object getMetaData(Object group,
                          Object attr)
Description copied from class: MethodCalledByMethodInvocation
This method resolves metadata based on the context of the invocation. It iterates through its list of MetaDataResolvers to find out the value of the metadata desired.

This list usually is ThreadMetaData, InstanceAdvisor.getMetaData ClassAdvisor.getMethodMetaData (or field, or constructor) ClassAdvisor.getDefaultMetaData

Specified by:
getMetaData in interface Invocation
Overrides:
getMetaData in class MethodCalledByMethodInvocation

invokeNext

public Object invokeNext()
                  throws Throwable
Description copied from class: MethodCalledByMethodInvocation
Invoke on the next interceptor in the chain. If this is already the end of the chain, reflection will call the constructor, field, or method you are invoking on.

Specified by:
invokeNext in interface Invocation
Overrides:
invokeNext in class MethodCalledByMethodInvocation
Throws:
Throwable

getInstanceResolver

public MetaDataResolver getInstanceResolver()
Overrides:
getInstanceResolver in class InvocationBase

copy

public Invocation copy()
Description copied from class: MethodCalledByMethodInvocation
Copies complete state of Invocation object.

Specified by:
copy in interface Invocation
Overrides:
copy in class MethodCalledByMethodInvocation
Returns:

getArguments

public Object[] getArguments()
Overrides:
getArguments in class MethodCalledByMethodInvocation
Returns:
the arguments of the called method

setArguments

public void setArguments(Object[] arguments)
Description copied from class: MethodCalledByMethodInvocation
change the arguments to the called method

Overrides:
setArguments in class MethodCalledByMethodInvocation
Parameters:
arguments -

getCallingClass

public Class getCallingClass()
Overrides:
getCallingClass in class MethodCalledByMethodInvocation
Returns:
The class that is making the call on the method

getCallingMethod

public Method getCallingMethod()
Overrides:
getCallingMethod in class MethodCalledByMethodInvocation
Returns:
The method that is making the call on the method

getResponseContextInfo

public Map getResponseContextInfo()
Specified by:
getResponseContextInfo in interface Invocation
Overrides:
getResponseContextInfo in class InvocationBase

setResponseContextInfo

public void setResponseContextInfo(Map responseContextInfo)
Specified by:
setResponseContextInfo in interface Invocation
Overrides:
setResponseContextInfo in class InvocationBase

addResponseAttachment

public void addResponseAttachment(Object key,
                                  Object val)
Specified by:
addResponseAttachment in interface Invocation
Overrides:
addResponseAttachment in class InvocationBase

getResponseAttachment

public Object getResponseAttachment(Object key)
Specified by:
getResponseAttachment in interface Invocation
Overrides:
getResponseAttachment in class InvocationBase

setMetaData

public void setMetaData(SimpleMetaData data)
Description copied from class: InvocationBase
Set all the contextual data attached to this invocation

Specified by:
setMetaData in interface Invocation
Overrides:
setMetaData in class InvocationBase

getAdvisor

public Advisor getAdvisor()
Specified by:
getAdvisor in interface Invocation
Overrides:
getAdvisor in class InvocationBase

getTargetObject

public Object getTargetObject()
Specified by:
getTargetObject in interface Invocation
Overrides:
getTargetObject in class InvocationBase

setTargetObject

public void setTargetObject(Object targetObject)
Specified by:
setTargetObject in interface Invocation
Overrides:
setTargetObject in class InvocationBase

getCalledMethod

public Method getCalledMethod()
Overrides:
getCalledMethod in class MethodCalledByMethodInvocation
Returns:
the method that is being called

getCallingObject

public Object getCallingObject()
Overrides:
getCallingObject in class MethodCalledByMethodInvocation


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.