Class SimpleClassWriter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ClassInformationRepository infoRepo  
      • Fields inherited from class org.objectweb.asm.ClassWriter

        COMPUTE_FRAMES, COMPUTE_MAXS
      • Fields inherited from class org.objectweb.asm.ClassVisitor

        api, cv
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.util.LinkedHashSet<java.lang.String> flattenHierarchy​(java.lang.String type)  
      protected java.lang.String getCommonSuperClass​(java.lang.String type1, java.lang.String type2)
      Derives common super class from the super name mapping passed in to the constructor.
      • Methods inherited from class org.objectweb.asm.ClassWriter

        getClassLoader, hasFlags, newClass, newConst, newConstantDynamic, newField, newHandle, newHandle, newInvokeDynamic, newMethod, newMethodType, newModule, newNameType, newPackage, newUTF8, setFlags, toByteArray, visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitMethod, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
      • Methods inherited from class org.objectweb.asm.ClassVisitor

        getDelegate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleClassWriter

        public SimpleClassWriter​(int flags,
                                 ClassInformationRepository infoRepo)
        Constructs a SimpleClassWriter object. See ClassWriter(int).
        Parameters:
        flags - option flags that can be used to modify the default behavior of this class. See ClassWriter.COMPUTE_MAXS, ClassWriter.COMPUTE_FRAMES.
        infoRepo - class hierarchy mappings for deriving stack map frames
        Throws:
        java.lang.NullPointerException - if any argument is null
      • SimpleClassWriter

        public SimpleClassWriter​(org.objectweb.asm.ClassReader classReader,
                                 int flags,
                                 ClassInformationRepository infoRepo)
        Constructs a SimpleClassWriter object. See ClassWriter(org.objectweb.asm.ClassReader, int).
        Parameters:
        classReader - the ClassReader used to read the original class. It will be used to copy the entire constant pool from the original class and also to copy other fragments of original bytecode where applicable.
        flags - option flags that can be used to modify the default behavior of this class. See ClassWriter.COMPUTE_MAXS, ClassWriter.COMPUTE_FRAMES.
        infoRepo - class hierarchy mappings for deriving stack map frames
        Throws:
        java.lang.NullPointerException - if any argument is null
    • Method Detail

      • getCommonSuperClass

        protected java.lang.String getCommonSuperClass​(java.lang.String type1,
                                                       java.lang.String type2)
        Derives common super class from the super name mapping passed in to the constructor.
        Overrides:
        getCommonSuperClass in class org.objectweb.asm.ClassWriter
        Parameters:
        type1 - the internal name of a class.
        type2 - the internal name of another class.
        Returns:
        the internal name of the common super class of the two given classes
        Throws:
        java.lang.NullPointerException - if any argument is null
      • flattenHierarchy

        private java.util.LinkedHashSet<java.lang.String> flattenHierarchy​(java.lang.String type)