Package proguard.classfile.visitor
Class ClassVersionSetter
- java.lang.Object
-
- proguard.classfile.visitor.ClassVersionSetter
-
- All Implemented Interfaces:
ClassVisitor
public class ClassVersionSetter extends java.lang.Object implements ClassVisitor
ThisClassVisitor
sets the version number of the program classes that it visits.
-
-
Constructor Summary
Constructors Constructor Description ClassVersionSetter(int classVersion)
Creates a new ClassVersionSetter.ClassVersionSetter(int classVersion, java.util.Set<java.lang.Integer> newerClassVersions)
Creates a new ClassVersionSetter that also stores any newer class version numbers that it encounters while visiting program classes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitAnyClass(Clazz clazz)
Visits any Clazz instance.void
visitProgramClass(ProgramClass programClass)
-
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
-
-
-
-
Constructor Detail
-
ClassVersionSetter
public ClassVersionSetter(int classVersion)
Creates a new ClassVersionSetter.- Parameters:
classVersion
- the class version number.
-
ClassVersionSetter
public ClassVersionSetter(int classVersion, java.util.Set<java.lang.Integer> newerClassVersions)
Creates a new ClassVersionSetter that also stores any newer class version numbers that it encounters while visiting program classes.- Parameters:
classVersion
- the class version number.newerClassVersions
- theSet
in which newer class version numbers can be collected.
-
-
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
-
visitProgramClass
public void visitProgramClass(ProgramClass programClass)
- Specified by:
visitProgramClass
in interfaceClassVisitor
-
-