|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.util.ArgsUtilities
public class ArgsUtilities
A collection of utilities for command line argument parsing.
Field Summary | |
---|---|
static String[] |
skipList
Skip svn entries, etc... |
Method Summary | |
---|---|
static String[] |
cut(String str)
Cuts a string of white space separated tokens into an array of strings, one element for each token. |
static String[] |
expandArgFiles(String[] args)
Expands any argfiles. |
static String |
getOptArg(String[] args,
int index,
String opt)
Gets the argument to a command line option. |
static void |
processClassArg(String arg,
Vector classes,
Vector resources)
Processes a single command line argument that specifies one or more class names or resource names. |
static void |
processClassJarOrZipArg(String arg,
Vector classes,
Vector resources)
Processes a single command line argument that specifies a jar or zip file of class files. |
static void |
processClassListArg(String arg,
Vector classes)
Processes a single command line argument that specifies a file containing a set of class names, one per line. |
static void |
processClasspathConnection(ClasspathConnection cp,
Vector classes,
Vector resources)
Processes a single command line argument that specifies a jar or zip file of class files. |
static void |
readArgFile(String name,
Vector args)
Processes a file containing command line arguments. |
static void |
readLines(String file,
Vector lines)
Reads all the lines of a file into a given vector. |
static String |
toPlatformPath(String path,
boolean isClassPath)
Converts a given file or class path to the correct format for the underlying platform. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] skipList
Method Detail |
---|
public static void readLines(String file, Vector lines)
file
- the file to readlines
- the vector to augmentpublic static void readArgFile(String name, Vector args)
name
- the name of the args fileargs
- the vector of arguments to be added topublic static String[] expandArgFiles(String[] args)
args
that
start with '@' (thus denoting a file containing more arguments) and
expands the arguments inline in args
. The expansion is
not recursive.
args
- the original command line arguments
public static String toPlatformPath(String path, boolean isClassPath)
path
will be converted to '/'.
path
- to the path to convertisClassPath
- specifies if path
is a class path
path
reformatted (if necessary) to
be correct for the underlying platformpublic static void processClassListArg(String arg, Vector classes)
arg
- the command line argument to processclasses
- the list of class names to augmentpublic static void processClassJarOrZipArg(String arg, Vector classes, Vector resources)
arg
- the command line argument to processclasses
- the list of class names to augmentresources
- the list of resource to augmentpublic static void processClasspathConnection(ClasspathConnection cp, Vector classes, Vector resources)
cp
- the command line argument to processclasses
- the list of class names to augmentresources
- the list of resource to augmentpublic static void processClassArg(String arg, Vector classes, Vector resources)
arg
- the command line argument to processclasses
- the list of class names to augmentresources
- Vectorpublic static String[] cut(String str)
str
- the string to cut
public static String getOptArg(String[] args, int index, String opt)
args
- the command line argumentsindex
- the index at which the option's argument is locatedopt
- the name of the option
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |