1
2
3
4
5
6
7
8 package org.codehaus.metaclass.tools.compiler;
9
10 import java.io.File;
11 import java.util.Collection;
12 import org.codehaus.metaclass.model.ClassDescriptor;
13
14 /***
15 * This is the interface via which interested parties
16 * can monitor events that occur during compilation.
17 *
18 * @author Peter Donald
19 * @version $Revision: 1.5 $ $Date: 2003/11/27 08:09:53 $
20 */
21 public interface CompilerMonitor
22 {
23 /***
24 * Method called when there was an error
25 * writing ClassDescriptor object.
26 *
27 * @param descriptor the ClassDescriptor object
28 * @param e the Exception
29 */
30 void errorWritingDescriptor( ClassDescriptor descriptor, Exception e );
31
32 /***
33 * Method called when a specified
34 * source file does not exist.
35 *
36 * @param file the source file
37 */
38 void missingSourceFile( File file );
39
40 /***
41 * Called to notify the monitor about the list of JavaClass
42 * objects loaded from the source files.
43 *
44 * @param classes the list of JavaClass objects
45 */
46 void javaClassObjectsLoaded( Collection classes );
47
48 /***
49 * Called to notify the monitor about the list of JavaClass
50 * objects that still remain after filtering.
51 *
52 * @param classes the list of JavaClass objects
53 */
54 void postFilterJavaClassList( Collection classes );
55
56 /***
57 * Error generating descriptor for specified class.
58 *
59 * @param classname the name of the class
60 * @param t the error
61 */
62 void errorGeneratingDescriptor( String classname, Throwable t );
63
64 /***
65 * Called to notify Monitor about the set of ClassDescriptors created.
66 *
67 * @param descriptors the ClassDescriptors compiled.
68 */
69 void postBuildDescriptorsList( Collection descriptors );
70
71 /***
72 * Called to notify Monitor about the set of ClassDescriptors
73 * after compacting.
74 *
75 * @param descriptors the ClassDescriptors post compacting.
76 */
77 void postCompactDescriptorsList( Collection descriptors );
78 }