}
public static <T> T convertTo(Object value, Class<T> aClass) {
if (ExpressionSubElementDefinition.class.isAssignableFrom(aClass) && value instanceof ExpressionDefinition) {
ExpressionDefinition exp = (ExpressionDefinition) value;
ExpressionSubElementDefinition answer = new ExpressionSubElementDefinition();
answer.setExpressionType(exp);
return (T) answer;
} else if (ExpressionDefinition.class.isAssignableFrom(aClass)
&& value instanceof ExpressionSubElementDefinition) {
ExpressionSubElementDefinition exp = (ExpressionSubElementDefinition) value;
return (T) exp.getExpressionType();
} else if (ExpressionDefinition.class.isAssignableFrom(aClass) && value instanceof List) {
List list = (List) value;
if (list.size() > 0) {
Object object = list.get(0);
if (object instanceof ExpressionDefinition) {