org.aspectj.tools.ajbrowser.core
Class BrowserCompilerConfiguration

java.lang.Object
  extended by org.aspectj.tools.ajbrowser.core.BrowserCompilerConfiguration
All Implemented Interfaces:
ICompilerConfiguration, CompilerConfigurationChangeFlags

public class BrowserCompilerConfiguration
extends java.lang.Object
implements ICompilerConfiguration

AjBrowser implementation of ICompilerConfiguration which returns something for getClasspath(), getJavaOptionsMap(), getNonStandardOptions() and getOutputLocationManager() and null for everything else. The reason it doesn't return anything for getProjectSourceFiles() is that it uses .lst files to record what is needed to build (via BuildConfigManager).


Field Summary
 
Fields inherited from interface org.aspectj.ajdt.internal.core.builder.CompilerConfigurationChangeFlags
ASPECTPATH_CHANGED, CLASSPATH_CHANGED, EVERYTHING, INJARS_CHANGED, INPATH_CHANGED, JAVAOPTIONS_CHANGED, NO_CHANGES, NONSTANDARDOPTIONS_CHANGED, OUTJAR_CHANGED, OUTPUTDESTINATIONS_CHANGED, PROJECTSOURCEFILES_CHANGED, PROJECTSOURCERESOURCES_CHANGED, XMLCONFIG_CHANGED
 
Constructor Summary
BrowserCompilerConfiguration(UserPreferencesAdapter preferencesAdapter)
           
 
Method Summary
 void configurationRead()
          Called by AspectJ once it has processed the configuration object and is ready to do a build.
 java.util.Set getAspectPath()
           
 java.lang.String getClasspath()
           
 java.util.List getClasspathElementsWithModifiedContents()
          Return a List (Strings) of the directory elements on the classpath that are likely to contain modified .class files since the previous build and must be checked.
 int getConfigurationChanges()
          Returns a set of bit flags indicating what has changed in the configuration since it was previously read.
 java.util.Set getInpath()
           
 java.util.Map getJavaOptionsMap()
          Returns the table of the current custom java options.
 java.lang.String getNonStandardOptions()
          The non-standard options, typically prefaced with -X when used with a command line compiler.
 java.lang.String getOutJar()
           
 IOutputLocationManager getOutputLocationManager()
           
 java.util.List getProjectSourceFiles()
           
 java.util.List getProjectSourceFilesChanged()
          Return a subset of those files we'd get on getProjectSourceFiles() - the subset that have changed since the last build.
 java.util.List getProjectXmlConfigFiles()
           
 java.util.Map getSourcePathResources()
          Get the set of non-Java resources for this compilation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowserCompilerConfiguration

public BrowserCompilerConfiguration(UserPreferencesAdapter preferencesAdapter)
Method Detail

getClasspath

public java.lang.String getClasspath()
Specified by:
getClasspath in interface ICompilerConfiguration
Returns:
the classpath to use

getJavaOptionsMap

public java.util.Map getJavaOptionsMap()
Description copied from interface: ICompilerConfiguration
Returns the table of the current custom java options.

For a complete description of the configurable options, see JavaOptions.getDefaultJavaOptions() or IJavaProject.getOptions(boolean)

Specified by:
getJavaOptionsMap in interface ICompilerConfiguration
Returns:
table of current settings of all options (key type: String; value type: String)
See Also:
or org.aspectj.org.eclipse.jdt.core.IJavaProject#getOptions(boolean)

getNonStandardOptions

public java.lang.String getNonStandardOptions()
Description copied from interface: ICompilerConfiguration
The non-standard options, typically prefaced with -X when used with a command line compiler. The default is no non-standard options. Options should be separated by a space, for example "-showWeaveInfo -XnoInline"

Specified by:
getNonStandardOptions in interface ICompilerConfiguration

getOutputLocationManager

public IOutputLocationManager getOutputLocationManager()
Specified by:
getOutputLocationManager in interface ICompilerConfiguration
Returns:
the IOutputLocationManager associated with this compiler configuration

getProjectSourceFiles

public java.util.List getProjectSourceFiles()
Specified by:
getProjectSourceFiles in interface ICompilerConfiguration
Returns:
a list of those files to include in the build

getProjectSourceFilesChanged

public java.util.List getProjectSourceFilesChanged()
Description copied from interface: ICompilerConfiguration
Return a subset of those files we'd get on getProjectSourceFiles() - the subset that have changed since the last build. If someone else has already worked out what needs rebuilding, we don't need to do it again by checking all of the projectSourceFiles(). Returning an empty list means nothing has changed, returning null means you have no idea what changed and the compiler should work it out.

Specified by:
getProjectSourceFilesChanged in interface ICompilerConfiguration
Returns:
a subset of those files that would be returned on getProjectSourceFiles() that have actually *changed*

getSourcePathResources

public java.util.Map getSourcePathResources()
Description copied from interface: ICompilerConfiguration
Get the set of non-Java resources for this compilation. Set members should be of type java.io.File. An empty set or null is acceptable for this option.

Specified by:
getSourcePathResources in interface ICompilerConfiguration
Returns:
map from unique resource name to absolute path to source resource (String to File)

getAspectPath

public java.util.Set getAspectPath()
Specified by:
getAspectPath in interface ICompilerConfiguration
Returns:
the set of aspect jar files to be used for the compilation. Returning null or an empty set disables this option. Set members should be of type java.io.File. From -aspectpath

getInpath

public java.util.Set getInpath()
Specified by:
getInpath in interface ICompilerConfiguration
Returns:
the set of input path elements for this compilation. Set members should be of the type java.io.File. An empty set or null is acceptable for this option. From -inpath

getOutJar

public java.lang.String getOutJar()
Specified by:
getOutJar in interface ICompilerConfiguration
Returns:
the output jar file for the compilation results. Return null to leave classfiles unjar'd in output directory From -outjar

getConfigurationChanges

public int getConfigurationChanges()
Description copied from interface: ICompilerConfiguration
Returns a set of bit flags indicating what has changed in the configuration since it was previously read. This allows the compiler to avoid repeating computation for values that are the same as before.

Specified by:
getConfigurationChanges in interface ICompilerConfiguration
Returns:
set of bit flags, see the constants in @link CompilerConfigurationChangeFlags. If unsure return EVERYTHING

configurationRead

public void configurationRead()
Description copied from interface: ICompilerConfiguration
Called by AspectJ once it has processed the configuration object and is ready to do a build. The configuration object may or may not be interested in this event. It probably will be if it is correctly tracking changes and answering getConfigurationChanges() with something other than EVERYTHING.

Specified by:
configurationRead in interface ICompilerConfiguration

getClasspathElementsWithModifiedContents

public java.util.List getClasspathElementsWithModifiedContents()
Description copied from interface: ICompilerConfiguration
Return a List (Strings) of the directory elements on the classpath that are likely to contain modified .class files since the previous build and must be checked. This would be used in the situation where a project has a dependency on another project and the dependency is captured by inclusion of one project on the classpath for the other. When the first project is built, we need to check the classpath element on the second projects classpath that represents the bin folder of the first project. By explicitly returning a list here we can avoid checking EVERYTHING.

Specified by:
getClasspathElementsWithModifiedContents in interface ICompilerConfiguration
Returns:
a list of modified elements that should be checked (can be empty) or null if unknown (and in which case every classpath element will be checked)

getProjectXmlConfigFiles

public java.util.List getProjectXmlConfigFiles()
Specified by:
getProjectXmlConfigFiles in interface ICompilerConfiguration
Returns:
a list of those files that should be used to configure a build