View Javadoc

1   package org.springframework.roo.classpath.details;
2   
3   import java.util.List;
4   
5   import org.springframework.roo.classpath.PhysicalTypeDetails;
6   import org.springframework.roo.classpath.details.annotations.AnnotationMetadata;
7   import org.springframework.roo.model.JavaType;
8   
9   /**
10   * Provides information about the different members in a class, interface, enum or aspect.
11   * 
12   * @author Ben Alex
13   * @since 1.0
14   *
15   */
16  public interface MemberHoldingTypeDetails extends PhysicalTypeDetails {
17  	
18  	List<? extends MethodMetadata> getDeclaredMethods();
19  	
20  	List<? extends ConstructorMetadata> getDeclaredConstructors();
21  	
22  	List<? extends FieldMetadata> getDeclaredFields();
23  	
24  	/**
25  	 * Lists the type-level annotations.
26  	 * 
27  	 * <p>
28  	 * This includes those annotations declared on the type, together with those defined via the ITD
29  	 * "declare @type: DestinationType: @Annotation" feature.
30  	 * 
31  	 * @return an unmodifiable representation of annotations declared on this type (may be empty, but never null)
32  	 */
33  	List<? extends AnnotationMetadata> getTypeAnnotations();
34  	
35  	/**
36  	 * Lists the classes this type extends. This may be empty. Always empty in the case of an enum.
37  	 * 
38  	 * <p>
39  	 * While a {@link List} is used, normally in Java a class will only extend a single other class.
40  	 * A {@link List} is used to support interfaces, as well as support 
41  	 * the special "declare parents: DestinationType extends SuperclassType"
42  	 * feature of ITDs which permits effectively multiple inheritance.
43  	 * 
44  	 * @return an unmodifiable representation of classes this type extends (may be empty, but never null)
45  	 */
46  	List<JavaType> getExtendsTypes();
47  	
48  	/**
49  	 * Lists the classes this type implements. Always empty in the case of an interface.
50  	 * 
51  	 * <p>
52  	 * A {@link List} is used to support interfaces, as well as support 
53  	 * the special "declare parents: DestinationType implements SomeInterfaceType"
54  	 * feature of ITDs.
55  	 * 
56  	 * @return an unmodifiable representation of classes this type implements (may be empty, but never null)
57  	 */
58  	List<JavaType> getImplementsTypes();
59  	
60  
61  }