info.bliki.wiki.template.expr.util
Class Console

java.lang.Object
  extended by info.bliki.wiki.template.expr.util.Console

public class Console
extends java.lang.Object

A java console program to run the evaluator interactively. Utility for testing the {{ #expr: ... }} and {{ #ifexpr: ... }} expression evaluator.


Constructor Summary
Console()
           
 
Method Summary
 java.io.File getFile()
           
 java.lang.String interpreter(java.lang.String strEval)
          Evaluates the given string-expression and returns the result in OutputForm
static void main(java.lang.String[] args)
           
 void printPrompt(java.io.PrintStream out, java.lang.String prompt)
          prints a prompt on the console but doesn't print a newline
 java.lang.String readString(java.io.PrintStream out)
          read a string from the console.
 java.lang.String readString(java.io.PrintStream out, java.lang.String prompt)
          read a string from the console.
 void setFile(java.io.File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Console

public Console()
        throws SyntaxError
Throws:
SyntaxError
Method Detail

main

public static void main(java.lang.String[] args)

interpreter

public java.lang.String interpreter(java.lang.String strEval)
Evaluates the given string-expression and returns the result in OutputForm

Parameters:
strEval -

printPrompt

public void printPrompt(java.io.PrintStream out,
                        java.lang.String prompt)
prints a prompt on the console but doesn't print a newline

Parameters:
out -
prompt - the prompt string to display

readString

public java.lang.String readString(java.io.PrintStream out)
read a string from the console. The string is terminated by a newline

Parameters:
out - Description of Parameter
Returns:
the input string (without the newline)

readString

public java.lang.String readString(java.io.PrintStream out,
                                   java.lang.String prompt)
read a string from the console. The string is terminated by a newline

Parameters:
prompt - the prompt string to display
out - Description of Parameter
Returns:
the input string (without the newline)

setFile

public void setFile(java.io.File file)
Parameters:
file -

getFile

public java.io.File getFile()
Returns:
the file with which the program was started or null


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.