@ExportedBean public class Branch extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Branch.Dead
Represents a dead branch.
|
| Constructor and Description |
|---|
Branch(String sourceId,
jenkins.scm.api.SCMHead head,
hudson.scm.SCM scm,
List<? extends BranchProperty> properties)
Constructs a branch instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
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.
|
hudson.scm.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, hudson.scm.SCM scm, List<? extends BranchProperty> properties)
sourceId - the SCMSource.getId()head - the name of the branch.scm - the SCM for the branch.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 hudson.scm.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.public <T extends BranchProperty> T getProperty(Class<T> clazz)
public List<BranchProperty> getProperties()
public boolean isBuildable()
true iff the branch is can be built.true iff the branch is can be built.Copyright © 2016. All rights reserved.