Class DynamicConstant

  • All Implemented Interfaces:
    Value

    public final class DynamicConstant
    extends Constant
    Represents a dynamic constant loaded via ldc (condy).
    • Constructor Detail

      • DynamicConstant

        public DynamicConstant​(String name,
                               String descriptor,
                               int bootstrapMethodIndex,
                               int originalCpIndex)
        Creates a dynamic constant.
        Parameters:
        name - the name of the constant
        descriptor - the type descriptor
        bootstrapMethodIndex - the index into the BootstrapMethods attribute
        originalCpIndex - the original constant pool index
    • Method Detail

      • getName

        public String getName()
        Returns:
        the name
      • getDescriptor

        public String getDescriptor()
        Returns:
        the descriptor
      • getBootstrapMethodIndex

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

        public int getOriginalCpIndex()
        Returns:
        the original cp index
      • getType

        public IRType getType()
        Description copied from interface: Value
        Gets the IR type of this value.
        Returns:
        the IR type
      • getValue

        public Object getValue()
        Description copied from class: Constant
        Gets the value of this constant.
        Specified by:
        getValue in class Constant
        Returns:
        the constant value
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object