~ubuntu-branches/ubuntu/natty/aspectj/natty

« back to all changes in this revision

Viewing changes to org.aspectj/modules/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2009-10-04 16:37:23 UTC
  • mfrom: (1.1.3 upstream) (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091004163723-ck4y7j7fhjxskkie
Tags: 1.6.6+dfsg-1
* New upstream release.
  - Update 02_use_gjdoc.diff patch
* Update my email address

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
import java.io.File;
15
15
import java.util.List;
 
16
import java.util.Map;
16
17
 
17
18
/**
18
 
 * Interface that handles where the compilation output is sent. Allows
19
 
 * for the output folder to be different for different source files.
 
19
 * Interface that handles where the compilation output is sent. Allows for the output folder to be different for different source
 
20
 * files.
20
21
 */
21
22
public interface IOutputLocationManager {
22
23
 
23
24
        /**
24
 
         * Return the directory root under which the results of compiling the given
25
 
         * source file. For example, if the source file contains the type a.b.C, and
26
 
         * this method returns "target/classes" the resulting class file will be written
27
 
         * to "target/classes/a/b/C.class"
 
25
         * Return the directory root under which the results of compiling the given source file. For example, if the source file
 
26
         * contains the type a.b.C, and this method returns "target/classes" the resulting class file will be written to
 
27
         * "target/classes/a/b/C.class"
28
28
         * 
29
 
         * @param compilationUnit  the compilation unit that has been compiled
30
 
         * @return a File object representing the root directory under which compilation results for this
31
 
         *  unit should be written
 
29
         * @param compilationUnit the compilation unit that has been compiled
 
30
         * @return a File object representing the root directory under which compilation results for this unit should be written
32
31
         */
33
32
        File getOutputLocationForClass(File compilationUnit);
34
 
        
35
 
        /**
36
 
         * When copying resources from source folders to output location, return the
37
 
         * root directory under which the resource should be copied.
 
33
 
 
34
        /**
 
35
         * For environments where multiple source folders are supported, they need to be included in the model. This method allows
 
36
         * AspectJ to determine which source folder a source file came from. Example return values would be "src" or "main/java"
 
37
         * 
 
38
         * @param sourceFile the File object for the source file
 
39
         * @return the source folder where this file came from, or null if in project root or source folders not supported.
 
40
         */
 
41
        String getSourceFolderForFile(File sourceFile);
 
42
 
 
43
        /**
 
44
         * When copying resources from source folders to output location, return the root directory under which the resource should be
 
45
         * copied.
38
46
         * 
39
47
         * @param resource the resource to be copied
40
 
         * @return a File object representing the root directory under which this resource
41
 
         * should be copied
 
48
         * @return a File object representing the root directory under which this resource should be copied
42
49
         */
43
50
        File getOutputLocationForResource(File resource);
44
51
 
45
52
        /**
46
53
         * Return a list of all output locations handled by this OutputLocationManager
47
54
         */
48
 
        List /*File*/ getAllOutputLocations();
49
 
        
 
55
        List /* File */getAllOutputLocations();
 
56
 
50
57
        /**
51
 
         * Return the default output location (for example, <my_project>/bin). This is
52
 
         * where classes which are on the inpath will be placed.
 
58
         * Return the default output location (for example, <my_project>/bin). This is where classes which are on the inpath will be
 
59
         * placed.
53
60
         */
54
61
        File getDefaultOutputLocation();
55
 
                
 
62
 
 
63
        /**
 
64
         * Callback from the compiler to indicate that a file has been written to disk, the type of the file (if known) is also
 
65
         * supplied.
 
66
         * 
 
67
         * @param outputfile the file that has been written
 
68
         * @param fileType the kind of file from the FILETYPE_XXX constants defined in this type
 
69
         */
 
70
        void reportFileWrite(String outputfile, int fileType);
 
71
 
 
72
        /**
 
73
         * @return a Map<File,String> from inpath absolute paths to handle components
 
74
         */
 
75
        Map getInpathMap();
 
76
        
 
77
        /**
 
78
         * Callback from the compiler to indicate that a file has been removed from disk, the type of the file (if known) is also
 
79
         * supplied.
 
80
         * 
 
81
         * @param file the file that has been written
 
82
         * @param fileType the kind of file from the FILETYPE_XXX constants defined in this type
 
83
         */
 
84
        void reportFileRemove(String file, int fileType);
 
85
 
 
86
        int discoverChangesSince(File dir, long buildtime);
 
87
 
 
88
        // match numbers in CompilationResultDestinationManager - ought to factor into super interface
 
89
        int FILETYPE_UNKNOWN = 0;
 
90
        int FILETYPE_CLASS = 1;
 
91
        int FILETYPE_OUTJAR = 2;
 
92
        int FILETYPE_RESOURCE = 3;
56
93
}