/** * If the base object is a map, returns the most general type that this resolver accepts for the * property argument. Otherwise, returns null. Assuming the base is a Map, this method will * always return Object.class. This is because Maps accept any object as a key. * * @param context * The context of this evaluation. * @param base * The map to analyze. Only bases of type Map are handled by this resolver. * @return null if base is not a Map; otherwise Object.class. */ @Override public Class<?> getCommonPropertyType(ELContext context, Object base) { return isResolvable(base) ? Object.class : null; }
if (isResolvable(base)) { Map<?, ?> map = (Map<?, ?>) base; final Iterator<?> keys = map.keySet().iterator();
if (isResolvable(base)) { result = Object.class; context.setPropertyResolved(true);
throw new NullPointerException("context is null"); if (isResolvable(base)) { context.setPropertyResolved(true);
if (isResolvable(base)) { result = ((Map<?, ?>) base).get(property); context.setPropertyResolved(true);
throw new NullPointerException("context is null"); if (isResolvable(base)) { if (readOnly) { throw new PropertyNotWritableException("resolver is read-only");