org.jaffa.tools.patternmetaengine
Class ComponentRegistry

java.lang.Object
  extended byorg.jaffa.tools.patternmetaengine.ComponentRegistry

public class ComponentRegistry
extends Object

This class holds all the generated components (ie their builders). It is used to keep a registry of all components across the multiple phases of the build. It also provides some convienance methods for accessing components from the repository

Version:
1.0
Author:
PaulE

Constructor Summary
ComponentRegistry()
           
 
Method Summary
 void addComponent(IBuilder comp)
          Add a new component (IBuilder) to the registry
 IBuilder findComponent(String domain, String type)
          Find a given component.
 Iterator iterateByDomain(String domain)
          Iterator for all components in registry for a given domain object
 Iterator iterateByType(String type)
          Iterator for all components in registry of a given type
 Iterator iterator()
          Iterator for all components in registry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentRegistry

public ComponentRegistry()
Method Detail

addComponent

public void addComponent(IBuilder comp)
Add a new component (IBuilder) to the registry

Parameters:
comp - New component to be added

iterator

public Iterator iterator()
Iterator for all components in registry

Returns:
a interator of IBuiler objects

iterateByType

public Iterator iterateByType(String type)
Iterator for all components in registry of a given type

Parameters:
type - Type of component (Finder, Viewer, etc)
Returns:
a interator of IBuiler objects

iterateByDomain

public Iterator iterateByDomain(String domain)
Iterator for all components in registry for a given domain object

Parameters:
domain - full class name (including package) of domain object
Returns:
a interator of IBuiler objects

findComponent

public IBuilder findComponent(String domain,
                              String type)
Find a given component. Assumes there is only one instance of a given component type per domain object. If multiple are found the first one is returned.

Parameters:
domain - full class name (including package) of domain object
type - Type of component (Finder, Viewer, etc)
Returns:
the located component, null of no component is found


Copyright © 2002-2004 JAFFA Project.