Record Class ClassProcessor.LinkContext
java.lang.Object
java.lang.Record
net.neoforged.neoforgespi.transformation.ClassProcessor.LinkContext
- Record Components:
processors- an immutable map of the processors that are being linked. The maps iteration order is the order in which the processors will be appliedbytecodeProvider- a provider to access class bytecode for other classes than the class that is being transformed
- Enclosing interface:
ClassProcessor
public static record ClassProcessor.LinkContext(@Unmodifiable SequencedMap<ProcessorName,ClassProcessor> processors, BytecodeProvider bytecodeProvider)
extends Record
The context provided to class processors
when they are linked with a bytecode source.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BytecodeProviderThe field for thebytecodeProviderrecord component.private final @Unmodifiable SequencedMap<ProcessorName, ClassProcessor> The field for theprocessorsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLinkContext(@Unmodifiable SequencedMap<ProcessorName, ClassProcessor> processors, BytecodeProvider bytecodeProvider) Creates an instance of aLinkContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebytecodeProviderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Unmodifiable SequencedMap<ProcessorName, ClassProcessor> Returns the value of theprocessorsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
processors
The field for theprocessorsrecord component. -
bytecodeProvider
The field for thebytecodeProviderrecord component.
-
-
Constructor Details
-
LinkContext
@Internal public LinkContext(@Unmodifiable SequencedMap<ProcessorName, ClassProcessor> processors, BytecodeProvider bytecodeProvider) Creates an instance of aLinkContextrecord class.- Parameters:
processors- the value for theprocessorsrecord componentbytecodeProvider- the value for thebytecodeProviderrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
processors
Returns the value of theprocessorsrecord component.- Returns:
- the value of the
processorsrecord component
-
bytecodeProvider
Returns the value of thebytecodeProviderrecord component.- Returns:
- the value of the
bytecodeProviderrecord component
-