View Javadoc

1   package net.sf.clirr.core.spi;
2   
3   /***
4    * Describes a field of a class.
5    */
6   public interface Field extends Named, Scoped
7   {
8       /***
9        * The type of this field.
10       */
11      JavaType getType();
12      
13      /***
14       * Whether the field is declared as final.
15       */
16      boolean isFinal();
17      
18      /***
19       * Whether the field is declared as static.
20       */
21      boolean isStatic();
22  
23      /***
24       * Whether the field is deprecated.
25       */
26      boolean isDeprecated();
27      
28      /***
29       * Returns the constant value of this field.
30       * The constant value is an Object if the field is static and final and the java compiler 
31       * could calculate the value at compilation time.
32       * 
33       * @return the constant value or <code>null</code> if the compiler could 
34       * not calculate the value at compilation time  
35       */
36      Object getConstantValue();
37  }