Package proguard.classfile.visitor
Class CounterConditionalClassVisitor
- java.lang.Object
-
- proguard.classfile.visitor.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 givenCounter
before and after values, also to a second given class visitor.
-
-
Constructor Summary
Constructors Constructor Description CounterConditionalClassVisitor(Counter counter, java.util.function.BiPredicate<java.lang.Integer,java.lang.Integer> predicate, ClassVisitor classVisitor1, ClassVisitor classVisitor2)
Creates a new CounterConditionalClassVisitor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
hasIncreased(int before, int after)
static boolean
isSame(int before, int after)
void
visitAnyClass(Clazz clazz)
Visits any Clazz instance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.visitor.ClassVisitor
visitLibraryClass, visitProgramClass
-
-
-
-
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 interfaceClassVisitor
-
hasIncreased
public static boolean hasIncreased(int before, int after)
-
isSame
public static boolean isSame(int before, int after)
-
-