1   // Copyright 2013 Bill Campbell, Swami Iyer and Bahar Akbal-Delibas
2   
3   package jminusminus;
4   
5   /**
6    * An interface supported by class (or later, interface) declarations.
7    */
8   
9   interface JTypeDecl {
10  
11      /**
12       * Even before preAnalyze(), declare this type in the parent context so that
13       * it is available in the preAnalyze() of other types.
14       * 
15       * @param context
16       *            the compilation unit context in which we're declaring types.
17       */
18  
19      public void declareThisType(Context context);
20  
21      /**
22       * Pre-analyze the members of this declaration in the parent context.
23       * Pre-analysis extends to the member headers (including method headers) but
24       * not into the bodies (if any).
25       * 
26       * @param context
27       *            the parent (compilation unit) context.
28       */
29  
30      public void preAnalyze(Context context);
31  
32      /**
33       * Return the name of this type declaration.
34       * 
35       * @return the name of this type declaration.
36       */
37  
38      public String name();
39  
40      /**
41       * Return the super class' type.
42       * 
43       * @return the super class' type.
44       */
45  
46      public Type superType();
47  
48      /**
49       * Return the type that this type declaration defines.
50       * 
51       * @return the type defined by this type declaration.
52       */
53  
54      public Type thisType();
55  
56  }
57