org.apache.commons.cli
Class PatternOptionBuilder

java.lang.Object
  extended byorg.apache.commons.cli.PatternOptionBuilder

public class PatternOptionBuilder
extends Object

Allows Options to be created from a single String.

Version:
$Revision: 1.2 $
Author:
Henri Yandell (bayard @ generationjava.com)

Field Summary
static Class CLASS_VALUE
          Class class
static Class DATE_VALUE
          Date class
static Class EXISTING_FILE_VALUE
          FileInputStream class
static Class FILE_VALUE
          File class
static Class FILES_VALUE
          File array class
static Class NUMBER_VALUE
          Number class
static Class OBJECT_VALUE
          Object class
static Class STRING_VALUE
          String class
static Class URL_VALUE
          URL class
 
Constructor Summary
PatternOptionBuilder()
           
 
Method Summary
static Object getValueClass(char ch)
          Retrieve the class that ch represents.
static boolean isValueCode(char ch)
          Returns whether ch is a value code, i.e.
static Options parsePattern(String pattern)
          Returns the Options instance represented by pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING_VALUE

public static final Class STRING_VALUE
String class


OBJECT_VALUE

public static final Class OBJECT_VALUE
Object class


NUMBER_VALUE

public static final Class NUMBER_VALUE
Number class


DATE_VALUE

public static final Class DATE_VALUE
Date class


CLASS_VALUE

public static final Class CLASS_VALUE
Class class


EXISTING_FILE_VALUE

public static final Class EXISTING_FILE_VALUE
FileInputStream class


FILE_VALUE

public static final Class FILE_VALUE
File class


FILES_VALUE

public static final Class FILES_VALUE
File array class


URL_VALUE

public static final Class URL_VALUE
URL class

Constructor Detail

PatternOptionBuilder

public PatternOptionBuilder()
Method Detail

getValueClass

public static Object getValueClass(char ch)

Retrieve the class that ch represents.

Parameters:
ch - the specified character
Returns:
The class that ch represents

isValueCode

public static boolean isValueCode(char ch)

Returns whether ch is a value code, i.e. whether it represents a class in a pattern.

Parameters:
ch - the specified character
Returns:
true if ch is a value code, otherwise false.

parsePattern

public static Options parsePattern(String pattern)

Returns the Options instance represented by pattern.

Parameters:
pattern - the pattern string
Returns:
The Options instance


Copyright © 2002-2004 Apache Software Foundation. All Rights Reserved.