/** * Convenience method for constructing {@link JavaType} for given JDK * type (usually {@link java.lang.Class}) */ public JavaType constructType(Type type) { if (type == null) { return null; } return getTypeFactory().constructType(type); }
@Override public JavaType typeFromId(DatabindContext context, String id) { requireNonNull(id, "id is null"); Class<?> typeClass = classResolver.apply(id); checkArgument(typeClass != null, "Unknown type ID: %s", id); return context.getTypeFactory().constructType(typeClass); }
@Override public JavaType typeFromId(DatabindContext context, String id) throws IOException { if (MY_DATA_CENTER_INFO_TYPE_MARKER.equals(id)) { return context.getTypeFactory().constructType(MyDataCenterInfo.class); } return super.typeFromId(context, id); }
@Override public JavaType typeFromId(DatabindContext context, String id) throws IOException { if (MY_DATA_CENTER_INFO_TYPE_MARKER.equals(id)) { return context.getTypeFactory().constructType(MyDataCenterInfo.class); } return super.typeFromId(context, id); }
@Override protected JavaType _typeFromId(final String id, final DatabindContext ctxt) { final TypeFactory typeFactory = ctxt.getTypeFactory(); Class<?> cls = DefaultClassDictionary.get().getClassById(Integer.parseInt(id), true); return typeFactory.constructSpecializedType(_baseType, cls); } }
JavaType t = getTypeFactory().constructFromCanonical(subClass); if (t.isTypeOrSubTypeOf(baseType.getRawClass())) { return t; Class<?> cls; try { cls = getTypeFactory().findClass(subClass); } catch (ClassNotFoundException e) { // let caller handle this problem return null; return getTypeFactory().constructSpecializedType(baseType, cls);
/** * Convenience method for constructing {@link JavaType} for given JDK * type (usually {@link java.lang.Class}) */ public JavaType constructType(Type type) { return getTypeFactory().constructType(type); }
/** * Convenience method for constructing {@link JavaType} for given JDK * type (usually {@link java.lang.Class}) */ public JavaType constructType(Type type) { if (type == null) { return null; } return getTypeFactory().constructType(type); }
/** * Convenience method for constructing {@link JavaType} for given JDK * type (usually {@link java.lang.Class}) */ public JavaType constructType(Type type) { return getTypeFactory().constructType(type); }
/** * Convenience method for constructing {@link JavaType} for given JDK * type (usually {@link java.lang.Class}) */ public JavaType constructType(Type type) { return getTypeFactory().constructType(type); }
@Override public JavaType typeFromId(DatabindContext context, String id) { requireNonNull(id, "id is null"); Class<?> typeClass = classResolver.apply(id); checkArgument(typeClass != null, "Unknown type ID: %s", id); return context.getTypeFactory().constructType(typeClass); }
@Override public JavaType typeFromId(DatabindContext context, String id) { requireNonNull(id, "id is null"); Class<?> typeClass = classResolver.apply(id); checkArgument(typeClass != null, "Unknown type ID: %s", id); return context.getTypeFactory().constructType(typeClass); }
@Override public JavaType typeFromId(DatabindContext context, String id) throws IOException { if (MY_DATA_CENTER_INFO_TYPE_MARKER.equals(id)) { return context.getTypeFactory().constructType(MyDataCenterInfo.class); } return super.typeFromId(context, id); }
@Override public JavaType typeFromId(DatabindContext context, String id) { return typeFromId(context.getTypeFactory(), id); }
@Override public JavaType typeFromId(DatabindContext context, String id) { return _typeFromId(id, context.getTypeFactory()); }
@Override public JavaType typeFromId(DatabindContext context, String id) { return _typeFromId(id, context.getTypeFactory()); }
@Override public JavaType typeFromId(DatabindContext context, String id) throws IOException { TypeFactory typeFactory = (context != null) ? context.getTypeFactory() : TypeFactory.defaultInstance(); return Arrays.stream(RequestType.values()) .filter(type -> type.getValue().equals(id)) .findFirst() .map(type -> typeFactory.constructType(type.getHoldClass())) .orElseThrow(() -> new IllegalArgumentException( "Can't find request class [id: " + id + "]")); }
@Override protected JavaType _typeFromId(final String id, final DatabindContext ctxt) { final TypeFactory typeFactory = ctxt.getTypeFactory(); Class<?> cls = DefaultClassDictionary.get().getClassById(Integer.parseInt(id), true); return typeFactory.constructSpecializedType(_baseType, cls); } }
@Override public JavaType typeFromId(DatabindContext context, String id) throws IOException { if (id.equals(idFromValueAndType(null, MultibankingError.class))) return context.getTypeFactory().constructSimpleType(MultibankingError.class, null); return super.typeFromId(context, id); }
@Override public JavaType typeFromId(DatabindContext context, String id) throws IOException { if (id.equals(idFromValueAndType(null, MultibankingError.class))) return context.getTypeFactory().constructSimpleType(MultibankingError.class, null); return super.typeFromId(context, id); }