Refine search
public BeanProperties(Class<?> baseClass) { PropertyDescriptor[] descriptors; try { BeanInfo info = Introspector.getBeanInfo(baseClass); descriptors = info.getPropertyDescriptors(); } catch (IntrospectionException ie) { throw new ELException(ie); } for (PropertyDescriptor pd: descriptors) { propertyMap.put(pd.getName(), new BeanProperty(baseClass, pd)); } }
context.setPropertyResolved(true); if (isReadOnly) { return true; BeanProperty bp = getBeanProperty(context, base, property); return bp.isReadOnly();
BeanProperty bp = getBeanProperty(context, base, property); Method method = bp.getReadMethod(); if (method == null) { throw new PropertyNotFoundException( try { value = method.invoke(base, new Object[0]); context.setPropertyResolved(base, property); } catch (ELException ex) { throw ex; } catch (InvocationTargetException ite) { throw new ELException(ite.getCause()); } catch (Exception ex) { throw new ELException(ex);
public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException, PropertyNotFoundException, ELException { if (context == null) { throw new NullPointerException(); } if (base == null || property == null) { return null; } context.setPropertyResolved(true); return this.property(context, base, property).getPropertyType(); }
if (isResolvable(base)) { Method method = toBeanProperty(base, property).getReadMethod(); if (method == null) { throw new PropertyNotFoundException("Cannot read property " + property); result = method.invoke(base); } catch (InvocationTargetException e) { throw new ELException(e.getCause()); } catch (Exception e) { throw new ELException(e); context.setPropertyResolved(true);
if (isResolvable(base)) { result |= toBeanProperty(base, property).isReadOnly(); context.setPropertyResolved(true);
BeanProperties props = getProps(cl); setProps(cl, props); context.setPropertyResolved(true); if (prop == null || prop.getReadMethod() == null) { throw new PropertyNotFoundException("'" + property + "' is an unknown bean property of '" + base.getClass().getName() + "'"); return prop.getReadMethod().invoke(base); } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { throw new ELException(e.getCause());
@Override public boolean isReadOnly(ELContext env, Object base, Object property) { if (base == null) return false; BeanProperties props = getProp(env, base, property); if (props != null) { env.setPropertyResolved(true); if (_isReadOnly) return true; BeanProperty prop = props.getBeanProperty((String) property); if (prop != null) return prop.isReadOnly(); } throw new PropertyNotFoundException("'" + property + "' is an unknown bean property of '" + base.getClass().getName() + "'"); }
BeanProperties props = getProps(cl); setProps(cl, props); context.setPropertyResolved(true); else if (prop.getWriteMethod() != null) { return prop.getWriteMethod().getParameterTypes()[0]; else if (prop.getReadMethod() != null) { return prop.getReadMethod().getReturnType();
public boolean isReadOnly() { return getWriteMethod() == null; }
public boolean isReadOnly() { return getWriteMethod() == null; }
public boolean isReadOnly() { return getWriteMethod() == null; } }
public boolean isReadOnly() { return getWriteMethod() == null; }
public boolean isReadOnly() { return getWriteMethod() == null; } }
public boolean isReadOnly() { return getWriteMethod() == null; }
public boolean isReadOnly() { return getWriteMethod() == null; }
public Method getReadMethod() { return this.read(null); }
public Method getReadMethod() { return this.read(null); }
public Method getWriteMethod() { return write(null); }
public Method getWriteMethod() { return write(null); }