org.mvel2.asm
Class Handle

java.lang.Object
  extended by org.mvel2.asm.Handle

public final class Handle
extends Object

A reference to a field or a method.

Author:
Remi Forax, Eric Bruneton

Constructor Summary
Handle(int tag, String owner, String name, String descriptor)
          Deprecated. this constructor has been superseded by Handle(int, String, String, String, boolean).
Handle(int tag, String owner, String name, String descriptor, boolean isInterface)
          Constructs a new field or method handle.
 
Method Summary
 boolean equals(Object object)
           
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Handle

@Deprecated
public Handle(int tag,
                         String owner,
                         String name,
                         String descriptor)
Deprecated. this constructor has been superseded by Handle(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 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.
descriptor - the descriptor of the field or method designated by this handle.

Handle

public Handle(int tag,
              String owner,
              String name,
              String descriptor,
              boolean isInterface)
Constructs a new field or method handle.

Parameters:
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.
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.

Returns:
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.

getOwner

public 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.

getName

public 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 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(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Returns the textual representation of this handle. The textual representation is:

Overrides:
toString in class Object


Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.