Class TransformerClassWriter

java.lang.Object
org.objectweb.asm.ClassVisitor
org.objectweb.asm.ClassWriter
net.neoforged.fml.classloading.transformation.TransformerClassWriter

class TransformerClassWriter extends ClassWriter
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • CLASS_PARENTS

      private static final Map<String,String> CLASS_PARENTS
    • CLASS_HIERARCHIES

      private static final Map<String,Set<String>> CLASS_HIERARCHIES
    • IS_INTERFACE

      private static final Map<String,Boolean> IS_INTERFACE
    • clazzAccessor

      private final org.objectweb.asm.tree.ClassNode clazzAccessor
    • computedThis

      private boolean computedThis
    • recomputationContext

      private final ClassHierarchyRecomputationContext recomputationContext
  • Constructor Details

    • TransformerClassWriter

      public TransformerClassWriter(int writerFlags, org.objectweb.asm.tree.ClassNode clazzAccessor, ClassHierarchyRecomputationContext recomputationContext)
  • Method Details

    • getCommonSuperClass

      protected String getCommonSuperClass(String type1, String type2)
      Overrides:
      getCommonSuperClass in class ClassWriter
    • getSupers

      private Set<String> getSupers(String typeName)
    • isIntf

      private boolean isIntf(String typeName)
    • getSuper

      private String getSuper(String typeName)
    • computeHierarchy

      private void computeHierarchy(org.objectweb.asm.tree.ClassNode clazzNode)
    • computeHierarchy

      private void computeHierarchy(String className)
      Computes the hierarchy for a specific class if it has not been computed yet
    • computeHierarchyFromClass

      private void computeHierarchyFromClass(String name, Class<?> clazz)
      Computes the hierarchy for a specific class using the already loaded class object Must be kept in sync with the file counterpart TransformerClassWriter.SuperCollectingVisitor.visit(int, int, String, String, String, String[])
    • computeHierarchyFromFile

      private void computeHierarchyFromFile(String className)
      Computes the hierarchy for a specific class by loading the class from disk and running it through modlauncher.