org.objectweb.fractal.adl.components
Class ComponentLoader
java.lang.Object
org.objectweb.fractal.adl.AbstractLoader
org.objectweb.fractal.adl.components.ComponentLoader
- All Implemented Interfaces:
- AttributeController, BindingController, ComponentLoaderAttributes, Loader
- Direct Known Subclasses:
- ArgumentComponentLoader
- public class ComponentLoader
- extends AbstractLoader
- implements ComponentLoaderAttributes
A Loader
to check Component
nodes
in definitions. This loader checks sub component names, loads the definitons
referenced by the component nodes (and the "extends" attribute), and merges
all these definitions into a single one (by following inheritance rules).
Method Summary |
Component |
getComponent(ComponentContainer container,
String name)
|
String |
getNameAttributes()
|
Component |
getPathComponent(ComponentContainer container,
String name)
|
Definition |
load(List loaded,
String name,
Map context)
|
Definition |
load(String name,
Map context)
Loads the ADL definition whose name is given. |
Node |
merge(Node elem,
Node superElem)
|
Node |
merge(Node elem,
Node superElem,
Map replacements)
|
void |
normalizeComponentContainer(ComponentContainer container)
|
ComponentContainer |
replaceComponents(ComponentContainer container,
Map replacements)
|
void |
resolveComponentContainer(List loaded,
ComponentContainer topLevelDefinition,
ComponentContainer container,
Map context)
|
Definition |
resolveDefinitions(List loaded,
String nameList,
Map context)
|
void |
setNameAttributes(String nameAttributes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComponentLoader
public ComponentLoader()
getNameAttributes
public String getNameAttributes()
- Specified by:
getNameAttributes
in interface ComponentLoaderAttributes
setNameAttributes
public void setNameAttributes(String nameAttributes)
- Specified by:
setNameAttributes
in interface ComponentLoaderAttributes
load
public Definition load(String name,
Map context)
throws ADLException
- Description copied from interface:
Loader
- Loads the ADL definition whose name is given.
- Specified by:
load
in interface Loader
- Parameters:
name
- the name of an ADL definition.context
- optional additional information.
- Returns:
- the ADL definition whose name is given.
- Throws:
ADLException
- if the definition cannot be found, or if it contains
errors.
load
public Definition load(List loaded,
String name,
Map context)
throws ADLException
- Throws:
ADLException
normalizeComponentContainer
public void normalizeComponentContainer(ComponentContainer container)
throws ADLException
- Throws:
ADLException
resolveComponentContainer
public void resolveComponentContainer(List loaded,
ComponentContainer topLevelDefinition,
ComponentContainer container,
Map context)
throws ADLException
- Throws:
ADLException
resolveDefinitions
public Definition resolveDefinitions(List loaded,
String nameList,
Map context)
throws ADLException
- Throws:
ADLException
getComponent
public Component getComponent(ComponentContainer container,
String name)
getPathComponent
public Component getPathComponent(ComponentContainer container,
String name)
replaceComponents
public ComponentContainer replaceComponents(ComponentContainer container,
Map replacements)
merge
public Node merge(Node elem,
Node superElem)
throws ADLException
- Throws:
ADLException
merge
public Node merge(Node elem,
Node superElem,
Map replacements)
throws ADLException
- Throws:
ADLException