|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.petals.cli.shell.Shell
org.ow2.petals.cli.shell.PetalsShell
public class PetalsShell
This class is the shell implementation for petals CLI for non-interactive use
| Field Summary | |
|---|---|
static java.util.regex.Pattern |
REGEX_COMMENT
Regular expression that matches comments in scripts |
static java.util.regex.Pattern |
REGEX_VARIABLE
Regular expression that matches variables in expressions |
| Fields inherited from class org.ow2.petals.cli.shell.Shell |
|---|
err, in, out |
| Constructor Summary | |
|---|---|
PetalsShell()
Creates a new PetalsShell |
|
PetalsShell(java.lang.String[] args)
Create a new PetalsShell and execute a command line |
|
| Method Summary | |
|---|---|
void |
evaluate(java.lang.String[] args)
Evaluate a list of arguments. |
void |
exit(int status)
Exit the current Set |
java.lang.String |
interpolate(java.lang.String str)
Interpolates variables and special characters in a string |
boolean |
isComment(java.lang.String line)
Test whether a line is a comment or not |
| Methods inherited from class org.ow2.petals.cli.shell.Shell |
|---|
evaluate, getCommands, register |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.util.regex.Pattern REGEX_COMMENT
public static final java.util.regex.Pattern REGEX_VARIABLE
| Constructor Detail |
|---|
public PetalsShell()
throws ShellException
ShellException - when a command cannot be registeredSet
public PetalsShell(java.lang.String[] args)
throws ShellException
configuration - the petals configurationargs - command line arguments
ShellException - when a command cannot be registered or an error occurs during
the evaluation of command line| Method Detail |
|---|
public java.lang.String interpolate(java.lang.String str)
Shell
interpolate in class Shellstr - the string to be interpolated
public boolean isComment(java.lang.String line)
Shell
isComment in class Shellline - the string to be tested
public void exit(int status)
Shell
exit in class Shellstatus - the optional result value
public void evaluate(java.lang.String[] args)
throws ShellException,
CommandException
Shell
evaluate in class Shellargs - the command line
ShellException - when the command was not found
CommandException - when an error occurs during the execution of the command
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||