org.objectweb.fractal.cecilia.adl.attributes
Class AbstractAttributeVisitor
java.lang.Object
org.objectweb.fractal.task.core.AbstractTaskFactoryUser
org.objectweb.fractal.cecilia.adl.attributes.AbstractAttributeVisitor
- All Implemented Interfaces:
- ComponentVisitor, Visitor<org.objectweb.fractal.adl.components.ComponentContainer>, org.objectweb.fractal.api.control.BindingController
- Direct Known Subclasses:
- ACDefinitionVisitor, ACFactoryVisitor, ACInstantiationVisitor, AttributeDefinitionVisitor, AttributeInstantiationVisitor
public abstract class AbstractAttributeVisitor
- extends AbstractTaskFactoryUser
- implements ComponentVisitor
Abstract visitor component that creates a task that depends on the attributes
of the component (if any).
Method Summary |
protected abstract org.objectweb.fractal.api.Component |
createTask(org.objectweb.fractal.adl.components.ComponentContainer container,
org.objectweb.fractal.adl.attributes.Attributes attributes)
Creates the task that is returned by this visitor. |
org.objectweb.fractal.api.Component |
visit(java.util.List<org.objectweb.fractal.adl.Node> path,
org.objectweb.fractal.adl.components.ComponentContainer container,
java.util.Map<java.lang.Object,java.lang.Object> context)
Visits ComponentContainer nodes and call
createTask if the given
component contains an Attributes sub-nodes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAttributeVisitor
public AbstractAttributeVisitor()
createTask
protected abstract org.objectweb.fractal.api.Component createTask(org.objectweb.fractal.adl.components.ComponentContainer container,
org.objectweb.fractal.adl.attributes.Attributes attributes)
throws org.objectweb.fractal.adl.ADLException,
TaskException
- Creates the task that is returned by this visitor.
- Parameters:
container
- the component that is visited.attributes
- the Attributes
node of the component.
- Returns:
- the created task.
- Throws:
org.objectweb.fractal.api.factory.InstantiationException
- if the instantiation of the task fails.
org.objectweb.fractal.adl.ADLException
- if the instantiation of the task fails.
TaskException
visit
public org.objectweb.fractal.api.Component visit(java.util.List<org.objectweb.fractal.adl.Node> path,
org.objectweb.fractal.adl.components.ComponentContainer container,
java.util.Map<java.lang.Object,java.lang.Object> context)
throws org.objectweb.fractal.adl.ADLException,
TaskException
- Visits
ComponentContainer
nodes and call
createTask
if the given
component contains an Attributes
sub-nodes.
- Specified by:
visit
in interface Visitor<org.objectweb.fractal.adl.components.ComponentContainer>
- Parameters:
path
- a list containing all the parent nodes of the visited node
stating from the root of the AST.container
- the AST Node to be visited.context
- additional parameters.
- Returns:
- a task component that models the processing to be done on this
node.
- Throws:
ADLException
- if something wrong is found in the AST.
TaskException
- if something wrong happens during the instantiation
of the task component.
Copyright © 2007-2009 ObjectWeb Consortium. All Rights Reserved.