Package org.eclipse.jgit.lib
Class ObjectIdRef.Unpeeled
- java.lang.Object
-
- org.eclipse.jgit.lib.ObjectIdRef
-
- org.eclipse.jgit.lib.ObjectIdRef.Unpeeled
-
- All Implemented Interfaces:
Ref
- Enclosing class:
- ObjectIdRef
public static class ObjectIdRef.Unpeeled extends ObjectIdRef
Any reference whose peeled value is not yet known.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jgit.lib.ObjectIdRef
ObjectIdRef.PeeledNonTag, ObjectIdRef.PeeledTag, ObjectIdRef.Unpeeled
-
Nested classes/interfaces inherited from interface org.eclipse.jgit.lib.Ref
Ref.Storage
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jgit.lib.Ref
UNDEFINED_UPDATE_INDEX
-
-
Constructor Summary
Constructors Constructor Description Unpeeled(Ref.Storage st, String name, ObjectId id)
Create a new ref pairing.Unpeeled(Ref.Storage st, String name, ObjectId id, long updateIndex)
Create a new ref pairing with update index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectId
getPeeledObjectId()
Cached value ofref^{}
(the ref peeled to commit).boolean
isPeeled()
Whether the Ref represents a peeled tag.-
Methods inherited from class org.eclipse.jgit.lib.ObjectIdRef
getLeaf, getName, getObjectId, getStorage, getTarget, getUpdateIndex, isSymbolic, toString
-
-
-
-
Constructor Detail
-
Unpeeled
public Unpeeled(@NonNull Ref.Storage st, @NonNull String name, @Nullable ObjectId id)
Create a new ref pairing.- Parameters:
st
- method used to store this ref.name
- name of this ref.id
- current value of the ref. May benull
to indicate a ref that does not exist yet.
-
Unpeeled
public Unpeeled(@NonNull Ref.Storage st, @NonNull String name, @Nullable ObjectId id, long updateIndex)
Create a new ref pairing with update index.- Parameters:
st
- method used to store this ref.name
- name of this ref.id
- current value of the ref. May benull
to indicate a ref that does not exist yet.updateIndex
- number increasing with each update to the reference.- Since:
- 5.3
-
-
Method Detail
-
getPeeledObjectId
@Nullable public ObjectId getPeeledObjectId()
Description copied from interface:Ref
Cached value ofref^{}
(the ref peeled to commit).- Returns:
- if this ref is an annotated tag the id of the commit (or tree or
blob) that the annotated tag refers to;
null
if this ref does not refer to an annotated tag.
-
isPeeled
public boolean isPeeled()
Description copied from interface:Ref
Whether the Ref represents a peeled tag.- Returns:
- whether the Ref represents a peeled tag.
-
-