public class

AspectMetadata

extends Object
java.lang.Object
   ↳ org.springframework.aop.aspectj.annotation.AspectMetadata

Class Overview

Metadata for an AspectJ aspect class, with an additional Spring AOP pointcut for the per clause.

Uses AspectJ 5 AJType reflection API, so is only supported on Java 5. Enables us to work with different AspectJ instantiation models such as "singleton", "pertarget" and "perthis".

Summary

Public Constructors
AspectMetadata(Class<?> aspectClass, String aspectName)
Create a new AspectMetadata instance for the given aspect class.
Public Methods
AjType getAjType()
Return AspectJ reflection information.
Class getAspectClass()
Return the aspect class.
String getAspectName()
Return the aspect class.
Pointcut getPerClausePointcut()
Return a Spring pointcut expression for a singleton aspect.
boolean isLazilyInstantiated()
Return whether the aspect needs to be lazily instantiated.
boolean isPerThisOrPerTarget()
Return whether the aspect is defined as "perthis" or "pertarget".
boolean isPerTypeWithin()
Return whether the aspect is defined as "pertypewithin".
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AspectMetadata (Class<?> aspectClass, String aspectName)

Create a new AspectMetadata instance for the given aspect class.

Parameters
aspectClass the aspect class
aspectName the name of the aspect

Public Methods

public AjType getAjType ()

Return AspectJ reflection information.

public Class getAspectClass ()

Return the aspect class.

public String getAspectName ()

Return the aspect class.

public Pointcut getPerClausePointcut ()

Return a Spring pointcut expression for a singleton aspect. (e.g. Pointcut.TRUE if it's a singleton).

public boolean isLazilyInstantiated ()

Return whether the aspect needs to be lazily instantiated.

public boolean isPerThisOrPerTarget ()

Return whether the aspect is defined as "perthis" or "pertarget".

public boolean isPerTypeWithin ()

Return whether the aspect is defined as "pertypewithin".