|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uni_paderborn.fujaba.basic.CommandLineParser
The class CommandLineParser checks the provided parameter for wildcards and substitutes them with complete filepaths. It handles wildcards with following filetypes as '*.java' and filenames with wildcards in the file extension like 'a.*'. !!! This case will be interpretet as 'a*.*' for now.!!! It contains two inner classes that define FilenameFilters. !!! Maybe this parsing is not necessary under other command line interpreters than LINUX/UNIX !!!
Field Summary | |
static int |
COMMAND_LINE
Constant indicating that the provided line is command line |
static int |
EMPTY_COMMANDLINE
Constant indicating that the provided String is empty (no job to do) |
static int |
NO_COMMAND
Constant indicating that the expression contains no command |
static int |
NO_ERROR
Constant indicating no error occured during parsing |
static int |
PATH_LIST
Constant indicating that the provided line is a list of pathes seperated by path.seperator |
static int |
PATH_NOT_EXISTS
Constant indicating that a provided pathname is not valid |
static int |
WRONG_EXPRESSION
Constant indicating a wrong wildcard expression was found (like Elevator*) |
Constructor Summary | |
CommandLineParser(java.lang.String line)
Constructor for CommandLineParser. |
|
CommandLineParser(java.lang.String line,
java.lang.String selection,
int type)
Constructor for class CommandLineParser |
Method Summary | |
java.lang.String |
getCommandLine()
Returns the last parsed commandLine. |
int |
getErrorState()
Returns the last error |
java.io.File[] |
getFileArray()
Returns an array of File objects with all matching files |
java.util.Vector |
getFileVector()
Returns a vector of File objects with all matching files |
void |
parseLine(java.lang.String line)
The provided String will be examined for wildcards. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int COMMAND_LINE
public static int PATH_LIST
public static final int NO_ERROR
public static final int WRONG_EXPRESSION
public static final int NO_COMMAND
public static final int EMPTY_COMMANDLINE
public static final int PATH_NOT_EXISTS
Constructor Detail |
public CommandLineParser(java.lang.String line)
line
- The String to be parsed for wildcards.
IllegalArgumentException,
- if a invalid wildcard expression is found in the provided
Stringpublic CommandLineParser(java.lang.String line, java.lang.String selection, int type)
line
- No description providedselection
- No description providedtype
- No description providedMethod Detail |
public java.lang.String getCommandLine()
public java.util.Vector getFileVector()
public java.io.File[] getFileArray()
public int getErrorState()
public void parseLine(java.lang.String line)
line
- The String to be parsed for wildcards.
IllegalArgumentException,
- if a invalid wildcard expression is found in the provided
String
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |