/** * @param context Mapping of formal parameter declarations (for generic * types) into actual types */ protected JavaType _fromClass(Class<?> clz, TypeBindings context) { // First: do we have an array type? if (clz.isArray()) { return ArrayType.construct(_constructType(clz.getComponentType(), null), null, null); } /* Also: although enums can also be fully resolved, there's little * point in doing so (T extends Enum<T>) etc. */ if (clz.isEnum()) { return new SimpleType(clz); } /* Maps and Collections aren't quite as hot; problem is, due * to type erasure we often do not know typing and can only assume * base Object. */ if (Map.class.isAssignableFrom(clz)) { return _mapType(clz); } if (Collection.class.isAssignableFrom(clz)) { return _collectionType(clz); } return new SimpleType(clz); }
return CollectionType.construct(clz, paramTypes.get(0)); return _collectionType(clz);
/** * @param context Mapping of formal parameter declarations (for generic * types) into actual types */ protected JavaType _fromClass(Class<?> clz, TypeBindings context) { // First: do we have an array type? if (clz.isArray()) { return ArrayType.construct(_constructType(clz.getComponentType(), null), null, null); } /* Also: although enums can also be fully resolved, there's little * point in doing so (T extends Enum<T>) etc. */ if (clz.isEnum()) { return new SimpleType(clz); } /* Maps and Collections aren't quite as hot; problem is, due * to type erasure we often do not know typing and can only assume * base Object. */ if (Map.class.isAssignableFrom(clz)) { return _mapType(clz); } if (Collection.class.isAssignableFrom(clz)) { return _collectionType(clz); } return new SimpleType(clz); }
return CollectionType.construct(clz, paramTypes.get(0)); return _collectionType(clz);
/** * @param context Mapping of formal parameter declarations (for generic * types) into actual types */ protected JavaType _fromClass(Class<?> clz, TypeBindings context) { // First: do we have an array type? if (clz.isArray()) { return ArrayType.construct(_constructType(clz.getComponentType(), null)); } /* Also: although enums can also be fully resolved, there's little * point in doing so (T extends Enum<T>) etc. */ if (clz.isEnum()) { return new SimpleType(clz); } /* Maps and Collections aren't quite as hot; problem is, due * to type erasure we often do not know typing and can only assume * base Object. */ if (Map.class.isAssignableFrom(clz)) { return _mapType(clz); } if (Collection.class.isAssignableFrom(clz)) { return _collectionType(clz); } return new SimpleType(clz); }
return CollectionType.construct(clz, paramTypes.get(0)); return _collectionType(clz);
/** * @param context Mapping of formal parameter declarations (for generic * types) into actual types */ protected JavaType _fromClass(Class<?> clz, TypeBindings context) { // First: do we have an array type? if (clz.isArray()) { return ArrayType.construct(_constructType(clz.getComponentType(), null), null, null); } /* Also: although enums can also be fully resolved, there's little * point in doing so (T extends Enum<T>) etc. */ if (clz.isEnum()) { return new SimpleType(clz); } /* Maps and Collections aren't quite as hot; problem is, due * to type erasure we often do not know typing and can only assume * base Object. */ if (Map.class.isAssignableFrom(clz)) { return _mapType(clz); } if (Collection.class.isAssignableFrom(clz)) { return _collectionType(clz); } return new SimpleType(clz); }
/** * @param context Mapping of formal parameter declarations (for generic * types) into actual types */ protected JavaType _fromClass(Class<?> clz, TypeBindings context) { // First: do we have an array type? if (clz.isArray()) { return ArrayType.construct(_constructType(clz.getComponentType(), null), null, null); } /* Also: although enums can also be fully resolved, there's little * point in doing so (T extends Enum<T>) etc. */ if (clz.isEnum()) { return new SimpleType(clz); } /* Maps and Collections aren't quite as hot; problem is, due * to type erasure we often do not know typing and can only assume * base Object. */ if (Map.class.isAssignableFrom(clz)) { return _mapType(clz); } if (Collection.class.isAssignableFrom(clz)) { return _collectionType(clz); } return new SimpleType(clz); }
return CollectionType.construct(clz, paramTypes.get(0)); return _collectionType(clz);
return CollectionType.construct(clz, paramTypes.get(0)); return _collectionType(clz);