类 AspectMetadata

java.lang.Object
infra.aop.aspectj.annotation.AspectMetadata
所有已实现的接口:
Serializable

public class AspectMetadata extends Object implements Serializable
Metadata for an AspectJ aspect class, with an additional Framework 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".

从以下版本开始:
4.0
作者:
Rod Johnson, Juergen Hoeller, Harry Yang
另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • aspectName

      private final String aspectName
      The name of this aspect as defined to Framework (the bean name) - allows us to determine if two pieces of advice come from the same aspect and hence their relative precedence.
    • aspectClass

      private final Class<?> aspectClass
      The aspect class, stored separately for re-resolution of the corresponding AjType on deserialization.
    • ajType

      private transient AjType<?> ajType
      AspectJ reflection information (AspectJ 5 / Java 5 specific). Re-resolved on deserialization since it isn't serializable itself.
    • perClausePointcut

      private final Pointcut perClausePointcut
      Framework AOP pointcut corresponding to the per clause of the aspect. Will be the Pointcut.TRUE canonical instance in the case of a singleton, otherwise an AspectJExpressionPointcut.
  • 构造器详细资料

    • AspectMetadata

      public AspectMetadata(Class<?> aspectClass, String aspectName)
      Create a new AspectMetadata instance for the given aspect class.
      参数:
      aspectClass - the aspect class
      aspectName - the name of the aspect
  • 方法详细资料

    • findPerClause

      private String findPerClause(Class<?> aspectClass)
      Extract contents from String of form pertarget(contents).
    • getAjType

      public AjType<?> getAjType()
      Return AspectJ reflection information.
    • getAspectClass

      public Class<?> getAspectClass()
      Return the aspect class.
    • getAspectName

      public String getAspectName()
      Return the aspect name.
    • getPerClausePointcut

      public Pointcut getPerClausePointcut()
      Return a Framework pointcut expression for a singleton aspect. (e.g. Pointcut.TRUE if it's a singleton).
    • isPerThisOrPerTarget

      public boolean isPerThisOrPerTarget()
      Return whether the aspect is defined as "perthis" or "pertarget".
    • isPerTypeWithin

      public boolean isPerTypeWithin()
      Return whether the aspect is defined as "pertypewithin".
    • isLazilyInstantiated

      public boolean isLazilyInstantiated()
      Return whether the aspect needs to be lazily instantiated.
    • readObject

      private void readObject(ObjectInputStream inputStream) throws IOException, ClassNotFoundException
      抛出:
      IOException
      ClassNotFoundException