Top Description Fields Constructors Methods
com.sun.faces.application

public Class ValueExpressionValueBindingAdapter

extends ValueExpression
implements Serializable, StateHolder
Class Inheritance
All Implemented Interfaces
javax.faces.component.StateHolder, java.io.Serializable
Static Imports
com.sun.faces.util.Util.isAnyNull, .Util.loadClass2, .Util.newInstance

Wrap a ValueBinding instance and expose it as a ValueExpression.

Field Summary

Modifier and TypeField and Description
private ValueBinding
binding

Deprecated as a consequence of ValueBinding being deprecated.
private static final long
private boolean

Constructor Summary

AccessConstructor and Description
public
public
ValueExpressionValueBindingAdapter(ValueBinding binding)

Deprecated as a consequence of ValueBinding being deprecated.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the Object to test for equality.
other
)

Implements abstract javax.el.Expression.equals.

Determines whether the specified object is equal to this Expression.
public String
public Class<?>
getExpectedType()

Implements abstract javax.el.ValueExpression.getExpectedType.

Returns the type the result of the expression will be coerced to after evaluation.
public String
getExpressionString()

Implements abstract javax.el.Expression.getExpressionString.

Returns the original String used to create this Expression, unmodified.
public Class<?>
getType(ELContext
The context of this evaluation.
context
)

Implements abstract javax.el.ValueExpression.getType.

Evaluates the expression relative to the provided context, and returns the most general type that is acceptable for an object to be passed as the value parameter in a future call to the setValue method.
public Object
getValue(ELContext
The context of this evaluation.
context
)

Implements abstract javax.el.ValueExpression.getValue.

Evaluates the expression relative to the provided context, and returns the resulting value.
public ValueBinding
getWrapped()

Deprecated as a consequence of ValueBinding being deprecated.
public int
hashCode()

Implements abstract javax.el.Expression.hashCode.

Returns the hash code for this Expression.
public boolean
isLiteralText()

Implements abstract javax.el.Expression.isLiteralText.

Always return false since we can't possibly know if this is a literal text binding or not.

public boolean
isReadOnly(ELContext
The context of this evaluation.
context
)

Implements abstract javax.el.ValueExpression.isReadOnly.

Evaluates the expression relative to the provided context, and returns true if a call to setValue will always fail.
public boolean
isTransient()

Implements javax.faces.component.StateHolder.isTransient.

If true, the Object implementing this interface must not participate in state saving or restoring.

public void
restoreState(FacesContext
the Faces context.
context
,
Object
the state.
state
)

Implements javax.faces.component.StateHolder.restoreState.

Perform any processing required to restore the state from the entries in the state Object.

public Object
saveState(FacesContext
the Faces context.
context
)

Implements javax.faces.component.StateHolder.saveState.

Gets the state of the instance as a Serializable Object.

public void
setTransient(boolean
boolean pass true if this Object will not participate in state saving or restoring, otherwise pass false.
newTransientValue
)

Implements javax.faces.component.StateHolder.setTransient.

Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.

public void
setValue(ELContext
The context of this evaluation.
context
,
Object
The new value to be set.
value
)

Implements abstract javax.el.ValueExpression.setValue.

Evaluates the expression relative to the provided context, and sets the result to the provided value.
Inherited from javax.el.ValueExpression:
getValueReference

Field Detail

bindingback to summary
private ValueBinding binding

Deprecated

as a consequence of ValueBinding being deprecated. See corresponding docs for further information.

serialVersionUIDback to summary
private static final long serialVersionUID
tranzientback to summary
private boolean tranzient

Constructor Detail

ValueExpressionValueBindingAdapterback to summary
public ValueExpressionValueBindingAdapter()
ValueExpressionValueBindingAdapterback to summary
public ValueExpressionValueBindingAdapter(ValueBinding binding)

Deprecated

as a consequence of ValueBinding being deprecated. See corresponding docs for further information.

Method Detail

equalsback to summary
public boolean equals(Object other)

Implements abstract javax.el.Expression.equals.

Doc from javax.el.Expression.equals.

Determines whether the specified object is equal to this Expression.

The result is true if and only if the argument is not null, is an Expression object that is the of the same type (ValueExpression or MethodExpression), and has an identical parsed representation.

Note that two expressions can be equal if their expression Strings are different. For example, ${fn1:foo()} and ${fn2:foo()} are equal if their corresponding FunctionMappers mapped fn1:foo and fn2:foo to the same method.

Parameters
other:Object

the Object to test for equality.

Returns:boolean

true if obj equals this Expression; false otherwise.

getDelimiterSyntaxback to summary
public String getDelimiterSyntax()
getExpectedTypeback to summary
public Class<?> getExpectedType()

Implements abstract javax.el.ValueExpression.getExpectedType.

Doc from javax.el.ValueExpression.getExpectedType.

Returns the type the result of the expression will be coerced to after evaluation.

Returns:Class<?>

the expectedType passed to the ExpressionFactory.createValueExpression method that created this ValueExpression.

getExpressionStringback to summary
public String getExpressionString()

Implements abstract javax.el.Expression.getExpressionString.

Doc from javax.el.Expression.getExpressionString.

Returns the original String used to create this Expression, unmodified.

This is used for debugging purposes but also for the purposes of comparison (e.g. to ensure the expression in a configuration file has not changed).

This method does not provide sufficient information to re-create an expression. Two different expressions can have exactly the same expression string but different function mappings. Serialization should be used to save and restore the state of an Expression.

Returns:String

The original expression String.

getTypeback to summary
public Class<?> getType(ELContext context) throws ELException

Implements abstract javax.el.ValueExpression.getType.

Doc from javax.el.ValueExpression.getType.

Evaluates the expression relative to the provided context, and returns the most general type that is acceptable for an object to be passed as the value parameter in a future call to the setValue method.

This is not always the same as getValue().getClass(). For example, in the case of an expression that references an array element, the getType method will return the element type of the array, which might be a superclass of the type of the actual element that is currently in the specified array element.

Parameters
context:ELContext

The context of this evaluation.

Returns:Class<?>

the most general acceptable type; otherwise undefined.

Exceptions
ELException:
if an exception was thrown while performing property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
getValueback to summary
public Object getValue(ELContext context) throws ELException

Implements abstract javax.el.ValueExpression.getValue.

Doc from javax.el.ValueExpression.getValue.

Evaluates the expression relative to the provided context, and returns the resulting value.

The resulting value is automatically coerced to the type returned by getExpectedType(), which was provided to the ExpressionFactory when this expression was created.

Parameters
context:ELContext

The context of this evaluation.

Returns:Object

The result of the expression evaluation.

Exceptions
ELException:
if an exception was thrown while performing property or variable resolution. The thrown exception must be included as the cause property of this exception, if available.
getWrappedback to summary
public ValueBinding getWrapped()

Deprecated

as a consequence of ValueBinding being deprecated. See corresponding docs for further information.

hashCodeback to summary
public int hashCode()

Implements abstract javax.el.Expression.hashCode.

Doc from javax.el.Expression.hashCode.

Returns the hash code for this Expression.

See the note in the equals method on how two expressions can be equal if their expression Strings are different. Recall that if two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. Implementations must take special note and implement hashCode correctly.

Returns:int

The hash code for this Expression.

isLiteralTextback to summary
public boolean isLiteralText()

Implements abstract javax.el.Expression.isLiteralText.

Always return false since we can't possibly know if this is a literal text binding or not.

Returns:boolean

Doc from javax.el.Expression.isLiteralText.

true if this expression was created from only literal text; false otherwise.

isReadOnlyback to summary
public boolean isReadOnly(ELContext context) throws ELException

Implements abstract javax.el.ValueExpression.isReadOnly.

Doc from javax.el.ValueExpression.isReadOnly.

Evaluates the expression relative to the provided context, and returns true if a call to setValue will always fail.

Parameters
context:ELContext

The context of this evaluation.

Returns:boolean

true if the expression is read-only or false if not.

Exceptions
ELException:
if an exception was thrown while performing property or variable resolution. The thrown exception must be included as the cause property of this exception, if available. * @throws NullPointerException if context is null
isTransientback to summary
public boolean isTransient()

Implements javax.faces.component.StateHolder.isTransient.

Doc from javax.faces.component.StateHolder.isTransient.

If true, the Object implementing this interface must not participate in state saving or restoring.

Returns:boolean

true if transient, false otherwise.

restoreStateback to summary
public void restoreState(FacesContext context, Object state)

Implements javax.faces.component.StateHolder.restoreState.

Doc from javax.faces.component.StateHolder.restoreState.

Perform any processing required to restore the state from the entries in the state Object.

If the class that implements this interface has references to instances that also implement StateHolder (such as a UIComponent with event handlers, validators, etc.) this method must call the restoreState method on all those instances as well.

If the state argument is null, take no action and return.

Parameters
context:FacesContext

the Faces context.

state:Object

the state.

saveStateback to summary
public Object saveState(FacesContext context)

Implements javax.faces.component.StateHolder.saveState.

Doc from javax.faces.component.StateHolder.saveState.

Gets the state of the instance as a Serializable Object.

If the class that implements this interface has references to instances that implement StateHolder (such as a UIComponent with event handlers, validators, etc.) this method must call the saveState method on all those instances as well. This method must not save the state of children and facets. That is done via the javax.faces.application.StateManager

This method must not alter the state of the implementing object. In other words, after executing this code:


Object state = component.saveState(facesContext);

component should be the same as before executing it.

The return from this method must be Serializable

Parameters
context:FacesContext

the Faces context.

Returns:Object

the saved state.

setTransientback to summary
public void setTransient(boolean newTransientValue)

Implements javax.faces.component.StateHolder.setTransient.

Doc from javax.faces.component.StateHolder.setTransient.

Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.

Parameters
newTransientValue:boolean

boolean pass true if this Object will not participate in state saving or restoring, otherwise pass false.

setValueback to summary
public void setValue(ELContext context, Object value) throws ELException

Implements abstract javax.el.ValueExpression.setValue.

Doc from javax.el.ValueExpression.setValue.

Evaluates the expression relative to the provided context, and sets the result to the provided value.

Parameters
context:ELContext

The context of this evaluation.

value:Object

The new value to be set.

Exceptions
ELException:
if an exception was thrown while attempting to set the property or variable. The thrown exception must be included as the cause property of this exception, if available.