01: package net.sf.clirr.core.spi;
02:
03: /**
04: * A Java Type (Object, Interface, primitive type or void).
05: *
06: * @author lkuehne
07: */
08: public interface JavaType extends Named, Scoped {
09: /**
10: * Type fully qualified class name.
11: *
12: * @return a fully qualified class name,
13: * like <code>"my.company.procuct.SampleClass"</code>.
14: */
15: String getName();
16:
17: /**
18: * The containing class if this is an inner class.
19: *
20: * @return the containing class or <code>null</code>
21: * if this JavaType does not represent an inner class.
22: */
23: JavaType getContainingClass();
24:
25: /**
26: * Return the superclasses of this class.
27: *
28: * @return the chain of superclasses of this type, starting from
29: * the direct superclass and ending with <code>java.lang.Object</code>.
30: */
31: JavaType[] getSuperClasses();
32:
33: /**
34: * Return the list of all interfaces this class implements.
35: *
36: * @return the list of all interfaces this class implements/extends,
37: * excluding <code>this</code> if this JavaType represents an interface itself.
38: */
39: JavaType[] getAllInterfaces();
40:
41: JavaType[] getInnerClasses();
42:
43: /**
44: * All methods that are declared by this class.
45: * Methods of superclasses/interfaces are not returned
46: * if they are not overridden/redeclared here.
47: *
48: * @return all methods that are declared by this class.
49: */
50: Method[] getMethods();
51:
52: /**
53: * All fields that are declared by this class.
54: * Fields of superclasses/interfaces are not returned.
55: *
56: * @return all fields that are declared by this class.
57: */
58: Field[] getFields();
59:
60: boolean isPrimitive();
61:
62: boolean isArray();
63:
64: boolean isFinal();
65:
66: boolean isAbstract();
67:
68: boolean isInterface();
69: }
|