public final class Handle extends Object
Constructor and Description |
---|
Handle(int tag,
String owner,
String name,
String desc)
Deprecated.
this constructor has been superseded
by
Handle(int, String, String, String, boolean) . |
Handle(int tag,
String owner,
String name,
String desc,
boolean itf)
Constructs a new field or method handle.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDesc()
Returns the descriptor of the field or method designated by this handle.
|
String |
getName()
Returns the name of the field or method designated by this handle.
|
String |
getOwner()
Returns the internal name of the class that owns the field or method
designated by this handle.
|
int |
getTag()
Returns the kind of field or method designated by this handle.
|
int |
hashCode() |
boolean |
isInterface()
Returns true if the owner of the field or method designated
by this handle is an interface.
|
String |
toString()
Returns the textual representation of this handle.
|
@Deprecated public Handle(int tag, String owner, String name, String desc)
Handle(int, String, String, String, boolean)
.tag
- the kind of field or method designated by this Handle. Must be
Opcodes.H_GETFIELD
, Opcodes.H_GETSTATIC
,
Opcodes.H_PUTFIELD
, Opcodes.H_PUTSTATIC
,
Opcodes.H_INVOKEVIRTUAL
,
Opcodes.H_INVOKESTATIC
,
Opcodes.H_INVOKESPECIAL
,
Opcodes.H_NEWINVOKESPECIAL
or
Opcodes.H_INVOKEINTERFACE
.owner
- the internal name of the class that owns the field or method
designated by this handle.name
- the name of the field or method designated by this handle.desc
- the descriptor of the field or method designated by this
handle.public Handle(int tag, String owner, String name, String desc, boolean itf)
tag
- the kind of field or method designated by this Handle. Must be
Opcodes.H_GETFIELD
, Opcodes.H_GETSTATIC
,
Opcodes.H_PUTFIELD
, Opcodes.H_PUTSTATIC
,
Opcodes.H_INVOKEVIRTUAL
,
Opcodes.H_INVOKESTATIC
,
Opcodes.H_INVOKESPECIAL
,
Opcodes.H_NEWINVOKESPECIAL
or
Opcodes.H_INVOKEINTERFACE
.owner
- the internal name of the class that owns the field or method
designated by this handle.name
- the name of the field or method designated by this handle.desc
- the descriptor of the field or method designated by this
handle.itf
- true if the owner is an interface.public int getTag()
public String getOwner()
public String getName()
public String getDesc()
public boolean isInterface()
public String toString()
for a reference to a class: owner '.' name desc ' ' '(' tag ')' for a reference to an interface: owner '.' name desc ' ' '(' tag ' ' itf ')'. As this format is unambiguous, it can be parsed if necessary.