Class RefConstant

    • Constructor Detail

      • RefConstant

        public RefConstant​(Constant[] pool,
                           int classIndex,
                           int nameAndTypeIndex)
        Creates an instance for the specified class, name, and type.
        Parameters:
        pool - Constant pool. Needed for resolving references.
        classIndex - Index of ClassConstant.
        nameAndTypeIndex - Index of NameAndTypeConstant.
    • Method Detail

      • getClassConstant

        public ClassConstant getClassConstant()
        Returns the class constant.
      • getNameAndType

        public NameAndTypeConstant getNameAndType()
        Returns the name-and-type constant.
      • toString

        protected java.lang.String toString​(java.lang.String constantType)
        Pretty printing. Will be used by toString of the subclasses.