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 java.lang.Object
Reference to a field or method that also includes invocation instructions.

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

  • Nested Class Summary

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

    Constructors
    Constructor Description
    MemberRef()  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    abstract java.lang.String getDesc()
    Descriptor of this member.
    abstract java.lang.String getName()
    Name of this member.
    abstract int getOpcode()
    The opcode of the invocation.
    abstract java.lang.String getOwner()
    The internal name for the owner of this member.
    int hashCode()  
    abstract boolean isField()
    Whether this member is a field.
    abstract void setDesc​(java.lang.String desc)
    Changes the descriptor of this member
    abstract void setName​(java.lang.String name)
    Rename this member.
    abstract void setOpcode​(int opcode)
    Set the opcode of the invocation.
    abstract void setOwner​(java.lang.String owner)
    Changes the owner of this
    java.lang.String toString()  

    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 java.lang.String getOwner()
      The internal name for the owner of this member.
      Returns:
      The owners name
    • setOwner

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

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

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

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

      public abstract void setDesc​(java.lang.String desc)
      Changes the descriptor of this member
      Parameters:
      desc - New descriptor of this member
    • toString

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

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object