Package proguard.classfile.constant
Class DynamicConstant
java.lang.Object
proguard.util.SimpleProcessable
proguard.classfile.constant.Constant
proguard.classfile.constant.DynamicConstant
- All Implemented Interfaces:
Serializable,Processable
This
Constant represents a dynamic constant in the constant pool.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionClazz[]An extra field pointing to the Clazz objects referenced in the descriptor string.intintFields inherited from class proguard.classfile.constant.Constant
CLASS, DOUBLE, DYNAMIC, FIELDREF, FLOAT, INTEGER, INTERFACE_METHODREF, INVOKE_DYNAMIC, LONG, METHOD_HANDLE, METHOD_TYPE, METHODREF, MODULE, NAME_AND_TYPE, PACKAGE, PRIMITIVE_ARRAY, STRING, UTF8Fields inherited from class proguard.util.SimpleProcessable
processingFlags, processingInfo -
Constructor Summary
ConstructorsConstructorDescriptionCreates an uninitialized InvokeDynamicConstant.DynamicConstant(int u2bootstrapMethodAttributeIndex, int u2nameAndTypeIndex, Clazz[] referencedClasses) Creates a new InvokeDynamicConstant with the given bootstrap method and name-and-type indices. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(Clazz clazz, ConstantVisitor constantVisitor) Accepts the given visitor.voidbootstrapMethodHandleAccept(Clazz clazz, ConstantVisitor constantVisitor) Lets the bootstrap method handle constant accept the given visitor.booleanintReturns the index of the bootstrap method in the bootstrap methods attribute of the class.Returns the method name.intReturns the name-and-type index.intgetTag()Returns the constant pool info tag that specifies the entry type.Returns the method type.inthashCode()booleanReturns whether the constant is of category 2.voidreferencedClassesAccept(ClassVisitor classVisitor) Lets the Clazz objects referenced in the descriptor string accept the given visitor.toString()Methods inherited from class proguard.util.SimpleProcessable
addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfoMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface proguard.util.Processable
accept
-
Field Details
-
u2bootstrapMethodAttributeIndex
public int u2bootstrapMethodAttributeIndex -
u2nameAndTypeIndex
public int u2nameAndTypeIndex -
referencedClasses
An extra field pointing to the Clazz objects referenced in the descriptor string. This field is filled out by the. References to primitive types are ignored.ClassReferenceInitializer
-
-
Constructor Details
-
DynamicConstant
public DynamicConstant()Creates an uninitialized InvokeDynamicConstant. -
DynamicConstant
public DynamicConstant(int u2bootstrapMethodAttributeIndex, int u2nameAndTypeIndex, Clazz[] referencedClasses) Creates a new InvokeDynamicConstant with the given bootstrap method and name-and-type indices.- Parameters:
u2bootstrapMethodAttributeIndex- the index of the bootstrap method entry in the bootstrap methods attribute.u2nameAndTypeIndex- the index of the name and type entry in the constant pool.referencedClasses- the classes referenced by the type.
-
-
Method Details
-
getBootstrapMethodAttributeIndex
public int getBootstrapMethodAttributeIndex()Returns the index of the bootstrap method in the bootstrap methods attribute of the class. -
getNameAndTypeIndex
public int getNameAndTypeIndex()Returns the name-and-type index. -
getName
Returns the method name. -
getType
Returns the method type. -
referencedClassesAccept
Lets the Clazz objects referenced in the descriptor string accept the given visitor. -
bootstrapMethodHandleAccept
Lets the bootstrap method handle constant accept the given visitor. -
getTag
public int getTag()Description copied from class:ConstantReturns the constant pool info tag that specifies the entry type. -
isCategory2
public boolean isCategory2()Description copied from class:ConstantReturns whether the constant is of category 2. This means that it takes up the space of two category 1 types in the constant pool or on the stack, for instance.- Specified by:
isCategory2in classConstant
-
accept
Description copied from class:ConstantAccepts the given visitor. -
equals
-
hashCode
public int hashCode() -
toString
-