Java Doc for ScriptEvaluator.java in  » Scripting » jacl » org » codehaus » janino » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » jacl » org.codehaus.janino 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.codehaus.janino.Cookable
      org.codehaus.janino.SimpleCompiler
         org.codehaus.janino.ClassBodyEvaluator
            org.codehaus.janino.ScriptEvaluator

All known Subclasses:   org.codehaus.janino.ExpressionEvaluator,
ScriptEvaluator
public class ScriptEvaluator extends ClassBodyEvaluator (Code)
A script evaluator that executes a script in JavaTM bytecode.

The syntax of the script to compile is a sequence of import declarations followed by a sequence of statements, as defined in the Java Language Specification, 2nd edition, sections 7.5 and 14.

Example:

 import java.text.*;
 System.out.println("HELLO");
 System.out.println(new DecimalFormat("####,###.##").format(a));
 
(Notice that this expression refers to a parameter "a", as explained below.)

The script may complete abnormally, e.g. through a RETURN statement:

 if (a == null) {
 System.out.println("Oops!");
 return;
 }
 
Optionally, the script may be declared with a non-void return type. In this case, the last statement of the script must be a RETURN statement (or a THROW statement), and all RETURN statements in the script must return a value with the given type.

The script evaluator is implemented by creating and compiling a temporary compilation unit defining one class with one method the body of which consists of the statements of the script.

To set up a ScriptEvaluator object, proceed as follows:

  1. Create the ScriptEvaluator using ScriptEvaluator.ScriptEvaluator()
  2. Configure the ScriptEvaluator by calling any of the following methods:
  3. Call any of the org.codehaus.janino.Cookable.cook(Scanner) methods to scan, parse, compile and load the script into the JVM.
Alternatively, a number of "convenience constructors" exist that execute the steps described above instantly.

After the ScriptEvaluator object is created, the script can be executed as often with different parameter values (see ScriptEvaluator.evaluate(Object[]) ). This execution is very fast, compared to the compilation.

The more elaborate constructors of ScriptEvaluator also allow for the specification of the name of the generated class, the class it extends, the interfaces it implements, the name of the method that executes the script, the exceptions that this method is allowed to throw, and the ClassLoader that is used to define the generated class and to load classes referenced by the expression. This degree of flexibility is usually not required; the most commonly used constructor is ScriptEvaluator.ScriptEvaluator(String,Class,String[],Class[]) .



Field Summary
final public static  StringDEFAULT_METHOD_NAME
    
final public static  String[]ZERO_STRINGS
    

Constructor Summary
public  ScriptEvaluator(String script)
    
public  ScriptEvaluator(String script, Class returnType)
    
public  ScriptEvaluator(String script, Class returnType, String[] parameterNames, Class[] parameterTypes)
    
public  ScriptEvaluator(String script, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions)
    
public  ScriptEvaluator(String optionalFileName, InputStream is, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader)
    
public  ScriptEvaluator(String optionalFileName, Reader reader, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader)
    
public  ScriptEvaluator(Scanner scanner, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader)
    
public  ScriptEvaluator(Scanner scanner, Class optionalExtendedType, Class[] implementedTypes, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader)
    
public  ScriptEvaluator(Scanner scanner, String className, Class optionalExtendedType, Class[] implementedTypes, boolean staticMethod, Class returnType, String methodName, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader)
    
public  ScriptEvaluator()
    

Method Summary
protected  Java.BlockaddClassMethodBlockDeclaration(Location location, Java.CompilationUnit compilationUnit, Class returnType)
    
protected  voidcompileToMethod(Java.CompilationUnit compilationUnit)
    
public static  ObjectcreateFastEvaluator(ScriptEvaluator se, String s, String[] parameterNames, Class interfaceToImplement)
    
public static  ObjectcreateFastEvaluator(ScriptEvaluator se, Scanner scanner, String[] parameterNames, Class interfaceToImplement)
    
public static  ObjectcreateFastScriptEvaluator(String script, Class interfaceToImplement, String[] parameterNames)
     Simplified version of ScriptEvaluator.createFastScriptEvaluator(Scanner,Class,String[],ClassLoader) .
public static  ObjectcreateFastScriptEvaluator(Scanner scanner, Class interfaceToImplement, String[] parameterNames, ClassLoader optionalParentClassLoader)
     If the parameter and return types of the expression are known at compile time, then a "fast" script evaluator can be instantiated through this method.

Script evaluation is faster than through ScriptEvaluator.evaluate(Object[]) , because it is not done through reflection but through direct method invocation.

Example:

 public interface Foo {
 int bar(int a, int b);
 }
 ...
 Foo f = (Foo) ScriptEvaluator.createFastScriptEvaluator(
 new Scanner(null, new StringReader("return a + b;")),
 Foo.class,
 new String[] { "a", "b" },
 (ClassLoader) null          // Use current thread's context class loader
 );
 System.out.println("1 + 2 = " + f.bar(1, 2));
 
Notice: The interfaceToImplement must either be declared public, or with package scope in the root package (i.e.
public static  ObjectcreateFastScriptEvaluator(Scanner scanner, String className, Class optionalExtendedType, Class interfaceToImplement, String[] parameterNames, ClassLoader optionalParentClassLoader)
     Like ScriptEvaluator.createFastScriptEvaluator(Scanner,Class,String[],ClassLoader) , but gives you more control over the generated class (rarely needed in practice).
public static  ObjectcreateFastScriptEvaluator(Scanner scanner, String[] optionalDefaultImports, String className, Class optionalExtendedType, Class interfaceToImplement, String[] parameterNames, ClassLoader optionalParentClassLoader)
    
public  Objectevaluate(Object[] parameterValues)
     Calls the generated method with concrete parameter values.
public  MethodgetMethod()
     Returns the loaded java.lang.reflect.Method .
protected  voidinternalCook(Scanner scanner)
    
public  voidsetMethodName(String methodName)
     Define the name of the generated method.
public  voidsetParameters(String[] parameterNames, Class[] parameterTypes)
     Define the names and types of the parameters of the generated method.
public  voidsetReturnType(Class returnType)
     Define the return type of the generated method.
public  voidsetStaticMethod(boolean staticMethod)
     Define whether the generated method should be STATIC or not.
public  voidsetThrownExceptions(Class[] thrownExceptions)
     Define the exceptions that the generated method may throw.

Field Detail
DEFAULT_METHOD_NAME
final public static String DEFAULT_METHOD_NAME(Code)



ZERO_STRINGS
final public static String[] ZERO_STRINGS(Code)




Constructor Detail
ScriptEvaluator
public ScriptEvaluator(String script) throws CompileException, Parser.ParseException, Scanner.ScanException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.cook(script);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   Cookable.cook(String)



ScriptEvaluator
public ScriptEvaluator(String script, Class returnType) throws CompileException, Parser.ParseException, Scanner.ScanException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.setReturnType(returnType);
 se.cook(script);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   ScriptEvaluator.setReturnType(Class)
See Also:   Cookable.cook(String)



ScriptEvaluator
public ScriptEvaluator(String script, Class returnType, String[] parameterNames, Class[] parameterTypes) throws CompileException, Parser.ParseException, Scanner.ScanException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.setReturnType(returnType);
 se.setParameters(parameterNames, parameterTypes);
 se.cook(script);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   ScriptEvaluator.setReturnType(Class)
See Also:   ScriptEvaluator.setParameters(String[],Class[])
See Also:   Cookable.cook(String)



ScriptEvaluator
public ScriptEvaluator(String script, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions) throws CompileException, Parser.ParseException, Scanner.ScanException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.setReturnType(returnType);
 se.setParameters(parameterNames, parameterTypes);
 se.setThrownExceptions(thrownExceptions);
 se.cook(script);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   ScriptEvaluator.setReturnType(Class)
See Also:   ScriptEvaluator.setParameters(String[],Class[])
See Also:   ScriptEvaluator.setThrownExceptions(Class[])
See Also:   Cookable.cook(String)



ScriptEvaluator
public ScriptEvaluator(String optionalFileName, InputStream is, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.setReturnType(returnType);
 se.setParameters(parameterNames, parameterTypes);
 se.setThrownExceptions(thrownExceptions);
 se.setParentClassLoader(optionalParentClassLoader);
 se.cook(optionalFileName, is);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   ScriptEvaluator.setReturnType(Class)
See Also:   ScriptEvaluator.setParameters(String[],Class[])
See Also:   ScriptEvaluator.setThrownExceptions(Class[])
See Also:   SimpleCompiler.setParentClassLoader(ClassLoader)
See Also:   Cookable.cook(StringInputStream)



ScriptEvaluator
public ScriptEvaluator(String optionalFileName, Reader reader, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.setReturnType(returnType);
 se.setParameters(parameterNames, parameterTypes);
 se.setThrownExceptions(thrownExceptions);
 se.setParentClassLoader(optionalParentClassLoader);
 se.cook(reader);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   ScriptEvaluator.setReturnType(Class)
See Also:   ScriptEvaluator.setParameters(String[],Class[])
See Also:   ScriptEvaluator.setThrownExceptions(Class[])
See Also:   SimpleCompiler.setParentClassLoader(ClassLoader)
See Also:   Cookable.cook(StringReader)



ScriptEvaluator
public ScriptEvaluator(Scanner scanner, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.setReturnType(returnType);
 se.setParameters(parameterNames, parameterTypes);
 se.setThrownExceptions(thrownExceptions);
 se.setParentClassLoader(optionalParentClassLoader);
 se.cook(scanner);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   ScriptEvaluator.setReturnType(Class)
See Also:   ScriptEvaluator.setParameters(String[],Class[])
See Also:   ScriptEvaluator.setThrownExceptions(Class[])
See Also:   SimpleCompiler.setParentClassLoader(ClassLoader)
See Also:   Cookable.cook(Scanner)



ScriptEvaluator
public ScriptEvaluator(Scanner scanner, Class optionalExtendedType, Class[] implementedTypes, Class returnType, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.setExtendedType(optionalExtendedType);
 se.setImplementedTypes(implementedTypes);
 se.setReturnType(returnType);
 se.setParameters(parameterNames, parameterTypes);
 se.setThrownExceptions(thrownExceptions);
 se.setParentClassLoader(optionalParentClassLoader);
 se.cook(scanner);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   ClassBodyEvaluator.setExtendedType(Class)
See Also:   ClassBodyEvaluator.setImplementedTypes(Class[])
See Also:   ScriptEvaluator.setReturnType(Class)
See Also:   ScriptEvaluator.setParameters(String[],Class[])
See Also:   ScriptEvaluator.setThrownExceptions(Class[])
See Also:   SimpleCompiler.setParentClassLoader(ClassLoader)
See Also:   Cookable.cook(Scanner)



ScriptEvaluator
public ScriptEvaluator(Scanner scanner, String className, Class optionalExtendedType, Class[] implementedTypes, boolean staticMethod, Class returnType, String methodName, String[] parameterNames, Class[] parameterTypes, Class[] thrownExceptions, ClassLoader optionalParentClassLoader) throws Scanner.ScanException, Parser.ParseException, CompileException, IOException(Code)
Equivalent to
 ScriptEvaluator se = new ScriptEvaluator();
 se.setClassName(className);
 se.setExtendedType(optionalExtendedType);
 se.setImplementedTypes(implementedTypes);
 se.setStaticMethod(staticMethod);
 se.setReturnType(returnType);
 se.setMethodName(methodName);
 se.setParameters(parameterNames, parameterTypes);
 se.setThrownExceptions(thrownExceptions);
 se.setParentClassLoader(optionalParentClassLoader);
 se.cook(scanner);

See Also:   ScriptEvaluator.ScriptEvaluator()
See Also:   ClassBodyEvaluator.setClassName(String)
See Also:   ClassBodyEvaluator.setExtendedType(Class)
See Also:   ClassBodyEvaluator.setImplementedTypes(Class[])
See Also:   ScriptEvaluator.setStaticMethod(boolean)
See Also:   ScriptEvaluator.setReturnType(Class)
See Also:   ScriptEvaluator.setMethodName(String)
See Also:   ScriptEvaluator.setParameters(String[],Class[])
See Also:   ScriptEvaluator.setThrownExceptions(Class[])
See Also:   SimpleCompiler.setParentClassLoader(ClassLoader)
See Also:   Cookable.cook(Scanner)



ScriptEvaluator
public ScriptEvaluator()(Code)




Method Detail
addClassMethodBlockDeclaration
protected Java.Block addClassMethodBlockDeclaration(Location location, Java.CompilationUnit compilationUnit, Class returnType) throws Parser.ParseException(Code)
To the given Java.CompilationUnit , add
  • A package member class declaration with the given name, superclass and interfaces
  • A public method declaration with the given return type, name, parameter names and values and thrown exceptions
  • A block

Parameters:
  location -
Parameters:
  compilationUnit -
Parameters:
  className -
Parameters:
  optionalExtendedType - (null == Object)
Parameters:
  implementedTypes -
Parameters:
  staticMethod - Whether the method should be declared "static"
Parameters:
  returnType - Return type of the declared method
Parameters:
  methodName -
Parameters:
  parameterNames -
Parameters:
  parameterTypes -
Parameters:
  thrownExceptions - The created Java.Block object
throws:
  Parser.ParseException -



compileToMethod
protected void compileToMethod(Java.CompilationUnit compilationUnit) throws CompileException(Code)



createFastEvaluator
public static Object createFastEvaluator(ScriptEvaluator se, String s, String[] parameterNames, Class interfaceToImplement) throws CompileException, Parser.ParseException, Scanner.ScanException(Code)



createFastEvaluator
public static Object createFastEvaluator(ScriptEvaluator se, Scanner scanner, String[] parameterNames, Class interfaceToImplement) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)



createFastScriptEvaluator
public static Object createFastScriptEvaluator(String script, Class interfaceToImplement, String[] parameterNames) throws CompileException, Parser.ParseException, Scanner.ScanException(Code)
Simplified version of ScriptEvaluator.createFastScriptEvaluator(Scanner,Class,String[],ClassLoader) .
Parameters:
  script - Contains the sequence of script tokens
Parameters:
  interfaceToImplement - Must declare exactly the one method that defines the expression's signature
Parameters:
  parameterNames - The expression references the parameters through these names an object that implements the given interface and extends the optionalExtendedType



createFastScriptEvaluator
public static Object createFastScriptEvaluator(Scanner scanner, Class interfaceToImplement, String[] parameterNames, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)
If the parameter and return types of the expression are known at compile time, then a "fast" script evaluator can be instantiated through this method.

Script evaluation is faster than through ScriptEvaluator.evaluate(Object[]) , because it is not done through reflection but through direct method invocation.

Example:

 public interface Foo {
 int bar(int a, int b);
 }
 ...
 Foo f = (Foo) ScriptEvaluator.createFastScriptEvaluator(
 new Scanner(null, new StringReader("return a + b;")),
 Foo.class,
 new String[] { "a", "b" },
 (ClassLoader) null          // Use current thread's context class loader
 );
 System.out.println("1 + 2 = " + f.bar(1, 2));
 
Notice: The interfaceToImplement must either be declared public, or with package scope in the root package (i.e. "no" package).
Parameters:
  scanner - Source of script tokens
Parameters:
  interfaceToImplement - Must declare exactly one method
Parameters:
  parameterNames -
Parameters:
  optionalParentClassLoader - an object that implements the given interface



createFastScriptEvaluator
public static Object createFastScriptEvaluator(Scanner scanner, String className, Class optionalExtendedType, Class interfaceToImplement, String[] parameterNames, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)
Like ScriptEvaluator.createFastScriptEvaluator(Scanner,Class,String[],ClassLoader) , but gives you more control over the generated class (rarely needed in practice).

Notice: The interfaceToImplement must either be declared public, or with package scope in the same package as className.
Parameters:
  scanner - Source of script tokens
Parameters:
  className - Name of generated class
Parameters:
  optionalExtendedType - Class to extend
Parameters:
  interfaceToImplement - Must declare exactly the one method that defines the expression's signature
Parameters:
  parameterNames - The expression references the parameters through these names
Parameters:
  optionalParentClassLoader - Used to load referenced classes, defaults to the current thread's "context class loader" an object that implements the given interface and extends the optionalExtendedType




createFastScriptEvaluator
public static Object createFastScriptEvaluator(Scanner scanner, String[] optionalDefaultImports, String className, Class optionalExtendedType, Class interfaceToImplement, String[] parameterNames, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)



evaluate
public Object evaluate(Object[] parameterValues) throws InvocationTargetException(Code)
Calls the generated method with concrete parameter values.

Each parameter value must have the same type as specified through the "parameterTypes" parameter of ScriptEvaluator.setParameters(String[],Class[]) .

Parameters of primitive type must passed with their wrapper class objects.

The object returned has the class as specified through ScriptEvaluator.setReturnType(Class) .

This method is thread-safe.
Parameters:
  parameterValues - The concrete parameter values.




getMethod
public Method getMethod()(Code)
Returns the loaded java.lang.reflect.Method .

This method must only be called after ScriptEvaluator.cook(Scanner) .

This method must not be called for instances of derived classes.




internalCook
protected void internalCook(Scanner scanner) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)



setMethodName
public void setMethodName(String methodName)(Code)
Define the name of the generated method. Defaults to ScriptEvaluator.DEFAULT_METHOD_NAME .



setParameters
public void setParameters(String[] parameterNames, Class[] parameterTypes)(Code)
Define the names and types of the parameters of the generated method.



setReturnType
public void setReturnType(Class returnType)(Code)
Define the return type of the generated method. Defaults to void.class.



setStaticMethod
public void setStaticMethod(boolean staticMethod)(Code)
Define whether the generated method should be STATIC or not. Defaults to true.



setThrownExceptions
public void setThrownExceptions(Class[] thrownExceptions)(Code)
Define the exceptions that the generated method may throw.



Fields inherited from org.codehaus.janino.ClassBodyEvaluator
final public static String DEFAULT_CLASS_NAME(Code)(Java Doc)
final protected static Class[] ZERO_CLASSES(Code)(Java Doc)
protected String className(Code)(Java Doc)

Methods inherited from org.codehaus.janino.ClassBodyEvaluator
protected Java.PackageMemberClassDeclaration addPackageMemberClassDeclaration(Location location, Java.CompilationUnit compilationUnit) throws Parser.ParseException(Code)(Java Doc)
protected Class compileToClass(Java.CompilationUnit compilationUnit, EnumeratorSet debuggingInformation, String newClassName) throws CompileException(Code)(Java Doc)
public static Object createFastClassBodyEvaluator(Scanner scanner, Class optionalBaseType, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
public static Object createFastClassBodyEvaluator(Scanner scanner, String className, Class optionalExtendedType, Class[] implementedTypes, ClassLoader optionalParentClassLoader) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
public Class getClazz()(Code)(Java Doc)
protected void internalCook(Scanner scanner) throws CompileException, ParseException, ScanException, IOException(Code)(Java Doc)
protected Java.CompilationUnit makeCompilationUnit(Scanner scanner) throws Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
public void setClassName(String className)(Code)(Java Doc)
public void setDefaultImports(String[] optionalDefaultImports)(Code)(Java Doc)
public void setExtendedType(Class optionalExtendedType)(Code)(Java Doc)
public void setImplementedTypes(Class[] implementedTypes)(Code)(Java Doc)

Fields inherited from org.codehaus.janino.SimpleCompiler
IClassLoader icloader(Code)(Java Doc)
boolean noloadSimpleCompiler(Code)(Java Doc)

Methods inherited from org.codehaus.janino.SimpleCompiler
protected Java.Type classToType(Location location, Class optionalClass)(Code)(Java Doc)
protected Java.Type[] classesToTypes(Location location, Class[] classes)(Code)(Java Doc)
public ClassFile[] compile(String javasrc)(Code)(Java Doc)
protected ClassLoader compileToClassLoader(Java.CompilationUnit compilationUnit, EnumeratorSet debuggingInformation) throws CompileException(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
public ClassLoader getClassLoader()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
protected void internalCook(Scanner scanner) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
public static void main(String[] args) throws Exception(Code)(Java Doc)
public void setParentClassLoader(ClassLoader optionalParentClassLoader)(Code)(Java Doc)

Methods inherited from org.codehaus.janino.Cookable
final public void cook(Scanner scanner) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cook(Reader r) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cook(String optionalFileName, Reader r) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cook(InputStream is) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cook(String optionalFileName, InputStream is) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cook(InputStream is, String optionalEncoding) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cook(String optionalFileName, InputStream is, String optionalEncoding) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cook(String s) throws CompileException, Parser.ParseException, Scanner.ScanException(Code)(Java Doc)
final public void cookFile(File file) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cookFile(File file, String optionalEncoding) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cookFile(String fileName) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
final public void cookFile(String fileName, String optionalEncoding) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)
abstract protected void internalCook(Scanner scanner) throws CompileException, Parser.ParseException, Scanner.ScanException, IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.