org.ow2.mind.AbstractVoidVisitorDispatcher Maven / Gradle / Ivy
/**
* Copyright (C) 2009 STMicroelectronics
*
* This file is part of "Mind Compiler" is free software: you can redistribute
* it and/or modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Contact: [email protected]
*
* Authors: Matthieu Leclercq
* Contributors:
*/
package org.ow2.mind;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.objectweb.fractal.adl.ADLException;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import org.objectweb.fractal.api.control.BindingController;
import org.objectweb.fractal.api.control.IllegalBindingException;
import org.objectweb.fractal.api.control.IllegalLifeCycleException;
public abstract class AbstractVoidVisitorDispatcher
implements
VoidVisitor,
BindingController {
/** The name of the {@link Compiler} client interface of this component. */
public static final String CLIENT_VISITOR = "client-visitor";
/** The builders client interfaces. */
// use a LinkedHashMap to ensure the iteration order which improves
// stability when debugging
public Map> visitorsItf = new LinkedHashMap>();
/**
* This method is used by {@link #bindFc(String, Object) bindFc} to cast the
* given serverItf
to a correct type. Sub-classes must implements
* this method to guaranty type safety.
*/
protected abstract VoidVisitor castVisitorInterface(Object serverItf);
// --------------------------------------------------------------------------
// Implementation of the Visitor interface
// --------------------------------------------------------------------------
public void visit(final I input, final Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy