Class SimpleClassProcessor
java.lang.Object
net.neoforged.neoforgespi.transformation.BaseSimpleProcessor
net.neoforged.neoforgespi.transformation.SimpleClassProcessor
- All Implemented Interfaces:
ClassProcessor
- Direct Known Subclasses:
MethodRedirector, ReplaceFieldWithGetterAccess
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordIdentifies a targeted class.Nested classes/interfaces inherited from interface ClassProcessor
ClassProcessor.AfterProcessingContext, ClassProcessor.ComputeFlags, ClassProcessor.LinkContext, ClassProcessor.OrderingHint, ClassProcessor.SelectionContext, ClassProcessor.TransformationContext -
Field Summary
FieldsFields inherited from interface ClassProcessor
GENERATED_PACKAGE_MODULE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanReturns whether the processor wants to recieve the class.Each class that the processor has opted to recieve is passed to this method for processing.abstract Set<SimpleClassProcessor.Target> targets()Returns the classes targeted by this processor.abstract voidtransform(org.objectweb.asm.tree.ClassNode input, SimpleTransformationContext context) Applies transformations to a targeted class.Methods inherited from class BaseSimpleProcessor
afterProcessing, link, runsAfterMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ClassProcessor
generatesPackages, name, orderingHint, runsBefore
-
Field Details
-
targets
-
-
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
Returns the classes targeted by this processor.- Returns:
- the classes targeted by this processor
-
handlesClass
Description copied from interface:ClassProcessorReturns 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:ClassProcessorEach 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.ComputeFlagsindicating how the class should be rewritten.
-