Class IntegerMemberValue

  • public class IntegerMemberValue
    extends MemberValue
    Integer constant value.
    Bill Burke, Shigeru Chiba
    • Constructor Detail

      • IntegerMemberValue

        public IntegerMemberValue​(int index,
                                  ConstPool cp)
        Constructs an int constant value. The initial value is specified by the constant pool entry at the given index.
        index - the index of a CONSTANT_Integer_info structure.
      • IntegerMemberValue

        public IntegerMemberValue​(ConstPool cp,
                                  int value)
        Constructs an int constant value. Note that this constructor receives the initial value as the second parameter unlike the corresponding constructors in the sibling classes. This is for making a difference from the constructor that receives an index into the constant pool table as the first parameter. Note that the index is also int type.
        value - the initial value.
      • IntegerMemberValue

        public IntegerMemberValue​(ConstPool cp)
        Constructs an int constant value. The initial value is 0.
    • Method Detail

      • getValue

        public int getValue()
        Obtains the value of the member.
      • setValue

        public void setValue​(int newValue)
        Sets the value of the member.
      • toString

        public java.lang.String toString()
        Obtains the string representation of this object.
        toString in class java.lang.Object
      • write

        public void write​(AnnotationsWriter writer)
        Writes the value.
        Specified by:
        write in class MemberValue