类 Handle
java.lang.Object
cn.taketoday.bytecode.Handle
A reference to a field or a method.
- 作者:
- Remi Forax, Eric Bruneton
-
字段概要
字段修饰符和类型字段说明private final StringThe descriptor of the field or method designated by this handle.private final booleanWhether the owner is an interface or not.private final StringThe name of the field or method designated by this handle.private final StringThe internal name of the class that owns the field or method designated by this handle.private final intThe kind of field or method designated by this Handle. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleangetDesc()Returns the descriptor of the field or method designated by this handle.getName()Returns the name of the field or method designated by this handle.getOwner()Returns the internal name of the class that owns the field or method designated by this handle.intgetTag()Returns the kind of field or method designated by this handle.inthashCode()booleanReturns true if the owner of the field or method designated by this handle is an interface.toString()Returns the textual representation of this handle.
-
字段详细资料
-
tag
private final int tagThe kind of field or method designated by this Handle. Should beOpcodes.H_GETFIELD,Opcodes.H_GETSTATIC,Opcodes.H_PUTFIELD,Opcodes.H_PUTSTATIC,Opcodes.H_INVOKEVIRTUAL,Opcodes.H_INVOKESTATIC,Opcodes.H_INVOKESPECIAL,Opcodes.H_NEWINVOKESPECIALorOpcodes.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. -
descriptor
The descriptor of the field or method designated by this handle. -
isInterface
private final boolean isInterfaceWhether the owner is an interface or not.
-
-
构造器详细资料
-
Handle
Constructs a new field or method handle.- 参数:
tag- the kind of field or method designated by this Handle. Must beOpcodes.H_GETFIELD,Opcodes.H_GETSTATIC,Opcodes.H_PUTFIELD,Opcodes.H_PUTSTATIC,Opcodes.H_INVOKEVIRTUAL,Opcodes.H_INVOKESTATIC,Opcodes.H_INVOKESPECIAL,Opcodes.H_NEWINVOKESPECIALorOpcodes.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.descriptor- the descriptor of the field or method designated by this handle.
-
Handle
Constructs a new field or method handle.- 参数:
tag- the kind of field or method designated by this Handle. Must beOpcodes.H_GETFIELD,Opcodes.H_GETSTATIC,Opcodes.H_PUTFIELD,Opcodes.H_PUTSTATIC,Opcodes.H_INVOKEVIRTUAL,Opcodes.H_INVOKESTATIC,Opcodes.H_INVOKESPECIAL,Opcodes.H_NEWINVOKESPECIALorOpcodes.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.descriptor- the descriptor of the field or method designated by this handle.isInterface- whether the owner is an interface or not.
-
-
方法详细资料
-
getTag
public int getTag()Returns the kind of field or method designated by this handle. -
getOwner
Returns the internal name of the class that owns the field or method designated by this handle.- 返回:
- the internal name of the class that owns the field or method designated by this handle.
-
getName
Returns the name of the field or method designated by this handle.- 返回:
- the name of the field or method designated by this handle.
-
getDesc
Returns the descriptor of the field or method designated by this handle.- 返回:
- the descriptor of the field or method designated by this handle.
-
isInterface
public boolean isInterface()Returns true if the owner of the field or method designated by this handle is an interface.- 返回:
- true if the owner of the field or method designated by this handle is an interface.
-
equals
-
hashCode
public int hashCode() -
toString
Returns the textual representation of this handle. The textual representation is:- for a reference to a class: owner "." name descriptor " (" tag ")",
- for a reference to an interface: owner "." name descriptor " (" tag " itf)".
-