spring-framework / org.springframework.aop.aspectj.annotation / AspectMetadata

AspectMetadata

open class AspectMetadata : Serializable

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

Uses AspectJ 5 AJType reflection API, enabling us to work with different AspectJ instantiation models such as "singleton", "pertarget" and "perthis".

Author
Rod Johnson

Author
Juergen Hoeller

Since
2.0

See Also
org.springframework.aop.aspectj.AspectJExpressionPointcut

Constructors

<init>

AspectMetadata(aspectClass: Class<*>, aspectName: String)

Create a new AspectMetadata instance for the given aspect class.

Functions

getAjType

open fun getAjType(): AjType<*>

Return AspectJ reflection information.

getAspectClass

open fun getAspectClass(): Class<*>

Return the aspect class.

getAspectName

open fun getAspectName(): String

Return the aspect class.

getPerClausePointcut

open fun getPerClausePointcut(): Pointcut

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

isLazilyInstantiated

open fun isLazilyInstantiated(): Boolean

Return whether the aspect needs to be lazily instantiated.

isPerThisOrPerTarget

open fun isPerThisOrPerTarget(): Boolean

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

isPerTypeWithin

open fun isPerTypeWithin(): Boolean

Return whether the aspect is defined as "pertypewithin".