Package org.eclipse.jgit.lib
Class ObjectIdRef.PeeledTag
java.lang.Object
org.eclipse.jgit.lib.ObjectIdRef
org.eclipse.jgit.lib.ObjectIdRef.PeeledTag
- All Implemented Interfaces:
Ref
- Direct Known Subclasses:
RefDirectory.LoosePeeledTag
- Enclosing class:
- ObjectIdRef
An annotated tag whose peeled object has been cached.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jgit.lib.ObjectIdRef
ObjectIdRef.PeeledNonTag, ObjectIdRef.PeeledTag, ObjectIdRef.UnpeeledNested classes/interfaces inherited from interface org.eclipse.jgit.lib.Ref
Ref.Storage -
Field Summary
FieldsFields inherited from interface org.eclipse.jgit.lib.Ref
UNDEFINED_UPDATE_INDEX -
Constructor Summary
ConstructorsConstructorDescriptionPeeledTag(Ref.Storage st, String name, ObjectId id, ObjectId p) Create a new ref pairing.PeeledTag(Ref.Storage st, String name, ObjectId id, ObjectId p, long updateIndex) Create a new ref pairing with update index. -
Method Summary
Modifier and TypeMethodDescriptionCached value ofref^{}(the ref peeled to commit).booleanisPeeled()Whether the Ref represents a peeled tag.Methods inherited from class org.eclipse.jgit.lib.ObjectIdRef
getLeaf, getName, getObjectId, getStorage, getTarget, getUpdateIndex, isSymbolic, toString
-
Field Details
-
peeledObjectId
-
-
Constructor Details
-
PeeledTag
public PeeledTag(@NonNull Ref.Storage st, @NonNull String name, @Nullable ObjectId id, @NonNull ObjectId p) Create a new ref pairing.- Parameters:
st- method used to store this ref.name- name of this ref.id- current value of the ref.p- the first non-tag object that tagidpoints to.
-
PeeledTag
public PeeledTag(@NonNull Ref.Storage st, @NonNull String name, @Nullable ObjectId id, @NonNull ObjectId p, 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 benullto indicate a ref that does not exist yet.p- the first non-tag object that tagidpoints to.updateIndex- number increasing with each update to the reference.- Since:
- 5.3
-
-
Method Details
-
getPeeledObjectId
Description copied from interface:RefCached 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;
nullif this ref does not refer to an annotated tag.
-
isPeeled
public boolean isPeeled()Description copied from interface:RefWhether the Ref represents a peeled tag.- Returns:
- whether the Ref represents a peeled tag.
-