@Immutable @Loggable(value=1) public static final class FileChange.Smart extends Object implements FileChange
FileChange.Smart, FileChange.Status| Constructor and Description |
|---|
Smart(FileChange chng)
Public ctor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
additions()
Number of lines added, or 0 if the file is binary.
|
String |
blobUrl()
URL for the file's git blob.
|
int |
changes()
Number of lines modified, which is equal to the sum of
additions() and deletions(). |
String |
contentsUrl()
Repo contents URL for the file.
|
int |
deletions()
Number of lines deleted, or 0 if the file is binary.
|
String |
filename()
File's name.
|
javax.json.JsonObject |
json()
Describe it in a JSON object.
|
com.google.common.base.Optional<String> |
patch()
Diff string of the changes to the file.
|
String |
rawUrl()
URL for the raw contents of the file.
|
String |
sha()
File's commit SHA.
|
FileChange.Status |
status()
Status of the file in this change.
|
public Smart(FileChange chng)
chng - File changepublic String sha() throws IOException
IOException - If there is any I/O problempublic String filename() throws IOException
IOException - If there is any I/O problempublic FileChange.Status status() throws IOException
IOException - If there is any I/O problempublic int additions()
throws IOException
IOException - If there is any I/O problempublic int deletions()
throws IOException
IOException - If there is any I/O problempublic int changes()
throws IOException
additions() and deletions().IOException - If there is any I/O problempublic com.google.common.base.Optional<String> patch() throws IOException
IOException - If there is any I/O problempublic String rawUrl() throws IOException
IOException - If there is any I/O problempublic String blobUrl() throws IOException
IOException - If there is any I/O problempublic String contentsUrl() throws IOException
IOException - If there is any I/O problempublic javax.json.JsonObject json()
throws IOException
JsonReadablejson in interface JsonReadableIOException - If there is any I/O problemCopyright © 2012–2018 jcabi.com. All rights reserved.