public final class FooterLine
extends java.lang.Object
These footer lines tend to be used to represent additional information about a commit, like the path it followed through reviewers before finally being accepted into the project's main repository as an immutable commit.
RevCommit.getFooterLines()
Modifier and Type | Field and Description |
---|---|
private byte[] |
buffer |
private java.nio.charset.Charset |
enc |
private int |
keyEnd |
private int |
keyStart |
private int |
valEnd |
private int |
valStart |
Constructor and Description |
---|
FooterLine(byte[] b,
java.nio.charset.Charset e,
int ks,
int ke,
int vs,
int ve) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEmailAddress()
Extract the email address (if present) from the footer.
|
java.lang.String |
getKey()
Get key name of this footer.
|
java.lang.String |
getValue()
Get value of this footer.
|
boolean |
matches(FooterKey key)
Whether keys match
|
java.lang.String |
toString() |
private final byte[] buffer
private final java.nio.charset.Charset enc
private final int keyStart
private final int keyEnd
private final int valStart
private final int valEnd
FooterLine(byte[] b, java.nio.charset.Charset e, int ks, int ke, int vs, int ve)
public boolean matches(FooterKey key)
key
- key to test this line's key name against.key.getName().equalsIgnorecase(getKey())
.public java.lang.String getKey()
public java.lang.String getValue()
public java.lang.String getEmailAddress()
If there is an email address looking string inside of angle brackets
(e.g. "<a@b>"), the return value is the part extracted from inside the
brackets. If no brackets are found, then getValue()
is returned
if the value contains an '@' sign. Otherwise, null.
public java.lang.String toString()
toString
in class java.lang.Object