org.eclipse.jgit.lib.Ref .
A symbolic reference always derives its current value from the target reference.
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final Ref | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public | SymbolicRef(String
name of this ref. refName, Ref the ref we reference and derive our value from. target)Create a new ref pairing. |
| public | SymbolicRef(String
name of this ref. refName, Ref the ref we reference and derive our value from. target, long index that increases with each update of the reference updateIndex)Create a new ref pairing. |
| Modifier and Type | Method and Description |
|---|---|
| public Ref | getLeaf()
Implements org. Traverse target references until |
| public String | getName()
Implements org. What this ref is called within the repository. |
| public ObjectId | |
| public ObjectId | getPeeledObjectId()
Implements org. Cached value of |
| public Ref. | |
| public Ref | getTarget()
Implements org. Get the reference this reference points to, or |
| public long | getUpdateIndex()
Overrides default org. Indicator of the relative order between updates of a specific reference name. |
| public boolean | |
| public boolean | isSymbolic()
Implements org. Test if this reference is a symbolic reference. |
| public String |
| name | back to summary |
|---|---|
| private final String name | |
| target | back to summary |
|---|---|
| private final Ref target | |
| updateIndex | back to summary |
|---|---|
| private final long updateIndex | |
| SymbolicRef | back to summary |
|---|---|
| public SymbolicRef(String refName, Ref target) Create a new ref pairing. | |
| SymbolicRef | back to summary |
|---|---|
| public SymbolicRef(String refName, Ref target, long updateIndex) Create a new ref pairing. | |
| getLeaf | back to summary |
|---|---|
| public Ref getLeaf() Implements org. Doc from org. Traverse target references until
If
If This method is effectively return isSymbolic() ? getTarget().getLeaf() : this; | |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. What this ref is called within the repository. | |
| getObjectId | back to summary |
|---|---|
| public ObjectId getObjectId() Implements org. Doc from org. Cached value of this ref. | |
| getPeeledObjectId | back to summary |
|---|---|
| public ObjectId getPeeledObjectId() Implements org. Doc from org. Cached value of | |
| getStorage | back to summary |
|---|---|
| public Ref. Implements org. Doc from org. How was this ref obtained? The current storage model of a Ref may influence how the ref must be updated or deleted from the repository. | |
| getTarget | back to summary |
|---|---|
| public Ref getTarget() Implements org. Doc from org. Get the reference this reference points to, or
If
If this is a leaf level reference that contains its own ObjectId,this
method returns | |
| getUpdateIndex | back to summary |
|---|---|
| public long getUpdateIndex() Overrides default org. Doc from org. Indicator of the relative order between updates of a specific reference name. A number that increases when a reference is updated. With symbolic references, the update index refers to updates of the symbolic reference itself. For example, if HEAD points to refs/heads/master, then the update index for exactRef("HEAD") will only increase when HEAD changes to point to another ref, regardless of how many times refs/heads/master is updated.
Should not be used unless the
| |
| isPeeled | back to summary |
|---|---|
| public boolean isPeeled() Implements org. Doc from org. Whether the Ref represents a peeled tag.
| |
| isSymbolic | back to summary |
|---|---|
| public boolean isSymbolic() Implements org. Doc from org. Test if this reference is a symbolic reference.
A symbolic reference does not have its own
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |