Interface CtFieldReference<T>

    • Method Detail

      • getActualField

        Member getActualField()
        Gets the runtime member that corresponds to a field reference if any.
        Returns:
        the member (null if not found)
      • getFieldDeclaration

        CtField<T> getFieldDeclaration()
        Returns the CtField that corresponds to the reference even if its declaring type isn't in the Spoon source path (in this case, the Spoon elements are built with runtime reflection)
        Returns:
        the field declaration that corresponds to the reference.
      • getDeclaringType

        CtTypeReference<?> getDeclaringType()
        Gets the type in which the field is declared.
      • getQualifiedName

        String getQualifiedName()
        Gets the qualified name of the field.
      • isFinal

        boolean isFinal()
        Tells if the referenced field is final.
      • isStatic

        boolean isStatic()
        Tells if the referenced field is static.
      • setFinal

        <C extends CtFieldReference<T>> C setFinal​(boolean b)
        Forces a reference to a final element.
      • setStatic

        <C extends CtFieldReference<T>> C setStatic​(boolean b)
        Forces a reference to a static element.