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 classMemberRef.FieldA static reference to a field backed by field get/put instructionstatic classMemberRef.HandleA reference to a field or method backed by a method handlestatic classMemberRef.MethodA static reference to a method backed by an invoke instruction -
Constructor Summary
Constructors Constructor Description MemberRef() -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)abstract java.lang.StringgetDesc()Descriptor of this member.abstract java.lang.StringgetName()Name of this member.abstract intgetOpcode()The opcode of the invocation.abstract java.lang.StringgetOwner()The internal name for the owner of this member.inthashCode()abstract booleanisField()Whether this member is a field.abstract voidsetDesc(java.lang.String desc)Changes the descriptor of this memberabstract voidsetName(java.lang.String name)Rename this member.abstract voidsetOpcode(int opcode)Set the opcode of the invocation.abstract voidsetOwner(java.lang.String owner)Changes the owner of thisjava.lang.StringtoString()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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-