public interface ClassFactory<T>
| Modifier and Type | Method and Description |
|---|---|
T |
create(Field field) |
void |
putHint(FactoryHint hint) |
<P extends FactoryHint> |
removeHint(Class<P> clazz) |
boolean |
supports(Class clazz)
Checks if this ClassFactory is targetted at a specific Class
|
boolean |
supports(Field field)
Checks if this ClassFactory is targetted at a specific field (can check for generics, annotations etc)
|
boolean supports(Class clazz)
clazz - The class to check support againsttrue if this ClassFactory supports the clazz requested to be created, false otherwiseboolean supports(Field field)
field - The field to check support againsttrue if this ClassFactory supports the field requested to be created, false otherwiseT create(Field field)
field - The field to create an instance ofT that this class is a factory forvoid putHint(FactoryHint hint)
hint - a new FactoryHint. If any FactoryHint with the same class exists, it should be replaced by this one.<P extends FactoryHint> void removeHint(Class<P> clazz)
P - a FactoryHint subclassclazz - The subclass of FactoryHint you want to removeCopyright © 2016. All rights reserved.