Class CounterConditionalClassVisitor

  • All Implemented Interfaces:
    ClassVisitor

    public class CounterConditionalClassVisitor
    extends java.lang.Object
    implements ClassVisitor
    This ClassVisitor delegates to a given class visitor, and then, if the given predicate succeeds with the given Counter before and after values, also to a second given class visitor.
    • Constructor Detail

      • CounterConditionalClassVisitor

        public CounterConditionalClassVisitor​(Counter counter,
                                              java.util.function.BiPredicate<java.lang.Integer,​java.lang.Integer> predicate,
                                              ClassVisitor classVisitor1,
                                              ClassVisitor classVisitor2)
        Creates a new CounterConditionalClassVisitor.
    • Method Detail

      • visitAnyClass

        public void visitAnyClass​(Clazz clazz)
        Description copied from interface: ClassVisitor
        Visits any Clazz instance. The more specific default implementations of this interface delegate to this method.
        Specified by:
        visitAnyClass in interface ClassVisitor
      • hasIncreased

        public static boolean hasIncreased​(int before,
                                           int after)
      • isSame

        public static boolean isSame​(int before,
                                     int after)