public class NullFactory extends AbstractGenericClassFactory<Object>
hints| Constructor and Description |
|---|
NullFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addIgnoredClass(Class<?> clazz) |
Object |
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 |
Object |
create(Field field) |
boolean |
supports(Class clazz)
Checks if this ClassFactory is targetted at a specific Class
|
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
|
supportsgetHint, putHint, removeHintclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitputHintremoveHintpublic void addIgnoredClass(Class<?> clazz)
public boolean supports(Class clazz)
ClassFactorysupports in interface ClassFactory<Object>supports in class AbstractGenericClassFactory<Object>clazz - The class to check support againsttrue if this ClassFactory supports the clazz 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 Object create(Class rawType, Type[] actualTypeArguments)
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)actualTypeArguments - the declared generic types for the class being createdT that this class is a factory forCollectionFactoryCopyright © 2016. All rights reserved.