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
  • Constructor Details

    • DirectReturn

      public DirectReturn(Set<ClassDesc> owners, ClassDesc existingType, TargetedMethodMatcher methodMatcher, Method staticHandler, boolean includeOwnerContext)
      Creates an instance of a DirectReturn record class.
      Parameters:
      owners - the value for the owners record component
      existingType - the value for the existingType record component
      methodMatcher - the value for the methodMatcher record component
      staticHandler - the value for the staticHandler record component
      includeOwnerContext - the value for the includeOwnerContext record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • owners

      public Set<ClassDesc> owners()
      Returns the value of the owners record component.
      Specified by:
      owners in interface OwnableRewriteRule
      Returns:
      the value of the owners record component
    • existingType

      public ClassDesc existingType()
      Returns the value of the existingType record component.
      Specified by:
      existingType in interface StaticRewrite.Generated
      Returns:
      the value of the existingType record component
    • methodMatcher

      public TargetedMethodMatcher methodMatcher()
      Returns the value of the methodMatcher record component.
      Specified by:
      methodMatcher in interface OwnableMethodRewriteRule.Filtered
      Specified by:
      methodMatcher in interface StaticRewrite.Generated
      Returns:
      the value of the methodMatcher record component
    • staticHandler

      public Method staticHandler()
      Returns the value of the staticHandler record component.
      Specified by:
      staticHandler in interface StaticRewriteGeneratedMethodHolder
      Returns:
      the value of the staticHandler record component
    • includeOwnerContext

      public boolean includeOwnerContext()
      Returns the value of the includeOwnerContext record component.
      Specified by:
      includeOwnerContext in interface StaticRewriteGeneratedMethodHolder.Return
      Returns:
      the value of the includeOwnerContext record component