Class SimpleClassProcessor

java.lang.Object
net.neoforged.neoforgespi.transformation.BaseSimpleProcessor
net.neoforged.neoforgespi.transformation.SimpleClassProcessor
All Implemented Interfaces:
ClassProcessor
Direct Known Subclasses:
MethodRedirector, ReplaceFieldWithGetterAccess

public abstract non-sealed class SimpleClassProcessor extends BaseSimpleProcessor
  • Field Details

  • Constructor Details

    • SimpleClassProcessor

      public SimpleClassProcessor()
  • Method Details

    • transform

      public abstract void transform(org.objectweb.asm.tree.ClassNode input, SimpleTransformationContext context)
      Applies transformations to a targeted class.
      Parameters:
      input - The ASM input node, which can be mutated directly
    • targets

      public abstract Set<SimpleClassProcessor.Target> targets()
      Returns the classes targeted by this processor.
      Returns:
      the classes targeted by this processor
    • handlesClass

      public final boolean handlesClass(ClassProcessor.SelectionContext context)
      Description copied from interface: ClassProcessor
      Returns whether the processor wants to recieve the class.
      Parameters:
      context - the context of the class to consider
      Returns:
      whether the processor wants to recieve the class
    • processClass

      Description copied from interface: ClassProcessor
      Each class that the processor has opted to recieve is passed to this method for processing.
      Parameters:
      context - the context of the class to process
      Returns:
      the ClassProcessor.ComputeFlags indicating how the class should be rewritten.