|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.cli.CommandLineHelper
public class CommandLineHelper extends java.lang.Object
Utility methods for use on the command line, including method to accept user input etc.
Constructor Summary | |
CommandLineHelper()
|
|
CommandLineHelper(java.io.PrintStream out)
@deprecated Use no-args constructor |
|
CommandLineHelper(java.io.InputStream input, java.io.PrintStream out)
@deprecated Use no-args constructor |
Method Summary | |
---|---|
java.lang.String
|
userInput(java.lang.String message)
Replacement for AntBuilder.input() to eliminate dependency of GrailsScriptRunner on the Ant libraries. |
java.lang.String
|
userInput(java.lang.String message, java.lang.String[] validResponses)
Replacement for AntBuilder.input() to eliminate dependency of GrailsScriptRunner on the Ant libraries. |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
public CommandLineHelper()
} public CommandLineHelper(java.io.PrintStream out)
} public CommandLineHelper(java.io.InputStream input, java.io.PrintStream out)
Method Detail |
---|
public java.lang.String userInput(java.lang.String message)
message
- The message/question to display.
public java.lang.String userInput(java.lang.String message, java.lang.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