/** * Based on the known string expression and the * {@link ParameterResolver} create an instance of the destined * type. * * @param clzDestined the type of object parsing the string * should resolve * resolver the parameter resolver used by the * expression * @param <T> the instance type to return * * @return an instance of type {@link T} created from resolving * the string expression */ protected <T> T evaluate(Class<T> clzDestined, ParameterResolver resolver) { try { return m_exprParserCoh.parse(m_sExpression, clzDestined).evaluate(resolver); } catch (Throwable t) { } return null; } }
/** * {@inheritDoc} */ @Override public Parameter process(ProcessingContext context, XmlElement element) throws ConfigurationException { String sName = context.getMandatoryProperty("name", String.class, element); try { return new Parameter(sName, context.getExpressionParser().parse(element.getString(), Object.class)); } catch (ParseException e) { throw new ConfigurationException("Error processing <property> element", "Ensure a valid value is present in <property> element", e); } } }