Package io.papermc.asm.rules.method
Record Class DirectStaticRewrite.Versioned
java.lang.Object
java.lang.Record
io.papermc.asm.rules.method.DirectStaticRewrite.Versioned
- All Implemented Interfaces:
VersionedRuleFactory
- Enclosing class:
DirectStaticRewrite
public static record DirectStaticRewrite.Versioned(Set<ClassDesc> owners, ClassDesc staticRedirectOwner, @Nullable String staticMethodName, VersionedMatcher<MethodMatcher> 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, ClassDesc staticRedirectOwner, @Nullable String staticMethodName, VersionedMatcher<MethodMatcher> 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.final inthashCode()Returns a hash code value for this object.owners()Returns the value of theownersrecord component.Returns the value of thestaticMethodNamerecord component.Returns the value of thestaticRedirectOwnerrecord 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, ClassDesc staticRedirectOwner, @Nullable String staticMethodName, VersionedMatcher<MethodMatcher> versions) Creates an instance of aVersionedrecord class.- Parameters:
owners- the value for theownersrecord componentstaticRedirectOwner- the value for thestaticRedirectOwnerrecord componentstaticMethodName- the value for thestaticMethodNamerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
owners
Returns the value of theownersrecord component.- Returns:
- the value of the
ownersrecord component
-
staticRedirectOwner
Returns the value of thestaticRedirectOwnerrecord component.- Returns:
- the value of the
staticRedirectOwnerrecord component
-
staticMethodName
Returns the value of thestaticMethodNamerecord component.- Returns:
- the value of the
staticMethodNamerecord component
-
versions
Returns the value of theversionsrecord component.- Returns:
- the value of the
versionsrecord component
-