View Javadoc

1   /***
2    * Cecilia ADL Compiler
3    * Copyright (C) 2006-2007 STMicroelectronics
4    *
5    * This library is free software; you can redistribute it and/or
6    * modify it under the terms of the GNU Lesser General Public
7    * License as published by the Free Software Foundation; either
8    * version 2 of the License, or (at your option) any later version.
9    *
10   * This library is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   * Lesser General Public License for more details.
14   *
15   * You should have received a copy of the GNU Lesser General Public
16   * License along with this library; if not, write to the Free Software
17   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18   *
19   * Contact: fractal@objectweb.org
20   *
21   * Author:Ali Erdem Ozcan
22   */
23  
24  package org.objectweb.fractal.cecilia.adl.idl;
25  
26  import org.objectweb.fractal.cecilia.adl.idl.ast.Field;
27  import org.objectweb.fractal.cecilia.adl.idl.ast.InterfaceDefinition;
28  import org.objectweb.fractal.cecilia.adl.idl.ast.Method;
29  
30  /**
31   * The meta builder interface for Interface writers.
32   */
33  public interface InterfaceVisitor extends IDLVisitor {
34  
35    /**
36     * Builds the header part for an given interface definition.
37     * 
38     * @param itf the interface definition for which has to be built.
39     * @throws Exception if any error occurs.
40     */
41    void enterInterface(InterfaceDefinition itf) throws Exception;
42  
43    /**
44     * Builds the footer part for an given interface definition.
45     * 
46     * @param itf the interface definition for which has to be built.
47     * @throws Exception if any error occurs.
48     */
49    void leaveInterface(InterfaceDefinition itf) throws Exception;
50  
51    /**
52     * Visits a method definition.
53     * 
54     * @param method the field definition to be used.
55     * @throws Exception if any error occurs.
56     */
57  
58    void visitMethod(Method method) throws Exception;
59  
60    /**
61     * Visits a field definition.
62     * 
63     * @param field the field definition to be used.
64     * @throws Exception if any error occurs.
65     */
66    void visitField(Field field) throws Exception;
67  
68  }