org.objectweb.fractal.cecilia.adl.components
Class VisitorSelectorForPrimitiveOrComposite

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

public class VisitorSelectorForPrimitiveOrComposite
extends java.lang.Object
implements ComponentVisitor, org.objectweb.fractal.api.control.BindingController

This visitor component has two client interfaces, the first one is used to delegate the visit operation for primitive components, the other one is used to delegate the visit operation for composite components.


Field Summary
static java.lang.String COMPOSITE_COMPONENT_ITF
          The name of the ComponentVisitor client interface used for composite components.
protected  ComponentVisitor compositeComponentItf
          The ComponentVisitor client interface used for composite component.
static java.lang.String PRIMITIVE_COMPONENT_ITF
          The name of the ComponentVisitor client interface used for primitive components.
protected  ComponentVisitor primitiveComponentItf
          The ComponentVisitor client interface used for primitive component.
 
Constructor Summary
VisitorSelectorForPrimitiveOrComposite()
           
 
Method Summary
 void bindFc(java.lang.String s, java.lang.Object o)
           
 java.lang.String[] listFc()
           
 java.lang.Object lookupFc(java.lang.String s)
           
 void unbindFc(java.lang.String s)
           
 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 an AST node and creates a component task that models the processing to be done on this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIMITIVE_COMPONENT_ITF

public static final java.lang.String PRIMITIVE_COMPONENT_ITF
The name of the ComponentVisitor client interface used for primitive components.

See Also:
Constant Field Values

COMPOSITE_COMPONENT_ITF

public static final java.lang.String COMPOSITE_COMPONENT_ITF
The name of the ComponentVisitor client interface used for composite components.

See Also:
Constant Field Values

primitiveComponentItf

protected ComponentVisitor primitiveComponentItf
The ComponentVisitor client interface used for primitive component.


compositeComponentItf

protected ComponentVisitor compositeComponentItf
The ComponentVisitor client interface used for composite component.

Constructor Detail

VisitorSelectorForPrimitiveOrComposite

public VisitorSelectorForPrimitiveOrComposite()
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
Description copied from interface: Visitor
Visits an AST node and creates a component task that models the processing to be done on this node.

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.

bindFc

public void bindFc(java.lang.String s,
                   java.lang.Object o)
            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
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalBindingException
org.objectweb.fractal.api.control.IllegalLifeCycleException

listFc

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

lookupFc

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

unbindFc

public void unbindFc(java.lang.String s)
              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
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.