|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.el.ELResolver
javax.el.ResourceBundleELResolver
public class 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(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.
Field Summary |
---|
Fields inherited from class javax.el.ELResolver |
---|
RESOLVABLE_AT_DESIGN_TIME, TYPE |
Constructor Summary | |
---|---|
ResourceBundleELResolver()
|
Method Summary | |
---|---|
java.lang.Class<?> |
getCommonPropertyType(ELContext context,
java.lang.Object base)
If the base object is a ResourceBundle, returns the most general type that this resolver accepts for the property argument. |
java.util.Iterator<java.beans.FeatureDescriptor> |
getFeatureDescriptors(ELContext context,
java.lang.Object base)
If the base object is a ResourceBundle, returns an Iterator containing the set of keys available in the ResourceBundle. |
java.lang.Class<?> |
getType(ELContext context,
java.lang.Object base,
java.lang.Object property)
If the base object is an instance of ResourceBundle, return null, since the resolver is read only. |
java.lang.Object |
getValue(ELContext context,
java.lang.Object base,
java.lang.Object property)
If the base object is an instance of ResourceBundle, the provided property will first be coerced to a String. |
boolean |
isReadOnly(ELContext context,
java.lang.Object base,
java.lang.Object property)
If the base object is not null and an instanceof java.util.ResourceBundle, return true. |
void |
setValue(ELContext context,
java.lang.Object base,
java.lang.Object property,
java.lang.Object value)
If the base object is a ResourceBundle, throw a PropertyNotWritableException . |
Methods inherited from class javax.el.ELResolver |
---|
invoke |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceBundleELResolver()
Method Detail |
---|
public java.lang.Class<?> getCommonPropertyType(ELContext context, java.lang.Object base)
getCommonPropertyType
in class ELResolver
context
- The context of this evaluation.base
- The bundle to analyze. Only bases of type ResourceBundle are handled by this
resolver.
public java.util.Iterator<java.beans.FeatureDescriptor> getFeatureDescriptors(ELContext context, java.lang.Object base)
ELResolver.TYPE
- String.class.ELResolver.RESOLVABLE_AT_DESIGN_TIME
- true
getFeatureDescriptors
in class ELResolver
context
- The context of this evaluation.base
- The bundle to analyze. Only bases of type ResourceBundle are handled by this
resolver.
public java.lang.Class<?> getType(ELContext context, java.lang.Object base, java.lang.Object property)
getType
in class ELResolver
context
- The context of this evaluation.base
- The bundle to analyze. Only bases of type ResourceBundle are handled by this
resolver.property
- The name of the property to analyze.
java.lang.NullPointerException
- if context is nullpublic java.lang.Object getValue(ELContext context, java.lang.Object base, java.lang.Object property)
getValue
in class ELResolver
context
- The context of this evaluation.base
- The bundle to analyze. Only bases of type ResourceBundle are handled by this
resolver.property
- The name of the property to analyze. Will be coerced to a String.
java.lang.NullPointerException
- if context is null.
ELException
- if an exception was thrown while performing the property or variable resolution.
The thrown exception must be included as the cause property of this exception, if
available.public boolean isReadOnly(ELContext context, java.lang.Object base, java.lang.Object property)
isReadOnly
in class ELResolver
context
- The context of this evaluation.base
- The base object whose property value is to be analyzed, or null to analyze a
top-level variable.property
- The property or variable to return the read-only status for.
java.lang.NullPointerException
- if context is null.public void setValue(ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
PropertyNotWritableException
.
setValue
in class ELResolver
context
- The context of this evaluation.base
- The bundle to analyze. Only bases of type ResourceBundle are handled by this
resolver.property
- The name of the property to analyze. Will be coerced to a String.value
- The value to be set.
java.lang.NullPointerException
- if context is null.
PropertyNotWritableException
- Always thrown if base is an instance of ResourceBundle.
|
Copyright © 2006-2009 Odysseus Software GmbH. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |