org.eclipse.jgit.api
Class ListBranchCommand

java.lang.Object
  extended by org.eclipse.jgit.api.GitCommand<List<Ref>>
      extended by org.eclipse.jgit.api.ListBranchCommand
All Implemented Interfaces:
Callable<List<Ref>>

public class ListBranchCommand
extends GitCommand<List<Ref>>

Used to obtain a list of branches.

See Also:
Git documentation about Branch

Nested Class Summary
static class ListBranchCommand.ListMode
          The modes available for listing branches (corresponding to the -r and -a options)
 
Field Summary
 
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
 
Constructor Summary
protected ListBranchCommand(Repository repo)
           
 
Method Summary
 List<Ref> call()
          Executes the command
 ListBranchCommand setListMode(ListBranchCommand.ListMode listMode)
           
 
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListBranchCommand

protected ListBranchCommand(Repository repo)
Parameters:
repo -
Method Detail

call

public List<Ref> call()
               throws GitAPIException
Description copied from class: GitCommand
Executes the command

Specified by:
call in interface Callable<List<Ref>>
Specified by:
call in class GitCommand<List<Ref>>
Returns:
T a result. Each command has its own return type
Throws:
GitAPIException - or subclass thereof when an error occurs

setListMode

public ListBranchCommand setListMode(ListBranchCommand.ListMode listMode)
Parameters:
listMode - optional: corresponds to the -r/-a options; by default, only local branches will be listed
Returns:
this instance


Copyright © 2012. All Rights Reserved.