Java Doc for GroovyShell.java in  » Scripting » groovy-1.0 » groovy » lang » 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 » groovy 1.0 » groovy.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   groovy.lang.GroovyObjectSupport
      groovy.lang.GroovyShell

GroovyShell
public class GroovyShell extends GroovyObjectSupport (Code)
Represents a groovy shell capable of running arbitrary groovy scripts
author:
   James Strachan
author:
   Guillaume Laforge
version:
   $Revision: 4346 $


Field Summary
final public static  String[]EMPTY_ARGS
    

Constructor Summary
public  GroovyShell()
    
public  GroovyShell(Binding binding)
    
public  GroovyShell(CompilerConfiguration config)
    
public  GroovyShell(Binding binding, CompilerConfiguration config)
    
public  GroovyShell(ClassLoader parent, Binding binding)
    
public  GroovyShell(ClassLoader parent)
    
public  GroovyShell(ClassLoader parent, Binding binding, CompilerConfiguration config)
    
public  GroovyShell(GroovyShell shell)
    

Method Summary
public  Objectevaluate(GroovyCodeSource codeSource)
    
public  Objectevaluate(String scriptText, String fileName)
    
public  Objectevaluate(String scriptText, String fileName, String codeBase)
     Evaluates some script against the current Binding and returns the result.
public  Objectevaluate(File file)
    
public  Objectevaluate(String scriptText)
    
public  Objectevaluate(InputStream in)
    
public  Objectevaluate(InputStream in, String fileName)
    
protected synchronized  StringgenerateScriptName()
    
public  BindinggetContext()
    
public  ObjectgetProperty(String property)
    
public  ObjectgetVariable(String name)
    
public  voidinitializeBinding()
    
public static  voidmain(String[] args)
    
public  Scriptparse(InputStream in, String fileName)
    
public  Scriptparse(GroovyCodeSource codeSource)
     Parses the given script and returns it ready to be run.
public  Scriptparse(File file)
    
public  Scriptparse(String scriptText)
    
public  Scriptparse(String scriptText, String fileName)
    
public  Scriptparse(InputStream in)
    
public  voidresetLoadedClasses()
    
public  Objectrun(File scriptFile, List list)
    
public  Objectrun(String scriptText, String fileName, List list)
    
public  Objectrun(File scriptFile, String[] args)
    
public  Objectrun(String scriptText, String fileName, String[] args)
    
public  Objectrun(InputStream in, String fileName, String[] args)
    
public  voidsetProperty(String property, Object newValue)
    
public  voidsetVariable(String name, Object value)
    

Field Detail
EMPTY_ARGS
final public static String[] EMPTY_ARGS(Code)




Constructor Detail
GroovyShell
public GroovyShell()(Code)



GroovyShell
public GroovyShell(Binding binding)(Code)



GroovyShell
public GroovyShell(CompilerConfiguration config)(Code)



GroovyShell
public GroovyShell(Binding binding, CompilerConfiguration config)(Code)



GroovyShell
public GroovyShell(ClassLoader parent, Binding binding)(Code)



GroovyShell
public GroovyShell(ClassLoader parent)(Code)



GroovyShell
public GroovyShell(ClassLoader parent, Binding binding, CompilerConfiguration config)(Code)



GroovyShell
public GroovyShell(GroovyShell shell)(Code)
Creates a child shell using a new ClassLoader which uses the parent shell's class loader as its parent
Parameters:
  shell - is the parent shell used for the variable bindings and the parent class loader




Method Detail
evaluate
public Object evaluate(GroovyCodeSource codeSource) throws CompilationFailedException(Code)
Evaluates some script against the current Binding and returns the result
Parameters:
  codeSource -
throws:
  CompilationFailedException -
throws:
  CompilationFailedException -



evaluate
public Object evaluate(String scriptText, String fileName) throws CompilationFailedException(Code)
Evaluates some script against the current Binding and returns the result
Parameters:
  scriptText - the text of the script
Parameters:
  fileName - is the logical file name of the script (which is used to create the class name of the script)



evaluate
public Object evaluate(String scriptText, String fileName, String codeBase) throws CompilationFailedException(Code)
Evaluates some script against the current Binding and returns the result. The .class file created from the script is given the supplied codeBase



evaluate
public Object evaluate(File file) throws CompilationFailedException, IOException(Code)
Evaluates some script against the current Binding and returns the result
Parameters:
  file - is the file of the script (which is used to create the class name of the script)



evaluate
public Object evaluate(String scriptText) throws CompilationFailedException(Code)
Evaluates some script against the current Binding and returns the result
Parameters:
  scriptText - the text of the script



evaluate
public Object evaluate(InputStream in) throws CompilationFailedException(Code)
Evaluates some script against the current Binding and returns the result
Parameters:
  in - the stream reading the script



evaluate
public Object evaluate(InputStream in, String fileName) throws CompilationFailedException(Code)
Evaluates some script against the current Binding and returns the result
Parameters:
  in - the stream reading the script
Parameters:
  fileName - is the logical file name of the script (which is used to create the class name of the script)



generateScriptName
protected synchronized String generateScriptName()(Code)



getContext
public Binding getContext()(Code)



getProperty
public Object getProperty(String property)(Code)



getVariable
public Object getVariable(String name)(Code)



initializeBinding
public void initializeBinding()(Code)



main
public static void main(String[] args)(Code)



parse
public Script parse(InputStream in, String fileName) throws CompilationFailedException(Code)
Parses the given script and returns it ready to be run
Parameters:
  in - the stream reading the script
Parameters:
  fileName - is the logical file name of the script (which is used to create the class name of the script) the parsed script which is ready to be run via @link Script.run()



parse
public Script parse(GroovyCodeSource codeSource) throws CompilationFailedException(Code)
Parses the given script and returns it ready to be run. When running in a secure environment (-Djava.security.manager) codeSource.getCodeSource() determines what policy grants should be given to the script.
Parameters:
  codeSource - ready to run script



parse
public Script parse(File file) throws CompilationFailedException, IOException(Code)
Parses the given script and returns it ready to be run
Parameters:
  file - is the file of the script (which is used to create the class name of the script)



parse
public Script parse(String scriptText) throws CompilationFailedException(Code)
Parses the given script and returns it ready to be run
Parameters:
  scriptText - the text of the script



parse
public Script parse(String scriptText, String fileName) throws CompilationFailedException(Code)



parse
public Script parse(InputStream in) throws CompilationFailedException(Code)
Parses the given script and returns it ready to be run
Parameters:
  in - the stream reading the script



resetLoadedClasses
public void resetLoadedClasses()(Code)



run
public Object run(File scriptFile, List list) throws CompilationFailedException, IOException(Code)
A helper method which runs the given script file with the given command line arguments
Parameters:
  scriptFile - the file of the script to run
Parameters:
  list - the command line arguments to pass in



run
public Object run(String scriptText, String fileName, List list) throws CompilationFailedException(Code)
A helper method which runs the given cl script with the given command line arguments
Parameters:
  scriptText - is the text content of the script
Parameters:
  fileName - is the logical file name of the script (which is used to create the class name of the script)
Parameters:
  list - the command line arguments to pass in



run
public Object run(File scriptFile, String[] args) throws CompilationFailedException, IOException(Code)
Runs the given script file name with the given command line arguments
Parameters:
  scriptFile - the file name of the script to run
Parameters:
  args - the command line arguments to pass in



run
public Object run(String scriptText, String fileName, String[] args) throws CompilationFailedException(Code)
Runs the given script text with command line arguments
Parameters:
  scriptText - is the text content of the script
Parameters:
  fileName - is the logical file name of the script (which is used to create the class name of the script)
Parameters:
  args - the command line arguments to pass in



run
public Object run(InputStream in, String fileName, String[] args) throws CompilationFailedException(Code)
Runs the given script with command line arguments
Parameters:
  in - the stream reading the script
Parameters:
  fileName - is the logical file name of the script (which is used to create the class name of the script)
Parameters:
  args - the command line arguments to pass in



setProperty
public void setProperty(String property, Object newValue)(Code)



setVariable
public void setVariable(String name, Object value)(Code)



Methods inherited from groovy.lang.GroovyObjectSupport
public MetaClass getMetaClass()(Code)(Java Doc)
public Object getProperty(String property)(Code)(Java Doc)
public Object invokeMethod(String name, Object args)(Code)(Java Doc)
public void setMetaClass(MetaClass metaClass)(Code)(Java Doc)
public void setProperty(String property, Object newValue)(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.