cuba.wired
Class DescriptorMap

java.lang.Object
  extended by cuba.wired.DescriptorMap
Direct Known Subclasses:
ComponentMap, ResourceFactoryMap

public class DescriptorMap
extends java.lang.Object

Author:
Jan Lessner

Constructor Summary
DescriptorMap()
           
 
Method Summary
 java.util.Iterator getDescriptors()
           
 AbstractDescriptor lookupDescriptor(java.lang.String globalName)
           
 void registerDescriptor(AbstractDescriptor description)
           
protected  void registerDescriptor(AbstractDescriptor description, boolean allowReplacement)
           
 void replaceDescriptor(AbstractDescriptor description)
          This function is especally of interest for test purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorMap

public DescriptorMap()
Method Detail

lookupDescriptor

public AbstractDescriptor lookupDescriptor(java.lang.String globalName)

registerDescriptor

protected void registerDescriptor(AbstractDescriptor description,
                                  boolean allowReplacement)
                           throws InitException
Throws:
InitException

registerDescriptor

public void registerDescriptor(AbstractDescriptor description)
                        throws InitException
Throws:
InitException

replaceDescriptor

public void replaceDescriptor(AbstractDescriptor description)
                       throws InitException
This function is especally of interest for test purposes. It allows to replace an existing descriptor by a modified one, e.g. to inject a mock implementation.

Parameters:
description - The descriptor to be put as a replacement for an existing one in the map
Throws:
InitException - if the global name, denoted in the passed descriptor is not registered.

getDescriptors

public java.util.Iterator getDescriptors()