Save This Page
Home » glassfish-v2ur2-b04-src » javax » el » [javadoc | source]
javax.el
public class: ResourceBundleELResolver [javadoc | source]
java.lang.Object
   javax.el.ELResolver
      javax.el.ResourceBundleELResolver
Defines property resolution behavior on instances of java.util.ResourceBundle .

This resolver handles base objects of type java.util.ResourceBundle. It accepts any object as a property and coerces it to a java.lang.String for invoking java.util.ResourceBundle#getObject(java.lang.String) .

This resolver is read only and will throw a PropertyNotWritableException if setValue is called.

ELResolvers are combined together using CompositeELResolver s, to define rich semantics for evaluating an expression. See the javadocs for ELResolver for details.

Fields inherited from javax.el.ELResolver:
TYPE,  RESOLVABLE_AT_DESIGN_TIME
Method from javax.el.ResourceBundleELResolver Summary:
getCommonPropertyType,   getFeatureDescriptors,   getType,   getValue,   isReadOnly,   setValue
Methods from javax.el.ELResolver:
getCommonPropertyType,   getFeatureDescriptors,   getType,   getValue,   isReadOnly,   setValue
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.el.ResourceBundleELResolver Detail:
 public Class getCommonPropertyType(ELContext context,
    Object base) 
    If the base object is a ResourceBundle, returns the most general type that this resolver accepts for the property argument. Otherwise, returns null.

    Assuming the base is a ResourceBundle, this method will always return String.class.

 public Iterator getFeatureDescriptors(ELContext context,
    Object base) 
    If the base object is a ResourceBundle, returns an Iterator containing the set of keys available in the ResourceBundle. Otherwise, returns null.

    The Iterator returned must contain zero or more instances of java.beans.FeatureDescriptor . Each info object contains information about a key in the ResourceBundle, and is initialized as follows:

  • displayName - The String key
  • name - Same as displayName property.
  • shortDescription - Empty string
  • expert - false
  • hidden - false
  • preferred - true
  • In addition, the following named attributes must be set in the returned FeatureDescriptors:
  • ELResolver#TYPE - String.class
  • ELResolver#RESOLVABLE_AT_DESIGN_TIME - true
 public Class getType(ELContext context,
    Object base,
    Object property) 
    If the base object is an instance of ResourceBundle, return null, since the resolver is read only.

    If the base is ResourceBundle, the propertyResolved property of the ELContext object must be set to true by this resolver, before returning. If this property is not true after this method is called, the caller should ignore the return value.

 public Object getValue(ELContext context,
    Object base,
    Object property) 
    If the base object is an instance of ResourceBundle, the provided property will first be coerced to a String. The Object returned by getObject on the base ResourceBundle will be returned.

    If the base is ResourceBundle, the propertyResolved property of the ELContext object must be set to true by this resolver, before returning. If this property is not true after this method is called, the caller should ignore the return value.

 public boolean isReadOnly(ELContext context,
    Object base,
    Object property) 
    If the base object is not null and an instanceof ResourceBundle , return true.
 public  void setValue(ELContext context,
    Object base,
    Object property,
    Object value)