1 /* FOREGEJ - FOrmatting REfactoring GEnerating Java
2 *
3 * Copyright (C) 2003 Andreas Arrgard
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.1 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 package com.octagroup.foregej.java.tools;
20 import com.octagroup.foregej.java.lang.ast.AST_CLASS_DEF;
21 import com.octagroup.foregej.java.lang.ast.AST_CTOR_DEF;
22 import com.octagroup.foregej.java.lang.ast.AST_INTERFACE_DEF;
23 import com.octagroup.foregej.java.lang.ast.AST_METHOD_DEF;
24 import com.octagroup.foregej.java.lang.ast.AST_VARIABLE_DEF;
25 import com.octagroup.foregej.java.lang.ast.CompilationUnit;
26 /***
27 * This is an interface for a tool.
28 * <p>
29 * A tool will receive notifications about a compilation unit, classes,
30 * interfaces and methods that are related to a tool.
31 * </p>
32 *
33 * <p>
34 * If the <code>ToolRunner</code>is driven by ant all the files in the
35 * fileset will be passed to this method.
36 * </p>
37 */
38 public interface Tool
39 {
40 /***
41 * The tool that implements this method must return true if the
42 * compilation unit should be processed any further.
43 *
44 * @param cu the compilation unit to process.
45 * @return true if processing should continue.
46 */
47 public boolean process(CompilationUnit cu);
48
49 /***
50 * Signals that we have discovered an interface.
51 *
52 * @param interfaze the interface to process.
53 * @return true if processing should continue.
54 */
55 public boolean process(AST_INTERFACE_DEF interfaze);
56
57 /***
58 * Signals that we have discovered a class.
59 *
60 * @param clazz the class to process.
61 * @return true if processing should continue.
62 */
63 public boolean process(AST_CLASS_DEF clazz);
64
65 /***
66 * Signals that we have discovered a method.
67 *
68 * @param method the method to process.
69 */
70 public void process(AST_METHOD_DEF method);
71
72 /***
73 * Signals that we have discovered a variable.
74 *
75 * @param variable the method to process.
76 */
77 public void process(AST_VARIABLE_DEF variable);
78
79 /***
80 * Signals that we have discovered a constructor.
81 *
82 * @param ctor the constructor to process.
83 */
84 public void process(AST_CTOR_DEF ctor);
85
86 }
This page was automatically generated by Maven