com.sun.mirror.declaration

## Interface FieldDeclaration

- All Superinterfaces:
    Declaration, MemberDeclaration
  All Known Subinterfaces:
    EnumConstantDeclaration

  Deprecated.
  All components of this API have been superseded by the standardized annotation processing API. The replacement for the functionality of this interface is included in `VariableElement`.

      @Deprecated
      public interface FieldDeclaration
      extends MemberDeclaration

  Represents a field of a type declaration.
  Since:
    1.5

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getConstantExpression()` Deprecated. Returns the text of a constant expression representing the value of this field if this field is a compile-time constant.
    `Object` | `getConstantValue()` Deprecated. Returns the value of this field if this field is a compile-time constant.
    `TypeMirror` | `getType()` Deprecated. Returns the type of this field.

    - ### Methods inherited from interface com.sun.mirror.declaration.MemberDeclaration

      `getDeclaringType`

    - ### Methods inherited from interface com.sun.mirror.declaration.Declaration

      `accept, equals, getAnnotation, getAnnotationMirrors, getDocComment, getModifiers, getPosition, getSimpleName`

- - ### Method Detail

    - #### getType

          TypeMirror getType()

      Deprecated.
      Returns the type of this field.
      Returns:
        the type of this field

    - #### getConstantValue

          Object getConstantValue()

      Deprecated.
      Returns the value of this field if this field is a compile-time constant. Returns `null` otherwise. The value will be of a primitive type or `String`. If the value is of a primitive type, it is wrapped in the appropriate wrapper class (such as `Integer`).
      Returns:
        the value of this field if this field is a compile-time constant, or `null` otherwise

    - #### getConstantExpression

          String getConstantExpression()

      Deprecated.
      Returns the text of a constant expression representing the value of this field if this field is a compile-time constant. Returns `null` otherwise. The value will be of a primitive type or `String`. The text returned is in a form suitable for representing the value in source code.
      Returns:
        the text of a constant expression if this field is a compile-time constant, or `null` otherwise

Copyright © 2004, 2019, Oracle and/or its affiliates. All rights reserved.