|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.lib.TagBuilder
public class TagBuilder
Mutable builder to construct an annotated tag recording a project state.
Applications should use this object when they need to manually construct a
tag and want precise control over its fields.
To read a tag object, construct a RevWalk
and obtain a RevTag
instance by calling
RevWalk.parseTag(AnyObjectId)
.
Constructor Summary | |
---|---|
TagBuilder()
|
Method Summary | |
---|---|
byte[] |
build()
Format this builder's state as an annotated tag object. |
String |
getMessage()
|
ObjectId |
getObjectId()
|
int |
getObjectType()
|
String |
getTag()
|
PersonIdent |
getTagger()
|
void |
setMessage(String newMessage)
Set the tag's message. |
void |
setObjectId(AnyObjectId obj,
int objType)
Set the object this tag refers to, and its type. |
void |
setObjectId(RevObject obj)
Set the object this tag refers to, and infer its type. |
void |
setTag(String shortName)
Set the name of this tag. |
void |
setTagger(PersonIdent taggerIdent)
Set the creator of this tag. |
byte[] |
toByteArray()
Format this builder's state as an annotated tag object. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TagBuilder()
Method Detail |
---|
public int getObjectType()
public ObjectId getObjectId()
public void setObjectId(AnyObjectId obj, int objType)
obj
- the object.objType
- the type of obj
. Must be a valid type code.public void setObjectId(RevObject obj)
obj
- the object the tag will refer to.public String getTag()
refs/tags/
prefix).public void setTag(String shortName)
shortName
- new short name of the tag. This short name should not start
with refs/
as typically a tag is stored under the
reference derived from "refs/tags/" + getTag()
.public PersonIdent getTagger()
public void setTagger(PersonIdent taggerIdent)
taggerIdent
- the creator. May be null.public String getMessage()
public void setMessage(String newMessage)
newMessage
- the tag's message.public byte[] build()
public byte[] toByteArray()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |