Interface Advice

All Known Implementing Classes:
AdviceImpl

public interface Advice
Runtime representation of an advice declaration inside an aspect
  • Method Details

    • getDeclaringType

      AjType getDeclaringType()
      Returns:
      the declaring aspect
    • getKind

      AdviceKind getKind()
      Returns:
      the kind of advice (before, after-returning, after-throwing, etc.)
    • getName

      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:
      the advice name, or the empty string if the advice is anonymous.
    • getParameterTypes

      AjType<?>[] getParameterTypes()
      Returns:
      the advice parameters
    • getGenericParameterTypes

      Type[] getGenericParameterTypes()
      Returns:
      the generic parameter types, @see java.lang.reflect.Method.getGenericParameterTypes
    • getExceptionTypes

      AjType<?>[] getExceptionTypes()
      Returns:
      the declared thrown exceptions by the advice
    • getPointcutExpression

      PointcutExpression getPointcutExpression()
      Returns:
      the pointcut expression associated with the advice declaration.