Class MemberRef
java.lang.Object
org.spongepowered.asm.mixin.struct.MemberRef
- Direct Known Subclasses:
MemberRef.Field,MemberRef.Handle,MemberRef.Method
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 ClassesModifier and TypeClassDescriptionstatic final classA static reference to a field backed by field get/put instructionstatic final classA reference to a field or method backed by a method handlestatic final classA static reference to a method backed by an invoke instruction -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract StringgetDesc()Descriptor of this member.abstract StringgetName()Name of this member.abstract intThe opcode of the invocation.abstract StringgetOwner()The internal name for the owner of this member.inthashCode()abstract booleanisField()Whether this member is a field.booleanWhether the owner of this member is a mixin.abstract voidChanges the descriptor of this memberabstract voidRename this member.abstract voidsetOpcode(int opcode) Set the opcode of the invocation.abstract voidChanges the owner of thistoString()
-
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
The internal name for the owner of this member.- Returns:
- The owners name
-
setOwner
Changes the owner of this- Parameters:
owner- New owner
-
getName
Name of this member.- Returns:
- Name of this member.
-
setName
Rename this member.- Parameters:
name- New name for this member.
-
getDesc
Descriptor of this member.- Returns:
- Descriptor of this member
-
setDesc
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
-
equals
-
hashCode
public int hashCode()
-