Package io.papermc.asm.rules.method
Record Class StaticRewrites.FuzzyParam
java.lang.Object
java.lang.Record
io.papermc.asm.rules.method.StaticRewrites.FuzzyParam
- All Implemented Interfaces:
GeneratedMethodHolder,GeneratedMethodSource<Set<Integer>>,StaticRewriteGeneratedMethodHolder,StaticRewriteGeneratedMethodHolder.Param,MethodRewriteRule,OwnableMethodRewriteRule,OwnableMethodRewriteRule.Filtered,StaticRewrite,StaticRewrite.Generated,StaticRewrite.Generated.Param,OwnableRewriteRule,RewriteRule
- Enclosing class:
- StaticRewrites
public static record StaticRewrites.FuzzyParam(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher methodMatcher, Method staticHandler)
extends Record
implements StaticRewrite.Generated.Param
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.papermc.asm.rules.generate.GeneratedMethodHolder
GeneratedMethodHolder.CallData, GeneratedMethodHolder.ConstructorCallData, GeneratedMethodHolder.MethodCallDataNested classes/interfaces inherited from interface io.papermc.asm.rules.generate.GeneratedMethodSource
GeneratedMethodSource.NoContextNested classes/interfaces inherited from interface io.papermc.asm.rules.method.MethodRewriteRule
MethodRewriteRule.GeneratorInfo<D extends GeneratedMethodHolder.CallData>, MethodRewriteRule.MethodGenerator, MethodRewriteRule.Rewrite<D extends GeneratedMethodHolder.CallData>, MethodRewriteRule.RewriteSingleNested classes/interfaces inherited from interface io.papermc.asm.rules.method.OwnableMethodRewriteRule
OwnableMethodRewriteRule.FilteredNested classes/interfaces inherited from interface io.papermc.asm.rules.RewriteRule
RewriteRule.Chain, RewriteRule.ChainBuilder, RewriteRule.Delegate, RewriteRule.GeneratorAdapterFactoryNested classes/interfaces inherited from interface io.papermc.asm.rules.method.StaticRewrite
StaticRewrite.Generated, StaticRewrite.RewriteConstructorNested classes/interfaces inherited from interface io.papermc.asm.rules.method.StaticRewrite.Generated
StaticRewrite.Generated.Param, StaticRewrite.Generated.ReturnNested classes/interfaces inherited from interface io.papermc.asm.rules.generate.StaticRewriteGeneratedMethodHolder
StaticRewriteGeneratedMethodHolder.Param, StaticRewriteGeneratedMethodHolder.Return -
Field Summary
Fields inherited from interface io.papermc.asm.rules.generate.GeneratedMethodSource
VOIDFields inherited from interface io.papermc.asm.rules.method.MethodRewriteRule
LAMBDA_METAFACTORY_OWNERFields inherited from interface io.papermc.asm.rules.RewriteRule
EMPTYFields inherited from interface io.papermc.asm.rules.method.StaticRewrite
CONSTRUCTOR_METHOD_NAME, GENERATED_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionFuzzyParam(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher methodMatcher, Method staticHandler) Creates an instance of aFuzzyParamrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreateRewrite(ClassProcessingContext context, MethodTypeDesc intermediateDescriptor, GeneratedMethodHolder.MethodCallData originalCallData) Creates a rewrite for the given method call data.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.Returns the value of themethodMatcherrecord component.owners()Returns the value of theownersrecord component.Returns the value of thestaticHandlerrecord component.final StringtoString()Returns a string representation of this record class.transformInvokedDescriptor(MethodTypeDesc original, Set<Integer> context) Transforms the descriptor of the generated method to the descriptor of the method that will be called within the generated method.transformToRedirectDescriptor(MethodTypeDesc intermediateDescriptor) Transforms the intermediate descriptor to the final descriptor that will be used in the rewritten bytecode.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.papermc.asm.rules.generate.GeneratedMethodSource
generateConstructor, generateMethod, generateReturnValueMethods inherited from interface io.papermc.asm.rules.method.MethodRewriteRule
createVisitorMethods inherited from interface io.papermc.asm.rules.method.OwnableMethodRewriteRule.Filtered
shouldProcessMethods inherited from interface io.papermc.asm.rules.OwnableRewriteRule
matchesOwnerMethods inherited from interface io.papermc.asm.rules.method.StaticRewrite
rewriteMethods inherited from interface io.papermc.asm.rules.method.StaticRewrite.Generated
createConstructorRewrite, staticRedirectOwnerMethods inherited from interface io.papermc.asm.rules.generate.StaticRewriteGeneratedMethodHolder.Param
createNewContext, generateParameters
-
Constructor Details
-
FuzzyParam
public FuzzyParam(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher methodMatcher, Method staticHandler) Creates an instance of aFuzzyParamrecord class.- Parameters:
owners- the value for theownersrecord componentexistingType- the value for theexistingTyperecord componentmethodMatcher- the value for themethodMatcherrecord componentstaticHandler- the value for thestaticHandlerrecord component
-
-
Method Details
-
transformToRedirectDescriptor
Description copied from interface:StaticRewriteTransforms the intermediate descriptor to the final descriptor that will be used in the rewritten bytecode.Intermediate means that it has been modified from the original accounting for the virtual/interface/static/constructor-ness of the method call.
- Specified by:
transformToRedirectDescriptorin interfaceStaticRewrite- Parameters:
intermediateDescriptor- the intermediate descriptor- Returns:
- the final descriptor to be used in the rewritten bytecode
-
transformInvokedDescriptor
Description copied from interface:GeneratedMethodSourceTransforms the descriptor of the generated method to the descriptor of the method that will be called within the generated method. This should be the method that actually exists in source.- Specified by:
transformInvokedDescriptorin interfaceGeneratedMethodSource<Set<Integer>>- Specified by:
transformInvokedDescriptorin interfaceStaticRewrite.Generated.Param- Parameters:
original- the method descriptor of the generated method that the bytecode was redirected tocontext- context for the generator- Returns:
- the descriptor of the method that will be called inside the generated method
-
createRewrite
public MethodRewriteRule.Rewrite<GeneratedMethodHolder.MethodCallData> createRewrite(ClassProcessingContext context, MethodTypeDesc intermediateDescriptor, GeneratedMethodHolder.MethodCallData originalCallData) Description copied from interface:StaticRewriteCreates a rewrite for the given method call data.- Specified by:
createRewritein interfaceStaticRewrite- Specified by:
createRewritein interfaceStaticRewrite.Generated- Parameters:
context- the contextintermediateDescriptor- the descriptor modified from the original to account for the method call type (interface, virtual, static, etc.)originalCallData- the original method call data- Returns:
- the 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). -
owners
Returns the value of theownersrecord component.- Specified by:
ownersin interfaceOwnableRewriteRule- Returns:
- the value of the
ownersrecord component
-
existingType
Returns the value of theexistingTyperecord component.- Specified by:
existingTypein interfaceStaticRewrite.Generated- Returns:
- the value of the
existingTyperecord component
-
methodMatcher
Returns the value of themethodMatcherrecord component.- Specified by:
methodMatcherin interfaceOwnableMethodRewriteRule.Filtered- Specified by:
methodMatcherin interfaceStaticRewrite.Generated- Returns:
- the value of the
methodMatcherrecord component
-
staticHandler
Returns the value of thestaticHandlerrecord component.- Specified by:
staticHandlerin interfaceStaticRewriteGeneratedMethodHolder- Returns:
- the value of the
staticHandlerrecord component
-