Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
expression_evaluator
expression_evaluator

Janino as an Expression Evaluator

...

Code Block
$ java org.codehaus.janino.samples.ExpressionDemo \
> -pn "a,b" -pt "int,int" "a + b" 11 22
Result = 33
$

Anchor
script_evaluator
script_evaluator

Janino as a Script Evaluator

...

Check the source code of ScriptDemo to learn more about the ScriptEvaluator API.

Anchor
class_body_evaluator
class_body_evaluator

Janino as a Class Body Evaluator

...

Code Block
$ java org.codehaus.janino.samples.ClassBodyDemo \
> 'import java.util.*;
>
> // Field declaration:
> private static final String hello = "World";
>
> // Method declaration:
> public static void main(String[] args) {
>     System.out.println(hello + args.length);
> }' alpha beta gamma
World3

Anchor
simple_compiler
simple_compiler

Janino as a Simple Compiler

...