org.codehaus.aspectwerkz.aspect
Class AdviceInfo

java.lang.Object
  extended by org.codehaus.aspectwerkz.aspect.AdviceInfo
All Implemented Interfaces:
Serializable

public class AdviceInfo
extends Object
implements Serializable

Contains advice info, like indexes describing the aspect and a method (advice or introduced), aspect manager etc.

Author:
Jonas BonŽr , Alexandre Vasseur
See Also:
Serialized Form

Field Summary
static int CUSTOM_JOIN_POINT_ARG
           
static AdviceInfo[] EMPTY_ADVICE_INFO_ARRAY
           
static int JOINPOINT_ARG
           
static int SPECIAL_ARGUMENT
           
static int STATIC_JOINPOINT_ARG
           
static int TARGET_ARG
           
static int THIS_ARG
           
static int VALID_NON_AW_AROUND_CLOSURE_TYPE
           
 
Constructor Summary
AdviceInfo(String aspectQualifiedName, String aspectClassName, DeploymentModel aspectDeploymentModel, String methodName, String methodSignature, org.objectweb.asm.Type[] methodParameterTypes, AdviceType type, String specialArgumentType, String adviceName, boolean targetWithRuntimeCheck, ExpressionInfo expressionInfo, ExpressionContext expressionContext, AdviceDefinition adviceDef)
          TODO refactor - many member fields holds data that is in either the adviceDef (which is in the class) or the aspectDef (which is accessible from the adviceDef)

Creates a new advice info.

 
Method Summary
 AdviceDefinition getAdviceDefinition()
          Returns the advice definition.
 String getAspectClassName()
          Returns the aspect FQN className.
 DeploymentModel getAspectDeploymentModel()
          Returns the aspect deployment model
 String getAspectQualifiedName()
          Returns the aspect qualified name.
 ExpressionContext getExpressionContext()
          Returns the expression context.
 ExpressionInfo getExpressionInfo()
          Returns the expression info.
 String getMethodName()
          Return the method name.
 org.objectweb.asm.Type[] getMethodParameterTypes()
          Return the method name.
 String getMethodSignature()
          Return the method signature.
 int[] getMethodToArgIndexes()
          Returns the advice method to target method arg index mapping.
 String getName()
          Returns the name of the advice.
 String getSpecialArgumentTypeDesc()
          Returns the special argument type desc.
 String getSpecialArgumentTypeName()
          Returns the special argument type name.
 AdviceType getType()
          Returns the advice type.
 boolean hasTargetWithRuntimeCheck()
          Checks if the target has a runtime check.
 void setMethodToArgIndexes(int[] map)
          Sets the advice method to target method arg mapping A value of -1 means "not mapped"
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_ADVICE_INFO_ARRAY

public static final AdviceInfo[] EMPTY_ADVICE_INFO_ARRAY

JOINPOINT_ARG

public static final int JOINPOINT_ARG
See Also:
Constant Field Values

STATIC_JOINPOINT_ARG

public static final int STATIC_JOINPOINT_ARG
See Also:
Constant Field Values

TARGET_ARG

public static final int TARGET_ARG
See Also:
Constant Field Values

THIS_ARG

public static final int THIS_ARG
See Also:
Constant Field Values

VALID_NON_AW_AROUND_CLOSURE_TYPE

public static final int VALID_NON_AW_AROUND_CLOSURE_TYPE
See Also:
Constant Field Values

SPECIAL_ARGUMENT

public static final int SPECIAL_ARGUMENT
See Also:
Constant Field Values

CUSTOM_JOIN_POINT_ARG

public static final int CUSTOM_JOIN_POINT_ARG
See Also:
Constant Field Values
Constructor Detail

AdviceInfo

public AdviceInfo(String aspectQualifiedName,
                  String aspectClassName,
                  DeploymentModel aspectDeploymentModel,
                  String methodName,
                  String methodSignature,
                  org.objectweb.asm.Type[] methodParameterTypes,
                  AdviceType type,
                  String specialArgumentType,
                  String adviceName,
                  boolean targetWithRuntimeCheck,
                  ExpressionInfo expressionInfo,
                  ExpressionContext expressionContext,
                  AdviceDefinition adviceDef)
TODO refactor - many member fields holds data that is in either the adviceDef (which is in the class) or the aspectDef (which is accessible from the adviceDef)

Creates a new advice info.

Parameters:
aspectQualifiedName -
aspectClassName -
aspectDeploymentModel -
methodName -
methodSignature -
methodParameterTypes -
type - the advice type
specialArgumentType - the special arg type
adviceName - full qualified advice method name (aspectFQN/advice(call sig))
targetWithRuntimeCheck - true if a runtime check is needed based on target instance
expressionInfo -
expressionContext -
adviceDef -
Method Detail

getMethodName

public String getMethodName()
Return the method name.

Returns:
the method name

getMethodSignature

public String getMethodSignature()
Return the method signature.

Returns:
the method signature

getMethodParameterTypes

public org.objectweb.asm.Type[] getMethodParameterTypes()
Return the method name.

Returns:
the method name

getAspectQualifiedName

public String getAspectQualifiedName()
Returns the aspect qualified name.

Returns:
the aspect qualified name

getAspectClassName

public String getAspectClassName()
Returns the aspect FQN className.

Returns:
the aspect class name

getAspectDeploymentModel

public DeploymentModel getAspectDeploymentModel()
Returns the aspect deployment model

Returns:

getName

public String getName()
Returns the name of the advice.

Returns:

setMethodToArgIndexes

public void setMethodToArgIndexes(int[] map)
Sets the advice method to target method arg mapping A value of -1 means "not mapped"

Parameters:
map -

getMethodToArgIndexes

public int[] getMethodToArgIndexes()
Returns the advice method to target method arg index mapping.

Returns:
the indexes

getSpecialArgumentTypeDesc

public String getSpecialArgumentTypeDesc()
Returns the special argument type desc.

Returns:

getSpecialArgumentTypeName

public String getSpecialArgumentTypeName()
Returns the special argument type name.

Returns:

getType

public AdviceType getType()
Returns the advice type.

Returns:

hasTargetWithRuntimeCheck

public boolean hasTargetWithRuntimeCheck()
Checks if the target has a runtime check.

Returns:

getExpressionInfo

public ExpressionInfo getExpressionInfo()
Returns the expression info.

Returns:

getExpressionContext

public ExpressionContext getExpressionContext()
Returns the expression context.

Returns:

getAdviceDefinition

public AdviceDefinition getAdviceDefinition()
Returns the advice definition.

Returns:

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2005 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.