|
Griffon 1.2.0 | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.codehaus.griffon.cli.CommandLineHelper
class CommandLineHelper
Utility methods for use on the command line, including method to accept user input etc.
| Field Summary | |
|---|---|
private PrintStream |
out
|
| Constructor Summary | |
CommandLineHelper()
|
|
CommandLineHelper(PrintStream out)
|
|
| Method Summary | |
|---|---|
String
|
askAndDo(String message, Closure yesCallback = null, Closure noCallback = null)
|
boolean
|
confirmInput(String msg)
|
String
|
forceUserInput(String message)
|
String
|
forceUserInput(String message, String[] validResponses)
|
private ConfigObject
|
getConfig()
|
String
|
getDefaultAnswerNonInteractive()
|
String
|
userInput(String message)
Replacement for AntBuilder.input() to eliminate dependency of GriffonScriptRunner on the Ant libraries. |
String
|
userInput(String message, String[] validResponses)
Replacement for AntBuilder.input() to eliminate dependency of GriffonScriptRunner on the Ant libraries. |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private PrintStream out
| Constructor Detail |
|---|
CommandLineHelper()
CommandLineHelper(PrintStream out)
| Method Detail |
|---|
String askAndDo(String message, Closure yesCallback = null, Closure noCallback = null)
boolean confirmInput(String msg)
String forceUserInput(String message)
String forceUserInput(String message, String[] validResponses)
private ConfigObject getConfig()
String getDefaultAnswerNonInteractive()
String userInput(String message)
message - The message/question to display.
String userInput(String message, String[] validResponses)
null.
message - The message/question to display.validResponses - An array of responses that the user is
allowed to enter. Displayed after the message.null
if the user never entered a valid string.
Groovy Documentation