KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > declaration > CtClass


1 package spoon.reflect.declaration;
2
3 import java.util.List JavaDoc;
4 import java.util.Set JavaDoc;
5
6 import spoon.reflect.reference.CtTypeReference;
7
8 /**
9  * This element represents a class declaration.
10  *
11  * @author Renaud Pawlak
12  */

13 public interface CtClass<T extends Object JavaDoc> extends CtType<T> {
14
15     /**
16      * Gets the fields defined by this class.
17      */

18     List JavaDoc<CtField<?>> getFields();
19
20     /**
21      * Returns the anonymous blocks of this class.
22      */

23     List JavaDoc<CtAnonymousExecutable> getAnonymousExecutables();
24
25     /**
26      * Returns the constructor of the class that takes the given argument types.
27      */

28     CtConstructor getConstructor(CtTypeReference<?>... parameterTypes);
29
30     /**
31      * Returns the constructors of this class. This includes the default
32      * constructor if this class has no constructors explicitly declared.
33      */

34     Set JavaDoc<CtConstructor> getConstructors();
35
36     /**
37      * Returns the class type directly extended by this class.
38      *
39      * @return the class type directly extended by this class, or null if there
40      * is none
41      */

42     CtTypeReference<?> getSuperclass();
43
44     /**
45      * Sets the anonymous blocks of this class.
46      */

47     void setAnonymousExecutables(List JavaDoc<CtAnonymousExecutable> e);
48
49     /**
50      * Sets the constructors for this class.
51      */

52     void setConstructors(Set JavaDoc<CtConstructor> constructors);
53
54     /**
55      * Sets the superclass type.
56      */

57     void setSuperclass(CtTypeReference<?> classType);
58
59 }
60
Popular Tags