public interface GenericClassFactory<T> extends ClassFactory<T>
| Modifier and Type | Method and Description |
|---|---|
T |
create(Class rawType,
Type[] actualTypeArguments)
Creates an instance of
rawType, given its actual type arguments actualTypeArguments
See CollectionFactory for an example of generic type instantiation |
void |
putHint(FactoryHint hint) |
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
|
create, removeHint, supports, supportsboolean supports(Class clazz, Type genericType)
clazz - 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 otherwiseT create(Class rawType, Type[] actualTypeArguments)
rawType, 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)actualTypeArguments - the declared generic types for the class being createdT that this class is a factory forCollectionFactoryvoid putHint(FactoryHint hint)
putHint in interface ClassFactory<T>hint - the new FactoryConfig for this factoryCopyright © 2016. All rights reserved.