public class CollectionFactory extends AbstractGenericClassFactory<Collection>
hints| Constructor and Description |
|---|
CollectionFactory(FatBoy fatBoy) |
| Modifier and Type | Method and Description |
|---|---|
Collection |
create(Class rawType,
Type[] actualParameters)
Creates an instance of
rawType, given its actual type arguments actualTypeArguments
See CollectionFactory for an example of generic type instantiation |
Collection |
create(Field field) |
boolean |
supports(Class clazz,
Type genericType)
Checks if this ClassFactory supports the generic creation of clazz, given its possible generic type genericType
Generic type has 3 possible values
|
supports, supportsgetHint, putHint, removeHintclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitputHintremoveHintpublic CollectionFactory(FatBoy fatBoy)
public boolean supports(Class clazz, Type genericType)
GenericClassFactoryclazz - The class to creategenericType - The generic type of the declared class, which has 3 possible value types:true if this provider can create an instance (or generic instance) of the class in question, or false otherwisepublic Collection create(Field field)
field - The field to create an instance ofT that this class is a factory forpublic Collection create(Class rawType, Type[] actualParameters)
GenericClassFactoryrawType, given its actual type arguments actualTypeArguments
See CollectionFactory for an example of generic type instantiationrawType - The raw class of the type being created. (Map, List, Set etc)actualParameters - the declared generic types for the class being createdT that this class is a factory forCollectionFactoryCopyright © 2016. All rights reserved.