/** * Creates a new WarningPrinter that prints to the given print stream, * except if the names of any involved classes matches the given filter. */ public WarningPrinter(PrintStream printStream, List classFilter) { this.printStream = printStream; this.classFilter = classFilter == null ? null : new ListParser(new ClassNameParser()).parse(classFilter); }
/** * Creates a new MemberDescriptorFilter. * @param regularExpression the regular expression against which member * descriptors will be matched. * @param memberVisitor the <code>MemberVisitor</code> to which visits * will be delegated. */ public MemberDescriptorFilter(String regularExpression, MemberVisitor memberVisitor) { this(new ClassNameParser().parse(regularExpression), memberVisitor); }
nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.METHOD_ARGUMENTS_CLOSE }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 5))); break; nextMatcher = rememberVariableStringMatcher( createAnyTypeMatcher(settableMatcher)); settableMatcher.setMatcher(parse(regularExpression.substring(index + 5))); break; nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 2))); nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END, ClassConstants.PACKAGE_SEPARATOR }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 1))); break; nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END, ClassConstants.PACKAGE_SEPARATOR },
new OrMatcher(parse(regularExpression.substring(index + 5)), createAnyTypeMatcher(settableMatcher)); createAnyTypeMatcher(parse(regularExpression.substring(index + 5))); break; 0, Integer.MAX_VALUE, parse(regularExpression.substring(index + 2))); break; 0, Integer.MAX_VALUE, parse(regularExpression.substring(index + 1))); break; 1, 1, parse(regularExpression.substring(index + 1))); break; 1, 1, parse(regularExpression.substring(index + 1))); break;
nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.METHOD_ARGUMENTS_CLOSE }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 5))); break; nextMatcher = rememberVariableStringMatcher( createAnyTypeMatcher(settableMatcher)); settableMatcher.setMatcher(parse(regularExpression.substring(index + 5))); break; nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 2))); nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END, ClassConstants.PACKAGE_SEPARATOR }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 1))); break; nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END, ClassConstants.PACKAGE_SEPARATOR },
nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.METHOD_ARGUMENTS_CLOSE }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 5))); break; nextMatcher = rememberVariableStringMatcher( createAnyTypeMatcher(settableMatcher)); settableMatcher.setMatcher(parse(regularExpression.substring(index + 5))); break; nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 2))); nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END, ClassConstants.PACKAGE_SEPARATOR }, settableMatcher.setMatcher(parse(regularExpression.substring(index + 1))); break; nextMatcher = rememberVariableStringMatcher( new VariableStringMatcher(null, new char[] { ClassConstants.TYPE_CLASS_END, ClassConstants.PACKAGE_SEPARATOR },
/** * Creates a new WarningPrinter that prints to the given print stream, * except if the names of any involved classes matches the given filter. */ public WarningPrinter(PrintStream printStream, List classFilter) { this.printStream = printStream; this.classFilter = classFilter == null ? null : new ListParser(new ClassNameParser()).parse(classFilter); }
/** * A main method for testing class name matching. */ public static void main(String[] args) { try { System.out.println("Regular expression ["+args[0]+"]"); ClassNameParser parser = new ClassNameParser(); StringMatcher matcher = parser.parse(args[0]); for (int index = 1; index < args.length; index++) { String string = args[index]; System.out.print("String ["+string+"]"); System.out.println(" -> match = "+matcher.matches(args[index])); } } catch (Exception ex) { ex.printStackTrace(); } }
/** * Creates a new WarningPrinter that prints to the given print stream, * except if the names of any involved classes matches the given filter. */ public WarningPrinter(PrintStream printStream, List classFilter) { this.printStream = printStream; this.classFilter = classFilter == null ? null : new ListParser(new ClassNameParser()).parse(classFilter); }
/** * A main method for testing class name matching. */ public static void main(String[] args) { try { System.out.println("Regular expression ["+args[0]+"]"); ClassNameParser parser = new ClassNameParser(); StringMatcher matcher = parser.parse(args[0]); for (int index = 1; index < args.length; index++) { String string = args[index]; System.out.print("String ["+string+"]"); System.out.println(" -> match = "+matcher.matches(args[index])); } } catch (Exception ex) { ex.printStackTrace(); } }
/** * Creates a new WarningPrinter that prints to the given print stream, * except if the names of any involved classes matches the given filter. */ public WarningPrinter(PrintStream printStream, List classFilter) { this.printStream = printStream; this.classFilter = classFilter == null ? null : new ListParser(new ClassNameParser()).parse(classFilter); }
/** * A main method for testing class name matching. */ public static void main(String[] args) { try { System.out.println("Regular expression ["+args[0]+"]"); ClassNameParser parser = new ClassNameParser(); StringMatcher matcher = parser.parse(args[0]); for (int index = 1; index < args.length; index++) { String string = args[index]; System.out.print("String ["+string+"]"); System.out.println(" -> match = "+matcher.matches(args[index])); } } catch (Exception ex) { ex.printStackTrace(); } } }
/** * Creates a new ClassNameFilter. * @param regularExpression the regular expression against which annotation * type names will be matched. * @param annotationVisitor the <code>annotationVisitor</code> to which * visits will be delegated. */ public AnnotationTypeFilter(String regularExpression, AnnotationVisitor annotationVisitor) { this.regularExpressionMatcher = new ListParser(new ClassNameParser()).parse(regularExpression); this.annotationVisitor = annotationVisitor; }
/** * A main method for testing class name matching. */ public static void main(String[] args) { try { System.out.println("Regular expression ["+args[0]+"]"); ClassNameParser parser = new ClassNameParser(); StringMatcher matcher = parser.parse(args[0]); for (int index = 1; index < args.length; index++) { String string = args[index]; System.out.print("String ["+string+"]"); System.out.println(" -> match = "+matcher.matches(args[index])); } } catch (Exception ex) { ex.printStackTrace(); } }
/** * Creates a new ClassNameFilter. * @param regularExpression the regular expression against which class names * will be matched. * @param classVisitor the <code>ClassVisitor</code> to which visits * will be delegated. */ public ClassNameFilter(String regularExpression, ClassVisitor classVisitor) { this(new ListParser(new ClassNameParser()).parse(regularExpression), classVisitor); }
/** * Creates a new ClassNameFilter. * @param regularExpression the regular expression against which class names * will be matched. * @param classVisitor the <code>ClassVisitor</code> to which visits * will be delegated. */ public ClassNameFilter(List regularExpression, ClassVisitor classVisitor) { this(new ListParser(new ClassNameParser()).parse(regularExpression), classVisitor); }
/** * Creates a new MemberDescriptorFilter. * @param regularExpression the regular expression against which member * descriptors will be matched. * @param variableStringMatchers an optional mutable list of * VariableStringMatcher instances that match * the wildcards. * @param memberVisitor the <code>MemberVisitor</code> to which * visits will be delegated. */ public MemberDescriptorFilter(String regularExpression, List variableStringMatchers, MemberVisitor memberVisitor) { this(new ListParser(new ClassNameParser(variableStringMatchers)).parse(regularExpression), memberVisitor); }
/** * Creates a new ClassNameFilter. * @param regularExpression the regular expression against which class * names will be matched. * @param variableStringMatchers an optional mutable list of * VariableStringMatcher instances that match * the wildcards. * @param classVisitor the <code>ClassVisitor</code> to which * visits will be delegated. */ public ClassNameFilter(String regularExpression, List variableStringMatchers, ClassVisitor classVisitor) { this(new ListParser(new ClassNameParser(variableStringMatchers)).parse(regularExpression), classVisitor); }
/** * Creates a new ClassNameFilter. * @param regularExpression the regular expression against which class * names will be matched. * @param variableStringMatchers an optional mutable list of * VariableStringMatcher instances that match * the wildcards. * @param classVisitor the <code>ClassVisitor</code> to which * visits will be delegated. */ public ClassNameFilter(String regularExpression, List variableStringMatchers, ClassVisitor classVisitor) { this(new ListParser(new ClassNameParser(variableStringMatchers)).parse(regularExpression), classVisitor); }
/** * Creates a new AnnotationTypeFilter. * @param regularExpression the regular expression against which * annotation type names will be matched. * @param variableStringMatchers an optional mutable list of * VariableStringMatcher instances that match * the wildcards. * @param annotationVisitor the annotation visitor to which visits * will be delegated. */ public AnnotationTypeFilter(String regularExpression, List variableStringMatchers, AnnotationVisitor annotationVisitor) { this(new ListParser(new ClassNameParser()).parse(regularExpression), annotationVisitor); }