KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > types > ParsedClassType


1 package polyglot.types;
2
3 import polyglot.frontend.Source;
4 import polyglot.util.Position;
5
6 /**
7  * A <code>ParsedClassType</code> represents a class loaded from a source file.
8  * <code>ParsedClassType</code>s are mutable.
9  */

10 public interface ParsedClassType extends ClassType
11 {
12     /**
13      * Position of the type's declaration.
14      */

15     void position(Position pos);
16     
17     /**
18      * The <code>Source</code> that this class type
19      * was loaded from. Should be <code>null</code> if it was not loaded from
20      * a <code>Source</code> during this compilation.
21      */

22     Source fromSource();
23
24     /**
25      * Set the class's package.
26      */

27     void package_(Package JavaDoc p);
28
29     /**
30      * Set the class's super type.
31      */

32     void superType(Type t);
33
34     /**
35      * Add an interface to the class.
36      */

37     void addInterface(Type t);
38
39     /**
40      * Add a field to the class.
41      */

42     void addField(FieldInstance fi);
43
44     /**
45      * Add a method to the class.
46      */

47     void addMethod(MethodInstance mi);
48
49     /**
50      * Add a constructor to the class.
51      */

52     void addConstructor(ConstructorInstance ci);
53
54     /**
55      * Add a member class to the class.
56      */

57     void addMemberClass(ClassType t);
58
59     /**
60      * Set the flags of the class.
61      */

62     void flags(Flags flags);
63
64     /**
65      * Set the class's outer class.
66      */

67     void outer(ClassType t);
68
69     /**
70      * Set the name of the class. Throws <code>InternalCompilerError</code>
71      * if called on an anonymous class.
72      */

73     void name(String JavaDoc name);
74
75     /**
76      * Set the class's kind.
77      */

78     void kind(Kind kind);
79
80     /**
81      * Set whether the class was declared in a static context.
82      */

83     void inStaticContext(boolean inStaticContext);
84 }
85
Popular Tags