public class MapFactory extends AbstractGenericClassFactory<Map>
hints| Constructor and Description |
|---|
MapFactory(FatBoy fatBoy) |
| Modifier and Type | Method and Description |
|---|---|
Map |
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 |
Map |
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
|
boolean |
supports(Field field)
Checks if this ClassFactory is targetted at a specific field (can check for generics, annotations etc)
|
supportsgetHint, putHint, removeHintclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitputHintremoveHintpublic MapFactory(FatBoy fatBoy)
public boolean supports(Field field)
ClassFactorysupports in interface ClassFactory<Map>supports in class AbstractGenericClassFactory<Map>field - The field to check support againsttrue if this ClassFactory supports the field requested to be created, false otherwisepublic 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 Map create(Field field)
field - The field to create an instance ofT that this class is a factory forpublic Map 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.