Record Class DirectReturnRewrite
java.lang.Object
java.lang.Record
io.papermc.asm.rules.method.returns.DirectReturnRewrite
- All Implemented Interfaces:
GeneratedMethodHolder,GeneratedMethodSource<Void>,GeneratedMethodSource.NoContext,StaticHandlerGeneratedMethodHolder,StaticHandlerGeneratedMethodHolder.Return,GeneratedStaticRewrite,TargetedTypeGeneratedStaticRewrite,TargetedTypeGeneratedStaticRewrite.Return,MethodRewriteRule,OwnableMethodRewriteRule,OwnableMethodRewriteRule.Filtered,StaticRewrite,OwnableRewriteRule,RewriteRule
public record DirectReturnRewrite(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher targetedMethodMatcher, Method staticHandler, boolean includeOwnerContext)
extends Record
implements TargetedTypeGeneratedStaticRewrite.Return, OwnableMethodRewriteRule.Filtered
-
Nested Class Summary
Nested ClassesNested 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.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.generate.StaticHandlerGeneratedMethodHolder
StaticHandlerGeneratedMethodHolder.Param, StaticHandlerGeneratedMethodHolder.ReturnNested classes/interfaces inherited from interface io.papermc.asm.rules.method.generated.TargetedTypeGeneratedStaticRewrite
TargetedTypeGeneratedStaticRewrite.Parameter, TargetedTypeGeneratedStaticRewrite.Return -
Field Summary
Fields 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 -
Constructor Summary
ConstructorsConstructorDescriptionDirectReturnRewrite(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher targetedMethodMatcher, Method staticHandler, boolean includeOwnerContext) Creates an instance of aDirectReturnRewriterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.A matcher to test against method names and descriptors.owners()Returns the value of theownersrecord component.Returns the value of thestaticHandlerrecord component.Returns the value of thetargetedMethodMatcherrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.papermc.asm.rules.generate.GeneratedMethodHolder
createAdapterMethods inherited from interface io.papermc.asm.rules.generate.GeneratedMethodSource
generateConstructor, generateMethod, generateParametersMethods inherited from interface io.papermc.asm.rules.generate.GeneratedMethodSource.NoContext
createNewContextMethods inherited from interface io.papermc.asm.rules.method.generated.GeneratedStaticRewrite
createConstructorRewrite, createRewrite, staticRedirectOwnerMethods 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.generate.StaticHandlerGeneratedMethodHolder.Return
generateReturnValueMethods inherited from interface io.papermc.asm.rules.method.StaticRewrite
rewrite, transformToRedirectDescriptorMethods inherited from interface io.papermc.asm.rules.method.generated.TargetedTypeGeneratedStaticRewrite.Return
transformInvokedDescriptor
-
Constructor Details
-
DirectReturnRewrite
public DirectReturnRewrite(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher targetedMethodMatcher, Method staticHandler, boolean includeOwnerContext) Creates an instance of aDirectReturnRewriterecord class.- Parameters:
owners- the value for theownersrecord componentexistingType- the value for theexistingTyperecord componenttargetedMethodMatcher- the value for thetargetedMethodMatcherrecord componentstaticHandler- the value for thestaticHandlerrecord componentincludeOwnerContext- the value for theincludeOwnerContextrecord component
-
-
Method Details
-
methodMatcher
Description copied from interface:OwnableMethodRewriteRule.FilteredA matcher to test against method names and descriptors.- Specified by:
methodMatcherin interfaceOwnableMethodRewriteRule.Filtered- Returns:
- the method matcher
-
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.- Specified by:
ownersin interfaceOwnableRewriteRule- Returns:
- the value of the
ownersrecord component
-
existingType
Returns the value of theexistingTyperecord component.- Specified by:
existingTypein interfaceTargetedTypeGeneratedStaticRewrite- Returns:
- the value of the
existingTyperecord component
-
targetedMethodMatcher
Returns the value of thetargetedMethodMatcherrecord component.- Returns:
- the value of the
targetedMethodMatcherrecord component
-
staticHandler
Returns the value of thestaticHandlerrecord component.- Specified by:
staticHandlerin interfaceStaticHandlerGeneratedMethodHolder- Returns:
- the value of the
staticHandlerrecord component
-
includeOwnerContext
public boolean includeOwnerContext()Returns the value of theincludeOwnerContextrecord component.- Specified by:
includeOwnerContextin interfaceStaticHandlerGeneratedMethodHolder.Return- Returns:
- the value of the
includeOwnerContextrecord component
-