/** * Helper class used to check whether exact class for which type is being constructed * is one of well-known base interfaces or classes that indicates alternate * {@link JavaType} implementation. */ protected JavaType _fromWellKnownClass(ClassStack context, Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) { if (bindings == null) { bindings = EMPTY_BINDINGS; } // Quite simple when we resolving exact class/interface; start with that if (rawType == Map.class) { return _mapType(rawType, bindings, superClass, superInterfaces); } if (rawType == Collection.class) { return _collectionType(rawType, bindings, superClass, superInterfaces); } // and since 2.6 one referential type if (rawType == AtomicReference.class) { return _referenceType(rawType, bindings, superClass, superInterfaces); } // 01-Nov-2015, tatu: As of 2.7, couple of potential `CollectionLikeType`s (like // `Iterable`, `Iterator`), and `MapLikeType`s (`Map.Entry`) are not automatically // detected, related to difficulties in propagating type upwards (Iterable, for // example, is a weak, tag-on type). They may be detectable in future. return null; }
/** * Helper class used to check whether exact class for which type is being constructed * is one of well-known base interfaces or classes that indicates alternate * {@link JavaType} implementation. */ protected JavaType _fromWellKnownClass(ClassStack context, Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) { if (bindings == null) { bindings = EMPTY_BINDINGS; } // Quite simple when we resolving exact class/interface; start with that if (rawType == Map.class) { return _mapType(rawType, bindings, superClass, superInterfaces); } if (rawType == Collection.class) { return _collectionType(rawType, bindings, superClass, superInterfaces); } // and since 2.6 one referential type if (rawType == AtomicReference.class) { return _referenceType(rawType, bindings, superClass, superInterfaces); } // 01-Nov-2015, tatu: As of 2.7, couple of potential `CollectionLikeType`s (like // `Iterable`, `Iterator`), and `MapLikeType`s (`Map.Entry`) are not automatically // detected, related to difficulties in propagating type upwards (Iterable, for // example, is a weak, tag-on type). They may be detectable in future. return null; }
return MapType.construct(clz, keyType, contentType); return _mapType(clz);
return MapType.construct(clz, keyType, contentType); return _mapType(clz);
return MapType.construct(clz, keyType, contentType); return _mapType(clz);
return MapType.construct(clz, keyType, contentType); return _mapType(clz);
/** * Helper class used to check whether exact class for which type is being constructed * is one of well-known base interfaces or classes that indicates alternate * {@link JavaType} implementation. */ protected JavaType _fromWellKnownClass(ClassStack context, Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces) { if (bindings == null) { bindings = TypeBindings.emptyBindings(); } // Quite simple when we resolving exact class/interface; start with that if (rawType == Map.class) { return _mapType(rawType, bindings, superClass, superInterfaces); } if (rawType == Collection.class) { return _collectionType(rawType, bindings, superClass, superInterfaces); } // and since 2.6 one referential type if (rawType == AtomicReference.class) { return _referenceType(rawType, bindings, superClass, superInterfaces); } // 01-Nov-2015, tatu: As of 2.7, couple of potential `CollectionLikeType`s (like // `Iterable`, `Iterator`), and `MapLikeType`s (`Map.Entry`) are not automatically // detected, related to difficulties in propagating type upwards (Iterable, for // example, is a weak, tag-on type). They may be detectable in future. return null; }
result = _mapType(clz); } else if (Collection.class.isAssignableFrom(clz)) { result = _collectionType(clz);
result = _mapType(clz); } else if (Collection.class.isAssignableFrom(clz)) { result = _collectionType(clz);
result = _mapType(clz); } else if (Collection.class.isAssignableFrom(clz)) { result = _collectionType(clz);
result = _mapType(clz); } else if (Collection.class.isAssignableFrom(clz)) { result = _collectionType(clz);