|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.beans.binding.ELPropertyResolver
public final class ELPropertyResolver
| Nested Class Summary | |
|---|---|
static class |
ELPropertyResolver.Delegate
A Delegate is notified once a PropertyResolver is
bound and a value of an observable property changes. |
| Constructor Summary | |
|---|---|
ELPropertyResolver(ELContext context)
|
|
ELPropertyResolver(ELContext context,
java.lang.Object source,
java.lang.String path)
|
|
| Method Summary | |
|---|---|
void |
bind()
Attaches listeners on the objects along the path as described in the class documentation. |
Expression.Result |
evaluate()
Evaluates the expression, returning the result. |
ELPropertyResolver.Delegate |
getDelegate()
Returns the current delegate. |
Expression.Result.Type |
getEvaluationResultType()
Returns the evaluation result type. |
java.lang.String |
getPath()
Returns the path. |
java.lang.Object |
getSource()
Returns the object the path is relative to. |
java.lang.Class<?> |
getTypeOfLastProperty()
Returns the type of the last property. |
java.lang.Object |
getValueOfLastProperty()
Returns the value of the last property identified in the path, relative to the source object. |
boolean |
isBound()
Returns true if this resolver is bound. |
void |
setDelegate(ELPropertyResolver.Delegate delegate)
Sets the delegate that is notified any time an observable property along the path changes. |
void |
setPath(java.lang.String path)
Sets the path. |
void |
setSource(java.lang.Object source)
Sets the object the path is relative to. |
void |
setValueOfLastProperty(java.lang.Object value)
Sets the value of the last property identified in the path, relative to the source object. |
void |
unbind()
Removes listeners installed from invoking bind. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ELPropertyResolver(ELContext context)
public ELPropertyResolver(ELContext context,
java.lang.Object source,
java.lang.String path)
| Method Detail |
|---|
public void setSource(java.lang.Object source)
source - the object the path is relative to
java.lang.IllegalStateException - if boundpublic java.lang.Object getSource()
public void setPath(java.lang.String path)
path - the pathpublic java.lang.String getPath()
public void setDelegate(ELPropertyResolver.Delegate delegate)
delegate - the delegate
java.lang.IllegalStateException - if the current delegate is
non-nullpublic ELPropertyResolver.Delegate getDelegate()
public void setValueOfLastProperty(java.lang.Object value)
"firstName", this is equivalent to
getSource().setFirstName(value) or
getSource().put("firstName", value).
value - the value to set
java.lang.IllegalStateException - if not bound, path is empty, or
the current path is incomplete or the expression is read only
PropertyResolverException - as described in the class
documentationpublic java.lang.Object getValueOfLastProperty()
java.lang.IllegalStateException - if not bound, or the expression is
incomplete
PropertyResolverException - as described in the class
documentationpublic Expression.Result.Type getEvaluationResultType()
true if all the values along the path resolve to
a non-null value
java.lang.IllegalStateException - if not bound, or the expression is
incomplete
PropertyResolverException - as described in the class
documentationpublic java.lang.Class<?> getTypeOfLastProperty()
java.lang.IllegalStateException - if not all path elements are available
PropertyResolverException - if a property along the path can
not be resolvedpublic void bind()
java.lang.IllegalStateException - if already bound, or the path is not empty
and the source is null
PropertyResolverException - as described in the class
documentationpublic void unbind()
bind.
java.lang.IllegalStateException - if not bound
PropertyResolverException - as described in the class
documentationpublic Expression.Result evaluate()
public boolean isBound()
true if this resolver is bound.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||