Package net.sf.antcontrib.cpptasks
Class DependencyTable
java.lang.Object
net.sf.antcontrib.cpptasks.DependencyTable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
This class handles populates the TargetHistory hashtable in response to SAX parse eventsclass
class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDependencyTable
(File baseDir) Creates a target history table from dependencies.xml in the prject directory, if it exists. -
Method Summary
Modifier and TypeMethodDescriptionvoid
elements()
Returns an enumerator of DependencyInfo'sgetDependencyInfo
(String sourceRelativeName, String includePathIdentifier) This method returns a DependencyInfo for the specific source file and include path identifierprivate Vector
void
load()
boolean
needsRebuild
(CCTask task, TargetInfo target, int dependencyDepth) Determines if the specified target needs to be rebuilt.parseIncludes
(CCTask task, CompilerConfiguration compiler, File source) private void
putDependencyInfo
(String key, DependencyInfo dependInfo) void
walkDependencies
(CCTask task, DependencyInfo dependInfo, CompilerConfiguration compiler, DependencyInfo[] stack, DependencyTable.DependencyVisitor visitor) private void
writeDependencyInfo
(BufferedWriter writer, StringBuffer buf, DependencyInfo dependInfo) private void
writeIncludePathDependencies
(String includePathIdentifier, BufferedWriter writer, StringBuffer buf)
-
Field Details
-
baseDir
-
baseDirPath
-
dependencies
a hashtable of DependencyInfo[] keyed by output file name -
dependenciesFile
The file the cache was loaded from. -
dirty
private boolean dirtyFlag indicating whether the cache should be written back to file.
-
-
Constructor Details
-
DependencyTable
Creates a target history table from dependencies.xml in the prject directory, if it exists. Otherwise, initializes the dependencies empty.- Parameters:
baseDir
- output directory for task
-
-
Method Details
-
commit
-
elements
Returns an enumerator of DependencyInfo's -
getDependencyInfo
This method returns a DependencyInfo for the specific source file and include path identifier -
getIncludePaths
-
load
-
needsRebuild
Determines if the specified target needs to be rebuilt. This task may result in substantial IO as files are parsed to determine their dependencies -
parseIncludes
-
putDependencyInfo
-
walkDependencies
public void walkDependencies(CCTask task, DependencyInfo dependInfo, CompilerConfiguration compiler, DependencyInfo[] stack, DependencyTable.DependencyVisitor visitor) throws org.apache.tools.ant.BuildException - Throws:
org.apache.tools.ant.BuildException
-
writeDependencyInfo
private void writeDependencyInfo(BufferedWriter writer, StringBuffer buf, DependencyInfo dependInfo) throws IOException - Throws:
IOException
-
writeIncludePathDependencies
private void writeIncludePathDependencies(String includePathIdentifier, BufferedWriter writer, StringBuffer buf) throws IOException - Throws:
IOException
-