Source Code Cross Referenced for MethodExpression.java in  » EJB-Server-GlassFish » servlet » javax » el » 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 » EJB Server GlassFish » servlet » javax.el 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the terms
003:         * of the Common Development and Distribution License
004:         * (the "License").  You may not use this file except
005:         * in compliance with the License.
006:         *
007:         * You can obtain a copy of the license at
008:         * glassfish/bootstrap/legal/CDDLv1.0.txt or
009:         * https://glassfish.dev.java.net/public/CDDLv1.0.html.
010:         * See the License for the specific language governing
011:         * permissions and limitations under the License.
012:         *
013:         * When distributing Covered Code, include this CDDL
014:         * HEADER in each file and include the License file at
015:         * glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable,
016:         * add the following below this CDDL HEADER, with the
017:         * fields enclosed by brackets "[]" replaced with your
018:         * own identifying information: Portions Copyright [yyyy]
019:         * [name of copyright owner]
020:         *
021:         * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
022:         */
023:
024:        package javax.el;
025:
026:        /**
027:         * An <code>Expression</code> that refers to a method on an object.
028:         *
029:         * <p>The {@link ExpressionFactory#createMethodExpression} method
030:         * can be used to parse an expression string and return a concrete instance
031:         * of <code>MethodExpression</code> that encapsulates the parsed expression.
032:         * The {@link FunctionMapper} is used at parse time, not evaluation time, 
033:         * so one is not needed to evaluate an expression using this class.  
034:         * However, the {@link ELContext} is needed at evaluation time.</p>
035:         *
036:         * <p>The {@link #getMethodInfo} and {@link #invoke} methods will evaluate the 
037:         * expression each time they are called. The {@link ELResolver} in the 
038:         * <code>ELContext</code> is used to resolve the top-level variables and to 
039:         * determine the behavior of the <code>.</code> and <code>[]</code> 
040:         * operators. For any of the two methods, the {@link ELResolver#getValue} 
041:         * method is used to resolve all properties up to but excluding the last 
042:         * one. This provides the <code>base</code> object on which the method
043:         * appears. If the <code>base</code> object is null, a 
044:         * <code>PropertyNotFoundException</code> must be thrown.
045:         * At the last resolution, 
046:         * the final <code>property</code> is then coerced to a <code>String</code>,
047:         * which provides the name of the method to be found. A method matching the 
048:         * name and expected parameters provided at parse time is found and it is 
049:         * either queried or invoked (depending on the method called on this
050:         * <code>MethodExpression</code>).</p>
051:         *
052:         * <p>See the notes about comparison, serialization and immutability in 
053:         * the {@link Expression} javadocs.
054:         *
055:         * @see ELResolver
056:         * @see Expression
057:         * @see ExpressionFactory
058:         * @since JSP 2.1
059:         */
060:        public abstract class MethodExpression extends Expression {
061:            // Evaluation
062:
063:            /**
064:             * Evaluates the expression relative to the provided context, and
065:             * returns information about the actual referenced method.
066:             *
067:             * @param context The context of this evaluation
068:             * @return an instance of <code>MethodInfo</code> containing information
069:             *     about the method the expression evaluated to.
070:             * @throws NullPointerException if context is <code>null</code>
071:             * @throws PropertyNotFoundException if one of the property
072:             *     resolutions failed because a specified variable or property 
073:             *     does not exist or is not readable.
074:             * @throws MethodNotFoundException if no suitable method can be found.
075:             * @throws ELException if an exception was thrown while performing
076:             *     property or variable resolution. The thrown exception
077:             *     must be included as the cause property of this exception, if
078:             *     available.
079:             */
080:            public abstract MethodInfo getMethodInfo(ELContext context);
081:
082:            /**
083:             * If a String literal is specified as the expression, returns the 
084:             * String literal coerced to the expected return type of the method 
085:             * signature. An <code>ELException</code> is thrown if 
086:             * <code>expectedReturnType</code> is void or if the coercion of the String literal 
087:             * to the <code>expectedReturnType</code> yields an error (see Section "1.18 Type
088:             * Conversion" of the EL specification).
089:             * 
090:             * If not a String literal, evaluates the expression 
091:             * relative to the provided context, invokes the method that was 
092:             * found using the supplied parameters, and returns the result of 
093:             * the method invocation.
094:             *
095:             * Any parameters passed to this method is ignored if isLiteralText()
096:             * is true.
097:             *
098:             * @param context The context of this evaluation.
099:             * @param params The parameters to pass to the method, or
100:             *     <code>null</code> if no parameters.
101:             * @return the result of the method invocation (<code>null</code> if
102:             *     the method has a <code>void</code> return type).
103:             * @throws NullPointerException if context is <code>null</code>
104:             * @throws PropertyNotFoundException if one of the property
105:             *     resolutions failed because a specified variable or property 
106:             *     does not exist or is not readable.
107:             * @throws MethodNotFoundException if no suitable method can be found.
108:             * @throws ELException if a String literal is specified and
109:             * expectedReturnType of the MethodExpression is void or if the coercion of the String literal 
110:             * to the expectedReturnType yields an error (see Section "1.18 Type
111:             * Conversion").
112:             * @throws ELException if 
113:             * an exception was thrown while performing
114:             *     property or variable resolution. The thrown exception must be
115:             *     included as the cause property of this exception, if
116:             *     available.  If the exception thrown is an
117:             *     <code>InvocationTargetException</code>, extract its
118:             *     <code>cause</code> and pass it to the
119:             *     <code>ELException</code> constructor.
120:             */
121:            public abstract Object invoke(ELContext context, Object[] params);
122:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.