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<GeneratedMethodHolder.ConstructorCallData>
- Enclosing interface:
- StaticRewrite
public static record StaticRewrite.RewriteConstructor(ClassDesc staticRedirectOwner, String constructorOwner, String methodName, MethodTypeDesc descriptor, @Nullable MethodRewriteRule.GeneratorInfo<GeneratedMethodHolder.ConstructorCallData> generatorInfo)
extends Record
implements MethodRewriteRule.Rewrite<GeneratedMethodHolder.ConstructorCallData>
-
Field Summary
Fields inherited from interface io.papermc.asm.rules.method.MethodRewriteRule.Rewrite
BOOTSTRAP_HANDLE_IDX, DYNAMIC_TYPE_IDX -
Constructor Summary
ConstructorsConstructorDescriptionRewriteConstructor(ClassDesc staticRedirectOwner, String constructorOwner, String methodName, MethodTypeDesc descriptor) RewriteConstructor(ClassDesc staticRedirectOwner, String constructorOwner, String methodName, MethodTypeDesc descriptor, @Nullable MethodRewriteRule.GeneratorInfo<GeneratedMethodHolder.ConstructorCallData> generatorInfo) Creates an instance of aRewriteConstructorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(MethodVisitor delegate, MethodNode context) voidapplyToBootstrapArguments(Object[] arguments) Returns the value of theconstructorOwnerrecord component.Returns the value of thedescriptorrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegeneratorInforecord component.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.withGeneratorInfo(GeneratedMethodHolder holder, GeneratedMethodHolder.ConstructorCallData original) withNamePrefix(String prefix) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.papermc.asm.rules.method.MethodRewriteRule.Rewrite
withHandleExtras
-
Constructor Details
-
RewriteConstructor
public RewriteConstructor(ClassDesc staticRedirectOwner, String constructorOwner, String methodName, MethodTypeDesc descriptor) -
RewriteConstructor
public RewriteConstructor(ClassDesc staticRedirectOwner, String constructorOwner, String methodName, MethodTypeDesc descriptor, @Nullable MethodRewriteRule.GeneratorInfo<GeneratedMethodHolder.ConstructorCallData> generatorInfo) 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 componentgeneratorInfo- the value for thegeneratorInforecord component
-
-
Method Details
-
apply
- Specified by:
applyin interfaceMethodRewriteRule.Rewrite<GeneratedMethodHolder.ConstructorCallData>
-
applyToBootstrapArguments
- Specified by:
applyToBootstrapArgumentsin interfaceMethodRewriteRule.Rewrite<GeneratedMethodHolder.ConstructorCallData>
-
withNamePrefix
public MethodRewriteRule.Rewrite<GeneratedMethodHolder.ConstructorCallData> withNamePrefix(String prefix) - Specified by:
withNamePrefixin interfaceMethodRewriteRule.Rewrite<GeneratedMethodHolder.ConstructorCallData>
-
withGeneratorInfo
public MethodRewriteRule.Rewrite<GeneratedMethodHolder.ConstructorCallData> withGeneratorInfo(GeneratedMethodHolder holder, GeneratedMethodHolder.ConstructorCallData original) - Specified by:
withGeneratorInfoin interfaceMethodRewriteRule.Rewrite<GeneratedMethodHolder.ConstructorCallData>
-
createMethodGenerator
- Specified by:
createMethodGeneratorin interfaceMethodRewriteRule.Rewrite<GeneratedMethodHolder.ConstructorCallData>
-
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
-
generatorInfo
public @Nullable MethodRewriteRule.GeneratorInfo<GeneratedMethodHolder.ConstructorCallData> generatorInfo()Returns the value of thegeneratorInforecord component.- Returns:
- the value of the
generatorInforecord component
-