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