Class ClassElementValueGen


  • public class ClassElementValueGen
    extends ElementValueGen
    Generates class element values in annotations.
    Since:
    6.0
    • Field Detail

      • idx

        private final int idx
    • Constructor Detail

      • ClassElementValueGen

        public ClassElementValueGen​(ClassElementValue value,
                                    ConstantPoolGen cpool,
                                    boolean copyPoolEntries)
        Constructs a ClassElementValueGen.
        Parameters:
        value - the class element value.
        cpool - the constant pool generator.
        copyPoolEntries - whether to copy pool entries.
      • ClassElementValueGen

        protected ClassElementValueGen​(int typeIdx,
                                       ConstantPoolGen cpool)
        Constructs a ClassElementValueGen.
        Parameters:
        typeIdx - the type index.
        cpool - the constant pool generator.
      • ClassElementValueGen

        public ClassElementValueGen​(ObjectType t,
                                    ConstantPoolGen cpool)
        Constructs a ClassElementValueGen.
        Parameters:
        t - the object type.
        cpool - the constant pool generator.
    • Method Detail

      • dump

        public void dump​(java.io.DataOutputStream dos)
                  throws java.io.IOException
        Description copied from class: ElementValueGen
        Dumps this element value to a DataOutputStream.
        Specified by:
        dump in class ElementValueGen
        Parameters:
        dos - the output stream.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • getClassString

        public java.lang.String getClassString()
        Gets the class string.
        Returns:
        the class string.
      • getElementValue

        public ElementValue getElementValue()
        Return immutable variant of this ClassElementValueGen.
        Specified by:
        getElementValue in class ElementValueGen
        Returns:
        immutable variant of this ClassElementValueGen.
      • getIndex

        public int getIndex()
        Gets the index.
        Returns:
        the index.
      • stringifyValue

        public java.lang.String stringifyValue()
        Description copied from class: ElementValueGen
        Returns a string representation of the element value.
        Specified by:
        stringifyValue in class ElementValueGen
        Returns:
        a string representation of the element value.