Class FileFingerprint

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.java.FileFingerprint

public class FileFingerprint extends Object
  • Field Details

    • NEVER_MODIFIED

      public static final long NEVER_MODIFIED
      Sentinel value for time indicating a nonexistent fingerprint. This is used for the timestamp of nonexistent files and for the getEmpty() singleton.
      See Also:
      Constant Field Values
    • UNKNOWN

      public static final long UNKNOWN
      Sentinel value for time indicating that the timestamp was not recorded as part of the fingerprint. This is normally used to indicate that the file's timestamp was so close to the current system time at the time the fingerprint was computed that subsequent changes in the file might not be detected. In such cases, timestamps are an unreliable method for determining if the file has changed and so are not included as part of the fingerprint.
      See Also:
      Constant Field Values
  • Constructor Details

    • FileFingerprint

      public FileFingerprint(long time, long size, long hash)
  • Method Details

    • getEmpty

      public static final FileFingerprint getEmpty()
    • create

      public static final FileFingerprint create(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
      Throws:
      org.eclipse.core.runtime.CoreException
    • getTime

      public long getTime()
    • getHash

      public long getHash()
    • getSize

      public long getSize()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • fileExists

      public boolean fileExists()
      Returns true iff the file existed at the time the fingerprint was computed.
      Returns:
      true iff the file existed at the time the fingerprint was computed.
    • test

      public FileFingerprint.FingerprintTestResult test(org.eclipse.core.runtime.IPath path, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
      Compares the given File with the receiver. If the fingerprint matches (ie: the file
      Throws:
      org.eclipse.core.runtime.CoreException
    • toString

      public String toString()
      Overrides:
      toString in class Object