Class ModifiedFile
java.lang.Object
com.google.gerrit.server.patch.gitdiff.ModifiedFile
An entity representing a Modified file due to a diff between 2 git trees. This entity contains
the change type and the old & new paths, but does not include any actual content diff of the
file.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ModifiedFile.Builder
builder()
abstract Patch.ChangeType
Returns the change type (i.e.newPath()
Returns the new name associated with this file.oldPath()
Returns the old name associated with this file.abstract ModifiedFile.Builder
int
weight()
Computes this object's weight, which is its size in bytes.
-
Constructor Details
-
ModifiedFile
public ModifiedFile()
-
-
Method Details
-
changeType
Returns the change type (i.e. add, delete, modify, rename, etc...) associated with this modified file. -
oldPath
Returns the old name associated with this file. An empty optional is returned ifchangeType()
is equal toPatch.ChangeType.ADDED
. -
newPath
Returns the new name associated with this file. An empty optional is returned ifchangeType()
is equal toPatch.ChangeType.DELETED
-
getDefaultPath
-
builder
-
toBuilder
-
weight
public int weight()Computes this object's weight, which is its size in bytes.
-