Top Description Methods
org.aspectj.lang.reflect

public Interface Advice

Known Direct Implementers
org.aspectj.internal.lang.reflect.AdviceImpl
Imports
java.lang.reflect.Type

Runtime representation of an advice declaration inside an aspect

Method Summary

Modifier and TypeMethod and Description
public AjType<T>

Returns:

the declaring aspect
getDeclaringType
()

public AjType<?>[]

Returns:

the declared thrown exceptions by the advice
getExceptionTypes
()

public Type[]

Returns:

the generic parameter types, @see java.lang.reflect.Method.getGenericParameterTypes
getGenericParameterTypes
()

public AdviceKind

Returns:

the kind of advice (before, after-returning, after-throwing, etc.)
getKind
()

public String

Returns:

the advice name, or the empty string if the advice is anonymous.
getName
()

If using the @AspectJ annotations, the advice name is the name of the annotated advice method.

public AjType<?>[]

Returns:

the advice parameters
getParameterTypes
()

public PointcutExpression

Returns:

the pointcut expression associated with the advice declaration.
getPointcutExpression
()

Method Detail

getDeclaringTypeback to summary
public AjType<T> getDeclaringType()
Returns:AjType<T>

the declaring aspect

getExceptionTypesback to summary
public AjType<?>[] getExceptionTypes()
Returns:AjType<?>[]

the declared thrown exceptions by the advice

getGenericParameterTypesback to summary
public Type[] getGenericParameterTypes()
Returns:Type[]

the generic parameter types, @see java.lang.reflect.Method.getGenericParameterTypes

getKindback to summary
public AdviceKind getKind()
Returns:AdviceKind

the kind of advice (before, after-returning, after-throwing, etc.)

getNameback to summary
public String getName()

If using the @AspectJ annotations, the advice name is the name of the annotated advice method. If using the code style, the advice is anonymous, unless the advice is annotated with the @AdviceName annotation, in which case the name given in the annotation is returned.

Returns:String

the advice name, or the empty string if the advice is anonymous.

getParameterTypesback to summary
public AjType<?>[] getParameterTypes()
Returns:AjType<?>[]

the advice parameters

getPointcutExpressionback to summary
public PointcutExpression getPointcutExpression()
Returns:PointcutExpression

the pointcut expression associated with the advice declaration.