List of usage examples for com.google.gwt.core.ext.typeinfo NotFoundException NotFoundException
public NotFoundException(Throwable cause)
From source file:org.gwt.json.serialization.GenericGenerationUtils.java
License:Apache License
public static String resolveType(JType jType) throws NotFoundException { if (jType.isPrimitive() == null) { return jType.getQualifiedSourceName(); } else {// w w w .j ava 2 s. c o m String name = jType.getQualifiedSourceName(); if ("boolean".equals(name)) { return Boolean.class.getName(); } if ("char".equals(name)) { return Character.class.getName(); } if ("double".equals(name)) { return Double.class.getName(); } if ("float".equals(name)) { return Float.class.getName(); } if ("int".equals(name)) { return Integer.class.getName(); } if ("long".equals(name)) { return Long.class.getName(); } } throw new NotFoundException("Unable to resolve type " + jType.getQualifiedSourceName()); }