Java Doc for AbstractScriptEngine.java in  » Scripting » beanshell » javax » script » 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 » beanshell » javax.script 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.script.AbstractScriptEngine

All known Subclasses:   bsh.engine.BshScriptEngine,
AbstractScriptEngine
abstract public class AbstractScriptEngine implements ScriptEngine(Code)
Provides a standard implementation for several of the variants of the eval method.

eval(Reader)

eval(String)

eval(String, Bindings)

eval(Reader, Bindings)

are implemented using the abstract methods

eval(Reader,ScriptContext) or eval(String, ScriptContext)

with a SimpleScriptContext.

A SimpleScriptContext is used as the default ScriptContext of the AbstractScriptEngine..
author:
   Mike Grogan
version:
   1.0
since:
   1.6



Field Summary
protected  ScriptContextcontext
     The default ScriptContext of this AbstractScriptEngine.

Constructor Summary
public  AbstractScriptEngine()
     Creates a new instance of AbstractScriptEngine using a SimpleScriptContext as its default ScriptContext.
public  AbstractScriptEngine(Bindings n)
     Creates a new instance using the specified Bindings as the ENGINE_SCOPE Bindings in the protected ScriptContext field.

Method Summary
public  Objecteval(Reader reader, Bindings bindings)
     eval(Reader, Bindings) calls the abstract eval(Reader, ScriptContext) method, passing it a ScriptContext whose Reader, Writers and Bindings for scopes other that ENGINE_SCOPE are identical to those members of the protected ScriptContext field.
public  Objecteval(String script, Bindings bindings)
     Same as eval(Reader, Bindings) except that the abstract eval(String, ScriptContext) is used.
Parameters:
  script - A String containing the source of the script.
Parameters:
  bindings - A Bindings to use as the ENGINE_SCOPEwhile the script executes.
public  Objecteval(Reader reader)
     eval(Reader) calls the abstract eval(Reader, ScriptContext) passing the value of the context field.
Parameters:
  reader - A Reader containing the source of the script.
public  Objecteval(String script)
     Same as eval(Reader) except that the abstract eval(String, ScriptContext) is used.
Parameters:
  script - A String containing the source of the script.
public  Objectget(String key)
     Gets the value for the specified key in the ENGINE_SCOPE of the protected ScriptContext field.
public  BindingsgetBindings(int scope)
     Returns the Bindings with the specified scope value in the protected ScriptContext field.
Parameters:
  scope - The specified scope The corresponding Bindings.
public  ScriptContextgetContext()
     Returns the value of the protected ScriptContext> field.
protected  ScriptContextgetScriptContext(Bindings nn)
     Returns a SimpleScriptContext.
public  voidput(String key, Object value)
     Sets the specified value with the specified key in the ENGINE_SCOPE Bindings of the protected ScriptContext field.
public  voidsetBindings(Bindings bindings, int scope)
     Sets the Bindings with the corresponding scope value in the context field.
Parameters:
  bindings - The specified Bindings.
Parameters:
  scope - The specified scope.
public  voidsetContext(ScriptContext ctxt)
     Sets the value of the protected ScriptContext field to the specified ScriptContext.

Field Detail
context
protected ScriptContext context(Code)
The default ScriptContext of this AbstractScriptEngine.




Constructor Detail
AbstractScriptEngine
public AbstractScriptEngine()(Code)
Creates a new instance of AbstractScriptEngine using a SimpleScriptContext as its default ScriptContext.



AbstractScriptEngine
public AbstractScriptEngine(Bindings n)(Code)
Creates a new instance using the specified Bindings as the ENGINE_SCOPE Bindings in the protected ScriptContext field.
Parameters:
  n - The specified Bindings.




Method Detail
eval
public Object eval(Reader reader, Bindings bindings) throws ScriptException(Code)
eval(Reader, Bindings) calls the abstract eval(Reader, ScriptContext) method, passing it a ScriptContext whose Reader, Writers and Bindings for scopes other that ENGINE_SCOPE are identical to those members of the protected ScriptContext field. The specified Bindings is used instead of the ENGINE_SCOPE Bindings of the context field.
Parameters:
  reader - A Reader containing the source of the script.
Parameters:
  bindings - A Bindings to use for the ENGINE_SCOPEwhile the script executes. The return value from eval(Reader, ScriptContext)



eval
public Object eval(String script, Bindings bindings) throws ScriptException(Code)
Same as eval(Reader, Bindings) except that the abstract eval(String, ScriptContext) is used.
Parameters:
  script - A String containing the source of the script.
Parameters:
  bindings - A Bindings to use as the ENGINE_SCOPEwhile the script executes. The return value from eval(String, ScriptContext)



eval
public Object eval(Reader reader) throws ScriptException(Code)
eval(Reader) calls the abstract eval(Reader, ScriptContext) passing the value of the context field.
Parameters:
  reader - A Reader containing the source of the script. The return value from eval(Reader, ScriptContext)



eval
public Object eval(String script) throws ScriptException(Code)
Same as eval(Reader) except that the abstract eval(String, ScriptContext) is used.
Parameters:
  script - A String containing the source of the script. The return value from eval(String, ScriptContext)



get
public Object get(String key)(Code)
Gets the value for the specified key in the ENGINE_SCOPE of the protected ScriptContext field. The value for the specified key.



getBindings
public Bindings getBindings(int scope)(Code)
Returns the Bindings with the specified scope value in the protected ScriptContext field.
Parameters:
  scope - The specified scope The corresponding Bindings. IllegalArgumentException if the value of scope isinvalid for the type the protected ScriptContext field.



getContext
public ScriptContext getContext()(Code)
Returns the value of the protected ScriptContext> field. The value of the protected ScriptContext field.



getScriptContext
protected ScriptContext getScriptContext(Bindings nn)(Code)
Returns a SimpleScriptContext. The SimpleScriptContext:

  • Uses the specified Bindings for its ENGINE_SCOPE
  • Uses the Bindings returned by the abstract getGlobalScope method as its GLOBAL_SCOPE
  • Uses the Reader and Writer in the default ScriptContext of this ScriptEngine


A SimpleScriptContext returned by this method is used to implement eval methods using the abstract eval(Reader,Bindings) and eval(String,Bindings) versions.
Parameters:
  nn - Bindings to use for the ENGINE_SCOPE The SimpleScriptContext



put
public void put(String key, Object value)(Code)
Sets the specified value with the specified key in the ENGINE_SCOPE Bindings of the protected ScriptContext field.
Parameters:
  key - The specified key.
Parameters:
  value - The specified value.



setBindings
public void setBindings(Bindings bindings, int scope)(Code)
Sets the Bindings with the corresponding scope value in the context field.
Parameters:
  bindings - The specified Bindings.
Parameters:
  scope - The specified scope. IllegalArgumentException if the value of scope isinvalid for the type the context field.



setContext
public void setContext(ScriptContext ctxt)(Code)
Sets the value of the protected ScriptContext field to the specified ScriptContext.
Parameters:
  ctxt - The specified ScriptContext.



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.