Class MemberRef

java.lang.Object
org.spongepowered.asm.mixin.struct.MemberRef
Direct Known Subclasses:
MemberRef.Field, MemberRef.Handle, MemberRef.Method

public abstract class MemberRef extends Object
Reference to a field or method that also includes invocation instructions.

Two instances are defined to be equal if they both refer to the same member and have the same invocation instructions.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A static reference to a field backed by field get/put instruction
    static final class 
    A reference to a field or method backed by a method handle
    static final class 
    A static reference to a method backed by an invoke instruction
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    abstract String
    Descriptor of this member.
    abstract String
    Name of this member.
    abstract int
    The opcode of the invocation.
    abstract String
    The internal name for the owner of this member.
    int
     
    abstract boolean
    Whether this member is a field.
    boolean
    Whether the owner of this member is a mixin.
    abstract void
    Changes the descriptor of this member
    abstract void
    Rename this member.
    abstract void
    setOpcode(int opcode)
    Set the opcode of the invocation.
    abstract void
    Changes the owner of this
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MemberRef

      public MemberRef()
  • Method Details

    • isField

      public abstract boolean isField()
      Whether this member is a field.
      Returns:
      If this member is a field, else it is a method
    • getOpcode

      public abstract int getOpcode()
      The opcode of the invocation.
      Returns:
      The opcode of the invocation
    • setOpcode

      public abstract void setOpcode(int opcode)
      Set the opcode of the invocation.
      Parameters:
      opcode - new opcode
    • getOwner

      public abstract String getOwner()
      The internal name for the owner of this member.
      Returns:
      The owners name
    • setOwner

      public abstract void setOwner(String owner)
      Changes the owner of this
      Parameters:
      owner - New owner
    • getName

      public abstract String getName()
      Name of this member.
      Returns:
      Name of this member.
    • setName

      public abstract void setName(String name)
      Rename this member.
      Parameters:
      name - New name for this member.
    • getDesc

      public abstract String getDesc()
      Descriptor of this member.
      Returns:
      Descriptor of this member
    • setDesc

      public abstract void setDesc(String desc)
      Changes the descriptor of this member
      Parameters:
      desc - New descriptor of this member
    • ownerIsMixin

      public boolean ownerIsMixin()
      Whether the owner of this member is a mixin.
      Returns:
      Whether the owner of this member is a mixin.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object