public class RebaseTodoLine
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RebaseTodoLine.Action
Describes rebase actions
|
| Modifier and Type | Field and Description |
|---|---|
(package private) RebaseTodoLine.Action |
action |
(package private) java.lang.String |
comment |
(package private) AbbreviatedObjectId |
commit |
(package private) java.lang.String |
shortMessage |
| Constructor and Description |
|---|
RebaseTodoLine(RebaseTodoLine.Action action,
AbbreviatedObjectId commit,
java.lang.String shortMessage)
Create a new non-comment line
|
RebaseTodoLine(java.lang.String newComment)
Create a new comment line
|
| Modifier and Type | Method and Description |
|---|---|
private static java.lang.IllegalArgumentException |
createInvalidCommentException(java.lang.String newComment) |
RebaseTodoLine.Action |
getAction()
Get rebase action type
|
java.lang.String |
getComment()
Get a comment
|
AbbreviatedObjectId |
getCommit()
Get abbreviated commit SHA-1 of commit that action will be performed on
|
java.lang.String |
getShortMessage()
Get the first line of the commit message of the commit the action will be
performed on.
|
void |
setAction(RebaseTodoLine.Action newAction)
Set the action.
|
void |
setComment(java.lang.String newComment)
Set a comment for this line that is used if this line's
action is a RebaseTodoLine.Action.COMMENT |
void |
setShortMessage(java.lang.String shortMessage)
Set short message
|
java.lang.String |
toString() |
RebaseTodoLine.Action action
final AbbreviatedObjectId commit
java.lang.String shortMessage
java.lang.String comment
public RebaseTodoLine(java.lang.String newComment)
newComment - the new commentpublic RebaseTodoLine(RebaseTodoLine.Action action, AbbreviatedObjectId commit, java.lang.String shortMessage)
action - a RebaseTodoLine.Action object.commit - a AbbreviatedObjectId object.shortMessage - a String object.public RebaseTodoLine.Action getAction()
public void setAction(RebaseTodoLine.Action newAction) throws IllegalTodoFileModification
newAction - a RebaseTodoLine.Action object.IllegalTodoFileModification - on attempt to set a non-comment action on a line which was a
comment line before.public void setComment(java.lang.String newComment)
Set a comment for this line that is used if this line's
action is a RebaseTodoLine.Action.COMMENT
setComment(null) '#'), is an
empty string, or consists of only spaces and tabs.newComment doesn't match these requirements
an Exception is thrown.newComment - the commentprivate static java.lang.IllegalArgumentException createInvalidCommentException(java.lang.String newComment)
public AbbreviatedObjectId getCommit()
public java.lang.String getShortMessage()
public void setShortMessage(java.lang.String shortMessage)
shortMessage - a short message.public java.lang.String getComment()
public java.lang.String toString()
toString in class java.lang.Object