public boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; int idx = coerce(property); checkBounds(list, idx); return this.readOnly || UNMODIFIABLE.equals(list.getClass()); } return this.readOnly; }
public boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; int idx = coerce(property); checkBounds(list, idx); return this.readOnly || UNMODIFIABLE.equals(list.getClass()); } return this.readOnly; }
public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; int idx = coerce(property); checkBounds(list, idx); Object obj = list.get(idx); return (obj != null) ? obj.getClass() : null; } return null; }
public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; int idx = coerce(property); checkBounds(list, idx); Object obj = list.get(idx); return (obj != null) ? obj.getClass() : null; } return null; }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(list, idx); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if (context == null) { throw new NullPointerException(); } if (base instanceof List) { context.setPropertyResolved(true); List list = (List) base; if (this.readOnly) { throw new PropertyNotWritableException(message(context, "resolverNotWriteable", new Object[] { base.getClass() .getName() })); } int idx = coerce(property); checkBounds(list, idx); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }