public class Depend extends java.lang.Object implements PersistentDependency
Constructor and Description |
---|
Depend(Path source)
Create a new dependency.
|
Depend(Path source,
long digest)
Create a new dependency with a given digest.
|
Depend(Path source,
long digest,
boolean requireSource)
Create a new dependency with a given digest.
|
Depend(Path source,
long lastModified,
long length)
Create a new dependency with an already known modified time and length.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Returns true if the test Dependency has the same source path as
this dependency.
|
long |
getDigest()
Returns the digest.
|
java.lang.String |
getJavaCreateString()
Returns the string to recreate the Dependency.
|
long |
getLastModified()
Returns the current last-modified time of the file.
|
long |
getLength()
Returns the current length time of the file.
|
Path |
getPath()
Returns the underlying source path.
|
boolean |
getRequireSource()
If true, deleting the source counts as a change.
|
boolean |
isModified()
If the source modified date changes at all, treat it as a modification.
|
boolean |
logModified(java.util.logging.Logger log)
Log the reason for modification
|
void |
setRequireSource(boolean requireSource)
If true, deleting the source counts as a change.
|
java.lang.String |
toString()
Returns a printable version of the dependency.
|
public Depend(Path source, long lastModified, long length)
source
- the source filepublic Depend(Path source)
source
- the source filepublic Depend(Path source, long digest)
source
- the source filedigest
- the CRC64 digestpublic Depend(Path source, long digest, boolean requireSource)
source
- the source filedigest
- the CRC64 digestpublic Path getPath()
public long getLastModified()
public long getLength()
public boolean getRequireSource()
public void setRequireSource(boolean requireSource)
public boolean isModified()
isModified
in interface Dependency
public boolean logModified(java.util.logging.Logger log)
logModified
in interface Dependency
public long getDigest()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getJavaCreateString()
getJavaCreateString
in interface PersistentDependency
public java.lang.String toString()
toString
in class java.lang.Object