Methods Summary |
---|
public java.lang.Object | getContext(java.lang.Class key)Returns the context object associated with the given key.
The ELContext maintains a collection of context objects
relevant to the evaluation of an expression. These context objects
are used by ELResolver s. This method is used to
retrieve the context with the given key from the collection.
By convention, the object returned will be of the type specified by
the key . However, this is not required and the key is
used strictly as a unique identifier.
if(key == null) {
throw new NullPointerException();
}
return map.get(key);
|
public abstract javax.el.ELResolver | getELResolver()Retrieves the ELResolver associated with this context.
The ELContext maintains a reference to the
ELResolver that will be consulted to resolve variables
and properties during an expression evaluation. This method
retrieves the reference to the resolver.
Once an ELContext is constructed, the reference to the
ELResolver associated with the context cannot be changed.
|
public abstract javax.el.FunctionMapper | getFunctionMapper()Retrieves the FunctionMapper associated with this
ELContext .
|
public java.util.Locale | getLocale()Get the Locale stored by a previous invocation to
{@link #setLocale}. If this method returns non null ,
this Locale must be used for all localization needs
in the implementation. The Locale must not be cached
to allow for applications that change Locale dynamically.
return this.locale;
|
public abstract javax.el.VariableMapper | getVariableMapper()Retrieves the VariableMapper associated with this
ELContext .
|
public boolean | isPropertyResolved()Returns whether an {@link ELResolver} has successfully resolved a
given (base, property) pair.
The {@link CompositeELResolver} checks this property to determine
whether it should consider or skip other component resolvers.
return resolved;
|
public void | putContext(java.lang.Class key, java.lang.Object contextObject)Associates a context object with this ELContext .
The ELContext maintains a collection of context objects
relevant to the evaluation of an expression. These context objects
are used by ELResolver s. This method is used to
add a context object to that collection.
By convention, the contextObject will be of the
type specified by the key . However, this is not
required and the key is used strictly as a unique identifier.
if((key == null) || (contextObject == null)) {
throw new NullPointerException();
}
map.put(key, contextObject);
|
public void | setLocale(java.util.Locale locale)Set the Locale for this instance. This method may be
called by the party creating the instance, such as JavaServer
Faces or JSP, to enable the EL implementation to provide localized
messages to the user. If no Locale is set, the implementation
must use the locale returned by Locale.getDefault( ) .
this.locale = locale;
|
public void | setPropertyResolved(boolean resolved)Called to indicate that a ELResolver has successfully
resolved a given (base, property) pair.
The {@link CompositeELResolver} checks this property to determine
whether it should consider or skip other component resolvers.
this.resolved = resolved;
|