private BeanProperty get(ELContext ctx, String name) { BeanProperty property = this.properties.get(name); if (property == null) { throw new PropertyNotFoundException(Util.message(ctx, "propertyNotFound", type.getName(), name)); } return property; }
private BeanProperty get(ELContext ctx, String name) { BeanProperty property = this.properties.get(name); if (property == null) { throw new PropertyNotFoundException(Util.message(ctx, "propertyNotFound", type.getName(), name)); } return property; }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (context == null) { throw new NullPointerException(); } if (base instanceof ResourceBundle) { context.setPropertyResolved(base, property); throw new PropertyNotWritableException(Util.message(context, "resolverNotWriteable", base.getClass().getName())); } }
private BeanProperty get(ELContext ctx, String name) { BeanProperty property = this.properties.get(name); if (property == null) { throw new PropertyNotFoundException(Util.message(ctx, "propertyNotFound", type.getName(), name)); } return property; }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof ResourceBundle) { context.setPropertyResolved(base, property); throw new PropertyNotWritableException(Util.message(context, "resolverNotWriteable", base.getClass().getName())); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof ResourceBundle) { context.setPropertyResolved(base, property); throw new PropertyNotWritableException(Util.message(context, "resolverNotWriteable", base.getClass().getName())); } }
public void importClass(String name) throws javax.el.ELException { int lastPeriodIndex = name.lastIndexOf('.'); if (lastPeriodIndex < 0) { throw new ELException(Util.message( null, "importHandler.invalidClassName", name)); } String unqualifiedName = name.substring(lastPeriodIndex + 1); String currentName = classNames.putIfAbsent(unqualifiedName, name); if (currentName != null && !currentName.equals(name)) { // Conflict. Same unqualifiedName, different fully qualified names throw new ELException(Util.message(null, "importHandler.ambiguousImport", name, currentName)); } }
public void importClass(String name) throws javax.el.ELException { int lastPeriodIndex = name.lastIndexOf('.'); if (lastPeriodIndex < 0) { throw new ELException(Util.message( null, "importHandler.invalidClassName", name)); } String unqualifiedName = name.substring(lastPeriodIndex + 1); String currentName = classNames.putIfAbsent(unqualifiedName, name); if (currentName != null && !currentName.equals(name)) { // Conflict. Same unqualifiedName, different fully qualified names throw new ELException(Util.message(null, "importHandler.ambiguousImport", name, currentName)); } }
private Method write(ELContext ctx) { if (this.write == null) { this.write = Util.getMethod(this.owner, descriptor.getWriteMethod()); if (this.write == null) { throw new PropertyNotWritableException(Util.message(ctx, "propertyNotWritable", new Object[] { owner.getName(), descriptor.getName() })); } } return this.write; }
private Method write(ELContext ctx) { if (this.write == null) { this.write = Util.getMethod(this.owner, descriptor.getWriteMethod()); if (this.write == null) { throw new PropertyNotWritableException(Util.message(ctx, "propertyNotWritable", new Object[] { owner.getName(), descriptor.getName() })); } } return this.write; }
private Method read(ELContext ctx) { if (this.read == null) { this.read = Util.getMethod(this.owner, descriptor.getReadMethod()); if (this.read == null) { throw new PropertyNotFoundException(Util.message(ctx, "propertyNotReadable", new Object[] { owner.getName(), descriptor.getName() })); } } return this.read; } }
private Method write(ELContext ctx) { if (this.write == null) { this.write = Util.getMethod(this.owner, descriptor.getWriteMethod()); if (this.write == null) { throw new PropertyNotWritableException(Util.message(ctx, "propertyNotWritable", new Object[] { owner.getName(), descriptor.getName() })); } } return this.write; }
private Method read(ELContext ctx) { if (this.read == null) { this.read = Util.getMethod(this.owner, descriptor.getReadMethod()); if (this.read == null) { throw new PropertyNotFoundException(Util.message(ctx, "propertyNotReadable", new Object[] { owner.getName(), descriptor.getName() })); } } return this.read; } }
public void importClass(String name) throws javax.el.ELException { if (!name.contains(".")) { throw new ELException(Util.message( null, "importHandler.invalidClassName", name)); } Class<?> clazz = findClass(name, true); if (clazz == null) { throw new ELException(Util.message( null, "importHandler.classNotFound", name)); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof ELClass && property instanceof String) { Class<?> clazz = ((ELClass) base).getKlass(); String name = (String) property; throw new PropertyNotWritableException(Util.message(context, "staticFieldELResolver.notWriteable", name, clazz.getName())); } }
private Method read(ELContext ctx) { if (this.read == null) { this.read = Util.getMethod(this.owner, descriptor.getReadMethod()); if (this.read == null) { throw new PropertyNotFoundException(Util.message(ctx, "propertyNotReadable", new Object[] { owner.getName(), descriptor.getName() })); } } return this.read; } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof ELClass && property instanceof String) { Class<?> clazz = ((ELClass) base).getKlass(); String name = (String) property; throw new PropertyNotWritableException(Util.message(context, "staticFieldELResolver.notWriteable", name, clazz.getName())); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { if (context == null) { throw new NullPointerException(); } if (base instanceof ELClass && property instanceof String) { Class<?> clazz = ((ELClass) base).getKlass(); String name = (String) property; throw new PropertyNotWritableException(Util.message(context, "staticFieldELResolver.notWriteable", name, clazz.getName())); } }
static Method findMethod(Class<?> clazz, String methodName, Class<?>[] paramTypes, Object[] paramValues) { if (clazz == null || methodName == null) { throw new MethodNotFoundException( message(null, "util.method.notfound", clazz, methodName, paramString(paramTypes))); } if (paramTypes == null) { paramTypes = getTypesFromValues(paramValues); } Method[] methods = clazz.getMethods(); List<Wrapper> wrappers = Wrapper.wrap(methods, methodName); Wrapper result = findWrapper(clazz, wrappers, methodName, paramTypes, paramValues); return getMethod(clazz, (Method) result.unWrap()); }
static Constructor<?> findConstructor(Class<?> clazz, Class<?>[] paramTypes, Object[] paramValues) { String methodName = "<init>"; if (clazz == null) { throw new MethodNotFoundException( message(null, "util.method.notfound", null, methodName, paramString(paramTypes))); } if (paramTypes == null) { paramTypes = getTypesFromValues(paramValues); } Constructor<?>[] constructors = clazz.getConstructors(); List<Wrapper> wrappers = Wrapper.wrap(constructors); Wrapper result = findWrapper(clazz, wrappers, methodName, paramTypes, paramValues); return getConstructor(clazz, (Constructor<?>) result.unWrap()); }