@ExportedBean public class Branch extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Branch.Dead
Represents a dead branch.
|
static class |
Branch.TransientJobActionsFactoryImpl
Ensures that the
getActions() are always present in the Actionable.getAllActions(). |
| Constructor and Description |
|---|
Branch(String sourceId,
jenkins.scm.api.SCMHead head,
SCM scm,
List<? extends BranchProperty> properties)
Constructs a branch instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
<T extends Action> |
getAction(Class<T> clazz)
Gets the specific action, or null if no such property is found.
|
List<Action> |
getActions()
Gets all the actions.
|
String |
getEncodedName()
Gets a branch name suitable for use in paths.
|
jenkins.scm.api.SCMHead |
getHead()
Returns the
of the branch |
String |
getName()
Returns the name of the branch.
|
List<BranchProperty> |
getProperties()
Gets all the properties.
|
<T extends BranchProperty> |
getProperty(Class<T> clazz)
Gets the specific property, or
null if no such property is found. |
SCM |
getScm()
Returns the
SCM for the branch. |
String |
getSourceId()
Returns the
SCMSource.getId() that this branch originates from. |
int |
hashCode() |
boolean |
hasProperty(Class<? extends BranchProperty> clazz)
Tests if a property of a specific type is present.
|
boolean |
isBuildable()
Returns
true iff the branch is can be built. |
public Branch(String sourceId, jenkins.scm.api.SCMHead head, SCM scm, List<? extends BranchProperty> properties)
sourceId - the SCMSource.getId()head - the name of the branch.scm - the SCM for the branch.properties - the properties to initiate the branch with.public String getSourceId()
SCMSource.getId() that this branch originates from.SCMSource.getId() that this branch originates from.public String getName()
public String getEncodedName()
getName() with URL-unsafe characters escaped@Exported public jenkins.scm.api.SCMHead getHead()
of the branchof the branch@Exported public SCM getScm()
SCM for the branch.SCM for the branch.public boolean hasProperty(Class<? extends BranchProperty> clazz)
clazz - the specific property typetrue if and only if there is a property of the specified type.@CheckForNull public <T extends BranchProperty> T getProperty(Class<T> clazz)
null if no such property is found.T - the type of property.clazz - the type of property.null if no such property is found.@NonNull public List<BranchProperty> getProperties()
@CheckForNull public <T extends Action> T getAction(Class<T> clazz)
T - the type of actionclazz - the type of action.null if no such action is present.public boolean isBuildable()
true iff the branch is can be built.true iff the branch is can be built.Copyright © 2016–2019. All rights reserved.