org.netbeans.lib.cvsclient.commandLine
Class CommandFactory

java.lang.Object
  extended by org.netbeans.lib.cvsclient.commandLine.CommandFactory

public class CommandFactory
extends java.lang.Object

A factory for commands. Given a command name, and any arguments passed to that command on the command line, it will return a configured Command object, ready for execution.

See Also:
Command

Method Summary
 Command createCommand(java.lang.String commandName, java.lang.String[] args, int startingIndex, GlobalOptions gopt, java.lang.String workingDir)
          Create a CVS command.
 CommandProvider getCommandProvider(java.lang.String name)
          Get the provider of a command.
 CommandProvider[] getCommandProviders()
          Get the array of all command providers.
static CommandFactory getDefault()
          Get the default instance of CommandFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefault

public static CommandFactory getDefault()
Get the default instance of CommandFactory.


createCommand

public Command createCommand(java.lang.String commandName,
                             java.lang.String[] args,
                             int startingIndex,
                             GlobalOptions gopt,
                             java.lang.String workingDir)
                      throws java.lang.IllegalArgumentException
Create a CVS command.

Parameters:
commandName - The name of the command to create
args - The array of arguments
startingIndex - The index of the first argument of the command in the array
workingDir - The working directory
Throws:
java.lang.IllegalArgumentException

getCommandProvider

public CommandProvider getCommandProvider(java.lang.String name)
Get the provider of a command.

Parameters:
name - The name of the command to get the provider for.

getCommandProviders

public CommandProvider[] getCommandProviders()
Get the array of all command providers.


 

Built on October 26 2010.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.