/** * If the base object is a list, returns the most general type that this resolver accepts for * the property argument. Otherwise, returns null. Assuming the base is a List, this method will * always return Integer.class. This is because Lists accept integers as their index. * * @param context * The context of this evaluation. * @param base * The list to analyze. Only bases of type List are handled by this resolver. * @return null if base is not a List; otherwise Integer.class. */ @Override public Class<?> getCommonPropertyType(ELContext context, Object base) { return isResolvable(base) ? Integer.class : null; }
/** * If the base object is a list, returns the most general type that this resolver accepts for * the property argument. Otherwise, returns null. Assuming the base is a List, this method will * always return Integer.class. This is because Lists accept integers as their index. * * @param context * The context of this evaluation. * @param base * The list to analyze. Only bases of type List are handled by this resolver. * @return null if base is not a List; otherwise Integer.class. */ @Override public Class<?> getCommonPropertyType(ELContext context, Object base) { return isResolvable(base) ? Integer.class : null; }
/** * If the base object is a list, returns the most general type that this resolver accepts for * the property argument. Otherwise, returns null. Assuming the base is a List, this method will * always return Integer.class. This is because Lists accept integers as their index. * * @param context * The context of this evaluation. * @param base * The list to analyze. Only bases of type List are handled by this resolver. * @return null if base is not a List; otherwise Integer.class. */ @Override public Class<?> getCommonPropertyType(ELContext context, Object base) { return isResolvable(base) ? Integer.class : null; }
if (isResolvable(base)) { toIndex((List<?>) base, property); result = Object.class;
throw new NullPointerException("context is null"); if (isResolvable(base)) { toIndex((List<?>) base, property); context.setPropertyResolved(true);
throw new NullPointerException("context is null"); if (isResolvable(base)) { toIndex((List<?>) base, property); context.setPropertyResolved(true);
if (isResolvable(base)) { int index = toIndex(null, property); List<?> list = (List<?>) base;
if (isResolvable(base)) { toIndex((List<?>) base, property); result = Object.class;
throw new NullPointerException("context is null"); if (isResolvable(base)) { toIndex((List<?>) base, property); context.setPropertyResolved(true);
if (isResolvable(base)) { toIndex((List<?>) base, property); result = Object.class;
if (isResolvable(base)) { int index = toIndex(null, property); List<?> list = (List<?>) base;
if (isResolvable(base)) { int index = toIndex(null, property); List<?> list = (List<?>) base;
throw new NullPointerException("context is null"); if (isResolvable(base)) { if (readOnly) { throw new PropertyNotWritableException("resolver is read-only");
throw new NullPointerException("context is null"); if (isResolvable(base)) { if (readOnly) { throw new PropertyNotWritableException("resolver is read-only");
throw new NullPointerException("context is null"); if (isResolvable(base)) { if (readOnly) { throw new PropertyNotWritableException("resolver is read-only");