[maven-scm] copy for tag geronimo-el_2.2_spec-1.0
git-svn-id: https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-el_2.2_spec-1.0@936717 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/geronimo-el_2.2_spec/LICENSE b/geronimo-el_2.2_spec/LICENSE
deleted file mode 100644
index de4b130..0000000
--- a/geronimo-el_2.2_spec/LICENSE
+++ /dev/null
@@ -1,204 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
diff --git a/geronimo-el_2.2_spec/NOTICE b/geronimo-el_2.2_spec/NOTICE
deleted file mode 100644
index 1bff2e3..0000000
--- a/geronimo-el_2.2_spec/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-Apache Geronimo
-Copyright 2003-2010 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/geronimo-el_2.2_spec/pom.xml b/geronimo-el_2.2_spec/pom.xml
deleted file mode 100644
index f9f49dd..0000000
--- a/geronimo-el_2.2_spec/pom.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!-- $Rev$ $Date$ -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.geronimo.genesis</groupId>
- <artifactId>genesis-java5-flava</artifactId>
- <version>2.0</version>
- </parent>
-
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-el_2.2_spec</artifactId>
- <packaging>bundle</packaging>
- <name>Expression Language 2.2</name>
- <version>1.0</version>
- <description>Expression Languague API 2.2</description>
-
- <url>http://geronimo.apache.org/maven/${siteId}/${version}</url>
- <distributionManagement>
- <site>
- <id>apache-website</id>
- <url>${site.deploy.url}/maven/${siteId}/${version}</url>
- </site>
- </distributionManagement>
-
- <properties>
- <siteId>specs/${artifactId}</siteId>
- </properties>
-
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-el_2.2_spec-1.0</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-el_2.2_spec-1.0</developerConnection>
- <url>http://svn.apache.org/viewcvs.cgi/geronimo/specs/tags/geronimo-el_2.2_spec-1.0</url>
- </scm>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-osgi-locator</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <configuration>
- <instructions>
- <Bundle-SymbolicName>${groupId}.${artifactId};singleton=true</Bundle-SymbolicName>
- <Specification-Title>JSR-245 Java Expression Language API 2.2</Specification-Title>
- <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
- <Specification-Version>2.2</Specification-Version>
- <Export-Package>javax.el*;version=2.2</Export-Package>
- <Import-Package>org.apache.geronimo.osgi.registry.api;resolution:=optional,*</Import-Package>
- <Private-Package>org.apache.geronimo.osgi.locator</Private-Package>
- <Bundle-Activator>org.apache.geronimo.osgi.locator.Activator</Bundle-Activator>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ArrayELResolver.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ArrayELResolver.java
deleted file mode 100644
index ac0dcc5..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ArrayELResolver.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.beans.FeatureDescriptor;
-import java.lang.reflect.Array;
-import java.util.Arrays;
-import java.util.Iterator;
-
-public class ArrayELResolver extends ELResolver {
-
- private final boolean readOnly;
-
- public ArrayELResolver() {
- this.readOnly = false;
- }
-
- public ArrayELResolver(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
- public Object getValue(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base != null && base.getClass().isArray()) {
- context.setPropertyResolved(true);
- int idx = coerce(property);
- if (idx < 0 || idx >= Array.getLength(base)) {
- return null;
- } else {
- return Array.get(base, idx);
- }
- }
-
- return null;
- }
-
- public Class<?> getType(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base != null && base.getClass().isArray()) {
- context.setPropertyResolved(true);
- int idx = coerce(property);
- checkBounds(base, idx);
- return base.getClass().getComponentType();
- }
-
- return null;
- }
-
- public void setValue(ELContext context, Object base, Object property,
- Object value) throws NullPointerException,
- PropertyNotFoundException, PropertyNotWritableException,
- ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base != null && base.getClass().isArray()) {
- context.setPropertyResolved(true);
-
- if (this.readOnly) {
- throw new PropertyNotWritableException(message(context,
- "resolverNotWriteable", new Object[] { base.getClass()
- .getName() }));
- }
-
- int idx = coerce(property);
- checkBounds(base, idx);
- try {
- Array.set(base, idx, value);
- } catch (IllegalArgumentException e) {
- ClassCastException ex = new ClassCastException(e.getMessage());
- ex.initCause(e);
- throw ex;
- }
- }
- }
-
- public boolean isReadOnly(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base != null && base.getClass().isArray()) {
- context.setPropertyResolved(true);
- int idx = coerce(property);
- checkBounds(base, idx);
- }
-
- return this.readOnly;
- }
-
- public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
- if (base != null && base.getClass().isArray()) {
- FeatureDescriptor[] descs = new FeatureDescriptor[Array.getLength(base)];
- for (int i = 0; i < descs.length; i++) {
- descs[i] = new FeatureDescriptor();
- descs[i].setDisplayName("["+i+"]");
- descs[i].setExpert(false);
- descs[i].setHidden(false);
- descs[i].setName(""+i);
- descs[i].setPreferred(true);
- descs[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
- descs[i].setValue(TYPE, Integer.class);
- }
- return Arrays.asList(descs).iterator();
- }
- return null;
- }
-
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
- if (base != null && base.getClass().isArray()) {
- return Integer.class;
- }
- return null;
- }
-
- private final static void checkBounds(Object base, int idx) {
- if (idx < 0 || idx >= Array.getLength(base)) {
- throw new PropertyNotFoundException(
- new ArrayIndexOutOfBoundsException(idx).getMessage());
- }
- }
-
- private final static int coerce(Object property) {
- if (property instanceof Number) {
- return ((Number) property).intValue();
- }
- if (property instanceof Character) {
- return ((Character) property).charValue();
- }
- if (property instanceof Boolean) {
- return (((Boolean) property).booleanValue() ? 1 : 0);
- }
- if (property instanceof String) {
- return Integer.parseInt((String) property);
- }
- throw new IllegalArgumentException(property != null ? property
- .toString() : "null");
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/BeanELResolver.java b/geronimo-el_2.2_spec/src/main/java/javax/el/BeanELResolver.java
deleted file mode 100644
index fa1a422..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/BeanELResolver.java
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.beans.BeanInfo;
-import java.beans.FeatureDescriptor;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.concurrent.ConcurrentHashMap;
-
-
-public class BeanELResolver extends ELResolver {
-
- private final boolean readOnly;
-
- private final ConcurrentCache<String, BeanProperties> cache = new ConcurrentCache<String, BeanProperties>(
- 1000);
-
- public BeanELResolver() {
- this.readOnly = false;
- }
-
- public BeanELResolver(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
- public Object getValue(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
- if (base == null || property == null) {
- return null;
- }
-
- context.setPropertyResolved(true);
- Method m = this.property(context, base, property).read(context);
- try {
- return m.invoke(base, (Object[]) null);
- } catch (IllegalAccessException e) {
- throw new ELException(e);
- } catch (InvocationTargetException e) {
- throw new ELException(message(context, "propertyReadError",
- new Object[] { base.getClass().getName(),
- property.toString() }), e.getCause());
- } catch (Exception e) {
- throw new ELException(e);
- }
- }
-
- public Class<?> getType(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
- if (base == null || property == null) {
- return null;
- }
-
- context.setPropertyResolved(true);
- return this.property(context, base, property).getPropertyType();
- }
-
- public void setValue(ELContext context, Object base, Object property,
- Object value) throws NullPointerException,
- PropertyNotFoundException, PropertyNotWritableException,
- ELException {
- if (context == null) {
- throw new NullPointerException();
- }
- if (base == null || property == null) {
- return;
- }
-
- context.setPropertyResolved(true);
-
- if (this.readOnly) {
- throw new PropertyNotWritableException(message(context,
- "resolverNotWriteable", new Object[] { base.getClass()
- .getName() }));
- }
-
- Method m = this.property(context, base, property).write(context);
- try {
- m.invoke(base, value);
- } catch (IllegalAccessException e) {
- throw new ELException(e);
- } catch (InvocationTargetException e) {
- throw new ELException(message(context, "propertyWriteError",
- new Object[] { base.getClass().getName(),
- property.toString() }), e.getCause());
- } catch (Exception e) {
- throw new ELException(e);
- }
- }
-
- public boolean isReadOnly(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
- if (base == null || property == null) {
- return false;
- }
-
- context.setPropertyResolved(true);
- return this.readOnly
- || this.property(context, base, property).isReadOnly();
- }
-
- public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base == null) {
- return null;
- }
-
- try {
- BeanInfo info = Introspector.getBeanInfo(base.getClass());
- PropertyDescriptor[] pds = info.getPropertyDescriptors();
- for (PropertyDescriptor pd : pds) {
- pd.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
- pd.setValue(TYPE, pd.getPropertyType());
- }
- return Arrays.asList((FeatureDescriptor[]) pds).iterator();
- } catch (IntrospectionException e) {
- //
- }
-
- return null;
- }
-
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base != null) {
- return Object.class;
- }
-
- return null;
- }
-
- protected final static class BeanProperties {
- private final Map<String, BeanProperty> properties;
-
- private final Class<?> type;
-
- public BeanProperties(Class<?> type) throws ELException {
- this.type = type;
- this.properties = new HashMap<String, BeanProperty>();
- try {
- BeanInfo info = Introspector.getBeanInfo(this.type);
- PropertyDescriptor[] pds = info.getPropertyDescriptors();
- for (PropertyDescriptor pd : pds) {
- this.properties.put(pd.getName(), new BeanProperty(
- type, pd));
- }
- } catch (IntrospectionException ie) {
- throw new ELException(ie);
- }
- }
-
- private BeanProperty get(ELContext ctx, String name) {
- BeanProperty property = this.properties.get(name);
- if (property == null) {
- throw new PropertyNotFoundException(message(ctx,
- "propertyNotFound",
- new Object[] { type.getName(), name }));
- }
- return property;
- }
-
- public BeanProperty getBeanProperty(String name) {
- return get(null, name);
- }
-
- private Class<?> getType() {
- return type;
- }
- }
-
- protected final static class BeanProperty {
- private final Class<?> type;
-
- private final Class<?> owner;
-
- private final PropertyDescriptor descriptor;
-
- private Method read;
-
- private Method write;
-
- public BeanProperty(Class<?> owner, PropertyDescriptor descriptor) {
- this.owner = owner;
- this.descriptor = descriptor;
- this.type = descriptor.getPropertyType();
- }
-
- public Class getPropertyType() {
- return this.type;
- }
-
- public boolean isReadOnly() {
- return this.write == null
- && (null == (this.write = getMethod(this.owner, descriptor.getWriteMethod())));
- }
-
- public Method getWriteMethod() {
- return write(null);
- }
-
- public Method getReadMethod() {
- return this.read(null);
- }
-
- private Method write(ELContext ctx) {
- if (this.write == null) {
- this.write = getMethod(this.owner, descriptor.getWriteMethod());
- if (this.write == null) {
- throw new PropertyNotFoundException(message(ctx,
- "propertyNotWritable", new Object[] {
- type.getName(), descriptor.getName() }));
- }
- }
- return this.write;
- }
-
- private Method read(ELContext ctx) {
- if (this.read == null) {
- this.read = getMethod(this.owner, descriptor.getReadMethod());
- if (this.read == null) {
- throw new PropertyNotFoundException(message(ctx,
- "propertyNotReadable", new Object[] {
- type.getName(), descriptor.getName() }));
- }
- }
- return this.read;
- }
- }
-
- private BeanProperty property(ELContext ctx, Object base,
- Object property) {
- Class<?> type = base.getClass();
- String prop = property.toString();
-
- BeanProperties props = this.cache.get(type.getName());
- if (props == null || type != props.getType()) {
- props = new BeanProperties(type);
- this.cache.put(type.getName(), props);
- }
-
- return props.get(ctx, prop);
- }
-
- private static Method getMethod(Class type, Method m) {
- if (m == null || Modifier.isPublic(type.getModifiers())) {
- return m;
- }
- Class[] inf = type.getInterfaces();
- Method mp;
- for (Class anInf : inf) {
- try {
- mp = anInf.getMethod(m.getName(), m.getParameterTypes());
- mp = getMethod(mp.getDeclaringClass(), mp);
- if (mp != null) {
- return mp;
- }
- } catch (NoSuchMethodException e) {
- //continue
- }
- }
- Class sup = type.getSuperclass();
- if (sup != null) {
- try {
- mp = sup.getMethod(m.getName(), m.getParameterTypes());
- mp = getMethod(mp.getDeclaringClass(), mp);
- if (mp != null) {
- return mp;
- }
- } catch (NoSuchMethodException e) {
- //continue
- }
- }
- return null;
- }
-
- private final static class ConcurrentCache<K,V> {
-
- private final int size;
- private final Map<K,V> eden;
- private final Map<K,V> longterm;
-
- public ConcurrentCache(int size) {
- this.size = size;
- this.eden = new ConcurrentHashMap<K,V>(size);
- this.longterm = new WeakHashMap<K,V>(size);
- }
-
- public V get(K key) {
- V value = this.eden.get(key);
- if (value == null) {
- value = this.longterm.get(key);
- if (value != null) {
- this.eden.put(key, value);
- }
- }
- return value;
- }
-
- public void put(K key, V value) {
- if (this.eden.size() >= this.size) {
- this.longterm.putAll(this.eden);
- this.eden.clear();
- }
- this.eden.put(key, value);
- }
-
- }
-
- public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
- if (context == null) {
- throw new NullPointerException("ELContext could not be nulll");
- }
- // Why static invocation is not supported
- if(base == null || method == null) {
- return null;
- }
- if (params == null) {
- params = new Object[0];
- }
- ExpressionFactory expressionFactory = null;
- if (ELUtils.isCachedExpressionFactoryEnabled()) {
- expressionFactory = ELUtils.getCachedExpressionFactory();
- }
- if (expressionFactory == null) {
- expressionFactory = ExpressionFactory.newInstance();
- }
- String methodName = (String) expressionFactory.coerceToType(method, String.class);
- if (methodName.length() == 0) {
- throw new MethodNotFoundException("The parameter method could not be zero-length");
- }
- Class<?> targetClass = base.getClass();
- if (methodName.equals("<init>") || methodName.equals("<cinit>")) {
- throw new MethodNotFoundException(method + " is not found in target class " + targetClass.getName());
- }
- Method targetMethod = null;
- if (paramTypes == null) {
- int paramsNumber = params.length;
- for (Method m : targetClass.getMethods()) {
- if (m.getName().equals(methodName) && m.getParameterTypes().length == paramsNumber) {
- targetMethod = m;
- break;
- }
- }
- if (targetMethod == null) {
- for (Method m : targetClass.getMethods()) {
- if (m.getName().equals(methodName) && m.isVarArgs() && paramsNumber >= (m.getParameterTypes().length - 1)) {
- targetMethod = m;
- break;
- }
- }
- }
- } else {
- try {
- targetMethod = targetClass.getMethod(methodName, paramTypes);
- } catch (SecurityException e) {
- throw new ELException(e);
- } catch (NoSuchMethodException e) {
- throw new MethodNotFoundException(e);
- }
- }
- if (targetMethod == null) {
- throw new MethodNotFoundException(method + " is not found in target class " + targetClass.getName());
- }
- if (paramTypes == null) {
- paramTypes = targetMethod.getParameterTypes();
- }
- //Initial check whether the types and parameter values length
- if (targetMethod.isVarArgs()) {
- if (paramTypes.length - 1 > params.length) {
- throw new IllegalArgumentException("Inconsistent number between argument types and values");
- }
- } else if (paramTypes.length != params.length) {
- throw new IllegalArgumentException("Inconsistent number between argument types and values");
- }
- try {
- Object[] finalParamValues = new Object[paramTypes.length];
- int iCurrentIndex = 0;
- for (int iLoopSize = paramTypes.length - 1; iCurrentIndex < iLoopSize; iCurrentIndex++) {
- finalParamValues[iCurrentIndex] = expressionFactory.coerceToType(params[iCurrentIndex],paramTypes[iCurrentIndex]);
- }
- /**
- * Not sure it is over-designed. Do not find detailed description about how the parameter values are passed if the method is of variable arguments.
- * It might be an array directly passed or each parameter value passed one by one.
- */
- if (targetMethod.isVarArgs()) {
- // varArgsClassType should be an array type
- Class<?> varArgsClassType = paramTypes[iCurrentIndex];
- // 1. If there is no parameter value left for the variable argment, create a zero-length array
- // 2. If there is only one parameter value left for the variable argment, and it has the same array type with the varArgsClass, pass in directly
- // 3. Eles, create an array of varArgsClass type, and add all the left coerced parameter values
- if (iCurrentIndex == params.length) {
- finalParamValues[iCurrentIndex] = Array.newInstance(varArgsClassType.getComponentType(), 0);
- } else if (iCurrentIndex == params.length - 1 && varArgsClassType == params[iCurrentIndex].getClass()
- && varArgsClassType.getClassLoader() == params[iCurrentIndex].getClass().getClassLoader()) {
- finalParamValues[iCurrentIndex] = params[iCurrentIndex];
- } else {
- Object targetArray = Array.newInstance(varArgsClassType.getComponentType(), params.length - iCurrentIndex);
- Class<?> componentClassType = varArgsClassType.getComponentType();
- for (int i = 0, iLoopSize = params.length - iCurrentIndex; i < iLoopSize; i++) {
- Array.set(targetArray, i, expressionFactory.coerceToType(iCurrentIndex + i, componentClassType));
- }
- finalParamValues[iCurrentIndex] = targetArray;
- }
- } else {
- finalParamValues[iCurrentIndex] = expressionFactory.coerceToType(params[iCurrentIndex], paramTypes[iCurrentIndex]);
- }
- Object retValue = targetMethod.invoke(base, finalParamValues);
- context.setPropertyResolved(true);
- return retValue;
- } catch (IllegalAccessException e) {
- throw new ELException(e);
- } catch (InvocationTargetException e) {
- throw new ELException(e.getCause());
- }
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/CompositeELResolver.java b/geronimo-el_2.2_spec/src/main/java/javax/el/CompositeELResolver.java
deleted file mode 100644
index 4153d84..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/CompositeELResolver.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.beans.FeatureDescriptor;
-import java.util.Iterator;
-
-public class CompositeELResolver extends ELResolver {
-
- private int size;
-
- private ELResolver[] resolvers;
-
- private ExpressionFactory expressionFactory;
-
- public CompositeELResolver() {
- this.size = 0;
- this.resolvers = new ELResolver[2];
- expressionFactory = ExpressionFactory.newInstance();
- }
-
- synchronized public void add(ELResolver elResolver) {
- if (elResolver == null) {
- throw new NullPointerException();
- }
-
- if (this.size >= this.resolvers.length) {
- ELResolver[] nr = new ELResolver[this.size * 2];
- System.arraycopy(this.resolvers, 0, nr, 0, this.size);
- this.resolvers = nr;
- }
- this.resolvers[this.size++] = elResolver;
- }
-
- public Object getValue(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- context.setPropertyResolved(false);
- int sz;
- ELResolver[] rslvrs;
- synchronized (this) {
- sz = this.size;
- rslvrs = this.resolvers;
- }
- Object result = null;
- for (int i = 0; i < sz; i++) {
- result = rslvrs[i].getValue(context, base, property);
- if (context.isPropertyResolved()) {
- return result;
- }
- }
- return null;
- }
-
- public void setValue(ELContext context, Object base, Object property,
- Object value) throws NullPointerException,
- PropertyNotFoundException, PropertyNotWritableException,
- ELException {
- context.setPropertyResolved(false);
- int sz;
- ELResolver[] rslvrs;
- synchronized (this) {
- sz = this.size;
- rslvrs = this.resolvers;
- }
- for (int i = 0; i < sz; i++) {
- rslvrs[i].setValue(context, base, property, value);
- if (context.isPropertyResolved()) {
- return;
- }
- }
- }
-
- public boolean isReadOnly(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- context.setPropertyResolved(false);
- int sz;
- ELResolver[] rslvrs;
- synchronized (this) {
- sz = this.size;
- rslvrs = this.resolvers;
- }
- boolean readOnly = false;
- for (int i = 0; i < sz; i++) {
- readOnly = rslvrs[i].isReadOnly(context, base, property);
- if (context.isPropertyResolved()) {
- return readOnly;
- }
- }
- return false;
- }
-
- synchronized public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
- return new FeatureIterator(context, base, this.resolvers, this.size);
- }
-
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
- int sz;
- ELResolver[] rslvrs;
- synchronized (this) {
- sz = this.size;
- rslvrs = this.resolvers;
- }
- Class<?> commonType = null, type = null;
- for (int i = 0; i < sz; i++) {
- type = rslvrs[i].getCommonPropertyType(context, base);
- if (type != null
- && (commonType == null || commonType.isAssignableFrom(type))) {
- commonType = type;
- }
- }
- return commonType;
- }
-
- public Class<?> getType(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- context.setPropertyResolved(false);
- int sz;
- ELResolver[] rslvrs;
- synchronized (this) {
- sz = this.size;
- rslvrs = this.resolvers;
- }
- Class<?> type;
- for (int i = 0; i < sz; i++) {
- type = rslvrs[i].getType(context, base, property);
- if (context.isPropertyResolved()) {
- return type;
- }
- }
- return null;
- }
-
- private final static class FeatureIterator implements Iterator<FeatureDescriptor> {
-
- private final ELContext context;
-
- private final Object base;
-
- private final ELResolver[] resolvers;
-
- private final int size;
-
- private Iterator itr;
-
- private int idx;
-
- public FeatureIterator(ELContext context, Object base,
- ELResolver[] resolvers, int size) {
- this.context = context;
- this.base = base;
- this.resolvers = resolvers;
- this.size = size;
-
- this.idx = 0;
- this.guaranteeIterator();
- }
-
- private void guaranteeIterator() {
- while (this.itr == null && this.idx < this.size) {
- this.itr = this.resolvers[this.idx].getFeatureDescriptors(
- this.context, this.base);
- this.idx++;
- }
- }
-
- public boolean hasNext() {
- return this.itr != null;
- }
-
- public FeatureDescriptor next() {
- Object result = null;
- if (this.itr != null) {
- if (this.itr.hasNext()) {
- result = this.itr.next();
- if (!this.itr.hasNext()) {
- this.itr = null;
- this.guaranteeIterator();
- }
- }
- }
- return (FeatureDescriptor) result;
- }
-
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
- if (context == null) {
- throw new NullPointerException("ELContext could not be null");
- }
- if (method == null || base == null) {
- return null;
- }
- ExpressionFactory expressionFactory = null;
- if (ELUtils.isCachedExpressionFactoryEnabled()) {
- expressionFactory = ELUtils.getCachedExpressionFactory();
- }
- if (expressionFactory == null) {
- expressionFactory = ExpressionFactory.newInstance();
- }
- String targetMethod = (String) expressionFactory.coerceToType(method, String.class);
- if (targetMethod.length() == 0) {
- throw new ELException(new NoSuchMethodException());
- }
- context.setPropertyResolved(false);
- if (context.getContext(ExpressionFactory.class) == null) {
- context.putContext(ExpressionFactory.class, ExpressionFactory.newInstance());
- }
- Object retValue = null;
- for (ELResolver resolver : resolvers) {
- retValue = resolver.invoke(context, base, targetMethod, paramTypes, params);
- if (context.isPropertyResolved()) {
- return retValue;
- }
- }
- return null;
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ELContext.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ELContext.java
deleted file mode 100644
index 2ef621d..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ELContext.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- *
- */
-public abstract class ELContext {
-
- private Locale locale;
-
- private Map<Class<?>, Object> map;
-
- private boolean resolved;
-
- /**
- *
- */
- public ELContext() {
- this.resolved = false;
- }
-
- public Object getContext(Class key) {
- if (this.map == null) {
- return null;
- }
- return this.map.get(key);
- }
-
- public void putContext(Class key, Object contextObject) throws NullPointerException {
- if (key == null || contextObject == null) {
- throw new NullPointerException();
- }
-
- if (this.map == null) {
- this.map = new HashMap<Class<?>, Object>();
- }
-
- this.map.put(key, contextObject);
- }
-
- public void setPropertyResolved(boolean resolved) {
- this.resolved = resolved;
- }
-
- public boolean isPropertyResolved() {
- return this.resolved;
- }
-
- public abstract ELResolver getELResolver();
-
- public abstract FunctionMapper getFunctionMapper();
-
- public abstract VariableMapper getVariableMapper();
-
- public Locale getLocale() {
- return this.locale;
- }
-
- public void setLocale(Locale locale) {
- this.locale = locale;
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ELContextEvent.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ELContextEvent.java
deleted file mode 100644
index 02cb3ea..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ELContextEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.util.EventObject;
-
-/**
- *
- */
-public class ELContextEvent extends EventObject {
-
- /**
- * @param source
- */
- public ELContextEvent(ELContext source) {
- super(source);
- }
-
- public ELContext getELContext() {
- return (ELContext) this.getSource();
- }
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ELContextListener.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ELContextListener.java
deleted file mode 100644
index a21038b..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ELContextListener.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- * @author Jacob Hookom [jacob/hookom.net]
- *
- */
-public interface ELContextListener extends java.util.EventListener {
-
- public void contextCreated(ELContextEvent event);
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ELException.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ELException.java
deleted file mode 100644
index 935a8a2..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ELException.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- * Represents any of the exception conditions that can arise during expression
- * evaluation.
- *
- * @since 2.1
- */
-public class ELException extends RuntimeException {
-
- /**
- * Creates an ELException with no detail message
- */
- public ELException() {
- super();
- }
-
- /**
- * Creates an ELException with the provided detail message.
- *
- * @param message
- * the detail message
- */
- public ELException(String message) {
- super(message);
- }
-
- /**
- * Creates an ELException with the given detail message and root cause.
- *
- * @param message
- * the detail message
- * @param cause
- * the originating cause of this exception
- */
- public ELException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Creates an ELException with the given cause
- *
- * @param cause
- * the originating cause of this exception
- */
- public ELException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ELResolver.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ELResolver.java
deleted file mode 100644
index b614f65..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ELResolver.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.text.MessageFormat;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author Jacob Hookom [jacob/hookom.net]
- *
- */
-public abstract class ELResolver {
-
- static String message(ELContext context, String name, Object[] props) {
- Locale locale = context == null? null: context.getLocale();
- if (locale == null) {
- locale = Locale.getDefault();
- if (locale == null) {
- return "";
- }
- }
- ResourceBundle bundle = ResourceBundle.getBundle(
- "javax.el.LocalStrings", locale);
- try {
- String template = bundle.getString(name);
- if (props != null) {
- template = MessageFormat.format(template, props);
- }
- return template;
- } catch (MissingResourceException e) {
- return "Missing Resource: '" + name + "' for Locale "
- + locale.getDisplayName();
- }
- }
-
- public final static String RESOLVABLE_AT_DESIGN_TIME = "resolvableAtDesignTime";
-
- public final static String TYPE = "type";
-
- public abstract Object getValue(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException;
-
- public abstract Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException;
-
- public abstract void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException;
-
- public abstract boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException;
-
- public abstract Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base);
-
- public abstract Class<?> getCommonPropertyType(ELContext context, Object base);
-
- public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
- return null;
- }
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ELUtils.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ELUtils.java
deleted file mode 100644
index 2881404..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ELUtils.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-class ELUtils {
-
- private static volatile ExpressionFactory cachedExpressionFactory;
-
- private static boolean cachedExpressionFactoryEnabled = Boolean.valueOf(System.getProperty("org.apache.geronimo.spec.el.useCachedExpressionFactory", "true"));
-
- public static ExpressionFactory getCachedExpressionFactory() {
- return cachedExpressionFactory;
- }
-
- public static boolean isCachedExpressionFactoryEnabled() {
- return cachedExpressionFactoryEnabled;
- }
-
- public static void setCachedExpressionFactory(ExpressionFactory expressionFactory) {
- cachedExpressionFactory = expressionFactory;
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/Expression.java b/geronimo-el_2.2_spec/src/main/java/javax/el/Expression.java
deleted file mode 100644
index 8d9d7ec..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/Expression.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.io.Serializable;
-
-/**
- *
- */
-public abstract class Expression implements Serializable {
-
- public abstract boolean equals(Object obj);
-
- public abstract int hashCode();
-
- public abstract String getExpressionString();
-
- public abstract boolean isLiteralText();
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ExpressionFactory.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ExpressionFactory.java
deleted file mode 100644
index 4063f8d..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ExpressionFactory.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Properties;
-
-import org.apache.geronimo.osgi.locator.ProviderLocator;
-
-/**
- *
- * @since 2.1
- */
-public abstract class ExpressionFactory {
-
- private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "org.apache.el.ExpressionFactoryImpl";
-
- private static final String SYSTEM_PROPERTY_NAME = "javax.el.ExpressionFactory";
-
- private static final String JAVA_RUNTIME_PROPERTY_FILE_LOCATION = "lib" + File.separator + "el.properties";
-
- static {
- try {
- ELUtils.setCachedExpressionFactory(newInstance());
- } catch (Exception e) {
- }
- }
-
- public abstract Object coerceToType(Object obj, Class<?> expectedType) throws ELException;
-
- public abstract ValueExpression createValueExpression(ELContext context, String expression, Class<?> expectedType) throws NullPointerException, ELException;
-
- public abstract ValueExpression createValueExpression(Object instance, Class<?> expectedType);
-
- public abstract MethodExpression createMethodExpression(ELContext context, String expression, Class<?> expectedReturnType, Class<?>[] expectedParamTypes) throws ELException, NullPointerException;
-
- public static ExpressionFactory newInstance() {
- return newInstance(null);
- }
-
- public static ExpressionFactory newInstance(Properties properties) {
- Class<?> implClass = loadExpressionFactoryImplClass();
- if (properties == null) {
- return newInstance0(implClass);
- }
- try {
- Constructor<?> constructor = implClass.getConstructor(Properties.class);
- try {
- return (ExpressionFactory) constructor.newInstance(properties);
- } catch (IllegalArgumentException e) {
- throw new ELException("Fail to create ExpressionFactory instance", e);
- } catch (InstantiationException e) {
- throw new ELException("Fail to create ExpressionFactory instance", e);
- } catch (IllegalAccessException e) {
- throw new ELException("Fail to create ExpressionFactory instance", e);
- } catch (InvocationTargetException e) {
- throw new ELException("Fail to create ExpressionFactory instance", e);
- }
- } catch (SecurityException e) {
- throw new ELException("Fail to get constuctor from ExpressionFactory implementation class", e);
- } catch (NoSuchMethodException e) {
- return newInstance0(implClass);
- }
- }
-
- private static ExpressionFactory newInstance0(Class<?> implClass) {
- try {
- return (ExpressionFactory) implClass.newInstance();
- } catch (IllegalAccessException e) {
- throw new ELException("Fail to create ExpressionFactory instance", e);
- } catch (InstantiationException e) {
- throw new ELException("Fail to create ExpressionFactory instance", e);
- }
- }
-
- private static String lookupExpressionFactoryImplClass() {
-
- String implClassName = lookupByJREPropertyFile();
- if (implClassName == null) {
- implClassName = System.getProperty(SYSTEM_PROPERTY_NAME);
- if (implClassName == null) {
- implClassName = PLATFORM_DEFAULT_FACTORY_CLASS;
- }
- }
- return implClassName;
- }
-
- private static Class<?> lookupByServiceEntryURL(ClassLoader cl) throws ClassNotFoundException {
- // use the common lookup/parsing logic for the service files.
- return ProviderLocator.getServiceClass(ExpressionFactory.class.getName(), ExpressionFactory.class, cl);
- }
-
- private static String lookupByJREPropertyFile() {
- try {
- return ProviderLocator.lookupByJREPropertyFile(JAVA_RUNTIME_PROPERTY_FILE_LOCATION, SYSTEM_PROPERTY_NAME);
- } catch (IOException e) {
- throw new ELException("Fail to read configuration file", e);
- }
- }
-
- private static Class<?> loadExpressionFactoryImplClass() {
-
- String implClassName = null;
- try {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if (cl == null) {
- cl = ClassLoader.getSystemClassLoader();
- }
- // check the META-INF/services defintions first
- Class<?> cls = lookupByServiceEntryURL(cl);
- if (cls != null) {
- return cls;
- }
- // try resolving using the alternate property lookups (always returns
- // something, since there is a default
- implClassName = lookupExpressionFactoryImplClass();
- return ProviderLocator.loadClass(implClassName, ExpressionFactory.class, cl);
- } catch (ClassNotFoundException e) {
- // can be thrown either as a result of a classloading failure in the service
- // lookup or a failure to directly load the class
- if (implClassName != null) {
- throw new ELException("Fail to load implementation class " + implClassName, e);
- }
- else {
- throw new ELException("Fail to load implementation class", e);
- }
- }
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/FunctionMapper.java b/geronimo-el_2.2_spec/src/main/java/javax/el/FunctionMapper.java
deleted file mode 100644
index 666a76c..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/FunctionMapper.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.lang.reflect.Method;
-
-/**
- *
- */
-public abstract class FunctionMapper {
-
- public abstract Method resolveFunction(String prefix, String localName);
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ListELResolver.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ListELResolver.java
deleted file mode 100644
index 4e61cd3..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ListELResolver.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.beans.FeatureDescriptor;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-public class ListELResolver extends ELResolver {
-
- private final boolean readOnly;
-
- private final static Class UNMODIFIABLE = Collections.unmodifiableList(
- new ArrayList()).getClass();
-
- public ListELResolver() {
- this.readOnly = false;
- }
-
- public ListELResolver(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
- public Object getValue(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof List) {
- context.setPropertyResolved(true);
- List list = (List) base;
- int idx = coerce(property);
- if (idx < 0 || idx >= list.size()) {
- return null;
- }
- return list.get(idx);
- }
-
- return null;
- }
-
- public Class<?> getType(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof List) {
- context.setPropertyResolved(true);
- List list = (List) base;
- int idx = coerce(property);
- checkBounds(list, idx);
- Object obj = list.get(idx);
- return (obj != null) ? obj.getClass() : null;
- }
-
- return null;
- }
-
- public void setValue(ELContext context, Object base, Object property,
- Object value) throws NullPointerException,
- PropertyNotFoundException, PropertyNotWritableException,
- ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof List) {
- context.setPropertyResolved(true);
- List list = (List) base;
-
- if (this.readOnly) {
- throw new PropertyNotWritableException(message(context,
- "resolverNotWriteable", new Object[] { base.getClass()
- .getName() }));
- }
-
- int idx = coerce(property);
- checkBounds(list, idx);
- try {
- list.set(idx, value);
- } catch (UnsupportedOperationException e) {
- throw new PropertyNotWritableException(e);
- } catch (IndexOutOfBoundsException e) {
- throw new PropertyNotFoundException(e);
- }
- }
- }
-
- public boolean isReadOnly(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof List) {
- context.setPropertyResolved(true);
- List list = (List) base;
- int idx = coerce(property);
- checkBounds(list, idx);
- return this.readOnly || UNMODIFIABLE.equals(list.getClass());
- }
-
- return this.readOnly;
- }
-
- public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
- if (base instanceof List) {
- FeatureDescriptor[] descs = new FeatureDescriptor[((List) base).size()];
- for (int i = 0; i < descs.length; i++) {
- descs[i] = new FeatureDescriptor();
- descs[i].setDisplayName("["+i+"]");
- descs[i].setExpert(false);
- descs[i].setHidden(false);
- descs[i].setName(""+i);
- descs[i].setPreferred(true);
- descs[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
- descs[i].setValue(TYPE, Integer.class);
- }
- return Arrays.asList(descs).iterator();
- }
- return null;
- }
-
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
- if (base != null && base instanceof List) {
- return Integer.class;
- }
- return null;
- }
-
- private final static void checkBounds(List base, int idx) {
- if (idx < 0 || idx >= base.size()) {
- throw new PropertyNotFoundException(
- new ArrayIndexOutOfBoundsException(idx).getMessage());
- }
- }
-
- private final static int coerce(Object property) {
- if (property instanceof Number) {
- return ((Number) property).intValue();
- }
- if (property instanceof Character) {
- return ((Character) property).charValue();
- }
- if (property instanceof Boolean) {
- return (((Boolean) property).booleanValue() ? 1 : 0);
- }
- if (property instanceof String) {
- return Integer.parseInt((String) property);
- }
- throw new IllegalArgumentException(property != null ? property
- .toString() : "null");
- }
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/MapELResolver.java b/geronimo-el_2.2_spec/src/main/java/javax/el/MapELResolver.java
deleted file mode 100644
index bf07ba0..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/MapELResolver.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.beans.FeatureDescriptor;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-public class MapELResolver extends ELResolver {
-
- private final static Class UNMODIFIABLE = Collections.unmodifiableMap(
- new HashMap()).getClass();
-
- private final boolean readOnly;
-
- public MapELResolver() {
- this.readOnly = false;
- }
-
- public MapELResolver(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
- public Object getValue(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof Map) {
- context.setPropertyResolved(true);
- return ((Map) base).get(property);
- }
-
- return null;
- }
-
- public Class<?> getType(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof Map) {
- context.setPropertyResolved(true);
- Object obj = ((Map) base).get(property);
- return (obj != null) ? obj.getClass() : null;
- }
-
- return null;
- }
-
- public void setValue(ELContext context, Object base, Object property,
- Object value) throws NullPointerException,
- PropertyNotFoundException, PropertyNotWritableException,
- ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof Map) {
- context.setPropertyResolved(true);
-
- if (this.readOnly) {
- throw new PropertyNotWritableException(message(context,
- "resolverNotWriteable", new Object[] { base.getClass()
- .getName() }));
- }
-
- try {
- ((Map) base).put(property, value);
- } catch (UnsupportedOperationException e) {
- throw new PropertyNotWritableException(e);
- }
- }
- }
-
- public boolean isReadOnly(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof Map) {
- context.setPropertyResolved(true);
- return this.readOnly || UNMODIFIABLE.equals(base.getClass());
- }
-
- return this.readOnly;
- }
-
- public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
- if (base instanceof Map) {
- Iterator itr = ((Map) base).keySet().iterator();
- List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
- Object key;
- FeatureDescriptor desc;
- while (itr.hasNext()) {
- key = itr.next();
- desc = new FeatureDescriptor();
- desc.setDisplayName(key.toString());
- desc.setExpert(false);
- desc.setHidden(false);
- desc.setName(key.toString());
- desc.setPreferred(true);
- desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
- desc.setValue(TYPE, key.getClass());
- feats.add(desc);
- }
- return feats.iterator();
- }
- return null;
- }
-
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
- if (base instanceof Map) {
- return Object.class;
- }
- return null;
- }
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/MethodExpression.java b/geronimo-el_2.2_spec/src/main/java/javax/el/MethodExpression.java
deleted file mode 100644
index ce17cc3..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/MethodExpression.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- *
- */
-public abstract class MethodExpression extends Expression {
-
- public abstract MethodInfo getMethodInfo(ELContext context) throws NullPointerException, PropertyNotFoundException, MethodNotFoundException, ELException;
-
- public abstract Object invoke(ELContext context, Object[] params) throws NullPointerException, PropertyNotFoundException, MethodNotFoundException, ELException;
-
- public boolean isParmetersProvided() {
- return false;
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/MethodInfo.java b/geronimo-el_2.2_spec/src/main/java/javax/el/MethodInfo.java
deleted file mode 100644
index 8047e25..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/MethodInfo.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- *
- */
-public class MethodInfo {
-
- private final String name;
-
- private final Class<?>[] paramTypes;
-
- private final Class<?> returnType;
-
- /**
- *
- */
- public MethodInfo(String name, Class<?> returnType, Class<?>[] paramTypes) {
- this.name = name;
- this.returnType = returnType;
- this.paramTypes = paramTypes;
- }
-
- public String getName() {
- return this.name;
- }
-
- public Class<?>[] getParamTypes() {
- return this.paramTypes;
- }
-
- public Class<?> getReturnType() {
- return this.returnType;
- }
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/MethodNotFoundException.java b/geronimo-el_2.2_spec/src/main/java/javax/el/MethodNotFoundException.java
deleted file mode 100644
index cd69ce1..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/MethodNotFoundException.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- *
- */
-public class MethodNotFoundException extends ELException {
-
- /**
- *
- */
- public MethodNotFoundException() {
- super();
- }
-
- /**
- * @param message
- */
- public MethodNotFoundException(String message) {
- super(message);
- }
-
- /**
- * @param message
- * @param cause
- */
- public MethodNotFoundException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * @param cause
- */
- public MethodNotFoundException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotFoundException.java b/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotFoundException.java
deleted file mode 100644
index 2480999..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotFoundException.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- *
- */
-public class PropertyNotFoundException extends ELException {
-
- /**
- *
- */
- public PropertyNotFoundException() {
- super();
- }
-
- /**
- * @param message
- */
- public PropertyNotFoundException(String message) {
- super(message);
- }
-
- /**
- * @param message
- * @param cause
- */
- public PropertyNotFoundException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * @param cause
- */
- public PropertyNotFoundException(Throwable cause) {
- super(cause);
- }
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotWritableException.java b/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotWritableException.java
deleted file mode 100644
index 912ab9b..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/PropertyNotWritableException.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- *
- */
-public class PropertyNotWritableException extends ELException {
-
- /**
- *
- */
- public PropertyNotWritableException() {
- super();
- }
-
- /**
- * @param message
- */
- public PropertyNotWritableException(String message) {
- super(message);
- }
-
- /**
- * @param message
- * @param cause
- */
- public PropertyNotWritableException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * @param cause
- */
- public PropertyNotWritableException(Throwable cause) {
- super(cause);
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ResourceBundleELResolver.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ResourceBundleELResolver.java
deleted file mode 100644
index be1bd91..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ResourceBundleELResolver.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.beans.FeatureDescriptor;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class ResourceBundleELResolver extends ELResolver {
-
- public ResourceBundleELResolver() {
- super();
- }
-
- public Object getValue(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof ResourceBundle) {
- context.setPropertyResolved(true);
-
- if (property != null) {
- try {
- return ((ResourceBundle) base).getObject(property
- .toString());
- } catch (MissingResourceException mre) {
- return "???" + property.toString() + "???";
- }
- }
- }
-
- return null;
- }
-
- public Class<?> getType(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof ResourceBundle) {
- context.setPropertyResolved(true);
- }
-
- return null;
- }
-
- public void setValue(ELContext context, Object base, Object property,
- Object value) throws NullPointerException,
- PropertyNotFoundException, PropertyNotWritableException,
- ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof ResourceBundle) {
- context.setPropertyResolved(true);
- throw new PropertyNotWritableException(message(context,
- "resolverNotWriteable", new Object[] { base.getClass()
- .getName() }));
- }
- }
-
- public boolean isReadOnly(ELContext context, Object base, Object property)
- throws NullPointerException, PropertyNotFoundException, ELException {
- if (context == null) {
- throw new NullPointerException();
- }
-
- if (base instanceof ResourceBundle) {
- context.setPropertyResolved(true);
- }
-
- return true;
- }
-
- public Iterator getFeatureDescriptors(ELContext context, Object base) {
- if (base instanceof ResourceBundle) {
- List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
- Enumeration e = ((ResourceBundle) base).getKeys();
- FeatureDescriptor feat;
- String key;
- while (e.hasMoreElements()) {
- key = (String) e.nextElement();
- feat = new FeatureDescriptor();
- feat.setDisplayName(key);
- feat.setExpert(false);
- feat.setHidden(false);
- feat.setName(key);
- feat.setPreferred(true);
- feat.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
- feat.setValue(TYPE, String.class);
- feats.add(feat);
- }
- return feats.iterator();
- }
- return null;
- }
-
- public Class<?> getCommonPropertyType(ELContext context, Object base) {
- if (base instanceof ResourceBundle) {
- return String.class;
- }
- return null;
- }
-
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ValueExpression.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ValueExpression.java
deleted file mode 100644
index eccbcad..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ValueExpression.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- *
- */
-public abstract class ValueExpression extends Expression {
-
- public abstract Class<?> getExpectedType();
-
- public abstract Class<?> getType(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException;
-
- public abstract boolean isReadOnly(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException;
-
- public abstract void setValue(ELContext context, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException;
-
- public abstract Object getValue(ELContext context) throws NullPointerException, PropertyNotFoundException, ELException;
-
- public ValueReference getValueReference(ELContext context){
- return null;
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/ValueReference.java b/geronimo-el_2.2_spec/src/main/java/javax/el/ValueReference.java
deleted file mode 100644
index 361bda4..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/ValueReference.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-import java.io.Serializable;
-
-/**
- * @since 2.2
- */
-public class ValueReference implements Serializable {
-
- private Object base;
-
- private Object property;
-
- public ValueReference(Object base, Object property) {
- this.base = base;
- this.property = property;
- }
-
- public Object getBase() {
- return base;
- }
-
- public Object getProperty() {
- return property;
- }
-}
diff --git a/geronimo-el_2.2_spec/src/main/java/javax/el/VariableMapper.java b/geronimo-el_2.2_spec/src/main/java/javax/el/VariableMapper.java
deleted file mode 100644
index 84c3682..0000000
--- a/geronimo-el_2.2_spec/src/main/java/javax/el/VariableMapper.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.el;
-
-/**
- *
- */
-public abstract class VariableMapper {
-
- public abstract ValueExpression resolveVariable(String variable);
-
- public abstract ValueExpression setVariable(String variable, ValueExpression expression);
-}
diff --git a/geronimo-el_2.2_spec/src/main/resources/javax/el/LocalStrings.properties b/geronimo-el_2.2_spec/src/main/resources/javax/el/LocalStrings.properties
deleted file mode 100644
index 92db77a..0000000
--- a/geronimo-el_2.2_spec/src/main/resources/javax/el/LocalStrings.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Default localized string information
-# Localized for Locale en_US
-
-propertyNotFound=Property ''{1}'' not found on type {0}
-propertyNotReadable=Property ''{1}'' not readable on type {0}
-propertyNotWritable=Property ''{1}'' not writable on type {0}
-propertyReadError=Error reading ''{1}'' on type {0}
-propertyWriteError=Error writing ''{1}'' on type {0}
-resolverNotWritable=ELResolver not writable for type {0}