org.aspectj.ajde.core
Interface IOutputLocationManager


public interface IOutputLocationManager

Interface that handles where the compilation output is sent. Allows for the output folder to be different for different source files.


Field Summary
static int FILETYPE_CLASS
           
static int FILETYPE_OUTJAR
           
static int FILETYPE_RESOURCE
           
static int FILETYPE_UNKNOWN
           
 
Method Summary
 int discoverChangesSince(java.io.File dir, long buildtime)
           
 java.util.List<java.io.File> getAllOutputLocations()
          Return a list of all output locations handled by this OutputLocationManager
 java.io.File getDefaultOutputLocation()
          Return the default output location (for example, /bin).
 java.util.Map<java.io.File,java.lang.String> getInpathMap()
           
 java.io.File getOutputLocationForClass(java.io.File compilationUnit)
          Return the directory root under which the results of compiling the given source file.
 java.io.File getOutputLocationForResource(java.io.File resource)
          When copying resources from source folders to output location, return the root directory under which the resource should be copied.
 java.lang.String getSourceFolderForFile(java.io.File sourceFile)
          For environments where multiple source folders are supported, they need to be included in the model.
 void reportFileRemove(java.lang.String file, int fileType)
          Callback from the compiler to indicate that a file has been removed from disk, the type of the file (if known) is also supplied.
 void reportFileWrite(java.lang.String outputfile, int fileType)
          Callback from the compiler to indicate that a file has been written to disk, the type of the file (if known) is also supplied.
 

Field Detail

FILETYPE_UNKNOWN

static final int FILETYPE_UNKNOWN
See Also:
Constant Field Values

FILETYPE_CLASS

static final int FILETYPE_CLASS
See Also:
Constant Field Values

FILETYPE_OUTJAR

static final int FILETYPE_OUTJAR
See Also:
Constant Field Values

FILETYPE_RESOURCE

static final int FILETYPE_RESOURCE
See Also:
Constant Field Values
Method Detail

getOutputLocationForClass

java.io.File getOutputLocationForClass(java.io.File compilationUnit)
Return the directory root under which the results of compiling the given source file. For example, if the source file contains the type a.b.C, and this method returns "target/classes" the resulting class file will be written to "target/classes/a/b/C.class"

Parameters:
compilationUnit - the compilation unit that has been compiled
Returns:
a File object representing the root directory under which compilation results for this unit should be written

getSourceFolderForFile

java.lang.String getSourceFolderForFile(java.io.File sourceFile)
For environments where multiple source folders are supported, they need to be included in the model. This method allows AspectJ to determine which source folder a source file came from. Example return values would be "src" or "main/java"

Parameters:
sourceFile - the File object for the source file
Returns:
the source folder where this file came from, or null if in project root or source folders not supported.

getOutputLocationForResource

java.io.File getOutputLocationForResource(java.io.File resource)
When copying resources from source folders to output location, return the root directory under which the resource should be copied.

Parameters:
resource - the resource to be copied
Returns:
a File object representing the root directory under which this resource should be copied

getAllOutputLocations

java.util.List<java.io.File> getAllOutputLocations()
Return a list of all output locations handled by this OutputLocationManager


getDefaultOutputLocation

java.io.File getDefaultOutputLocation()
Return the default output location (for example, /bin). This is where classes which are on the inpath will be placed.


reportFileWrite

void reportFileWrite(java.lang.String outputfile,
                     int fileType)
Callback from the compiler to indicate that a file has been written to disk, the type of the file (if known) is also supplied.

Parameters:
outputfile - the file that has been written
fileType - the kind of file from the FILETYPE_XXX constants defined in this type

getInpathMap

java.util.Map<java.io.File,java.lang.String> getInpathMap()
Returns:
a Map from inpath absolute paths to handle components

reportFileRemove

void reportFileRemove(java.lang.String file,
                      int fileType)
Callback from the compiler to indicate that a file has been removed from disk, the type of the file (if known) is also supplied.

Parameters:
file - the file that has been written
fileType - the kind of file from the FILETYPE_XXX constants defined in this type

discoverChangesSince

int discoverChangesSince(java.io.File dir,
                         long buildtime)