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

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

public class CompilationVisitor
extends AbstractTaskFactoryUser
implements ComponentVisitor


Nested Class Summary
static class CompilationVisitor.AssemblyFileProvider
          A SourceFileProvider task that provides SourceFile for component module written in assembly code.
static class CompilationVisitor.FileProviderAggregatorTask
          Aggregate files provided by a set of FileProvider client into a collection provided by the FileCollectionProvider server interface of this task.
 
Field Summary
static java.lang.String COMPILATION_COMPOSITION
          The name of the task composition schema used by this visitor.
static java.lang.String COMPILATION_TASK_FACTORY_ITF_NAME
          The name of the compilationTaskFactoryItf client interface.
 CompilationTaskFactory compilationTaskFactoryItf
          The client interface used to create compilation tasks.
 
Fields inherited from class org.objectweb.fractal.task.core.AbstractTaskFactoryUser
TASK_FACTORY_ITF_NAME, taskFactoryItf
 
Constructor Summary
CompilationVisitor()
           
 
Method Summary
 void bindFc(java.lang.String clientItfName, java.lang.Object serverItf)
           
protected  org.objectweb.fractal.api.Component createArchiveTask(org.objectweb.fractal.adl.components.ComponentContainer container, java.util.List<java.lang.String> cFlag, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  org.objectweb.fractal.api.Component createAssemblyFileProvider(org.objectweb.fractal.adl.components.ComponentContainer container, Include include, SourceFile code)
           
protected  org.objectweb.fractal.api.Component createCompilationComposition(org.objectweb.fractal.adl.components.ComponentContainer container, java.util.Collection<org.objectweb.fractal.api.Component> tasks, boolean archiveOutput, boolean doLink)
           
protected  org.objectweb.fractal.api.Component createComponentCompilationTask(org.objectweb.fractal.adl.components.ComponentContainer container, java.util.List<java.lang.String> cFlag, java.util.Map<java.lang.Object,java.lang.Object> context)
           
protected  org.objectweb.fractal.api.Component createFileProviderAggregatorTask(org.objectweb.fractal.adl.components.ComponentContainer container)
           
protected  org.objectweb.fractal.api.Component createModuleCompilationTask(Include include, java.util.List<java.lang.String> cFlag, java.util.Map<java.lang.Object,java.lang.Object> context)
           
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String clientItfName)
           
 void unbindFc(java.lang.String clientItfName)
           
 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 creates a compilation tasks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPILATION_COMPOSITION

public static final java.lang.String COMPILATION_COMPOSITION
The name of the task composition schema used by this visitor.

See Also:
Constant Field Values

COMPILATION_TASK_FACTORY_ITF_NAME

public static final java.lang.String COMPILATION_TASK_FACTORY_ITF_NAME
The name of the compilationTaskFactoryItf client interface.

See Also:
Constant Field Values

compilationTaskFactoryItf

public CompilationTaskFactory compilationTaskFactoryItf
The client interface used to create compilation tasks.

Constructor Detail

CompilationVisitor

public CompilationVisitor()
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 ComponentContainer nodes and creates a compilation tasks.

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.

createFileProviderAggregatorTask

protected org.objectweb.fractal.api.Component createFileProviderAggregatorTask(org.objectweb.fractal.adl.components.ComponentContainer container)
                                                                        throws TaskException
Throws:
TaskException

createModuleCompilationTask

protected org.objectweb.fractal.api.Component createModuleCompilationTask(Include include,
                                                                          java.util.List<java.lang.String> cFlag,
                                                                          java.util.Map<java.lang.Object,java.lang.Object> context)
                                                                   throws TaskException
Throws:
TaskException

createComponentCompilationTask

protected org.objectweb.fractal.api.Component createComponentCompilationTask(org.objectweb.fractal.adl.components.ComponentContainer container,
                                                                             java.util.List<java.lang.String> cFlag,
                                                                             java.util.Map<java.lang.Object,java.lang.Object> context)
                                                                      throws TaskException
Throws:
TaskException

createAssemblyFileProvider

protected org.objectweb.fractal.api.Component createAssemblyFileProvider(org.objectweb.fractal.adl.components.ComponentContainer container,
                                                                         Include include,
                                                                         SourceFile code)
                                                                  throws TaskException
Throws:
TaskException

createArchiveTask

protected org.objectweb.fractal.api.Component createArchiveTask(org.objectweb.fractal.adl.components.ComponentContainer container,
                                                                java.util.List<java.lang.String> cFlag,
                                                                java.util.Map<java.lang.Object,java.lang.Object> context)
                                                         throws TaskException
Throws:
TaskException

createCompilationComposition

protected org.objectweb.fractal.api.Component createCompilationComposition(org.objectweb.fractal.adl.components.ComponentContainer container,
                                                                           java.util.Collection<org.objectweb.fractal.api.Component> tasks,
                                                                           boolean archiveOutput,
                                                                           boolean doLink)
                                                                    throws TaskException
Throws:
TaskException

listFc

public java.lang.String[] listFc()
Specified by:
listFc in interface org.objectweb.fractal.api.control.BindingController
Overrides:
listFc in class AbstractTaskFactoryUser

bindFc

public void bindFc(java.lang.String clientItfName,
                   java.lang.Object serverItf)
            throws org.objectweb.fractal.api.NoSuchInterfaceException,
                   org.objectweb.fractal.api.control.IllegalBindingException,
                   org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
bindFc in interface org.objectweb.fractal.api.control.BindingController
Overrides:
bindFc in class AbstractTaskFactoryUser
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

lookupFc

public java.lang.Object lookupFc(java.lang.String clientItfName)
                          throws org.objectweb.fractal.api.NoSuchInterfaceException
Specified by:
lookupFc in interface org.objectweb.fractal.api.control.BindingController
Overrides:
lookupFc in class AbstractTaskFactoryUser
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException

unbindFc

public void unbindFc(java.lang.String clientItfName)
              throws org.objectweb.fractal.api.NoSuchInterfaceException,
                     org.objectweb.fractal.api.control.IllegalBindingException,
                     org.objectweb.fractal.api.control.IllegalLifeCycleException
Specified by:
unbindFc in interface org.objectweb.fractal.api.control.BindingController
Overrides:
unbindFc in class AbstractTaskFactoryUser
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException


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