public class MethodTypeConstant extends Constant
Constant represents a method handle constant in the constant pool.| Modifier and Type | Field and Description |
|---|---|
Clazz |
javaLangInvokeMethodTypeClass
An extra field pointing to the java.lang.invoke.MethodType Clazz object.
|
Clazz[] |
referencedClasses
An extra field pointing to the Clazz objects referenced in the
descriptor string.
|
int |
u2descriptorIndex |
CLASS, DOUBLE, DYNAMIC, FIELDREF, FLOAT, INTEGER, INTERFACE_METHODREF, INVOKE_DYNAMIC, LONG, METHOD_HANDLE, METHOD_TYPE, METHODREF, MODULE, NAME_AND_TYPE, PACKAGE, PRIMITIVE_ARRAY, STRING, UTF8processingFlags, processingInfo| Constructor and Description |
|---|
MethodTypeConstant()
Creates an uninitialized MethodTypeConstant.
|
MethodTypeConstant(int u2descriptorIndex,
Clazz[] referencedClasses)
Creates a new MethodTypeConstant with the given descriptor index.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Clazz clazz,
ConstantVisitor constantVisitor)
Accepts the given visitor.
|
boolean |
equals(java.lang.Object object) |
int |
getDescriptorIndex()
Returns the descriptor index.
|
int |
getTag()
Returns the constant pool info tag that specifies the entry type.
|
java.lang.String |
getType(Clazz clazz)
Returns the type.
|
int |
hashCode() |
boolean |
isCategory2()
Returns whether the constant is of category 2.
|
void |
referencedClassesAccept(ClassVisitor classVisitor)
Lets the Clazz objects referenced in the descriptor string
accept the given visitor.
|
java.lang.String |
toString() |
getProcessingFlags, getProcessingInfo, setProcessingFlags, setProcessingInfopublic int u2descriptorIndex
public Clazz javaLangInvokeMethodTypeClass
ClassReferenceInitializer..public Clazz[] referencedClasses
ClassReferenceInitializer.
References to primitive types are ignored.public MethodTypeConstant()
public MethodTypeConstant(int u2descriptorIndex,
Clazz[] referencedClasses)
u2descriptorIndex - the index of the descriptor in the constant
pool.referencedClasses - the classes referenced by the descriptor.public int getDescriptorIndex()
public java.lang.String getType(Clazz clazz)
public void referencedClassesAccept(ClassVisitor classVisitor)
public int getTag()
Constantpublic boolean isCategory2()
ConstantisCategory2 in class Constantpublic void accept(Clazz clazz, ConstantVisitor constantVisitor)
Constantpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object