chrriis.uihierarchy.xml.resolver
Class ArrayComponentResolver

java.lang.Object
  extended bychrriis.uihierarchy.xml.resolver.ArrayComponentResolver
All Implemented Interfaces:
ComponentResolver

public class ArrayComponentResolver
extends Object
implements ComponentResolver

The component resolver for arrays.

Version:
1.0 2003.10.06
Author:
Christopher Deckers (chrriis@brainlex.com)

Constructor Summary
ArrayComponentResolver(Object[] components)
          Construct a component resolver for an array.
 
Method Summary
 Object resolve(String name)
          Resolve a component from its name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayComponentResolver

public ArrayComponentResolver(Object[] components)
Construct a component resolver for an array.

Parameters:
components - The array of components. They are in the form {"name_of_component_1", component_1, "name_of_component_2", component_2, ...}
or:
{component_1, component_2, ...} with the components' names set.
or a mix of both.
Method Detail

resolve

public Object resolve(String name)
Resolve a component from its name.

Specified by:
resolve in interface ComponentResolver
Parameters:
name - The name of the component to resolve.
Returns:
The component matching the given name, or null if not found.
See Also:
ComponentResolver.resolve(java.lang.String)