Package io.papermc.asm.rules.method
Record Class StaticRewrites.DirectReturn
java.lang.Object
java.lang.Record
io.papermc.asm.rules.method.StaticRewrites.DirectReturn
- All Implemented Interfaces:
GeneratedMethodHolder,GeneratedMethodSource<Void>,GeneratedMethodSource.NoContext,StaticRewriteGeneratedMethodHolder,StaticRewriteGeneratedMethodHolder.Return,MethodRewriteRule,OwnableMethodRewriteRule,OwnableMethodRewriteRule.Filtered,StaticRewrite,StaticRewrite.Generated,StaticRewrite.Generated.Return,OwnableRewriteRule,RewriteRule
- Enclosing class:
- StaticRewrites
public static record StaticRewrites.DirectReturn(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher methodMatcher, Method staticHandler, boolean includeOwnerContext)
extends Record
implements StaticRewrite.Generated.Return
-
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
ConstructorsConstructorDescriptionDirectReturn(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher methodMatcher, Method staticHandler, boolean includeOwnerContext) Creates an instance of aDirectReturnrecord 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.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.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, generateParametersMethods inherited from interface io.papermc.asm.rules.generate.GeneratedMethodSource.NoContext
createNewContextMethods 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
rewrite, transformToRedirectDescriptorMethods inherited from interface io.papermc.asm.rules.method.StaticRewrite.Generated
createConstructorRewrite, createRewrite, staticRedirectOwnerMethods inherited from interface io.papermc.asm.rules.method.StaticRewrite.Generated.Return
transformInvokedDescriptorMethods inherited from interface io.papermc.asm.rules.generate.StaticRewriteGeneratedMethodHolder.Return
generateReturnValue
-
Constructor Details
-
DirectReturn
public DirectReturn(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher methodMatcher, Method staticHandler, boolean includeOwnerContext) Creates an instance of aDirectReturnrecord class.- Parameters:
owners- the value for theownersrecord componentexistingType- the value for theexistingTyperecord componentmethodMatcher- the value for themethodMatcherrecord componentstaticHandler- the value for thestaticHandlerrecord componentincludeOwnerContext- the value for theincludeOwnerContextrecord component
-
-
Method Details
-
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 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
-
includeOwnerContext
public boolean includeOwnerContext()Returns the value of theincludeOwnerContextrecord component.- Specified by:
includeOwnerContextin interfaceStaticRewriteGeneratedMethodHolder.Return- Returns:
- the value of the
includeOwnerContextrecord component
-