org.objectweb.fractal.cecilia.adl.implementations
Class ImplementationVisitor

java.lang.Object
  extended by org.objectweb.fractal.task.core.AbstractTaskFactoryUser
      extended by org.objectweb.fractal.cecilia.adl.implementations.ImplementationVisitor
All Implemented Interfaces:
ComponentVisitor, Visitor<org.objectweb.fractal.adl.components.ComponentContainer>, org.objectweb.fractal.api.control.BindingController

public class ImplementationVisitor
extends AbstractTaskFactoryUser
implements ComponentVisitor

Visitor component that creates tasks that provides implementation source code of the visited component.


Nested Class Summary
static class ImplementationVisitor.ImplementationTask
          Provides implementation source file and a piece of code that includes it.
 class ImplementationVisitor.ModuleImplementationTask
          Provides implementation module source file and a piece of code that includes it.
 
Field Summary
 
Fields inherited from class org.objectweb.fractal.task.core.AbstractTaskFactoryUser
TASK_FACTORY_ITF_NAME, taskFactoryItf
 
Constructor Summary
ImplementationVisitor()
           
 
Method Summary
 org.objectweb.fractal.api.Component visit(java.util.List<org.objectweb.fractal.adl.Node> path, org.objectweb.fractal.adl.components.ComponentContainer node, java.util.Map<java.lang.Object,java.lang.Object> context)
          Visits ComponentContainer nodes and creates a provides implementation source code of the visited component.
 
Methods inherited from class org.objectweb.fractal.task.core.AbstractTaskFactoryUser
bindFc, listFc, lookupFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImplementationVisitor

public ImplementationVisitor()
Method Detail

visit

public org.objectweb.fractal.api.Component visit(java.util.List<org.objectweb.fractal.adl.Node> path,
                                                 org.objectweb.fractal.adl.components.ComponentContainer node,
                                                 java.util.Map<java.lang.Object,java.lang.Object> context)
                                          throws org.objectweb.fractal.adl.ADLException,
                                                 TaskException
Visits ComponentContainer nodes and creates a provides implementation source code of the visited component. More precisely, the returned task provides a SourceFileProvider interfaces and a SourceCodeProvider for each implementation file. The first interface provides the implementation file itself, the second one provide source code that includes it.

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.
node - 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.