return v;
} else if (returnType == Map.class) {
DefaultStringMapValue a = getCheckedAnnotation(method, DefaultStringMapValue.class);
String[] v = a.value();
if (v.length % 2 != 0) {
throw new GwtTestI18NException("@" + DefaultStringMapValue.class.getSimpleName()
+ " value incorrect for method " + method.getDeclaringClass().getName() + "."
+ method.getName() + "() : the array value (key/value pair) should be even");
}
Map<String, String> result = new HashMap<String, String>();
for (int i = 0; i < v.length; i++) {
result.put(v[i], treatLine(v[++i]));
}
return result;
} else if (returnType == Integer.class || returnType == Integer.TYPE) {
DefaultIntValue a = getCheckedAnnotation(method, DefaultIntValue.class);
return a.value();
} else if (returnType == Double.class || returnType == Double.TYPE) {
DefaultDoubleValue a = getCheckedAnnotation(method, DefaultDoubleValue.class);
return a.value();
} else if (returnType == Float.class || returnType == Float.TYPE) {
DefaultFloatValue a = getCheckedAnnotation(method, DefaultFloatValue.class);
return a.value();
} else if (returnType == Boolean.class || returnType == Boolean.TYPE) {
DefaultBooleanValue a = getCheckedAnnotation(method, DefaultBooleanValue.class);
return a.value();
}
throw new GwtTestI18NException("The return type (" + returnType.getSimpleName()
+ ") of i18n '" + getProxiedClass().getSimpleName() + "." + method.getName()
+ "()' is not managed");
}