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.ObjectReference 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 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
All Methods Instance Methods Abstract Methods Concrete Methods 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.booleanownerIsMixin()Whether the owner of this member is a mixin.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()
-
-
-
Method Detail
-
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
-
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 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
-
-