Base Factory implementation with default no-op lifecycle hooks.
| 26 | * Base {@link Factory} implementation with default no-op lifecycle hooks. |
| 27 | */ |
| 28 | public abstract class AbstractFactory implements Factory { |
| 29 | /** {@inheritDoc} */ |
| 30 | @Override |
| 31 | public boolean isLeaf() { |
| 32 | return false; |
| 33 | } |
| 34 | |
| 35 | /** {@inheritDoc} */ |
| 36 | @Override |
| 37 | public boolean isHandlesNodeChildren() { |
| 38 | return false; |
| 39 | } |
| 40 | |
| 41 | /** {@inheritDoc} */ |
| 42 | @Override |
| 43 | public void onFactoryRegistration(FactoryBuilderSupport builder, String registeredName, String group) { |
| 44 | // do nothing |
| 45 | } |
| 46 | |
| 47 | /** {@inheritDoc} */ |
| 48 | @Override |
| 49 | public boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, |
| 50 | Map attributes ) { |
| 51 | return true; |
| 52 | } |
| 53 | |
| 54 | /** {@inheritDoc} */ |
| 55 | @Override |
| 56 | public boolean onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent) { |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | /** {@inheritDoc} */ |
| 61 | @Override |
| 62 | public void onNodeCompleted(FactoryBuilderSupport builder, Object parent, Object node ) { |
| 63 | // do nothing |
| 64 | } |
| 65 | |
| 66 | /** {@inheritDoc} */ |
| 67 | @Override |
| 68 | public void setParent(FactoryBuilderSupport builder, Object parent, Object child ) { |
| 69 | // do nothing |
| 70 | } |
| 71 | |
| 72 | /** {@inheritDoc} */ |
| 73 | @Override |
| 74 | public void setChild(FactoryBuilderSupport builder, Object parent, Object child ) { |
| 75 | // do nothing |
| 76 | } |
| 77 | |
| 78 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…