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

public final Class ChainTypeCompositeELResolver

extends FacesCompositeELResolver
Class Inheritance
Imports
com.sun.faces.util.RequestStateManager, java.beans.FeatureDescriptor, java.util.Iterator, .Map, javax.el.ELContext, .ELException, .ELResolver, javax.faces.context.FacesContext

Maintains an ordered composite list of child ELResolver for JSF.

Field Summary

Modifier and TypeField and Description
private final FacesCompositeELResolver.ELResolverChainType
private final FacesCompositeELResolver

Constructor Summary

AccessConstructor and Description
public
ChainTypeCompositeELResolver(FacesCompositeELResolver.ELResolverChainType
the ELResolverChainType
chainType
)

Guarantee that this instance knows of what chain it is a member.

public

Method Summary

Modifier and TypeMethod and Description
public void
add(ELResolver
The component resolver to add.
elResolver
)

Overrides javax.el.CompositeELResolver.add.

Adds the given resolver to the list of component resolvers.
public void
public void
public FacesCompositeELResolver.ELResolverChainType
private FacesContext

Returns:

the FacesContext associated with this expression evaluation
getFacesContext
(ELContext
context for the current expression evaluation
elContext
)

public Iterator<FeatureDescriptor>
getFeatureDescriptors(ELContext
The context of this evaluation.
context
,
Object
The base object whose set of valid properties is to be enumerated, or null to enumerate the set of top-level variables that this resolver can evaluate.
base
)

Overrides javax.el.CompositeELResolver.getFeatureDescriptors.

Returns information about the set of variables or properties that can be resolved for the given base object.
public Class<?>
getType(ELContext
The context of this evaluation.
context
,
Object
The base object whose property value is to be analyzed, or null to analyze a top-level variable.
base
,
Object
The property or variable to return the acceptable type for.
property
)

Overrides javax.el.CompositeELResolver.getType.

For a given base and property, attempts to identify 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
,
Object
The base object whose property value is to be returned, or null to resolve a top-level variable.
base
,
Object
The property or variable to be resolved.
property
)

Overrides javax.el.CompositeELResolver.getValue.

Attempts to resolve the given property object on the given base object by querying all component resolvers.
public boolean
isReadOnly(ELContext
The context of this evaluation.
context
,
Object
The base object whose property value is to be analyzed, or null to analyze a top-level variable.
base
,
Object
The property or variable to return the read-only status for.
property
)

Overrides javax.el.CompositeELResolver.isReadOnly.

For a given base and property, attempts to determine whether a call to setValue will always fail.
public void
setValue(ELContext
The context of this evaluation.
context
,
Object
The base object whose property value is to be set, or null to set a top-level variable.
base
,
Object
The property or variable to be set.
property
,
Object
The value to set the property or variable to.
val
)

Overrides javax.el.CompositeELResolver.setValue.

Attempts to set the value of the given property object on the given base object.

Field Detail

_chainTypeback to summary
private final FacesCompositeELResolver.ELResolverChainType _chainType
_wrappedback to summary
private final FacesCompositeELResolver _wrapped

Constructor Detail

ChainTypeCompositeELResolverback to summary
public ChainTypeCompositeELResolver(FacesCompositeELResolver.ELResolverChainType chainType)

Guarantee that this instance knows of what chain it is a member.

Parameters
chainType:FacesCompositeELResolver.ELResolverChainType

the ELResolverChainType

ChainTypeCompositeELResolverback to summary
public ChainTypeCompositeELResolver(FacesCompositeELResolver delegate)

Method Detail

addback to summary
public void add(ELResolver elResolver)

Overrides javax.el.CompositeELResolver.add.

Doc from javax.el.CompositeELResolver.add.

Adds the given resolver to the list of component resolvers.

Resolvers are consulted in the order in which they are added.

Parameters
elResolver:ELResolver

The component resolver to add.

Annotations
@Override
addPropertyELResolverback to summary
public void addPropertyELResolver(ELResolver elResolver)

Implements abstract com.sun.faces.el.FacesCompositeELResolver.addPropertyELResolver.

Annotations
@Override
addRootELResolverback to summary
public void addRootELResolver(ELResolver elResolver)

Implements abstract com.sun.faces.el.FacesCompositeELResolver.addRootELResolver.

Annotations
@Override
getChainTypeback to summary
public FacesCompositeELResolver.ELResolverChainType getChainType()

Implements abstract com.sun.faces.el.FacesCompositeELResolver.getChainType.

Annotations
@Override
getFacesContextback to summary
private FacesContext getFacesContext(ELContext elContext)
Parameters
elContext:ELContext

context for the current expression evaluation

Returns:FacesContext

the FacesContext associated with this expression evaluation

getFeatureDescriptorsback to summary
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)

Overrides javax.el.CompositeELResolver.getFeatureDescriptors.

Doc from javax.el.CompositeELResolver.getFeatureDescriptors.

Returns information about the set of variables or properties that can be resolved for the given base object. One use for this method is to assist tools in auto-completion. The results are collected from all component resolvers.

The propertyResolved property of the ELContext is not relevant to this method. The results of all ELResolvers are concatenated.

The Iterator returned is an iterator over the collection of FeatureDescriptor objects returned by the iterators returned by each component resolver's getFeatureDescriptors method. If null is returned by a resolver, it is skipped.

Parameters
context:ELContext

The context of this evaluation.

base:Object

The base object whose set of valid properties is to be enumerated, or null to enumerate the set of top-level variables that this resolver can evaluate.

Returns:Iterator<FeatureDescriptor>

An Iterator containing zero or more (possibly infinitely more) FeatureDescriptor objects, or null if this resolver does not handle the given base object or that the results are too complex to represent with this method

Annotations
@Override
getTypeback to summary
public Class<?> getType(ELContext context, Object base, Object property) throws ELException

Overrides javax.el.CompositeELResolver.getType.

Doc from javax.el.CompositeELResolver.getType.

For a given base and property, attempts to identify 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. The result is obtained by querying all component resolvers.

If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must be set to true by the resolver, before returning. If this property is not true after this method is called, the caller should ignore the return value.

First, propertyResolved is set to false on the provided ELContext.

Next, for each component resolver in this composite:

  1. The getType() method is called, passing in the provided context, base and property.
  2. If the ELContext's propertyResolved flag is false then iteration continues.
  3. Otherwise, iteration stops and no more component resolvers are considered. The value returned by getType() is returned by this method.

If none of the component resolvers were able to perform this operation, the value null is returned and the propertyResolved flag remains set to false

.

Any exception thrown by component resolvers during the iteration is propagated to the caller of this method.

Parameters
context:ELContext

The context of this evaluation.

base:Object

The base object whose property value is to be analyzed, or null to analyze a top-level variable.

property:Object

The property or variable to return the acceptable type for.

Returns:Class<?>

If the propertyResolved property of ELContext was set to true, then the most general acceptable type; otherwise undefined.

Annotations
@Override
Exceptions
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.
getValueback to summary
public Object getValue(ELContext context, Object base, Object property) throws ELException

Overrides javax.el.CompositeELResolver.getValue.

Doc from javax.el.CompositeELResolver.getValue.

Attempts to resolve the given property object on the given base object by querying all component resolvers.

If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must be set to true by the resolver, before returning. If this property is not true after this method is called, the caller should ignore the return value.

First, propertyResolved is set to false on the provided ELContext.

Next, for each component resolver in this composite:

  1. The getValue() method is called, passing in the provided context, base and property.
  2. If the ELContext's propertyResolved flag is false then iteration continues.
  3. Otherwise, iteration stops and no more component resolvers are considered. The value returned by getValue() is returned by this method.

If none of the component resolvers were able to perform this operation, the value null is returned and the propertyResolved flag remains set to false

.

Any exception thrown by component resolvers during the iteration is propagated to the caller of this method.

Parameters
context:ELContext

The context of this evaluation.

base:Object

The base object whose property value is to be returned, or null to resolve a top-level variable.

property:Object

The property or variable to be resolved.

Returns:Object

If the propertyResolved property of ELContext was set to true, then the result of the variable or property resolution; otherwise undefined.

Annotations
@Override
Exceptions
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.
isReadOnlyback to summary
public boolean isReadOnly(ELContext context, Object base, Object property) throws ELException

Overrides javax.el.CompositeELResolver.isReadOnly.

Doc from javax.el.CompositeELResolver.isReadOnly.

For a given base and property, attempts to determine whether a call to setValue will always fail. The result is obtained by querying all component resolvers.

If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must be set to true by the resolver, before returning. If this property is not true after this method is called, the caller should ignore the return value.

First, propertyResolved is set to false on the provided ELContext.

Next, for each component resolver in this composite:

  1. The isReadOnly() method is called, passing in the provided context, base and property.
  2. If the ELContext's propertyResolved flag is false then iteration continues.
  3. Otherwise, iteration stops and no more component resolvers are considered. The value returned by isReadOnly() is returned by this method.

If none of the component resolvers were able to perform this operation, the value false is returned and the propertyResolved flag remains set to false

.

Any exception thrown by component resolvers during the iteration is propagated to the caller of this method.

Parameters
context:ELContext

The context of this evaluation.

base:Object

The base object whose property value is to be analyzed, or null to analyze a top-level variable.

property:Object

The property or variable to return the read-only status for.

Returns:boolean

If the propertyResolved property of ELContext was set to true, then true if the property is read-only or false if not; otherwise undefined.

Annotations
@Override
Exceptions
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.
setValueback to summary
public void setValue(ELContext context, Object base, Object property, Object val) throws ELException

Overrides javax.el.CompositeELResolver.setValue.

Doc from javax.el.CompositeELResolver.setValue.

Attempts to set the value of the given property object on the given base object. All component resolvers are asked to attempt to set the value.

If this resolver handles the given (base, property) pair, the propertyResolved property of the ELContext object must be set to true by the resolver, before returning. If this property is not true after this method is called, the caller can safely assume no value has been set.

First, propertyResolved is set to false on the provided ELContext.

Next, for each component resolver in this composite:

  1. The setValue() method is called, passing in the provided context, base, property and value.
  2. If the ELContext's propertyResolved flag is false then iteration continues.
  3. Otherwise, iteration stops and no more component resolvers are considered.

If none of the component resolvers were able to perform this operation, the propertyResolved flag remains set to false

.

Any exception thrown by component resolvers during the iteration is propagated to the caller of this method.

Parameters
context:ELContext

The context of this evaluation.

base:Object

The base object whose property value is to be set, or null to set a top-level variable.

property:Object

The property or variable to be set.

val:Object

The value to set the property or variable to.

Annotations
@Override
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.