Package io.papermc.asm.rules.method
Record Class StaticRewrite.RewriteConstructor
java.lang.Object
java.lang.Record
io.papermc.asm.rules.method.StaticRewrite.RewriteConstructor
- All Implemented Interfaces:
MethodRewriteRule.Rewrite
- Enclosing interface:
- StaticRewrite
public static record StaticRewrite.RewriteConstructor(ClassDesc staticRedirectOwner, String constructorOwner, String methodName, MethodTypeDesc descriptor)
extends Record
implements MethodRewriteRule.Rewrite
-
Constructor Summary
ConstructorsConstructorDescriptionRewriteConstructor(ClassDesc staticRedirectOwner, String constructorOwner, String methodName, MethodTypeDesc descriptor) Creates an instance of aRewriteConstructorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(MethodVisitor delegate, MethodNode context) Returns the value of theconstructorOwnerrecord component.Returns the value of thedescriptorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themethodNamerecord component.Returns the value of thestaticRedirectOwnerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RewriteConstructor
public RewriteConstructor(ClassDesc staticRedirectOwner, String constructorOwner, String methodName, MethodTypeDesc descriptor) Creates an instance of aRewriteConstructorrecord class.- Parameters:
staticRedirectOwner- the value for thestaticRedirectOwnerrecord componentconstructorOwner- the value for theconstructorOwnerrecord componentmethodName- the value for themethodNamerecord componentdescriptor- the value for thedescriptorrecord component
-
-
Method Details
-
apply
- Specified by:
applyin interfaceMethodRewriteRule.Rewrite
-
createHandle
- Specified by:
createHandlein interfaceMethodRewriteRule.Rewrite
-
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). -
staticRedirectOwner
Returns the value of thestaticRedirectOwnerrecord component.- Returns:
- the value of the
staticRedirectOwnerrecord component
-
constructorOwner
Returns the value of theconstructorOwnerrecord component.- Returns:
- the value of the
constructorOwnerrecord component
-
methodName
Returns the value of themethodNamerecord component.- Returns:
- the value of the
methodNamerecord component
-
descriptor
Returns the value of thedescriptorrecord component.- Returns:
- the value of the
descriptorrecord component
-