org.aspectj.internal.lang.reflect

## Class AdviceImpl

- java.lang.Object
- - org.aspectj.internal.lang.reflect.AdviceImpl

All Implemented Interfaces:
  Advice

    public class AdviceImpl
    extends Object
    implements Advice

Author:
  colyer

### Constructor Summary

Constructors
`protected` `AdviceImpl(Method method, String pointcut, AdviceKind type)`
`protected` `AdviceImpl(Method method, String pointcut, AdviceKind type, String extraParamName)`

### Method Summary

All Methods Instance Methods Concrete Methods
`AjType` `getDeclaringType()`
`AjType<?>[]` `getExceptionTypes()`
`Type[]` `getGenericParameterTypes()`
`AdviceKind` `getKind()`
`String` `getName()` If using the @AspectJ annotations, the advice name is the name of the annotated advice method.
`AjType<?>[]` `getParameterTypes()`
`PointcutExpression` `getPointcutExpression()`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### AdviceImpl

    protected AdviceImpl(Method method,
                         String pointcut,
                         AdviceKind type)

#### AdviceImpl

    protected AdviceImpl(Method method,
                         String pointcut,
                         AdviceKind type,
                         String extraParamName)

### Method Detail

#### getDeclaringType

    public AjType getDeclaringType()

Specified by:
  `getDeclaringType` in interface `Advice`
Returns:
  the declaring aspect

#### getGenericParameterTypes

    public Type[] getGenericParameterTypes()

Specified by:
  `getGenericParameterTypes` in interface `Advice`
Returns:
  the generic parameter types, @see java.lang.reflect.Method.getGenericParameterTypes

#### getParameterTypes

    public AjType<?>[] getParameterTypes()

Specified by:
  `getParameterTypes` in interface `Advice`
Returns:
  the advice parameters

#### getExceptionTypes

    public AjType<?>[] getExceptionTypes()

Specified by:
  `getExceptionTypes` in interface `Advice`
Returns:
  the declared thrown exceptions by the advice

#### getKind

    public AdviceKind getKind()

Specified by:
  `getKind` in interface `Advice`
Returns:
  the kind of advice (before, after-returning, after-throwing, etc.)

#### getName

    public String getName()

Description copied from interface: `Advice`
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.

Specified by:
  `getName` in interface `Advice`
Returns:
  the advice name, or the empty string if the advice is anonymous.

#### getPointcutExpression

    public PointcutExpression getPointcutExpression()

Specified by:
  `getPointcutExpression` in interface `Advice`
Returns:
  the pointcut expression associated with the advice declaration.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`