Source Code Cross Referenced for TclPkgInvoker.java in  » Scripting » jacl » tcl » 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 » jacl » tcl.lang 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * TclPkgInvoker --
003:         *
004:         *	This class tests the tcl.lang.reflect.PkgInvoker class. Please
005:         *	see the comments in PkgInvoker.java for details.
006:         *
007:         * Copyright (c) 1997 Sun Microsystems, Inc.
008:         *
009:         * See the file "license.terms" for information on usage and
010:         * redistribution of this file, and for a DISCLAIMER OF ALL
011:         * WARRANTIES.
012:         *
013:         * RCS: @(#) $Id: TclPkgInvoker.java,v 1.1 1999/05/10 04:08:59 dejong Exp $
014:         *
015:         */
016:
017:        package tcl.lang;
018:
019:        import tcl.lang.reflect.*;
020:        import java.lang.reflect.*;
021:        import java.beans.*;
022:
023:        public class TclPkgInvoker extends PkgInvoker {
024:
025:            /*
026:             *----------------------------------------------------------------------
027:             *
028:             * invokeConstructor --
029:             *
030:             *	Invoke the given constructor with the arguments.
031:             *
032:             * Results:
033:             *	The new object instance returned by the constructor.
034:             *
035:             * Side effects:
036:             *	The constructor may have arbitraty side effects.
037:             *
038:             *----------------------------------------------------------------------
039:             */
040:
041:            public Object invokeConstructor(Constructor constructor, // The constructor to invoke.
042:                    Object args[]) // Arguments for the constructor.
043:                    throws InstantiationException, // Standard exceptions thrown by
044:                    IllegalAccessException, // Constructor.newInstance.
045:                    IllegalArgumentException, InvocationTargetException {
046:                return constructor.newInstance(args);
047:            }
048:
049:            /*
050:             *----------------------------------------------------------------------
051:             *
052:             * invokeMethod --
053:             *
054:             *	Invoke the given method of the obj with the arguments.
055:             *
056:             * Results:
057:             *	The value returned by the method.
058:             *
059:             * Side effects:
060:             *	The method may have arbitraty side effects.
061:             *
062:             *----------------------------------------------------------------------
063:             */
064:
065:            public Object invokeMethod(Method method, // The method to invoke.
066:                    Object obj, // The object associated with the method.
067:                    // May be null if the method is static.
068:                    Object args[]) // The arguments for the method.
069:                    throws IllegalAccessException, // Standard exceptions throw by Method.Invoke.
070:                    IllegalArgumentException, InvocationTargetException {
071:                return method.invoke(obj, args);
072:            }
073:
074:            /*
075:             *----------------------------------------------------------------------
076:             *
077:             * getField --
078:             *
079:             *	Query the value of the given field.
080:             *
081:             * Results:
082:             *	The value of the field.
083:             *
084:             * Side effects:
085:             *	None.
086:             *
087:             *----------------------------------------------------------------------
088:             */
089:
090:            public Object getField(Field field, // The field to query.
091:                    Object obj) // The object that owns the field. May be
092:                    // null for static fields.
093:                    throws IllegalArgumentException, // Standard exceptions thrown by Field.get().
094:                    IllegalAccessException {
095:                return field.get(obj);
096:            }
097:
098:            /*
099:             *----------------------------------------------------------------------
100:             *
101:             * setField --
102:             *
103:             *	Modify the value of the given field.
104:             *
105:             * Results:
106:             *	None.
107:             *
108:             * Side effects:
109:             *	When successful, the field is modified to be the new value.
110:             *
111:             *----------------------------------------------------------------------
112:             */
113:
114:            public void setField(Field field, // The field to modify.
115:                    Object obj, // The object that owns the field. May be
116:                    // null for static fields.
117:                    Object value) // New value for the field.
118:                    throws IllegalArgumentException, // Standard exceptions thrown by Field.set().
119:                    IllegalAccessException {
120:                field.set(obj, value);
121:            }
122:
123:        } // end TclPkgInvoker
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.