Package com.tonic.analysis.ssa.value
Class MethodHandleConstant
- java.lang.Object
-
- com.tonic.analysis.ssa.value.Constant
-
- com.tonic.analysis.ssa.value.MethodHandleConstant
-
-
Field Summary
Fields Modifier and Type Field Description static intREF_getFieldstatic intREF_getStaticstatic intREF_invokeInterfacestatic intREF_invokeSpecialstatic intREF_invokeStaticstatic intREF_invokeVirtualstatic intREF_newInvokeSpecialstatic intREF_putFieldstatic intREF_putStatic
-
Constructor Summary
Constructors Constructor Description MethodHandleConstant(int referenceKind, String owner, String name, String descriptor)Creates a MethodHandle constant.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetDescriptor()StringgetName()StringgetOwner()intgetReferenceKind()StringgetReferenceKindName()Gets a human-readable name for the reference kind.IRTypegetType()Gets the IR type of this value.ObjectgetValue()Gets the value of this constant.inthashCode()booleanisFieldReference()Checks if this method handle references a field.booleanisMethodReference()Checks if this method handle references a method.StringtoString()-
Methods inherited from class com.tonic.analysis.ssa.value.Constant
isConstant
-
Methods inherited from interface com.tonic.analysis.ssa.value.Value
isNull, isSSAValue
-
-
-
-
Field Detail
-
REF_getField
public static final int REF_getField
- See Also:
- Constant Field Values
-
REF_getStatic
public static final int REF_getStatic
- See Also:
- Constant Field Values
-
REF_putField
public static final int REF_putField
- See Also:
- Constant Field Values
-
REF_putStatic
public static final int REF_putStatic
- See Also:
- Constant Field Values
-
REF_invokeVirtual
public static final int REF_invokeVirtual
- See Also:
- Constant Field Values
-
REF_invokeStatic
public static final int REF_invokeStatic
- See Also:
- Constant Field Values
-
REF_invokeSpecial
public static final int REF_invokeSpecial
- See Also:
- Constant Field Values
-
REF_newInvokeSpecial
public static final int REF_newInvokeSpecial
- See Also:
- Constant Field Values
-
REF_invokeInterface
public static final int REF_invokeInterface
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MethodHandleConstant
public MethodHandleConstant(int referenceKind, String owner, String name, String descriptor)Creates a MethodHandle constant.- Parameters:
referenceKind- the reference kind (1-9)owner- the class containing the referenced membername- the name of the referenced memberdescriptor- the descriptor of the referenced member
-
-
Method Detail
-
getReferenceKind
public int getReferenceKind()
- Returns:
- the reference kind
-
getOwner
public String getOwner()
- Returns:
- the owner
-
getName
public String getName()
- Returns:
- the name
-
getDescriptor
public String getDescriptor()
- Returns:
- the descriptor
-
getType
public IRType getType()
Description copied from interface:ValueGets the IR type of this value.- Returns:
- the IR type
-
getValue
public Object getValue()
Description copied from class:ConstantGets the value of this constant.
-
isFieldReference
public boolean isFieldReference()
Checks if this method handle references a field.- Returns:
- true if this is a field reference
-
isMethodReference
public boolean isMethodReference()
Checks if this method handle references a method.- Returns:
- true if this is a method reference
-
getReferenceKindName
public String getReferenceKindName()
Gets a human-readable name for the reference kind.- Returns:
- the reference kind name
-
-