Fix signatures
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 1 Jun 2007 07:38:39 +0000 (07:38 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 1 Jun 2007 07:38:39 +0000 (07:38 +0000)
BZ 42509
BZ 42515
Submitted by Paul McMahan

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@543413 13f79535-47bb-0310-9956-ffa450edef68

java/javax/el/BeanELResolver.java
java/javax/el/ResourceBundleELResolver.java
java/javax/servlet/jsp/el/ScopedAttributeELResolver.java
java/javax/servlet/jsp/tagext/TagInfo.java

index 109f6ce..186ffa4 100644 (file)
@@ -81,7 +81,7 @@ public class BeanELResolver extends ELResolver {
                }
 
                context.setPropertyResolved(true);
-               return this.property(context, base, property).getType();
+               return this.property(context, base, property).getPropertyType();
        }
 
        public void setValue(ELContext context, Object base, Object property,
@@ -105,7 +105,7 @@ public class BeanELResolver extends ELResolver {
 
                Method m = this.property(context, base, property).write(context);
                try {
-                       m.invoke(base, new Object[] { value });
+                       m.invoke(base, value);
                } catch (IllegalAccessException e) {
                        throw new ELException(e);
                } catch (InvocationTargetException e) {
@@ -187,7 +187,7 @@ public class BeanELResolver extends ELResolver {
                        }
                }
 
-               public BeanProperty get(ELContext ctx, String name) {
+               private BeanProperty get(ELContext ctx, String name) {
                        BeanProperty property = this.properties.get(name);
                        if (property == null) {
                                throw new PropertyNotFoundException(message(ctx,
@@ -196,8 +196,12 @@ public class BeanELResolver extends ELResolver {
                        }
                        return property;
                }
+
+        public BeanProperty getBeanProperty(String name) {
+            return get(null, name);
+        }
         
-        public Class<?> getType() {
+        private Class<?> getType() {
             return type;
         }
        }
@@ -213,13 +217,13 @@ public class BeanELResolver extends ELResolver {
 
                private Method write;
 
-               public BeanProperty(Class owner, PropertyDescriptor descriptor) {
+               public BeanProperty(Class<?> owner, PropertyDescriptor descriptor) {
                        this.owner = owner;
                        this.descriptor = descriptor;
                        this.type = descriptor.getPropertyType();
                }
 
-               public Class<?> getType() {
+               public Class getPropertyType() {
                        return this.type;
                }
 
@@ -228,7 +232,15 @@ public class BeanELResolver extends ELResolver {
                        && (null == (this.write = getMethod(this.owner, descriptor.getWriteMethod())));
                }
 
-               public Method write(ELContext ctx) {
+               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) {
@@ -240,7 +252,7 @@ public class BeanELResolver extends ELResolver {
                        return this.write;
                }
 
-               public Method read(ELContext ctx) {
+               private Method read(ELContext ctx) {
                        if (this.read == null) {
                                this.read = getMethod(this.owner, descriptor.getReadMethod());
                                if (this.read == null) {
index 0f1a6bb..b7c5eea 100644 (file)
@@ -95,7 +95,7 @@ public class ResourceBundleELResolver extends ELResolver {
                return true;
        }
 
-       public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
+       public Iterator getFeatureDescriptors(ELContext context, Object base) {
                if (base instanceof ResourceBundle) {
                        List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
                        Enumeration e = ((ResourceBundle) base).getKeys();
index 4568014..d78dbd8 100644 (file)
@@ -57,7 +57,7 @@ public class ScopedAttributeELResolver extends ELResolver {
                return null;
        }
 
-       public Class getType(ELContext context, Object base, Object property)
+       public Class<Object> getType(ELContext context, Object base, Object property)
                        throws NullPointerException, PropertyNotFoundException, ELException {
                if (context == null) {
                        throw new NullPointerException();
index 33b597f..749e829 100644 (file)
@@ -38,21 +38,21 @@ public class TagInfo {
      * Static constant for getBodyContent() when it is Tag dependent.
      */
 
-    public static final String BODY_CONTENT_TAG_DEPENDENT = "TAGDEPENDENT";
+    public static final String BODY_CONTENT_TAG_DEPENDENT = "tagdependent";
 
 
     /**
      * Static constant for getBodyContent() when it is empty.
      */
 
-    public static final String BODY_CONTENT_EMPTY = "EMPTY";
+    public static final String BODY_CONTENT_EMPTY = "empty";
     
     /**
      * Static constant for getBodyContent() when it is scriptless.
      * 
      * @since 2.0
      */ 
-    public static final String BODY_CONTENT_SCRIPTLESS = "SCRIPTLESS";
+    public static final String BODY_CONTENT_SCRIPTLESS = "scriptless";
 
     /**
      * Constructor for TagInfo from data in the JSP 1.1 format for TLD.