public Class<?> getJavaClass(final Type type) { Class<?> result = JavaPrimitiveTypes.javaClass(type); if (result == null) { String className = getCustomPrimitivesMapping().get(type.getName()); if (className == null) { throw new IllegalStateException("Mapping for " + type + " is not defined"); } try { result = Thread.currentThread().getContextClassLoader().loadClass(className); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } return result; }
public String getSequenceItemClassName(final Class<?> javaType) { return getSequenceCollectionName() != null ? JavaPrimitiveTypes.box(javaType).getCanonicalName() : javaType.getCanonicalName(); }