Class ModifiedFile
- java.lang.Object
- 
- com.google.gerrit.server.patch.gitdiff.ModifiedFile
 
- 
 public abstract class ModifiedFile extends Object 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 SummaryNested Classes Modifier and Type Class Description static classModifiedFile.Builder
 - 
Constructor SummaryConstructors Constructor Description ModifiedFile()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ModifiedFile.Builderbuilder()abstract Patch.ChangeTypechangeType()Returns the change type (i.e.StringgetDefaultPath()abstract Optional<String>newPath()Returns the new name associated with this file.abstract Optional<String>oldPath()Returns the old name associated with this file.abstract ModifiedFile.BuildertoBuilder()intweight()Computes this object's weight, which is its size in bytes.
 
- 
- 
- 
Method Detail- 
changeTypepublic abstract Patch.ChangeType changeType() Returns the change type (i.e. add, delete, modify, rename, etc...) associated with this modified file.
 - 
oldPathpublic abstract Optional<String> oldPath() Returns the old name associated with this file. An empty optional is returned ifchangeType()is equal toPatch.ChangeType.ADDED.
 - 
newPathpublic abstract Optional<String> newPath() Returns the new name associated with this file. An empty optional is returned ifchangeType()is equal toPatch.ChangeType.DELETED
 - 
getDefaultPathpublic String getDefaultPath() 
 - 
builderpublic static ModifiedFile.Builder builder() 
 - 
toBuilderpublic abstract ModifiedFile.Builder toBuilder() 
 - 
weightpublic int weight() Computes this object's weight, which is its size in bytes.
 
- 
 
-