类 TypePatternClassFilter

java.lang.Object
infra.aop.aspectj.TypePatternClassFilter
所有已实现的接口:
ClassFilter

public class TypePatternClassFilter extends Object implements ClassFilter
Framework AOP ClassFilter implementation using AspectJ type matching.
从以下版本开始:
4.0
作者:
Rod Johnson, Juergen Hoeller, Sam Brannen
  • 字段详细资料

    • typePattern

      private String typePattern
    • aspectJTypePatternMatcher

      @Nullable private org.aspectj.weaver.tools.TypePatternMatcher aspectJTypePatternMatcher
  • 构造器详细资料

    • TypePatternClassFilter

      public TypePatternClassFilter()
      Creates a new instance of the TypePatternClassFilter class.

      This is the JavaBean constructor; be sure to set the typePattern property, else a no doubt fatal IllegalStateException will be thrown when the matches(Class) method is first invoked.

    • TypePatternClassFilter

      public TypePatternClassFilter(String typePattern)
      Create a fully configured TypePatternClassFilter using the given type pattern.
      参数:
      typePattern - the type pattern that AspectJ weaver should parse
  • 方法详细资料

    • setTypePattern

      public void setTypePattern(String typePattern)
      Set the AspectJ type pattern to match.

      Examples include: infra.beans.* This will match any class or interface in the given package. infra.beans.ITestBean+ This will match the ITestBean interface and any class that implements it.

      These conventions are established by AspectJ, not Framework AOP.

      参数:
      typePattern - the type pattern that AspectJ weaver should parse
    • getTypePattern

      public String getTypePattern()
      Return the AspectJ type pattern to match.
    • matches

      public boolean matches(Class<?> clazz)
      Should the pointcut apply to the given interface or target class?
      指定者:
      matches 在接口中 ClassFilter
      参数:
      clazz - candidate target class
      返回:
      whether the advice should apply to this candidate target class
      抛出:
      IllegalStateException - if no setTypePattern(String) has been set
    • replaceBooleanOperators

      private String replaceBooleanOperators(String pcExpr)
      If a type pattern has been specified in XML, the user cannot write and as "&&" (though && will work). We also allow and between two sub-expressions.

      This method converts back to && for the AspectJ pointcut parser.

    • equals

      public boolean equals(Object other)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object