|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.at4j.support.prog.AbstractProgram
public abstract class AbstractProgram
This is an abstract base class for command-line programs such as zip
,
unzip
and tar
. It contains common utility functions.
Constructor Summary | |
---|---|
AbstractProgram()
|
Method Summary | |
---|---|
protected String |
getArg(String[] args,
int pos,
String errMsg)
Get the argument from the specified position. |
protected AbsoluteLocation |
getParentLocation(File f)
Get the absolute location of the file's parent directory. |
protected boolean |
isFlagArgument(String arg)
Is the argument a flag argument, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractProgram()
Method Detail |
---|
protected String getArg(String[] args, int pos, String errMsg) throws CommandErrorException
CommandErrorException
having the supplied error message.
args
- The argument array.pos
- The position in the array of the argument.errMsg
- The error message to use for the exception if the position
is beyond the end of the array.
CommandErrorException
- If the position is beyond the end of the
array.protected boolean isFlagArgument(String arg)
-
?
arg
- The argument.
true
if the argument is a flag argument.protected AbsoluteLocation getParentLocation(File f)
f
- The file
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |