Prompting For User Input

Next, Joe notices that by using the #prompt directive, he could accept input from the user while the template is being processed. To test this functionality, he modifies his method template:

#prompt ( "Method Description:" $methodDescription )
#prompt ( "Return Type:" $returnType "void")
#prompt ( "Method Name:" $methodName )
#prompt ( "Parameters:" $parameters )
    /**
     * ${methodDescription}
     */
    public ${returnType} ${methodName}(${parameters}) {
        ${returnType} retVal = null;
        return retVal;
    }

Now when this template is processed by the Templates plugin, the user will be prompted for each of:

Each of these values is then "filled in" at the appropriate point in the generated code.