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
Nested Classes -
Field Summary
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAffectedSourceFiles(Set<File> addTo, Set<File> lastTimeSources) protected voidaddDependentsOf(File sourceFile) checkPreviousBuild(String name) voidvoidgetBinaryFilesToCompile(boolean firstTime) getDelegate(ReferenceType referenceType) See if we can create a delegate from a CompactTypeStructure - TODO better commentgetFilesToCompile(boolean firstPass) longReturns last time we did a full or incremental build.longReturns last time we did a full buildintbooleanhasResource(String resourceName) voidbooleanvoidvoidnoteResult(InterimCompilationResult result) booleanprepareForNextBuild(AjBuildConfig newBuildConfig) Returns false if a batch build is needed.voidrecordAspectClassFile(String aspectFile) Record an aspect that came in on the aspect path.voidrecordBinarySource(String fromPathName, List<UnwovenClassFile> unwovenClassFiles) booleanrecordDependencies(File file, String[] typeNameDependencies) Record some additional dependencies between types.voidrecordResource(String resourceName, File resourceSourceLocation) protected voidrecordTypeChanged(String typename) Record that a particular type has been touched during a compilation run.booleanvoidsetCouldBeSubsequentIncrementalBuild(boolean yesThereCould) voidsetFileSystem(FileSystem fileSystem) voidsetNameEnvironment(INameEnvironment nameEnvironment) voidsetStructureModel(AsmManager structureModel) voidsetWeaver(BcelWeaver bw) voidtoString()voidvoid
-
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
-
getDeletedFiles
-
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:
getDelegatein interfaceTypeDelegateResolver
-