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

public Class DemuxCompositeELResolver

extends FacesCompositeELResolver
Class Inheritance
Imports
java.beans.FeatureDescriptor, java.util.Iterator, .NoSuchElementException, javax.el.ELResolver, .ELContext, .ELException

Maintains an ordered composite list of child ELResolver for JSF.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private int
private ELResolver[]
private final FacesCompositeELResolver.ELResolverChainType
private int
private ELResolver[]
private int
private ELResolver[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
public void
private void
private Class<?>
_getType(int resolverCount, ELResolver[] resolvers, ELContext context, Object base, Object property)

private Object
_getValue(int resolverCount, ELResolver[] resolvers, ELContext context, Object base, Object property)

private boolean
_isReadOnly(int resolverCount, ELResolver[] resolvers, ELContext context, Object base, Object property)

private void
_setValue(int resolverCount, ELResolver[] resolvers, ELContext context, Object base, Object property, Object val)

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
public Class<?>
getCommonPropertyType(ELContext
The context of this evaluation.
context
,
Object
The base object to return the most general property type for, or null to enumerate the set of top-level variables that this resolver can evaluate.
base
)

Overrides javax.el.CompositeELResolver.getCommonPropertyType.

Returns the most general type that this resolver accepts for the property argument, given a base object.
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

_allELResolverCountback to summary
private int _allELResolverCount
_allELResolversback to summary
private ELResolver[] _allELResolvers
_chainTypeback to summary
private final FacesCompositeELResolver.ELResolverChainType _chainType
_propertyELResolverCountback to summary
private int _propertyELResolverCount
_propertyELResolversback to summary
private ELResolver[] _propertyELResolvers
_rootELResolverCountback to summary
private int _rootELResolverCount
_rootELResolversback to summary
private ELResolver[] _rootELResolvers

Constructor Detail

DemuxCompositeELResolverback to summary
public DemuxCompositeELResolver(FacesCompositeELResolver.ELResolverChainType chainType)

Method Detail

_addAllELResolverback to summary
private void _addAllELResolver(ELResolver elResolver)
_addPropertyELResolverback to summary
public void _addPropertyELResolver(ELResolver elResolver)
_addRootELResolverback to summary
private void _addRootELResolver(ELResolver elResolver)
_getTypeback to summary
private Class<?> _getType(int resolverCount, ELResolver[] resolvers, ELContext context, Object base, Object property) throws ELException
_getValueback to summary
private Object _getValue(int resolverCount, ELResolver[] resolvers, ELContext context, Object base, Object property) throws ELException
_isReadOnlyback to summary
private boolean _isReadOnly(int resolverCount, ELResolver[] resolvers, ELContext context, Object base, Object property) throws ELException
_setValueback to summary
private void _setValue(int resolverCount, ELResolver[] resolvers, ELContext context, Object base, Object property, Object val) throws ELException
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
getCommonPropertyTypeback to summary
public Class<?> getCommonPropertyType(ELContext context, Object base)

Overrides javax.el.CompositeELResolver.getCommonPropertyType.

Doc from javax.el.CompositeELResolver.getCommonPropertyType.

Returns the most general type that this resolver accepts for the property argument, given a base object. One use for this method is to assist tools in auto-completion. The result is obtained by querying all component resolvers.

The Class returned is the most specific class that is a common superclass of all the classes returned by each component resolver's getCommonPropertyType method. If null is returned by a resolver, it is skipped.

Parameters
context:ELContext

The context of this evaluation.

base:Object

The base object to return the most general property type for, or null to enumerate the set of top-level variables that this resolver can evaluate.

Returns:Class<?>

null if this ELResolver does not know how to handle the given base object; otherwise Object.class if any type of property is accepted; otherwise the most general property type accepted for the given base.

Annotations
@Override
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.
com.sun.faces.el back to summary

private final Class DemuxCompositeELResolver.DescriptorIterator

extends Object
implements Iterator<FeatureDescriptor>
Class Inheritance
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
private final Object
private final ELContext
private Iterator<FeatureDescriptor>
private int
private final int
private final ELResolver[]

Constructor Summary

AccessConstructor and Description
public
DescriptorIterator(ELContext context, Object base, ELResolver[] resolvers, int resolverCount)

Method Summary

Modifier and TypeMethod and Description
private Iterator<FeatureDescriptor>
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
public FeatureDescriptor
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_baseback to summary
private final Object _base
_contextback to summary
private final ELContext _context
_currIteratorback to summary
private Iterator<FeatureDescriptor> _currIterator
_currResolverIndexback to summary
private int _currResolverIndex
_resolverCountback to summary
private final int _resolverCount
_resolversback to summary
private final ELResolver[] _resolvers

Constructor Detail

DescriptorIteratorback to summary
public DescriptorIterator(ELContext context, Object base, ELResolver[] resolvers, int resolverCount)

Method Detail

_getCurrIteratorback to summary
private Iterator<FeatureDescriptor> _getCurrIterator()
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public FeatureDescriptor next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:FeatureDescriptor

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override