Class FieldInfo

  • All Implemented Interfaces:
    javax.lang.model.AnnotatedConstruct, javax.lang.model.element.Element, javax.lang.model.element.VariableElement, Writable

    public class FieldInfo
    extends java.lang.Object
    implements Writable, javax.lang.model.element.VariableElement
    • Field Detail

      • variableElement

        private javax.lang.model.element.VariableElement variableElement
      • synthetic

        private boolean synthetic
      • readyToWrite

        private boolean readyToWrite
      • access_flags

        private int access_flags
      • name_index

        private int name_index
      • descriptor_index

        private int descriptor_index
    • Constructor Detail

      • FieldInfo

        public FieldInfo​(ClassFile classFile,
                         javax.lang.model.element.VariableElement variableElement)
      • FieldInfo

        public FieldInfo​(ClassFile classFile,
                         javax.lang.model.element.VariableElement variableElement,
                         ConstantValue constant)
      • FieldInfo

        public FieldInfo​(java.io.DataInput in)
                  throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • readyToWrite

        public void readyToWrite()
        Call to this method tells that the Attribute is ready writing. This method must be called before constant pool is written.
      • write

        public void write​(java.io.DataOutput out)
                   throws java.io.IOException
        Specified by:
        write in interface Writable
        Throws:
        java.io.IOException
      • addSignatureIfNeed

        private void addSignatureIfNeed()
      • getConstantValue

        public java.lang.Object getConstantValue()
        Specified by:
        getConstantValue in interface javax.lang.model.element.VariableElement
      • asType

        public javax.lang.model.type.TypeMirror asType()
        Specified by:
        asType in interface javax.lang.model.element.Element
      • getKind

        public javax.lang.model.element.ElementKind getKind()
        Specified by:
        getKind in interface javax.lang.model.element.Element
      • getAnnotationMirrors

        public java.util.List<? extends javax.lang.model.element.AnnotationMirror> getAnnotationMirrors()
        Specified by:
        getAnnotationMirrors in interface javax.lang.model.AnnotatedConstruct
        Specified by:
        getAnnotationMirrors in interface javax.lang.model.element.Element
      • getAnnotation

        public <A extends java.lang.annotation.Annotation> A getAnnotation​(java.lang.Class<A> annotationType)
        Specified by:
        getAnnotation in interface javax.lang.model.AnnotatedConstruct
        Specified by:
        getAnnotation in interface javax.lang.model.element.Element
      • getModifiers

        public java.util.Set<javax.lang.model.element.Modifier> getModifiers()
        Specified by:
        getModifiers in interface javax.lang.model.element.Element
      • getSimpleName

        public javax.lang.model.element.Name getSimpleName()
        Specified by:
        getSimpleName in interface javax.lang.model.element.Element
        Specified by:
        getSimpleName in interface javax.lang.model.element.VariableElement
      • getEnclosingElement

        public javax.lang.model.element.Element getEnclosingElement()
        Specified by:
        getEnclosingElement in interface javax.lang.model.element.Element
        Specified by:
        getEnclosingElement in interface javax.lang.model.element.VariableElement
      • getEnclosedElements

        public java.util.List<? extends javax.lang.model.element.Element> getEnclosedElements()
        Specified by:
        getEnclosedElements in interface javax.lang.model.element.Element
      • accept

        public <R,​P> R accept​(javax.lang.model.element.ElementVisitor<R,​P> v,
                                    P p)
        Specified by:
        accept in interface javax.lang.model.element.Element
      • getAnnotationsByType

        public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType​(java.lang.Class<A> annotationType)
        Specified by:
        getAnnotationsByType in interface javax.lang.model.AnnotatedConstruct