Source Code Cross Referenced for Invocable.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 Referenced  Class Diagram Java Document (Java Doc) 


01:        /*
02:         * %W% %E% %U%
03:         *
04:         * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
05:         * SUN PROPRIETARY/CONFIDENTAIL. Use is subject to license terms.
06:         */
07:
08:        package javax.script;
09:
10:        /**
11:         * The optional interface implemented by ScriptEngines whose methods allow the invocation of  
12:         * procedures in scripts that have previously been executed. 
13:         *
14:         * @version 1.0
15:         * @author  Mike Grogan
16:         * @author  A. Sundararajan
17:         * @since 1.6
18:         */
19:        public interface Invocable {
20:            /**
21:             * Calls a procedure compiled during a previous script execution, which is retained in 
22:             * the state of the <code>ScriptEngine<code>.
23:             *
24:             * @param name The name of the procedure to be called.
25:             *
26:             * @param thiz If the procedure is a member  of a class
27:             * defined in the script and thiz is an instance of that class
28:             * returned by a previous execution or invocation, the named method is 
29:             * called through that instance.
30:             * If classes are not supported in the scripting language or 
31:             * if the procedure is not a member function of any class, the argument must be 
32:             * <code>null</code>.
33:             *
34:             * @param args Arguments to pass to the procedure.  The rules for converting
35:             * the arguments to scripting variables are implementation-specific.
36:             *
37:             * @return The value returned by the procedure.  The rules for converting the scripting variable returned by the procedure to a Java Object are implementation-specific.
38:             *
39:             * @throws ScriptException if an error occurrs during invocation of the method.
40:             * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
41:             * @throws NullPointerException if method name is null.
42:             */
43:            public Object invoke(Object thiz, String name, Object... args)
44:                    throws ScriptException, NoSuchMethodException;
45:
46:            /**
47:             * Same as invoke(Object, String, Object...) with <code>null</code> as the first
48:             * argument.  Used to call top-level procedures defined in scripts.
49:             *
50:             * @param args Arguments to pass to the procedure
51:             * @return The value returned by the procedure
52:             *
53:             * @throws ScriptException if an error occurrs during invocation of the method.
54:             * @throws NoSuchMethodException if method with given name or matching argument types cannot be found.
55:             * @throws NullPointerException if method name is null.
56:             */
57:            public Object invoke(String name, Object... args)
58:                    throws ScriptException, NoSuchMethodException;
59:
60:            /**
61:             * Returns an implementation of an interface using procedures compiled in 
62:             * the interpreter. The methods of the interface 
63:             * may be implemented using the <code>invoke</code> method.
64:             *
65:             * @param clasz The <code>Class</code> object of the interface to return.
66:             *
67:             * @return An instance of requested interface - null if the requested interface is unavailable, 
68:             * i. e. if compiled methods in the <code>ScriptEngine</code> cannot be found matching 
69:             * the ones in the requested interface.
70:             *
71:             * @throws IllegalArgumentException if the specified <code>Class</code> object
72:             * does not exist or is not an interface. 
73:             */
74:            public <T> T getInterface(Class<T> clasz);
75:
76:            /**
77:             * Returns an implementation of an interface using member functions of
78:             * a scripting object compiled in the interpreter. The methods of the
79:             * interface may be implemented using invoke(Object, String, Object...)
80:             * method.
81:             *
82:             * @param thiz The scripting object whose member functions are used to implement the methods of the interface.
83:             * @param clasz The <code>Class</code> object of the interface to return.
84:             *
85:             * @return An instance of requested interface - null if the requested interface is unavailable, 
86:             * i. e. if compiled methods in the <code>ScriptEngine</code> cannot be found matching 
87:             * the ones in the requested interface.
88:             *
89:             * @throws IllegalArgumentException if the specified <code>Class</code> object
90:             * does not exist or is not an interface, or if the specified Object is 
91:             * null or does not represent a scripting object.
92:             */
93:            public <T> T getInterface(Object thiz, Class<T> clasz);
94:
95:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.