private Class<?> resolveTypeLiteral(TypeLiteral typeLiteral) { final Type<JavaAnnotationSource> type = new TypeImpl<JavaAnnotationSource>(getOrigin(), typeLiteral.getType()); if (type.isPrimitive()) { final Class<?>[] primitiveTypes = { boolean.class, byte.class, short.class, int.class, long.class, float.class, double.class }; for (Class<?> c : primitiveTypes) { if (c.getSimpleName().equals(type.getName())) { return c; } } return null; } final String classname = type.getQualifiedName(); try { return Class.forName(getOrigin().resolveType(classname)); } catch (ClassNotFoundException e) { return null; } } }
private Class<?> resolveTypeLiteral(TypeLiteral typeLiteral) { final Type<JavaAnnotationSource> type = new TypeImpl<JavaAnnotationSource>(getOrigin(), typeLiteral.getType()); if (type.isPrimitive()) { final Class<?>[] primitiveTypes = { boolean.class, byte.class, short.class, int.class, long.class, float.class, double.class }; for (Class<?> c : primitiveTypes) { if (c.getSimpleName().equals(type.getName())) { return c; } } return null; } final String classname = type.getQualifiedName(); try { return Class.forName(getOrigin().resolveType(classname)); } catch (ClassNotFoundException e) { return null; } } }
private Class<?> resolveTypeLiteral(TypeLiteral typeLiteral) { final Type<JavaAnnotationSource> type = new TypeImpl<JavaAnnotationSource>(getOrigin(), typeLiteral.getType()); if (type.isPrimitive()) { final Class<?>[] primitiveTypes = { boolean.class, byte.class, short.class, int.class, long.class, float.class, double.class }; for (Class<?> c : primitiveTypes) { if (c.getSimpleName().equals(type.getName())) { return c; } } return null; } final String classname = type.getQualifiedName(); try { return Class.forName(getOrigin().resolveType(classname)); } catch (ClassNotFoundException e) { return null; } } }