@Deprecated public static JavaType[] findParameterTypes(Class<?> clz, Class<?> expType) { return instance.findTypeParameters(clz, expType); }
@Deprecated public static JavaType[] findParameterTypes(JavaType type, Class<?> expType) { return instance.findTypeParameters(type, expType); }
@Deprecated public static JavaType[] findParameterTypes(Class<?> clz, Class<?> expType, TypeBindings bindings) { return instance.findTypeParameters(clz, expType, bindings); }
public JavaType[] findTypeParameters(Class<?> clz, Class<?> expType) { return findTypeParameters(clz, expType, new TypeBindings(this, clz)); }
private JavaType _collectionType(Class<?> rawClass) { JavaType[] typeParams = findTypeParameters(rawClass, Collection.class); // ok to have no types ("raw") if (typeParams == null) { return CollectionType.construct(rawClass, _unknownType()); } // but exactly 2 types if any found if (typeParams.length != 1) { throw new IllegalArgumentException("Strange Collection type "+rawClass.getName()+": can not determine type parameters"); } return CollectionType.construct(rawClass, typeParams[0]); }
private JavaType _mapType(Class<?> rawClass) { JavaType[] typeParams = findTypeParameters(rawClass, Map.class); // ok to have no types ("raw") if (typeParams == null) { return MapType.construct(rawClass, _unknownType(), _unknownType()); } // but exactly 2 types if any found if (typeParams.length != 2) { throw new IllegalArgumentException("Strange Map type "+rawClass.getName()+": can not determine type parameters"); } return MapType.construct(rawClass, typeParams[0], typeParams[1]); }
typeParams = _typeFactory.findTypeParameters(_contextType, raw);
JavaType[] mapParams = findTypeParameters(subtype, Map.class); if (mapParams.length != 2) { throw new IllegalArgumentException("Could not find 2 type parameters for Map class "+rawType.getName()+" (found "+mapParams.length+")"); JavaType[] collectionParams = findTypeParameters(subtype, Collection.class); if (collectionParams.length != 1) { throw new IllegalArgumentException("Could not find 1 type parameter for Collection class "+rawType.getName()+" (found "+collectionParams.length+")");
JavaType[] params = tf.findTypeParameters(type, AtomicReference.class); JavaType referencedType; if (params == null || params.length < 1) { // untyped (raw)
return findTypeParameters(raw, expType, new TypeBindings(this, type));
@Deprecated public static JavaType[] findParameterTypes(JavaType type, Class<?> expType) { return instance.findTypeParameters(type, expType); }
@Deprecated public static JavaType[] findParameterTypes(Class<?> clz, Class<?> expType) { return instance.findTypeParameters(clz, expType); }
@Deprecated public static JavaType[] findParameterTypes(Class<?> clz, Class<?> expType, TypeBindings bindings) { return instance.findTypeParameters(clz, expType, bindings); }
public JavaType[] findTypeParameters(Class<?> clz, Class<?> expType) { return findTypeParameters(clz, expType, new TypeBindings(this, clz)); }
private JavaType _collectionType(Class<?> rawClass) { JavaType[] typeParams = findTypeParameters(rawClass, Collection.class); // ok to have no types ("raw") if (typeParams == null) { return CollectionType.construct(rawClass, _unknownType()); } // but exactly 2 types if any found if (typeParams.length != 1) { throw new IllegalArgumentException("Strange Collection type "+rawClass.getName()+": can not determine type parameters"); } return CollectionType.construct(rawClass, typeParams[0]); }
private JavaType _mapType(Class<?> rawClass) { JavaType[] typeParams = findTypeParameters(rawClass, Map.class); // ok to have no types ("raw") if (typeParams == null) { return MapType.construct(rawClass, _unknownType(), _unknownType()); } // but exactly 2 types if any found if (typeParams.length != 2) { throw new IllegalArgumentException("Strange Map type "+rawClass.getName()+": can not determine type parameters"); } return MapType.construct(rawClass, typeParams[0], typeParams[1]); }
JavaType[] mapParams = findTypeParameters(subtype, Map.class); if (mapParams.length != 2) { throw new IllegalArgumentException("Could not find 2 type parameters for Map class "+rawType.getName()+" (found "+mapParams.length+")"); JavaType[] collectionParams = findTypeParameters(subtype, Collection.class); if (collectionParams.length != 1) { throw new IllegalArgumentException("Could not find 1 type parameter for Collection class "+rawType.getName()+" (found "+collectionParams.length+")");
typeParams = _typeFactory.findTypeParameters(_contextType, raw);
JavaType[] params = tf.findTypeParameters(type, AtomicReference.class); JavaType referencedType; if (params == null || params.length < 1) { // untyped (raw)
return findTypeParameters(raw, expType, new TypeBindings(this, type));