Class ClassConstantClassFilter

  • All Implemented Interfaces:
    ConstantVisitor, ClassVisitor

    public class ClassConstantClassFilter
    extends java.lang.Object
    implements ClassVisitor, ConstantVisitor
    This ClassVisitor delegates all visits to another given visitor, but only if the visited class contains the specified class constant. This can be useful to avoid applying expensive visitors when they aren't necessary.
    • Constructor Detail

      • ClassConstantClassFilter

        public ClassConstantClassFilter​(java.lang.String regularExpression,
                                        ClassVisitor classVisitor)
        Creates a new ClassConstantClassFilter.
        Parameters:
        regularExpression - the regular expression against which class names of class constants will be matched.
        classVisitor - the class visitor for classes that contain the specified class constant.
      • ClassConstantClassFilter

        public ClassConstantClassFilter​(StringMatcher regularExpressionMatcher,
                                        ClassVisitor classVisitor)
        Creates a new ClassConstantClassFilter.
        Parameters:
        regularExpressionMatcher - the string matcher against which class names will be matched.
        classVisitor - the class visitor for classes that contain the specified class constant.