Class FieldInfo

    • Field Detail

      • EMPTY_ARRAY

        public static final FieldInfo[] EMPTY_ARRAY
    • Method Detail

      • getNumParams

        public int getNumParams()
      • isNative

        public boolean isNative()
      • isSynchronized

        public boolean isSynchronized()
      • getClassName

        @DottedClassName
        public java.lang.String getClassName()
        Description copied from interface: ClassMember
        Get the full (dotted) name of the class (if the object represents a class) or the class the entity is defined in (if a field or method).
        Specified by:
        getClassName in interface ClassMember
      • getSourceSignature

        public java.lang.String getSourceSignature()
        Description copied from interface: ClassMember
        Get the signature representing the field/method's type, including generic type
        Specified by:
        getSourceSignature in interface ClassMember
      • isEnum

        public boolean isEnum()
        Specified by:
        isEnum in interface XField
        Returns:
        true if this is a enum constant
      • isResolved

        public boolean isResolved()
        Description copied from interface: ClassMember
        Did we find a declaration of this entity?
        Specified by:
        isResolved in interface ClassMember
      • isReferenceType

        public boolean isReferenceType()
        Description copied from interface: XField
        Is the type of the field a reference type?
        Specified by:
        isReferenceType in interface XField
      • isVolatile

        public boolean isVolatile()
        Description copied from interface: XField
        Is this a volatile field?
        Specified by:
        isVolatile in interface XField
      • addAnnotation

        public void addAnnotation​(AnnotationValue annotationValue)
        Destructively add an annotation. We do this for "built-in" annotations that might not be directly evident in the code. It's not a great idea in general, but we can get away with it as long as it's done early enough (i.e., before anyone asks what annotations this field has.)
        Parameters:
        annotationValue - an AnnotationValue representing a field annotation
      • createUnresolvedFieldInfo

        public static FieldInfo createUnresolvedFieldInfo​(java.lang.String className,
                                                          java.lang.String name,
                                                          java.lang.String signature,
                                                          boolean isStatic)
        Create a FieldInfo object to represent an unresolved field. Don't call this directly - use XFactory instead.
        Parameters:
        className - name of class containing the field
        name - name of field
        signature - field signature
        isStatic - true if field is static, false otherwise
        Returns:
        FieldInfo object representing the unresolved field