public class TagBuilder
extends java.lang.Object
RevWalk
and obtain a RevTag
instance by calling
RevWalk.parseTag(AnyObjectId)
.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
message |
private ObjectId |
object |
private java.lang.String |
tag |
private PersonIdent |
tagger |
private int |
type |
Constructor and Description |
---|
TagBuilder() |
Modifier and Type | Method and Description |
---|---|
byte[] |
build()
Format this builder's state as an annotated tag object.
|
java.lang.String |
getMessage()
Get the complete commit message.
|
ObjectId |
getObjectId()
Get the object this tag refers to.
|
int |
getObjectType()
Get the type of object this tag refers to.
|
java.lang.String |
getTag()
Get short name of the tag (no
refs/tags/ prefix). |
PersonIdent |
getTagger()
Get creator of this tag.
|
void |
setMessage(java.lang.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(java.lang.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.
|
java.lang.String |
toString() |
private ObjectId object
private int type
private java.lang.String tag
private PersonIdent tagger
private java.lang.String message
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 java.lang.String getTag()
refs/tags/
prefix).refs/tags/
prefix).public void setTag(java.lang.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 java.lang.String getMessage()
public void setMessage(java.lang.String newMessage)
newMessage
- the tag's message.public byte[] build()
public byte[] toByteArray()
public java.lang.String toString()
toString
in class java.lang.Object