org.objectweb.fractal.cecilia.primitive.thinkMC.source
Class SourceFileVisitor

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

public class SourceFileVisitor
extends AbstractTaskFactoryUser
implements ComponentVisitor

Visitor component that builds the source file containing the components' definition and instance code.


Nested Class Summary
protected static class SourceFileVisitor.AbstractSourceFileTask
           
static class SourceFileVisitor.ModuleSourceFileTask
          Builds the ".adl.c" source file that contains the definition of the component structure and the inclusion of a module of implementation.
static class SourceFileVisitor.SourceFileTask
          Builds the ".adl.c" source file that contains the definition of the component structure, the inclusion of the implementation file and the instantiation/initialization of the static instances.
 
Field Summary
 
Fields inherited from class org.objectweb.fractal.task.core.AbstractTaskFactoryUser
TASK_FACTORY_ITF_NAME, taskFactoryItf
 
Constructor Summary
SourceFileVisitor()
           
 
Method Summary
protected  org.objectweb.fractal.api.Component createModuleSourceFileTask(org.objectweb.fractal.adl.components.ComponentContainer container, Include include, java.lang.String moduleName, java.io.File adlBuildDirectory)
           
protected  org.objectweb.fractal.api.Component createSourceFileTask(org.objectweb.fractal.adl.components.ComponentContainer container, org.objectweb.fractal.adl.implementations.Implementation impl, java.io.File adlBuildDirectory)
           
 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 a ComponentContainer node and creates a task that creates the source file containing the components' definition and instance code.
 
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

SourceFileVisitor

public SourceFileVisitor()
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 container,
                                                 java.util.Map<java.lang.Object,java.lang.Object> context)
                                          throws org.objectweb.fractal.adl.ADLException,
                                                 TaskException
Visits a ComponentContainer node and creates a task that creates the source file containing the components' definition and instance code.

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.

createModuleSourceFileTask

protected org.objectweb.fractal.api.Component createModuleSourceFileTask(org.objectweb.fractal.adl.components.ComponentContainer container,
                                                                         Include include,
                                                                         java.lang.String moduleName,
                                                                         java.io.File adlBuildDirectory)
                                                                  throws TaskException
Throws:
TaskException

createSourceFileTask

protected org.objectweb.fractal.api.Component createSourceFileTask(org.objectweb.fractal.adl.components.ComponentContainer container,
                                                                   org.objectweb.fractal.adl.implementations.Implementation impl,
                                                                   java.io.File adlBuildDirectory)
                                                            throws TaskException
Throws:
TaskException


Copyright © 2007-2009 ObjectWeb Consortium. All Rights Reserved.