public class InfoFileDependencies extends java.lang.Object implements AddDependency_InfoFileDependencies
Modifier and Type | Field and Description |
---|---|
private char |
cNewly
State of the file:
' ' if it is unchanged, and all included files are unchanged.
|
(package private) MainCmdLogging_ifc |
console |
private long |
dateFileMirror |
(package private) long |
dateFileSrc
The timestamp of the file (lastModified).
|
(package private) java.io.File |
fileMirror |
(package private) java.io.File |
fileSrc
The existing or non-existing include file.
|
private static java.text.DateFormat |
formatTimestamp
Format to produce a human readable timestamp of file.
|
(package private) java.util.Map<java.lang.String,InfoFileDependencies> |
includedAllFiles
All included files in this included file and all other included files.
|
(package private) java.util.Map<java.lang.String,InfoFileDependencies> |
includedPrimaryDeps
All included files in this file read from the dependency input.
|
(package private) java.util.Map<java.lang.String,InfoFileDependencies> |
includedPrimaryFiles
All included files in this included file.
|
(package private) java.util.Map<java.lang.String,InfoFileDependencies> |
includingAllFiles
All files which includes this file directly or indirectly.
|
(package private) java.util.Map<java.lang.String,InfoFileDependencies> |
includingPrimaryFiles
All files which includes this file directly.
|
private boolean |
isSrc
True if it is a file from the source pool.
|
(package private) java.lang.String |
sAbsolutePath |
private java.lang.String |
sDateNameLine
Timestamp and name of the file for .dep file and for some reports.
|
(package private) java.lang.String |
sFilePathIncludeline
File path like written in Include line between "path" or < path>.
|
static java.lang.String |
spaces
The length of this string determines the maximal processed deepness of nested files.
|
(package private) long |
timestampNewestDependingFiles_ |
static int |
version
Version, history and license.
|
Constructor and Description |
---|
InfoFileDependencies(java.lang.String sFilePathIncludeline,
java.io.File fileSrc,
java.io.File fileMirror,
boolean isSrc,
MainCmdLogging_ifc console) |
InfoFileDependencies(java.lang.String sFileAbs,
MainCmdLogging_ifc console) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
addAllParentDependency(InfoFileDependencies child,
ObjectFileDeps objDeps,
int nRecursion)
Recursive call of adding the dependency.
|
void |
addDependency(InfoFileDependencies child,
ObjectFileDeps objDeps)
Adds a depending file.
|
java.lang.String |
getDataNameLine() |
(package private) long |
getDateFile() |
boolean |
isNewlyItself()
Returns true if the file is changed in comparison with a last used file for translation.
|
boolean |
isNewlyOrIncludedNewly()
Returns true if the file is changed in comparison with a last used file for translation.
|
boolean |
isSrcFile()
Returns true if the file is in the source pool.
|
void |
notifyChangedTimestamp() |
void |
notifyIncludedNewly(ObjectFileDeps objDeps)
The fileMirror is copied from fileSrc, because the fileSrc is changed.
|
void |
notifyNewly(ObjectFileDeps objDeps)
The fileMirror is copied from fileSrc, because the fileSrc is changed.
|
boolean |
shouldWriteNewly()
Returns true if the file is changed in comparison with a last used file for translation
or if the source file has non-relevant changes but it is stored with other timestamp.
|
java.lang.String |
toString() |
(package private) static void |
writeAllBackDeps(java.lang.String sDepFileName,
java.util.Map<java.lang.String,InfoFileDependencies> indexAllDeps)
Writes a list with all files which are known with the files, which includes it (backward dependencies).
|
void |
writeDependendingFiles(java.lang.Appendable writer,
java.util.Map<java.lang.String,java.lang.String> indexWrittenDeps,
MainCmdLogging_ifc console,
int nRecursion)
Recursively called method to write the dependencies.
|
(package private) void |
xxx_writeBackDeps(InfoFileDependencies info,
InfoFileDependencies parent,
java.io.Writer writer) |
void |
xxx_writeDependenciesOfFile(java.io.File fileDep,
MainCmdLogging_ifc console)
Write dependencies from the given level to a file, including all included files.
|
public static final int version
private static java.text.DateFormat formatTimestamp
public static java.lang.String spaces
final MainCmdLogging_ifc console
final java.lang.String sFilePathIncludeline
final java.io.File fileSrc
final java.lang.String sAbsolutePath
final java.io.File fileMirror
final long dateFileSrc
private long dateFileMirror
long timestampNewestDependingFiles_
private char cNewly
private final boolean isSrc
private java.lang.String sDateNameLine
final java.util.Map<java.lang.String,InfoFileDependencies> includedPrimaryDeps
final java.util.Map<java.lang.String,InfoFileDependencies> includedPrimaryFiles
final java.util.Map<java.lang.String,InfoFileDependencies> includedAllFiles
final java.util.Map<java.lang.String,InfoFileDependencies> includingPrimaryFiles
final java.util.Map<java.lang.String,InfoFileDependencies> includingAllFiles
public InfoFileDependencies(java.lang.String sFilePathIncludeline, java.io.File fileSrc, java.io.File fileMirror, boolean isSrc, MainCmdLogging_ifc console)
public InfoFileDependencies(java.lang.String sFileAbs, MainCmdLogging_ifc console)
void addAllParentDependency(InfoFileDependencies child, ObjectFileDeps objDeps, int nRecursion)
#isNewly()
,
this will be notified as newly too. If the child is changed, the parent is changed too
because it includes the child.child
- It will be added to this.includingAllFiles
.public void addDependency(InfoFileDependencies child, ObjectFileDeps objDeps)
addDependency
in interface AddDependency_InfoFileDependencies
AddDependency_InfoFileDependencies.addDependency(InfoFileDependencies, ObjectFileDeps)
public void notifyNewly(ObjectFileDeps objDeps)
public void notifyIncludedNewly(ObjectFileDeps objDeps)
public void notifyChangedTimestamp()
public boolean isNewlyItself()
getDateFile()
.public boolean isNewlyOrIncludedNewly()
getDateFile()
.public boolean shouldWriteNewly()
public boolean isSrcFile()
long getDateFile()
public java.lang.String getDataNameLine()
public void xxx_writeDependenciesOfFile(java.io.File fileDep, MainCmdLogging_ifc console)
fileDep
- The file will be created. The directory of file will be created if not exists.
TODO use for new alldep-filepublic void writeDependendingFiles(java.lang.Appendable writer, java.util.Map<java.lang.String,java.lang.String> indexWrittenDeps, MainCmdLogging_ifc console, int nRecursion) throws java.io.IOException
writer
- The writerindexWrittenDeps
- Index of processed header-files, any header is written only one time.index
- The tree of dependencies of this level.nRecursion
- counter, will be checked and used as indentjava.io.IOException
- file writing.static void writeAllBackDeps(java.lang.String sDepFileName, java.util.Map<java.lang.String,InfoFileDependencies> indexAllDeps)
void xxx_writeBackDeps(InfoFileDependencies info, InfoFileDependencies parent, java.io.Writer writer) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object