FileDocCategorySizeDatePackage
CompositeELResolver.javaAPI DocApache Tomcat 6.0.144986Fri Jul 20 04:20:30 BST 2007javax.el

CompositeELResolver

public class CompositeELResolver extends ELResolver

Fields Summary
private int
size
private ELResolver[]
resolvers
Constructors Summary
public CompositeELResolver()

		this.size = 0;
		this.resolvers = new ELResolver[2];
	
Methods Summary
public voidadd(javax.el.ELResolver elResolver)

		if (elResolver == null) {
			throw new NullPointerException();
		}

		if (this.size >= this.resolvers.length) {
			ELResolver[] nr = new ELResolver[this.size * 2];
			System.arraycopy(this.resolvers, 0, nr, 0, this.size);
			this.resolvers = nr;
		}
		this.resolvers[this.size++] = elResolver;
	
public java.lang.ClassgetCommonPropertyType(javax.el.ELContext context, java.lang.Object base)

		int sz = this.size;
		Class<?> commonType = null, type = null;
		for (int i = 0; i < sz; i++) {
			type = this.resolvers[i].getCommonPropertyType(context, base);
			if (type != null
					&& (commonType == null || commonType.isAssignableFrom(type))) {
				commonType = type;
			}
		}
		return commonType;
	
public java.util.IteratorgetFeatureDescriptors(javax.el.ELContext context, java.lang.Object base)

		return new FeatureIterator(context, base, this.resolvers, this.size);
	
public java.lang.ClassgetType(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)

		context.setPropertyResolved(false);
		int sz = this.size;
		Class<?> type;
		for (int i = 0; i < sz; i++) {
			type = this.resolvers[i].getType(context, base, property);
			if (context.isPropertyResolved()) {
				return type;
			}
		}
		return null;
	
public java.lang.ObjectgetValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)

		context.setPropertyResolved(false);
		int sz = this.size;
		Object result = null;
		for (int i = 0; i < sz; i++) {
			result = this.resolvers[i].getValue(context, base, property);
			if (context.isPropertyResolved()) {
				return result;
			}
		}
		return null;
	
public booleanisReadOnly(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)

		context.setPropertyResolved(false);
		int sz = this.size;
		boolean readOnly = false;
		for (int i = 0; i < sz; i++) {
			readOnly = this.resolvers[i].isReadOnly(context, base, property);
			if (context.isPropertyResolved()) {
				return readOnly;
			}
		}
		return false;
	
public voidsetValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)

		context.setPropertyResolved(false);
		int sz = this.size;
		for (int i = 0; i < sz; i++) {
			this.resolvers[i].setValue(context, base, property, value);
			if (context.isPropertyResolved()) {
				return;
			}
		}