|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.jgit.lib.Ref
public class Ref
Pairing of a name and the ObjectId it currently has.
A ref in Git is (more or less) a variable that holds a single object identifier. The object identifier can be any valid Git object (blob, tree, commit, annotated tag, ...).
The ref name has the attributes of the ref that was asked for as well as the ref it was resolved to for symbolic refs plus the object id it points to and (for tags) the peeled target object id, i.e. the tag resolved recursively until a non-tag object is referenced.
| Nested Class Summary | |
|---|---|
static class |
Ref.Storage
Location where a Ref is stored. |
| Constructor Summary | |
|---|---|
Ref(Ref.Storage st,
java.lang.String refName,
ObjectId id)
Create a new ref pairing. |
|
Ref(Ref.Storage st,
java.lang.String refName,
ObjectId id,
ObjectId peel,
boolean peeled)
Create a new ref pairing. |
|
Ref(Ref.Storage st,
java.lang.String origName,
java.lang.String refName,
ObjectId id)
Create a new ref pairing. |
|
Ref(Ref.Storage st,
java.lang.String origName,
java.lang.String refName,
ObjectId id,
ObjectId peel,
boolean peeled)
Create a new ref pairing. |
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
What this ref is called within the repository. |
ObjectId |
getObjectId()
Cached value of this ref. |
java.lang.String |
getOrigName()
|
ObjectId |
getPeeledObjectId()
Cached value of ref^{} (the ref peeled to commit). |
Ref.Storage |
getStorage()
How was this ref obtained? |
boolean |
isPeeled()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Ref(Ref.Storage st,
java.lang.String origName,
java.lang.String refName,
ObjectId id)
st - method used to store this ref.origName - The name used to resolve this refrefName - name of this ref.id - current value of the ref. May be null to indicate a ref that
does not exist yet.
public Ref(Ref.Storage st,
java.lang.String refName,
ObjectId id)
st - method used to store this ref.refName - name of this ref.id - current value of the ref. May be null to indicate a ref that
does not exist yet.
public Ref(Ref.Storage st,
java.lang.String origName,
java.lang.String refName,
ObjectId id,
ObjectId peel,
boolean peeled)
st - method used to store this ref.origName - The name used to resolve this refrefName - name of this ref.id - current value of the ref. May be null to indicate a ref that
does not exist yet.peel - peeled value of the ref's tag. May be null if this is not a
tag or not yet peeled (in which case the next parameter should be null)peeled - true if peel represents a the peeled value of the object
public Ref(Ref.Storage st,
java.lang.String refName,
ObjectId id,
ObjectId peel,
boolean peeled)
st - method used to store this ref.refName - name of this ref.id - current value of the ref. May be null to indicate a ref that
does not exist yet.peel - peeled value of the ref's tag. May be null if this is not a
tag or the peeled value is not known.peeled - true if peel represents a the peeled value of the object| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getOrigName()
public ObjectId getObjectId()
public ObjectId getPeeledObjectId()
ref^{} (the ref peeled to commit).
public boolean isPeeled()
public Ref.Storage getStorage()
The current storage model of a Ref may influence how the ref must be updated or deleted from the repository.
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||