Source Code Cross Referenced for Interpreter.java in  » Ajax » zk » org » zkoss » zk » scripting » 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 » Ajax » zk » org.zkoss.zk.scripting 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Interpreter.java
002:
003:        {{IS_NOTE
004:        	Purpose:
005:        		
006:        	Description:
007:        		
008:        	History:
009:        		Thu Jun  1 14:51:22     2006, Created by tomyeh
010:        }}IS_NOTE
011:
012:        Copyright (C) 2006 Potix Corporation. All Rights Reserved.
013:
014:        {{IS_RIGHT
015:        	This program is distributed under GPL Version 2.0 in the hope that
016:        	it will be useful, but WITHOUT ANY WARRANTY.
017:        }}IS_RIGHT
018:         */
019:        package org.zkoss.zk.scripting;
020:
021:        import org.zkoss.xel.Function;
022:        import org.zkoss.zk.ui.Page;
023:
024:        /**
025:         * Represents an interpter that can interpret the scripting codes.
026:         *
027:         * <p>It is easier to implement by extending
028:         * from {@link org.zkoss.zk.scripting.util.GenericInterpreter}.
029:         *
030:         * @author tomyeh
031:         */
032:        public interface Interpreter {
033:            /** Initializes the interpreter.
034:             * It is called once when the new instance of interpreter is constructed.
035:             *
036:             * @param zslang the language this interpreter is associated with
037:             */
038:            public void init(Page owner, String zslang);
039:
040:            /** Called when the interpreter is about to be destroyed.
041:             * After called, this interpreter cannot be used again.
042:             */
043:            public void destroy();
044:
045:            /** Returns the owner of this interpreter.
046:             */
047:            public Page getOwner();
048:
049:            /** Returns the scripting language this interpreter is associated with.
050:             */
051:            public String getLanguage();
052:
053:            /** Returns the native interpreter, or null if not available.
054:             * The native interpreter depends on the implementation of an interpreter.
055:             *
056:             * @since 3.0.2
057:             */
058:            public Object getNativeInterpreter();
059:
060:            /** Evaluates the script against the specified namespace.
061:             *
062:             * <p>Implementation Note:
063:             * <ol>
064:             * <li>The implementation has to concatenate
065:             * the string returned by
066:             * {@link org.zkoss.zk.ui.metainfo.LanguageDefinition#getEachTimeScript}
067:             * if not null.</li>
068:             * <li>The implementation must use {@link Namespaces#getCurrent}
069:             * to retrieve the current namesace if the ns argument is null.
070:             *
071:             * @param ns the namspace. If null, the current namespace is assumed.
072:             * The current namespace is {@link Namespaces#getCurrent}, which
073:             * is the event target's namespace, if the thread is processing an event.
074:             * The event target is {@link org.zkoss.zk.ui.event.Event#getTarget}.
075:             * Otherwise, the current namespace is the owner page's namespace
076:             * ({@link #getOwner}.
077:             */
078:            public void interpret(String script, Namespace ns);
079:
080:            /** Returns the class defined in this interpreter, or null if not found.
081:             */
082:            public Class getClass(String clsnm);
083:
084:            /** Returns the method of the specified name defined in this interpreter,
085:             * or null if not defined.
086:             *
087:             * @param argTypes the list of argument (aka., parameter) types.
088:             * If null, Class[0] is assumed.
089:             * @since 3.0.0
090:             */
091:            public Function getFunction(String name, Class[] argTypes);
092:
093:            /** Tests whether the variable is defined in this interpreter.
094:             * Note: it doesn't search the namespace ({@link Namespace}).
095:             *
096:             * @since 2.4.0
097:             */
098:            public boolean containsVariable(String name);
099:
100:            /** Returns the value of a variable defined in this interpreter.
101:             * Note: it doesn't search the namespace ({@link Namespace}).
102:             */
103:            public Object getVariable(String name);
104:
105:            /** Sets the value of a variable to this interpreter, as if
106:             * they are defined in the interpreter.
107:             *
108:             * <p>Note: it is not part of any namespace and it has higher prioerty
109:             * if its name conflicts with any variable defined in the namespaces.
110:             */
111:            public void setVariable(String name, Object value);
112:
113:            /** Removes the value of a variable defined in this interpreter.
114:             */
115:            public void unsetVariable(String name);
116:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.