Class ConstantDynamicInfo


  • public final class ConstantDynamicInfo
    extends Object
    A CONSTANT_Dynamic constant pool entry awaiting bootstrap-method resolution.
    • Constructor Detail

      • ConstantDynamicInfo

        public ConstantDynamicInfo​(int bootstrapMethodIndex,
                                   String name,
                                   String descriptor,
                                   int constantPoolIndex)
        Creates a constant-dynamic descriptor.
        Parameters:
        bootstrapMethodIndex - index into the BootstrapMethods attribute
        name - the constant's name
        descriptor - the constant's field descriptor
        constantPoolIndex - index of the entry in the constant pool
    • Method Detail

      • getBootstrapMethodIndex

        public int getBootstrapMethodIndex()
        Returns:
        the bootstrap method index
      • getName

        public String getName()
        Returns:
        the name
      • getDescriptor

        public String getDescriptor()
        Returns:
        the descriptor
      • getConstantPoolIndex

        public int getConstantPoolIndex()
        Returns:
        the constant pool index
      • getReturnType

        public String getReturnType()
        Returns:
        the return type
      • isWideType

        public boolean isWideType()
        Checks whether the constant occupies two stack slots.
        Returns:
        true if the descriptor is long or double
      • isPrimitive

        public boolean isPrimitive()
        Checks whether the constant is of primitive type.
        Returns:
        true if the descriptor denotes a primitive
      • isReference

        public boolean isReference()
        Checks whether the constant is of reference type.
        Returns:
        true if the descriptor denotes an object or array