public final class CstMethodHandle extends TypedConstant
MethodHandle.| Modifier and Type | Field and Description |
|---|---|
static int |
METHOD_HANDLE_TYPE_INSTANCE_GET |
static int |
METHOD_HANDLE_TYPE_INSTANCE_PUT |
static int |
METHOD_HANDLE_TYPE_INVOKE_CONSTRUCTOR |
static int |
METHOD_HANDLE_TYPE_INVOKE_DIRECT |
static int |
METHOD_HANDLE_TYPE_INVOKE_INSTANCE |
static int |
METHOD_HANDLE_TYPE_INVOKE_INTERFACE |
static int |
METHOD_HANDLE_TYPE_INVOKE_STATIC |
static int |
METHOD_HANDLE_TYPE_STATIC_GET |
static int |
METHOD_HANDLE_TYPE_STATIC_PUT |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareTo0(Constant other)
Compare the values of this and another instance, which are guaranteed
to be of the same class.
|
int |
getMethodHandleType()
Gets the type of this method handle.
|
static java.lang.String |
getMethodHandleTypeName(int type)
Gets a human readable name for a method handle type.
|
Constant |
getRef()
Gets the actual constant.
|
Type |
getType()
Gets the type associated with this instance.
|
boolean |
isAccessor()
Reports whether the method handle is a field accessor.
|
static boolean |
isAccessor(int type)
Reports whether the method handle type is a field accessor.
|
boolean |
isCategory2()
Returns
true if this instance is a category-2 constant,
meaning it takes up two slots in the constant pool, or
false if this instance is category-1. |
boolean |
isInvocation()
Reports whether the method handle is a method invocation.
|
static boolean |
isInvocation(int type)
Reports whether the method handle type is a method invocation.
|
static CstMethodHandle |
make(int type,
Constant ref)
Makes an instance for the given value.
|
java.lang.String |
toHuman()
Return the "human" string form of this instance.
|
java.lang.String |
toString() |
java.lang.String |
typeName()
Returns the human name for the particular type of constant
this instance is.
|
getBasicFrameType, getBasicType, getFrameType, isConstantpublic static final int METHOD_HANDLE_TYPE_STATIC_PUT
public static final int METHOD_HANDLE_TYPE_STATIC_GET
public static final int METHOD_HANDLE_TYPE_INSTANCE_PUT
public static final int METHOD_HANDLE_TYPE_INSTANCE_GET
public static final int METHOD_HANDLE_TYPE_INVOKE_STATIC
public static final int METHOD_HANDLE_TYPE_INVOKE_INSTANCE
public static final int METHOD_HANDLE_TYPE_INVOKE_CONSTRUCTOR
public static final int METHOD_HANDLE_TYPE_INVOKE_DIRECT
public static final int METHOD_HANDLE_TYPE_INVOKE_INTERFACE
public static CstMethodHandle make(int type, Constant ref)
type - the type of this handleref - non-null; the referenced field or method constantnon-null; the appropriate instancepublic Constant getRef()
public int getMethodHandleType()
public static boolean isAccessor(int type)
type - the method handle typepublic boolean isAccessor()
public static boolean isInvocation(int type)
type - the method handle typepublic boolean isInvocation()
public static java.lang.String getMethodHandleTypeName(int type)
type - the method handle typepublic boolean isCategory2()
true if this instance is a category-2 constant,
meaning it takes up two slots in the constant pool, or
false if this instance is category-1.isCategory2 in class Constanttrue iff this instance is category-2protected int compareTo0(Constant other)
compareTo0 in class Constantother - non-null; the instance to compare to-1, 0, or 1, as usual
for a comparisonpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String typeName()
public java.lang.String toHuman()
toString().non-null; the human string formpublic Type getType()
TypeBearernon-null; the typeCopyright © 2020. All Rights Reserved.