wyvern.kernel.commands.filters
Class CommandFilterFactory

java.lang.Object
  extended bywyvern.kernel.commands.filters.CommandFilterFactory

public final class CommandFilterFactory
extends java.lang.Object

Factory/registry for CommandFilter objects. Provides a parse() method for parsing a filter, such as "wc -l" or "egrep [^|]", into a CommandFilter implementation object. Also provides a mechanism (eventually) for registering your own CommandFilter implementations that other Wizards can use.

Version:
1.0, Jun 12, 2003
Author:
Steve Yegge

Method Summary
static void main(java.lang.String[] args)
          Test suite.
static CommandFilter parse(java.lang.String command)
          Parses a filter command such as "sort -r" or "grep (telnet)" into a CommandFilter that can implement the passed filter command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parse

public static CommandFilter parse(java.lang.String command)
                           throws java.lang.ClassNotFoundException
Parses a filter command such as "sort -r" or "grep (telnet)" into a CommandFilter that can implement the passed filter command.

Parameters:
command - the filter command to parse
Returns:
a CommandFilter implementation object to handle the passed filter command.
Throws:
java.lang.ClassNotFoundException - if no implementation could be instantiated for the command.
java.lang.IllegalArgumentException - if the arguments to the filter command were invalid.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test suite.

Throws:
java.lang.Exception