Class SimpleElementValueGen


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

      • idx

        private final int idx
    • Constructor Detail

      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     boolean value)
      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     byte value)
      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     char value)
      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     double value)
      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     float value)
      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     int value)
      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     long value)
      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     short value)
      • SimpleElementValueGen

        public SimpleElementValueGen​(int type,
                                     ConstantPoolGen cpGen,
                                     java.lang.String value)
      • SimpleElementValueGen

        protected SimpleElementValueGen​(int type,
                                        int idx,
                                        ConstantPoolGen cpGen)
        Protected ctor used for deserialization, doesn't *put* an entry in the constant pool, assumes the one at the supplied index is correct.
      • SimpleElementValueGen

        public SimpleElementValueGen​(SimpleElementValue value,
                                     ConstantPoolGen cpool,
                                     boolean copyPoolEntries)
        The boolean controls whether we copy info from the 'old' constant pool to the 'new'. You need to use this ctor if the annotation is being copied from one file to another.
    • 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.
      • getIndex

        public int getIndex()
      • getValueInt

        public int getValueInt()
      • getValueString

        public java.lang.String getValueString()
      • 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.