org.jboss.aop.joinpoint
Class ConstructorCalledByMethodInvocation

java.lang.Object
  extended byorg.jboss.aop.joinpoint.InvocationBase
      extended byorg.jboss.aop.joinpoint.CallerInvocation
          extended byorg.jboss.aop.joinpoint.ConstructorCalledByMethodInvocation
All Implemented Interfaces:
Invocation, Serializable
Direct Known Subclasses:
ConstructorCalledByMethodInvocationWrapper

public class ConstructorCalledByMethodInvocation
extends CallerInvocation

This is a helper wrapper class for an Invocation object. It is used to add or get values or metadata that pertains to an AOP method invocation.

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

Field Summary
protected  Object[] arguments
           
protected  Class callingClass
           
protected  Method callingMethod
           
protected  long callingMethodHash
           
protected  Object callingObject
           
protected  CallerConstructorInfo info
           
 
Fields inherited from class org.jboss.aop.joinpoint.InvocationBase
advisor, currentInterceptor, instanceResolver, interceptors, metadata, responseContextInfo, targetObject
 
Constructor Summary
protected ConstructorCalledByMethodInvocation(Interceptor[] interceptors)
           
  ConstructorCalledByMethodInvocation(Interceptor[] interceptors, CallerConstructorInfo info, long callingHash, Class callingClass, Object[] args, Object callingObject)
           
 
Method Summary
 Invocation copy()
          Copies complete state of Invocation object.
 Object[] getArguments()
           
 Constructor getCalledConstructor()
           
 Class getCallingClass()
           
 Method getCallingMethod()
           
 Object getCallingObject()
           
 Object getMetaData(Object group, Object attr)
          This method resolves metadata based on the context of the invocation.
 Invocation getWrapper(Interceptor[] newchain)
          Get a wrapper invocation object that can insert a new chain of interceptors at runtime to the invocation flow.
 Method getWrappingMethod()
          Is the called constructor aspectized? If so then this method returns the method that wraps the constructor.
 Object invokeNext()
          Invoke on the next interceptor in the chain.
 boolean isWrapped()
          Is the called constructor aspectized? If so then there is a wrapping method that must be called.
 void setArguments(Object[] arguments)
          change the arguments to the called constructor
 
Methods inherited from class org.jboss.aop.joinpoint.InvocationBase
addResponseAttachment, getAdvisor, getCurrentInterceptor, getInstanceResolver, getInterceptors, getMetaData, getResponseAttachment, getResponseContextInfo, getTargetObject, invokeNext, resolveAnnotation, resolveAnnotation, resolveClassAnnotation, resolveClassMetaData, setAdvisor, setInstanceResolver, setMetaData, setResponseContextInfo, setTargetObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

arguments

protected Object[] arguments

callingMethodHash

protected long callingMethodHash

info

protected CallerConstructorInfo info

callingClass

protected Class callingClass

callingMethod

protected Method callingMethod

callingObject

protected Object callingObject
Constructor Detail

ConstructorCalledByMethodInvocation

public ConstructorCalledByMethodInvocation(Interceptor[] interceptors,
                                           CallerConstructorInfo info,
                                           long callingHash,
                                           Class callingClass,
                                           Object[] args,
                                           Object callingObject)

ConstructorCalledByMethodInvocation

protected ConstructorCalledByMethodInvocation(Interceptor[] interceptors)
Method Detail

getArguments

public Object[] getArguments()
Returns:
the arguments of the called constructor

setArguments

public void setArguments(Object[] arguments)
change the arguments to the called constructor

Parameters:
arguments -

getCallingClass

public Class getCallingClass()
Returns:
The class that is making the call on the constructor

getCallingMethod

public Method getCallingMethod()
Returns:
The method that is making the call on the constructor

getCalledConstructor

public Constructor getCalledConstructor()
Returns:
the constructor call being executed by the calling method

isWrapped

public boolean isWrapped()
Is the called constructor aspectized? If so then there is a wrapping method that must be called.

Returns:

getWrappingMethod

public Method getWrappingMethod()
Is the called constructor aspectized? If so then this method returns the method that wraps the constructor.

Returns:

invokeNext

public Object invokeNext()
                  throws Throwable
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 InvocationBase
Throws:
Throwable

getMetaData

public Object getMetaData(Object group,
                          Object attr)
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 InvocationBase

getWrapper

public Invocation getWrapper(Interceptor[] newchain)
Get a wrapper invocation object that can insert a new chain of interceptors at runtime to the invocation flow. CFlow makes use of this. When the wrapper object finishes its invocation chain it delegates back to the wrapped invocation.

Parameters:
newchain -
Returns:

copy

public Invocation copy()
Copies complete state of Invocation object.

Returns:

getCallingObject

public Object getCallingObject()


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