Package org.eclipse.sisu.space.asm
Class Handle
- java.lang.Object
-
- org.eclipse.sisu.space.asm.Handle
-
public final class Handle extends java.lang.ObjectA reference to a field or a method.- Author:
- Remi Forax, Eric Bruneton
-
-
Constructor Summary
Constructors Constructor Description Handle(int tag, java.lang.String owner, java.lang.String name, java.lang.String descriptor)Deprecated.this constructor has been superseded byHandle(int, String, String, String, boolean).Handle(int tag, java.lang.String owner, java.lang.String name, java.lang.String descriptor, boolean isInterface)Constructs a new field or method handle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object object)java.lang.StringgetDesc()Returns the descriptor of the field or method designated by this handle.java.lang.StringgetName()Returns the name of the field or method designated by this handle.java.lang.StringgetOwner()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()booleanisInterface()Returns true if the owner of the field or method designated by this handle is an interface.java.lang.StringtoString()Returns the textual representation of this handle.
-
-
-
Constructor Detail
-
Handle
@Deprecated public Handle(int tag, java.lang.String owner, java.lang.String name, java.lang.String descriptor)Deprecated.this constructor has been superseded byHandle(int, String, String, String, boolean).Constructs a new field or method handle.- Parameters:
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 (seeType.getInternalName()).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
public Handle(int tag, java.lang.String owner, java.lang.String name, java.lang.String descriptor, boolean isInterface)Constructs a new field or method handle.- Parameters:
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 (seeType.getInternalName()).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.
-
-
Method Detail
-
getTag
public int getTag()
Returns the kind of field or method designated by this handle.
-
getOwner
public java.lang.String getOwner()
Returns the internal name of the class that owns the field or method designated by this handle.- Returns:
- the internal name of the class that owns the field or method designated by this handle
(see
Type.getInternalName()).
-
getName
public java.lang.String getName()
Returns the name of the field or method designated by this handle.- Returns:
- the name of the field or method designated by this handle.
-
getDesc
public java.lang.String getDesc()
Returns the descriptor of the field or method designated by this handle.- Returns:
- 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.- Returns:
- true if the owner of the field or method designated by this handle is an interface.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String 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)".
- Overrides:
toStringin classjava.lang.Object
-
-