Class ClassVersionSetter

  • All Implemented Interfaces:
    ClassVisitor

    public class ClassVersionSetter
    extends java.lang.Object
    implements ClassVisitor
    This ClassVisitor 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.
    • 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 - the Set 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 interface ClassVisitor