CompositeELResolverpublic 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 void | add(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.Class | getCommonPropertyType(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.Iterator | getFeatureDescriptors(javax.el.ELContext context, java.lang.Object base)
return new FeatureIterator(context, base, this.resolvers, this.size);
| public java.lang.Class | getType(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.Object | getValue(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 boolean | isReadOnly(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 void | setValue(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;
}
}
|
|