类 ClassNameFilter

  • 所有已实现的接口:
    ClassVisitor

    public class ClassNameFilter
    extends java.lang.Object
    implements ClassVisitor
    This ClassVisitor delegates its visits to another given ClassVisitor, but only when the visited class has a name that matches a given regular expression.
    • 构造器详细资料

      • ClassNameFilter

        public ClassNameFilter​(java.lang.String regularExpression,
                               ClassVisitor acceptedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpression - the regular expression against which class names will be matched.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(java.lang.String regularExpression,
                               WildcardManager wildcardManager,
                               ClassVisitor acceptedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpression - the regular expression against which class names will be matched.
        wildcardManager - an optional scope for StringMatcher instances that match wildcards.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(java.util.List regularExpression,
                               ClassVisitor acceptedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpression - the regular expression against which class names will be matched.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(java.util.List regularExpression,
                               WildcardManager wildcardManager,
                               ClassVisitor acceptedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpression - the regular expression against which class names will be matched.
        wildcardManager - an optional scope for StringMatcher instances that match wildcards.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(StringMatcher regularExpressionMatcher,
                               ClassVisitor acceptedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpressionMatcher - the string matcher against which class names will be matched.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(java.lang.String regularExpression,
                               ClassVisitor acceptedClassVisitor,
                               ClassVisitor rejectedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpression - the regular expression against which class names will be matched.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
        rejectedClassVisitor - the ClassVisitor to which rejected visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(java.lang.String regularExpression,
                               WildcardManager wildcardManager,
                               ClassVisitor acceptedClassVisitor,
                               ClassVisitor rejectedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpression - the regular expression against which class names will be matched.
        wildcardManager - an optional scope for StringMatcher instances that match wildcards.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
        rejectedClassVisitor - the ClassVisitor to which rejected visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(java.util.List regularExpression,
                               ClassVisitor acceptedClassVisitor,
                               ClassVisitor rejectedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpression - the regular expression against which class names will be matched.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
        rejectedClassVisitor - the ClassVisitor to which rejected visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(java.util.List regularExpression,
                               WildcardManager wildcardManager,
                               ClassVisitor acceptedClassVisitor,
                               ClassVisitor rejectedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpression - the regular expression against which class names will be matched.
        wildcardManager - an optional scope for StringMatcher instances that match wildcards.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
        rejectedClassVisitor - the ClassVisitor to which rejected visits will be delegated.
      • ClassNameFilter

        public ClassNameFilter​(StringMatcher regularExpressionMatcher,
                               ClassVisitor acceptedClassVisitor,
                               ClassVisitor rejectedClassVisitor)
        Creates a new ClassNameFilter.
        参数:
        regularExpressionMatcher - the string matcher against which class names will be matched.
        acceptedClassVisitor - the ClassVisitor to which accepted visits will be delegated.
        rejectedClassVisitor - the ClassVisitor to which rejected visits will be delegated.
    • 方法详细资料

      • visitAnyClass

        public void visitAnyClass​(Clazz clazz)
        从接口复制的说明: ClassVisitor
        Visits any Clazz instance. The more specific default implementations of this interface delegate to this method.
        指定者:
        visitAnyClass 在接口中 ClassVisitor