Class ElementValuePair


  • public class ElementValuePair
    extends java.lang.Object
    An annotation's element value pair.
    Since:
    6.0
    • Field Detail

      • elementNameIndex

        private final int elementNameIndex
    • Constructor Detail

      • ElementValuePair

        public ElementValuePair​(int elementNameIndex,
                                ElementValue elementValue,
                                ConstantPool constantPool)
        Constructs an ElementValuePair.
        Parameters:
        elementNameIndex - the element name index.
        elementValue - the element value.
        constantPool - the constant pool.
    • Method Detail

      • dump

        protected void dump​(java.io.DataOutputStream dos)
                     throws java.io.IOException
        Dumps this element value pair to a DataOutputStream.
        Parameters:
        dos - the output stream.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • getNameIndex

        public int getNameIndex()
        Gets the name index.
        Returns:
        the name index.
      • getNameString

        public java.lang.String getNameString()
        Gets the name string.
        Returns:
        the name string.
      • getValue

        public final ElementValue getValue()
        Gets the value.
        Returns:
        the element value.
      • toShortString

        public java.lang.String toShortString()
        Gets a short string representation.
        Returns:
        a short string representation.