Class ClassFile.FieldInfo

  • Enclosing class:
    ClassFile

    public static class ClassFile.FieldInfo
    extends java.lang.Object
    Representation of a "method_info" structure, as defined by JVMS7 4.5.
    • Field Detail

      • nameIndex

        private final short nameIndex
      • descriptorIndex

        private final short descriptorIndex
    • Method Detail

      • getModifierFlags

        public short getModifierFlags()
        Returns:
        The modifier flags of the field; or'ed values are the constants declared in Mod
      • getAnnotations

        public Java.Annotation[] getAnnotations()
        Returns:
        The annotations of this field
      • getName

        public java.lang.String getName​(ClassFile classFile)
        Returns:
        The field's name
      • getDescriptor

        public java.lang.String getDescriptor​(ClassFile classFile)
        Returns:
        The field descriptor describing this field
      • addAttribute

        public void addAttribute​(ClassFile.AttributeInfo attribute)
        Adds the given attribute to this field.
      • store

        public void store​(java.io.DataOutputStream dos)
                   throws java.io.IOException
        Writes this object to a DataOutputStream, in the format described inJVMS7 4.5.
        Throws:
        java.io.IOException