Methods Summary |
---|
public java.lang.Class | getCommonPropertyType(javax.el.ELContext context, java.lang.Object base)
if (base instanceof Map) {
return Object.class;
}
return null;
|
public java.util.Iterator | getFeatureDescriptors(javax.el.ELContext context, java.lang.Object base)
if (base instanceof Map) {
Iterator itr = ((Map) base).keySet().iterator();
List<FeatureDescriptor> feats = new ArrayList<FeatureDescriptor>();
Object key;
FeatureDescriptor desc;
while (itr.hasNext()) {
key = itr.next();
desc = new FeatureDescriptor();
desc.setDisplayName(key.toString());
desc.setExpert(false);
desc.setHidden(false);
desc.setName(key.toString());
desc.setPreferred(true);
desc.setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.FALSE);
desc.setValue(TYPE, key.getClass());
feats.add(desc);
}
return feats.iterator();
}
return null;
|
public java.lang.Class | getType(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
if (context == null) {
throw new NullPointerException();
}
if (base instanceof Map) {
context.setPropertyResolved(true);
Object obj = ((Map) base).get(property);
return (obj != null) ? obj.getClass() : null;
}
return null;
|
public java.lang.Object | getValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
if (context == null) {
throw new NullPointerException();
}
if (base instanceof Map) {
context.setPropertyResolved(true);
return ((Map) base).get(property);
}
return null;
|
public boolean | isReadOnly(javax.el.ELContext context, java.lang.Object base, java.lang.Object property)
if (context == null) {
throw new NullPointerException();
}
if (base instanceof Map) {
context.setPropertyResolved(true);
return this.readOnly || UNMODIFIABLE.equals(base.getClass());
}
return this.readOnly;
|
public void | setValue(javax.el.ELContext context, java.lang.Object base, java.lang.Object property, java.lang.Object value)
if (context == null) {
throw new NullPointerException();
}
if (base instanceof Map) {
context.setPropertyResolved(true);
if (this.readOnly) {
throw new PropertyNotWritableException(message(context,
"resolverNotWriteable", new Object[] { base.getClass()
.getName() }));
}
try {
((Map) base).put(property, value);
} catch (UnsupportedOperationException e) {
throw new PropertyNotWritableException(e);
}
}
|