Class BuildFile

java.lang.Object
io.helidon.build.devloop.BuildFile
All Implemented Interfaces:
FileChangeAware

public class BuildFile extends Object implements FileChangeAware
A project build file that can detect modification.
  • Method Details

    • createBuildFile

      public static BuildFile createBuildFile(ProjectDirectory parent, Path path)
      Returns a new build file.
      Parameters:
      parent - The parent.
      path - The file path.
      Returns:
      The file.
    • parent

      public ProjectDirectory parent()
      Returns the parent directory.
      Returns:
      The parent.
    • path

      public Path path()
      Returns the path.
      Returns:
      The path.
    • changedTime

      public Optional<FileTime> changedTime()
      Description copied from interface: FileChangeAware
      Returns the most recent change time, if any.
      Specified by:
      changedTime in interface FileChangeAware
      Returns:
      The time if changed.
    • changedTimeIfNewerThan

      public Optional<FileTime> changedTimeIfNewerThan(FileTime baseTime)
      Tests whether or not this file has a modified time that is more recent than the base time.
      Parameters:
      baseTime - The base time. May be null.
      Returns:
      true if base time is null or change time is newer.
    • changedTimeIfOlderThan

      public Optional<FileTime> changedTimeIfOlderThan(FileTime baseTime)
      Tests whether or not this file has a modified time that is more recent than the base time.
      Parameters:
      baseTime - The base time. May be null.
      Returns:
      true if base time is null or change time is older.
    • lastModifiedTime

      public FileTime lastModifiedTime()
      Returns the last modified time.
      Returns:
      The last modified time.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • update

      public void update()
      Updates the last modified time.
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object