Record Class DirectReturnRewrite.Versioned
java.lang.Object
java.lang.Record
io.papermc.asm.rules.method.returns.DirectReturnRewrite.Versioned
- All Implemented Interfaces:
VersionedRuleFactory
- Enclosing class:
DirectReturnRewrite
public static record DirectReturnRewrite.Versioned(Set<ClassDesc> owners, ClassDesc existingType, VersionedMatcher<TargetedMethodMatcherWithHandler> versions, boolean includeOwnerContext)
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 existingType, VersionedMatcher<TargetedMethodMatcherWithHandler> versions, boolean includeOwnerContext) 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 theexistingTyperecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theincludeOwnerContextrecord component.owners()Returns the value of theownersrecord 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 existingType, VersionedMatcher<TargetedMethodMatcherWithHandler> versions, boolean includeOwnerContext) Creates an instance of aVersionedrecord class.- Parameters:
owners- the value for theownersrecord componentexistingType- the value for theexistingTyperecord componentversions- the value for theversionsrecord componentincludeOwnerContext- the value for theincludeOwnerContextrecord 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
-
existingType
Returns the value of theexistingTyperecord component.- Returns:
- the value of the
existingTyperecord component
-
versions
Returns the value of theversionsrecord component.- Returns:
- the value of the
versionsrecord component
-
includeOwnerContext
public boolean includeOwnerContext()Returns the value of theincludeOwnerContextrecord component.- Returns:
- the value of the
includeOwnerContextrecord component
-