D.5 Package javax.faces.el
This is the base class for all
more specific evaluation
exception classes.
Synopsis
Class name:
|
javax.faces.el.EvaluationException
|
Extends:
|
javax.faces.FacesException
|
Implements:
|
java.io.Serializable
|
Constructors
- public EvaluationException()
-
Creates an empty instance.
- public EvaluationException(String message)
-
Creates an instance with the specified message.
- public EvaluationException(String message, Throwable rootCause)
-
Creates an instance with the specified message and root cause.
- public EvaluationException(Throwable rootCause)
-
Creates an instance with the specified root cause.
An instance of a
subclass of this abstract class
represents a dynamic binding to a method, typically created from a
method binding expression.
Synopsis
Class name:
|
javax.faces.el.MethodBinding
|
Extends:
|
None
|
Implements:
|
None
|
Constructors
- public MethodBinding()
-
Creates an instance.
Methods
- public String getExpressionString()
-
Returns the method binding expression used to create this instance or
null if none.
- public abstract Class getType(javax.faces.context.FacesContext context)
-
Returns the Class representing the return type for
the method this instance is bound to or null if
void. Throws
MethodNotFoundException if the method
isn't found.
- public abstract Object invoke(javax.faces.context.FacesContext context, Object[] params)
-
Invokes the method this instance is bound to and returns its return
value. Throws MethodNotFoundException if the
method isn't found or
EvaluationException wrapped around an exception
thrown by the method.
An instance of this class is
thrown to signal that the
method referenced by a method binding expression
can't be found.
Synopsis
Class name:
|
javax.faces.el.MethodNotFoundException
|
Extends:
|
javax.faces.el.EvaluationException
|
Implements:
|
java.io.Serializable
|
Constructors
- public MethodNotFoundException()
-
Creates an empty instance.
- public MethodNotFoundException(String message)
-
Creates an instance with the specified message.
- public MethodNotFoundException(String message, Throwable rootCause)
-
Creates an instance with the specified message and root cause.
- public MethodNotFoundException(Throwable rootCause)
-
Creates an instance with the specified root cause.
PropertyNotFoundException | |
An instance of this class is
thrown to signal that the
property referenced by a value binding expression
can't be found.
Synopsis
Class name:
|
javax.faces.el.PropertyNotFoundException
|
Extends:
|
javax.faces.el.EvaluationException
|
Implements:
|
java.io.Serializable
|
Constructors
- public PropertyNotFoundException()
-
Creates an empty instance.
- public PropertyNotFoundException(String message)
-
Creates an instance with the specified message.
- public PropertyNotFoundException(String message, Throwable rootCause)
-
Creates an instance with the specified message and root cause.
- public PropertyNotFoundException(Throwable rootCause)
-
Creates an instance with the specified root cause.
An instance of a
subclass of this abstract
class resolves property and element accessor operators in a JSF EL
expression. See Appendix B for details about the default resolver.
Synopsis
Class name:
|
javax.faces.el.PropertyResolver
|
Extends:
|
None
|
Implements:
|
None
|
Constructors
- public PropertyResolver()
-
Creates an instance.
Methods
- public abstract Class getType(Object base, int index)
-
Returns the Class representing the type of the
element of the base object at the specified index or
null if unknown. Throws
PropertyNotFoundException if the base object is
null or the index is out of bounds, or
EvaluationException wrapping any exception thrown
while getting the type.
- public abstract Class getType(Object base, Object property)
-
Returns the Class representing the type of the
property of the base object (after coercing the property to a
String if the base object is a bean) or
null if unknown. Throws
PropertyNotFoundException if the base object is a
bean and the property doesn't exist or if the base
object or the property is null, or
EvaluationException wrapping any exception thrown
while getting the type.
- public abstract Object getValue(Object base, int index)
-
Returns the Object represented by the element of
the base object at the specified index. Throws
PropertyNotFoundException if the base object is
null or the index is out of bounds, or
EvaluationException wrapping any exception thrown
while getting the value.
- public abstract Object getValue(Object base, Object property)
-
Returns the Object represented by the property of
the base object (after coercing the property to a
String if the base object is a bean), or
null if the base object or the property is
null, or if the base object is a
Map and the property doesn't
match a key. Throws PropertyNotFoundException if
the base object is a bean and the property doesn't
exist or isn't readable, or
EvaluationException wrapping any exception thrown
while getting the type.
- public abstract boolean isReadOnly(Object base, int index)
-
Returns true if the Object
represented by the element of the base object at the specified index
is known to be immutable; otherwise false. Throws
PropertyNotFoundException if the base object is
null or the index is out of bounds, or
EvaluationException wrapping any exception thrown
while getting the value.
- public abstract boolean isReadOnly(Object base, Object property)
-
Returns true if the Object
represented by the property of the base object, (after coercing the
property to a String if the base object is a bean)
is known to be immutable; otherwise false. Throws
PropertyNotFoundException if the base object is a
bean and the property doesn't exist or if the base
object or the property is null, or
EvaluationException wrapping any exception thrown
while getting the type.
- public abstract void setValue(Object base, int index, Object value)
-
Sets the element of the base object at the specified index to the
provide value. Throws PropertyNotFoundException if
the base object is null or the index is out of
bounds, or EvaluationException wrapping any
exception thrown while getting the value.
- public abstract void setValue(Object base, Object property, Object value)
-
Sets the property of the base object, (after coercing the property to
a String if the base object is a bean) to the
provided value. Throws PropertyNotFoundException
if the base object is a bean and the property
doesn't exist or isn't writable or
if the base object or the property is null, or
EvaluationException wrapping any exception thrown
while getting the type.
An instance of this class is
thrown to signal a syntax
error in a value or method binding expression.
Synopsis
Class name:
|
javax.faces.el.ReferenceSyntaxException
|
Extends:
|
javax.faces.el.EvaluationException
|
Implements:
|
java.io.Serializable
|
Constructors
- public ReferenceSyntaxException()
-
Creates an empty instance.
- public ReferenceSyntaxException(String message)
-
Creates an instance with the specified message.
- public ReferenceSyntaxException(String message, Throwable rootCause)
-
Creates an instance with the specified message and root cause.
- public ReferenceSyntaxException(Throwable rootCause)
-
Creates an instance with the specified root cause.
An instance of a subclass
of this abstract class
represents a dynamic binding to a property or a read-only JSF EL
expression, typically created from a value binding expression.
Synopsis
Class name:
|
javax.faces.el.ValueBinding
|
Extends:
|
None
|
Implements:
|
None
|
Constructors
- public ValueBinding()
-
Creates an instance.
Methods
- public String getExpressionString()
-
Returns the method binding expression used to create this instance or
null if none.
- public abstract Class getType(javax.faces.context.FacesContext context)
-
Returns the Class representing the data type for
the evaluation result of this binding. Throws
PropertyNotFoundException if the value binding
refers to a property that isn't found or
EvaluationException wrapped around an exception
thrown while evaluating the value binding.
- public abstract Object getValue(javax.faces.context.FacesContext context)
-
Returns the evaluation result for the binding. Throws
PropertyNotFoundException if the value binding
refers to a property that isn't found or readable,
or EvaluationException wrapped around an exception
thrown while evaluating the value binding.
- public abstract boolean isReadOnly(javax.faces.context.FacesContext context)
-
Returns true if the binding represents a read-only
property or JSF EL expression. Throws
PropertyNotFoundException if the value binding
refers to a property that isn't found or readable,
or EvaluationException wrapped around an exception
thrown while evaluating the value binding.
- public abstract void setValue(javax.faces.context.FacesContext context, Object value)
-
Evaluates the binding and sets the property it refers to to the
provide value. Throws PropertyNotFoundException if
the value binding refers to a property that isn't
found or writable, or EvaluationException wrapped
around an exception thrown while evaluating the value binding.
An instance of a subclass of
this abstract class
resolves variables in a JSF EL expression. See Appendix B for details
about the default resolver.
Synopsis
Class name:
|
javax.faces.el.VariableResolver
|
Extends:
|
None
|
Implements:
|
None
|
Constructors
- public VariableResolver()
-
Creates an instance.
Methods
- public abstract Object resolveVariable(javax.faces.context.FacesContext context, String name)
-
Returns the Object represented by the specified
name or null if unknown. Throws
EvaluationException wrapping any exception thrown
while resolving the name.
|