KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > reference > CtFieldReference


1 package spoon.reflect.reference;
2
3 import java.lang.reflect.Member JavaDoc;
4
5 import spoon.reflect.declaration.CtField;
6
7 /**
8  * This interface defines a reference to a
9  * {@link spoon.reflect.declaration.CtField}.
10  */

11 public interface CtFieldReference<T> extends CtVariableReference<T> {
12     /**
13      * Gets the runtime member that corresponds to a field reference if any.
14      *
15      * @return the member (null if not found)
16      */

17     Member JavaDoc getActualField();
18
19     CtField<T> getDeclaration();
20
21     /**
22      * Gets the type in which the field is declared.
23      */

24     CtTypeReference<?> getDeclaringType();
25
26     /**
27      * Gets the qualified name of the field.
28      */

29     String JavaDoc getQualifiedName();
30
31     /**
32      * Tells if the referenced field is final.
33      */

34     boolean isFinal();
35
36     /**
37      * Tells if the referenced field is static.
38      */

39     boolean isStatic();
40
41     /**
42      * Sets the type in which the field is declared.
43      */

44     void setDeclaringType(CtTypeReference<?> declaringType);
45
46     /**
47      * Forces a reference to a final element.
48      */

49     void setFinal(boolean b);
50
51     /**
52      * Forces a reference to a static element.
53      */

54     void setStatic(boolean b);
55 }
56
Popular Tags