/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, JavaType elementType) { return CollectionType.construct(collectionClass, elementType); }
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, Class<?> elementClass) { return CollectionType.construct(collectionClass, constructType(elementClass)); }
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]); }
/** * Method that can be used to construct "raw" Collection type; meaning that its * parameterization is unknown. * This is similar to using <code>Object.class</code> parameterization, * and is equivalent to calling: *<pre> * typeFactory.constructCollectionType(collectionClass, typeFactory.unknownType()); *<pre> *<p> * This method should only be used if parameterization is completely unavailable. * * @since 1.9 */ public CollectionType constructRawCollectionType(Class<? extends Collection> collectionClass) { return CollectionType.construct(collectionClass, unknownType()); }
return CollectionType.construct(clz, paramTypes.get(0));
throw new IllegalArgumentException("Could not find 1 type parameter for Collection class "+rawType.getName()+" (found "+collectionParams.length+")"); return CollectionType.construct(rawType, collectionParams[0]);
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, JavaType elementType) { return CollectionType.construct(collectionClass, elementType); }
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, Class<?> elementClass) { return CollectionType.construct(collectionClass, constructType(elementClass)); }
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]); }
/** * Method that can be used to construct "raw" Collection type; meaning that its * parameterization is unknown. * This is similar to using <code>Object.class</code> parameterization, * and is equivalent to calling: *<pre> * typeFactory.constructCollectionType(collectionClass, typeFactory.unknownType()); *<pre> *<p> * This method should only be used if parameterization is completely unavailable. * * @since 1.9 */ public CollectionType constructRawCollectionType(Class<? extends Collection> collectionClass) { return CollectionType.construct(collectionClass, unknownType()); }
return CollectionType.construct(clz, paramTypes.get(0));
throw new IllegalArgumentException("Could not find 1 type parameter for Collection class "+rawType.getName()+" (found "+collectionParams.length+")"); return CollectionType.construct(rawType, collectionParams[0]);
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, JavaType elementType) { return CollectionType.construct(collectionClass, elementType); }
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ @SuppressWarnings("unchecked") public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, JavaType elementType) { return CollectionType.construct(collectionClass, elementType); }
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, JavaType elementType) { return CollectionType.construct(collectionClass, elementType); }
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, Class<?> elementClass) { return CollectionType.construct(collectionClass, constructType(elementClass)); }
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, Class<?> elementClass) { return CollectionType.construct(collectionClass, constructType(elementClass)); }
/** * Method for constructing a {@link CollectionType}. *<p> * NOTE: type modifiers are NOT called on Collection type itself; but are called * for contained types. */ @SuppressWarnings("unchecked") public CollectionType constructCollectionType(Class<? extends Collection> collectionClass, Class<?> elementClass) { return CollectionType.construct(collectionClass, constructType(elementClass)); }
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 _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]); }