public final class DependencyTable
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private class |
DependencyTable.DependencyTableHandler
This class handles populates the TargetHistory hashtable in response to
SAX parse events
|
class |
DependencyTable.DependencyVisitor |
class |
DependencyTable.TimestampChecker |
Modifier and Type | Field and Description |
---|---|
private java.io.File |
baseDir |
private java.lang.String |
baseDirPath |
private java.util.Hashtable |
dependencies
a hashtable of DependencyInfo[] keyed by output file name
|
private java.io.File |
dependenciesFile
The file the cache was loaded from.
|
private boolean |
dirty
Flag indicating whether the cache should be written back to file.
|
Constructor and Description |
---|
DependencyTable(java.io.File baseDir)
Creates a target history table from dependencies.xml in the prject
directory, if it exists.
|
Modifier and Type | Method and Description |
---|---|
void |
commit(CCTask task) |
java.util.Enumeration |
elements()
Returns an enumerator of DependencyInfo's
|
DependencyInfo |
getDependencyInfo(java.lang.String sourceRelativeName,
java.lang.String includePathIdentifier)
This method returns a DependencyInfo for the specific source file and
include path identifier
|
private java.util.Vector |
getIncludePaths() |
void |
load() |
boolean |
needsRebuild(CCTask task,
TargetInfo target,
int dependencyDepth)
Determines if the specified target needs to be rebuilt.
|
DependencyInfo |
parseIncludes(CCTask task,
CompilerConfiguration compiler,
java.io.File source) |
private void |
putDependencyInfo(java.lang.String key,
DependencyInfo dependInfo) |
void |
walkDependencies(CCTask task,
DependencyInfo dependInfo,
CompilerConfiguration compiler,
DependencyInfo[] stack,
DependencyTable.DependencyVisitor visitor) |
private void |
writeDependencyInfo(java.io.BufferedWriter writer,
java.lang.StringBuffer buf,
DependencyInfo dependInfo) |
private void |
writeIncludePathDependencies(java.lang.String includePathIdentifier,
java.io.BufferedWriter writer,
java.lang.StringBuffer buf) |
private java.io.File baseDir
private java.lang.String baseDirPath
private final java.util.Hashtable dependencies
private java.io.File dependenciesFile
private boolean dirty
public DependencyTable(java.io.File baseDir)
baseDir
- output directory for taskpublic void commit(CCTask task)
public java.util.Enumeration elements()
public DependencyInfo getDependencyInfo(java.lang.String sourceRelativeName, java.lang.String includePathIdentifier)
private java.util.Vector getIncludePaths()
public void load() throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
public boolean needsRebuild(CCTask task, TargetInfo target, int dependencyDepth)
public DependencyInfo parseIncludes(CCTask task, CompilerConfiguration compiler, java.io.File source)
private void putDependencyInfo(java.lang.String key, DependencyInfo dependInfo)
public void walkDependencies(CCTask task, DependencyInfo dependInfo, CompilerConfiguration compiler, DependencyInfo[] stack, DependencyTable.DependencyVisitor visitor) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
private void writeDependencyInfo(java.io.BufferedWriter writer, java.lang.StringBuffer buf, DependencyInfo dependInfo) throws java.io.IOException
java.io.IOException
private void writeIncludePathDependencies(java.lang.String includePathIdentifier, java.io.BufferedWriter writer, java.lang.StringBuffer buf) throws java.io.IOException
java.io.IOException