Ref.Storage| Constructor and Description |
|---|
SymbolicRef(String refName,
Ref target)
Create a new ref pairing.
|
| Modifier and Type | Method and Description |
|---|---|
Ref |
getLeaf()
Traverse target references until
Ref.isSymbolic() is false. |
String |
getName()
What this ref is called within the repository.
|
ObjectId |
getObjectId()
Cached value of this ref.
|
ObjectId |
getPeeledObjectId()
Cached value of
ref^{} (the ref peeled to commit). |
Ref.Storage |
getStorage()
How was this ref obtained?
|
Ref |
getTarget()
Get the reference this reference points to, or
this. |
boolean |
isPeeled() |
boolean |
isSymbolic()
Test if this reference is a symbolic reference.
|
String |
toString() |
public String getName()
Refpublic boolean isSymbolic()
Ref
A symbolic reference does not have its own ObjectId value, but
instead points to another Ref in the same database and always
uses that other reference's value as its own.
isSymbolic in interface Refpublic Ref getLeaf()
RefRef.isSymbolic() is false.
If Ref.isSymbolic() is false, returns this.
If Ref.isSymbolic() is true, this method recursively traverses
Ref.getTarget() until Ref.isSymbolic() returns false.
This method is effectively
return isSymbolic() ? getTarget().getLeaf() : this;
public Ref getTarget()
Refthis.
If Ref.isSymbolic() is true this method returns the reference it
directly names, which might not be the leaf reference, but could be
another symbolic reference.
If this is a leaf level reference that contains its own ObjectId,this
method returns this.
public ObjectId getObjectId()
RefgetObjectId in interface Refpublic Ref.Storage getStorage()
RefThe current storage model of a Ref may influence how the ref must be updated or deleted from the repository.
getStorage in interface Refpublic ObjectId getPeeledObjectId()
Refref^{} (the ref peeled to commit).getPeeledObjectId in interface Refpublic boolean isPeeled()
Copyright © 2014. All rights reserved.