to.etc.iocular.def
Class AbstractBuildPlan

java.lang.Object
  extended by to.etc.iocular.def.AbstractBuildPlan
All Implemented Interfaces:
BuildPlan
Direct Known Subclasses:
BuildPlanForConstructor, BuildPlanForContainerParameter, BuildPlanForStaticFactory

public abstract class AbstractBuildPlan
extends java.lang.Object
implements BuildPlan

Internal abstract base for most build plans. It only implements the property injection part of creating an object.

Author:
Frits Jalvingh Created on May 18, 2009

Field Summary
 
Fields inherited from interface to.etc.iocular.container.BuildPlan
EMPTY_PLANS
 
Constructor Summary
AbstractBuildPlan()
           
 
Method Summary
 void destroy(BasicContainer bc, java.lang.Object self)
          Call the before-destruction methods specified for this object.
 void dump(IndentWriter iw)
           
 java.util.List<PropertyInjector> getInjectorList()
           
abstract  java.lang.Object getObject(BasicContainer c)
           
 boolean hasDestructors()
           
protected  void injectProperties(java.lang.Object instance, BasicContainer bc)
           
protected  void internalDumpSetters(IndentWriter iw)
           
protected  void internalDumpStartStop(IndentWriter iw)
           
abstract  boolean needsStaticInitialization()
          When T this component has a static (one-time only) initialization requirement.
 void setDestroyList(MethodInvoker[] destroyList)
           
 void setInjectorList(java.util.List<PropertyInjector> injectorList)
           
 void setStartList(MethodInvoker[] startList)
           
 void start(BasicContainer bc, java.lang.Object self)
          Call the after-construction methods specified for this object (start methods).
abstract  void staticStart(BasicContainer c)
          When this has a static initializer this should execute it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBuildPlan

public AbstractBuildPlan()
Method Detail

getObject

public abstract java.lang.Object getObject(BasicContainer c)
                                    throws java.lang.Exception
Specified by:
getObject in interface BuildPlan
Throws:
java.lang.Exception

needsStaticInitialization

public abstract boolean needsStaticInitialization()
Description copied from interface: BuildPlan
When T this component has a static (one-time only) initialization requirement.

Specified by:
needsStaticInitialization in interface BuildPlan
Returns:

staticStart

public abstract void staticStart(BasicContainer c)
                          throws java.lang.Exception
Description copied from interface: BuildPlan
When this has a static initializer this should execute it. This gets called before an actual object is created from this definition.

Specified by:
staticStart in interface BuildPlan
Throws:
java.lang.Exception

getInjectorList

public java.util.List<PropertyInjector> getInjectorList()

setInjectorList

public void setInjectorList(java.util.List<PropertyInjector> injectorList)

dump

public void dump(IndentWriter iw)
          throws java.io.IOException
Specified by:
dump in interface BuildPlan
Throws:
java.io.IOException

injectProperties

protected void injectProperties(java.lang.Object instance,
                                BasicContainer bc)
                         throws java.lang.Exception
Throws:
java.lang.Exception

internalDumpSetters

protected void internalDumpSetters(IndentWriter iw)
                            throws java.io.IOException
Throws:
java.io.IOException

internalDumpStartStop

protected void internalDumpStartStop(IndentWriter iw)
                              throws java.io.IOException
Throws:
java.io.IOException

destroy

public void destroy(BasicContainer bc,
                    java.lang.Object self)
Description copied from interface: BuildPlan
Call the before-destruction methods specified for this object.

Specified by:
destroy in interface BuildPlan

setDestroyList

public void setDestroyList(MethodInvoker[] destroyList)

setStartList

public void setStartList(MethodInvoker[] startList)

hasDestructors

public boolean hasDestructors()
Specified by:
hasDestructors in interface BuildPlan

start

public void start(BasicContainer bc,
                  java.lang.Object self)
           throws java.lang.Exception
Description copied from interface: BuildPlan
Call the after-construction methods specified for this object (start methods). When present these are called after construction of the object, with the instance of the object as a possible parameter.

Specified by:
start in interface BuildPlan
Throws:
java.lang.Exception