net.dpml.test.composite
Class ChildComponent

java.lang.Object
  extended by net.dpml.test.composite.ChildComponent
All Implemented Interfaces:
ColorManager

public class ChildComponent
extends Object
implements ColorManager

Arbitary component used in the testing of parent to child context management. The key features tested though this class is the assignment of a color value by the enclosing component (as opposed to a static directive).

Version:
1.2.0
Author:
Digital Product Meta Library

Nested Class Summary
static interface ChildComponent.Context
          The construction criteria.
 
Constructor Summary
ChildComponent(ChildComponent.Context context)
          Creation of a new singleton component instance.
 
Method Summary
 Color getColor()
          Return the color value assigned to the component context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChildComponent

public ChildComponent(ChildComponent.Context context)
Creation of a new singleton component instance.

Parameters:
context - a context implementation fullfilling the context criteria
Method Detail

getColor

public Color getColor()
Return the color value assigned to the component context.

Specified by:
getColor in interface ColorManager
Returns:
the color value