Class AjState
java.lang.Object
org.aspectj.ajdt.internal.core.builder.AjState
- All Implemented Interfaces:
CompilerConfigurationChangeFlags
,TypeDelegateResolver
public class AjState
extends Object
implements CompilerConfigurationChangeFlags, TypeDelegateResolver
Maintains state needed for incremental compilation
-
Nested Class Summary
-
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, PROCESSOR_CHANGED, PROJECTSOURCEFILES_CHANGED, PROJECTSOURCERESOURCES_CHANGED, XMLCONFIG_CHANGED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAffectedSourceFiles
(Set<File> addTo, Set<File> lastTimeSources) protected void
addDependentsOf
(File sourceFile) checkPreviousBuild
(String name) void
void
getBinaryFilesToCompile
(boolean firstTime) getDelegate
(ReferenceType referenceType) See if we can create a delegate from a CompactTypeStructure - TODO better commentgetFilesToCompile
(boolean firstPass) long
Returns last time we did a full or incremental build.long
Returns last time we did a full buildint
boolean
hasResource
(String resourceName) void
boolean
void
void
noteResult
(InterimCompilationResult result) boolean
prepareForNextBuild
(AjBuildConfig newBuildConfig) Returns false if a batch build is needed.void
recordAspectClassFile
(String aspectFile) Record an aspect that came in on the aspect path.void
recordBinarySource
(String fromPathName, List<UnwovenClassFile> unwovenClassFiles) boolean
recordDependencies
(File file, String[] typeNameDependencies) Record some additional dependencies between types.void
recordResource
(String resourceName, File resourceSourceLocation) protected void
recordTypeChanged
(String typename) Record that a particular type has been touched during a compilation run.boolean
void
setCouldBeSubsequentIncrementalBuild
(boolean yesThereCould) void
setFileSystem
(FileSystem fileSystem) void
setNameEnvironment
(INameEnvironment nameEnvironment) void
setStructureModel
(AsmManager structureModel) void
setWeaver
(BcelWeaver bw) void
toString()
void
void
-
Field Details
-
CHECK_STATE_FIRST
public static boolean CHECK_STATE_FIRST -
stateListener
-
FORCE_INCREMENTAL_DURING_TESTING
public static boolean FORCE_INCREMENTAL_DURING_TESTING -
deltaAddedClasses
-
-
Constructor Details
-
AjState
-
-
Method Details
-
setCouldBeSubsequentIncrementalBuild
public void setCouldBeSubsequentIncrementalBuild(boolean yesThereCould) -
prepareForNextBuild
Returns false if a batch build is needed. -
toString
-
getFilesToCompile
-
getBinaryFilesToCompile
-
noteResult
-
noteNewResult
-
addAffectedSourceFiles
-
recordTypeChanged
Record that a particular type has been touched during a compilation run. Information is used to ensure any types depending upon this one are also recompiled.- Parameters:
typename
- (possibly qualified) type name
-
recordDependencies
Record some additional dependencies between types. When any of the types specified in fullyQualifiedTypeNames changes, we need to recompile the file named in the CompilationResult. This method patches that information into the existing data structures. -
addDependentsOf
-
setStructureModel
-
getStructureModel
-
setWeaver
-
getWeaver
-
setWorld
-
getBcelWorld
-
getNumberOfStructuralChangesSinceLastFullBuild
public int getNumberOfStructuralChangesSinceLastFullBuild() -
getLastBuildTime
public long getLastBuildTime()Returns last time we did a full or incremental build. -
getLastFullBuildTime
public long getLastFullBuildTime()Returns last time we did a full build -
getBuildConfig
- Returns:
- Returns the buildConfig.
-
clearBinarySourceFiles
public void clearBinarySourceFiles() -
recordBinarySource
-
getBinarySourceMap
-
getClassNameToFileMap
-
hasResource
-
recordResource
-
getAddedFiles
- Returns:
- Returns the addedFiles.
-
getDeletedFiles
- Returns:
- Returns the deletedFiles.
-
forceBatchBuildNextTimeAround
public void forceBatchBuildNextTimeAround() -
requiresFullBatchBuild
public boolean requiresFullBatchBuild() -
wipeAllKnowledge
public void wipeAllKnowledge() -
getAspectNamesToFileNameMap
-
initializeAspectNamesToFileNameMap
public void initializeAspectNamesToFileNameMap() -
listenerDefined
public boolean listenerDefined() -
getListener
-
checkPreviousBuild
-
getAjBuildManager
-
getNameEnvironment
-
setNameEnvironment
-
getFileSystem
-
setFileSystem
-
recordAspectClassFile
Record an aspect that came in on the aspect path. When a .class file changes on the aspect path we can then recognize it as an aspect and know to do more than just a tiny incremental build.
TODO but this doesn't allow for a new aspect created on the aspectpath?- Parameters:
aspectFile
- path to the file, eg. c:/temp/foo/Fred.class
-
write
- Throws:
IOException
-
getDelegate
See if we can create a delegate from a CompactTypeStructure - TODO better comment- Specified by:
getDelegate
in interfaceTypeDelegateResolver
-