Package io.papermc.asm.rules.field
Record Class FieldToMethodRewrite.Versioned
java.lang.Object
java.lang.Record
io.papermc.asm.rules.field.FieldToMethodRewrite.Versioned
- All Implemented Interfaces:
VersionedRuleFactory
- Enclosing class:
- FieldToMethodRewrite
public static record FieldToMethodRewrite.Versioned(Set<ClassDesc> owners, @Nullable String getterName, @Nullable String setterName, boolean isInterfaceMethod, VersionedMatcher<FieldMatcher> versions)
extends Record
implements VersionedRuleFactory
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.papermc.asm.versioned.VersionedRuleFactory
VersionedRuleFactory.Chain -
Field Summary
Fields inherited from interface io.papermc.asm.versioned.VersionedRuleFactory
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionVersioned(Set<ClassDesc> owners, @Nullable String getterName, @Nullable String setterName, boolean isInterfaceMethod, VersionedMatcher<FieldMatcher> versions) Creates an instance of aVersionedrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreateRule(ApiVersion<?> apiVersion) final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegetterNamerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisInterfaceMethodrecord component.owners()Returns the value of theownersrecord component.Returns the value of thesetterNamerecord component.final StringtoString()Returns a string representation of this record class.versions()Returns the value of theversionsrecord component.
-
Constructor Details
-
Versioned
public Versioned(Set<ClassDesc> owners, @Nullable String getterName, @Nullable String setterName, boolean isInterfaceMethod, VersionedMatcher<FieldMatcher> versions) Creates an instance of aVersionedrecord class.- Parameters:
owners- the value for theownersrecord componentgetterName- the value for thegetterNamerecord componentsetterName- the value for thesetterNamerecord componentisInterfaceMethod- the value for theisInterfaceMethodrecord componentversions- the value for theversionsrecord component
-
-
Method Details
-
createRule
- Specified by:
createRulein interfaceVersionedRuleFactory
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
owners
Returns the value of theownersrecord component.- Returns:
- the value of the
ownersrecord component
-
getterName
Returns the value of thegetterNamerecord component.- Returns:
- the value of the
getterNamerecord component
-
setterName
Returns the value of thesetterNamerecord component.- Returns:
- the value of the
setterNamerecord component
-
isInterfaceMethod
public boolean isInterfaceMethod()Returns the value of theisInterfaceMethodrecord component.- Returns:
- the value of the
isInterfaceMethodrecord component
-
versions
Returns the value of theversionsrecord component.- Returns:
- the value of the
versionsrecord component
-