Package hydra.build.assembly
Class KeepPathEntry
- java.lang.Object
-
- hydra.build.assembly.KeepPathEntry
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<KeepPathEntry>
public class KeepPathEntry extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<KeepPathEntry>
One protected path in a keep-paths manifest: a source-set directory paired with a file's path relative to it. Serialized by the native executor as <sourceSetDir>\t<relPath>, bit-compatible with the prune-stale (#357) and digest-check --keep-paths-from consumers.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKeepPathEntry.BuilderA fluent builder forKeepPathEntry.
-
Field Summary
Fields Modifier and Type Field Description static NameREL_PATHName of thehydra.build.assembly.KeepPathEntry.relPathfield.java.lang.StringrelPathThe file's path relative to its source-set directorystatic NameSOURCE_SET_DIRName of thehydra.build.assembly.KeepPathEntry.sourceSetDirfield.java.lang.StringsourceSetDirThe source-set directory the file belongs to, as a worktree-relative pathstatic NameTYPE_Name of thehydra.build.assembly.KeepPathEntrytype.
-
Constructor Summary
Constructors Constructor Description KeepPathEntry(java.lang.String sourceSetDir, java.lang.String relPath)Constructs an immutableKeepPathEntry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static KeepPathEntry.Builderbuilder()Creates a new fluent builder forKeepPathEntry.intcompareTo(KeepPathEntry other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()KeepPathEntrywithRelPath(java.lang.String relPath)Returns a copy of thisKeepPathEntrywithrelPathreplaced.KeepPathEntrywithSourceSetDir(java.lang.String sourceSetDir)Returns a copy of thisKeepPathEntrywithsourceSetDirreplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.build.assembly.KeepPathEntrytype.
-
SOURCE_SET_DIR
public static final Name SOURCE_SET_DIR
Name of thehydra.build.assembly.KeepPathEntry.sourceSetDirfield.
-
REL_PATH
public static final Name REL_PATH
Name of thehydra.build.assembly.KeepPathEntry.relPathfield.
-
sourceSetDir
public final java.lang.String sourceSetDir
The source-set directory the file belongs to, as a worktree-relative path
-
relPath
public final java.lang.String relPath
The file's path relative to its source-set directory
-
-
Constructor Detail
-
KeepPathEntry
public KeepPathEntry(java.lang.String sourceSetDir, java.lang.String relPath)Constructs an immutableKeepPathEntry.- Parameters:
sourceSetDir- The source-set directory the file belongs to, as a worktree-relative pathrelPath- The file's path relative to its source-set directory
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(KeepPathEntry other)
- Specified by:
compareToin interfacejava.lang.Comparable<KeepPathEntry>
-
withSourceSetDir
public KeepPathEntry withSourceSetDir(java.lang.String sourceSetDir)
Returns a copy of thisKeepPathEntrywithsourceSetDirreplaced.
-
withRelPath
public KeepPathEntry withRelPath(java.lang.String relPath)
Returns a copy of thisKeepPathEntrywithrelPathreplaced.
-
builder
public static KeepPathEntry.Builder builder()
Creates a new fluent builder forKeepPathEntry.
-
-