Class SimpleFieldProcessor
java.lang.Object
net.neoforged.neoforgespi.transformation.BaseSimpleProcessor
net.neoforged.neoforgespi.transformation.SimpleFieldProcessor
- All Implemented Interfaces:
ClassProcessor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordIdentifies a targeted field and the class it resides in.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<SimpleFieldProcessor.Target> targets()Returns the fields targeted by this processor.abstract voidtransform(org.objectweb.asm.tree.FieldNode input, SimpleTransformationContext context) Applies transformations to a targeted field.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
-
targetsByClass
-
-
Constructor Details
-
SimpleFieldProcessor
public SimpleFieldProcessor()
-
-
Method Details
-
transform
public abstract void transform(org.objectweb.asm.tree.FieldNode input, SimpleTransformationContext context) Applies transformations to a targeted field.- Parameters:
input- The ASM input node, which can be mutated directly
-
targets
Returns the fields targeted by this processor.- Returns:
- the fields targeted by this processor
-
targetsByClass
-
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.
-