001: /* ====================================================================
002: * The JRefactory License, Version 1.0
003: *
004: * Copyright (c) 2001 JRefactory. All rights reserved.
005: *
006: * Redistribution and use in source and binary forms, with or without
007: * modification, are permitted provided that the following conditions
008: * are met:
009: *
010: * 1. Redistributions of source code must retain the above copyright
011: * notice, this list of conditions and the following disclaimer.
012: *
013: * 2. Redistributions in binary form must reproduce the above copyright
014: * notice, this list of conditions and the following disclaimer in
015: * the documentation and/or other materials provided with the
016: * distribution.
017: *
018: * 3. The end-user documentation included with the redistribution,
019: * if any, must include the following acknowledgment:
020: * "This product includes software developed by the
021: * JRefactory (http://www.sourceforge.org/projects/jrefactory)."
022: * Alternately, this acknowledgment may appear in the software itself,
023: * if and wherever such third-party acknowledgments normally appear.
024: *
025: * 4. The names "JRefactory" must not be used to endorse or promote
026: * products derived from this software without prior written
027: * permission. For written permission, please contact seguin@acm.org.
028: *
029: * 5. Products derived from this software may not be called "JRefactory",
030: * nor may "JRefactory" appear in their name, without prior written
031: * permission of Chris Seguin.
032: *
033: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
034: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
035: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
036: * DISCLAIMED. IN NO EVENT SHALL THE CHRIS SEGUIN OR
037: * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
038: * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
039: * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
040: * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
041: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
042: * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
043: * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
044: * SUCH DAMAGE.
045: * ====================================================================
046: *
047: * This software consists of voluntary contributions made by many
048: * individuals on behalf of JRefactory. For more information on
049: * JRefactory, please see
050: * <http://www.sourceforge.org/projects/jrefactory>.
051: */
052: package org.acm.seguin.summary;
053:
054: /**
055: * All items that want to visit a summary tree should implement this interface.
056: *
057: *@author Chris Seguin
058: *@created May 12, 1999
059: */
060: public interface SummaryVisitor {
061: /**
062: * Visit a summary node. This is the default method.
063: *
064: *@param node the summary that we are visiting
065: *@param data the data that was passed in
066: *@return the result
067: */
068: public Object visit(Summary node, Object data);
069:
070: /**
071: * Visit a package summary.
072: *
073: *@param node the summary that we are visiting
074: *@param data the data that was passed in
075: *@return the result
076: */
077: public Object visit(PackageSummary node, Object data);
078:
079: /**
080: * Visit a file summary.
081: *
082: *@param node the summary that we are visiting
083: *@param data the data that was passed in
084: *@return the result
085: */
086: public Object visit(FileSummary node, Object data);
087:
088: /**
089: * Visit a import summary.
090: *
091: *@param node the summary that we are visiting
092: *@param data the data that was passed in
093: *@return the result
094: */
095: public Object visit(ImportSummary node, Object data);
096:
097: /**
098: * Visit a type summary.
099: *
100: *@param node the summary that we are visiting
101: *@param data the data that was passed in
102: *@return the result
103: */
104: public Object visit(TypeSummary node, Object data);
105:
106: /**
107: * Visit a method summary.
108: *
109: *@param node the summary that we are visiting
110: *@param data the data that was passed in
111: *@return the result
112: */
113: public Object visit(MethodSummary node, Object data);
114:
115: /**
116: * Visit a field summary.
117: *
118: *@param node the summary that we are visiting
119: *@param data the data that was passed in
120: *@return the result
121: */
122: public Object visit(FieldSummary node, Object data);
123:
124: /**
125: * Visit a parameter summary.
126: *
127: *@param node the summary that we are visiting
128: *@param data the data that was passed in
129: *@return the result
130: */
131: public Object visit(ParameterSummary node, Object data);
132:
133: /**
134: * Visit a local variable summary.
135: *
136: *@param node the summary that we are visiting
137: *@param data the data that was passed in
138: *@return the result
139: */
140: public Object visit(LocalVariableSummary node, Object data);
141:
142: /**
143: * Visit a variable summary.
144: *
145: *@param node the summary that we are visiting
146: *@param data the data that was passed in
147: *@return the result
148: */
149: public Object visit(VariableSummary node, Object data);
150:
151: /**
152: * Visit a type declaration summary.
153: *
154: *@param node the summary that we are visiting
155: *@param data the data that was passed in
156: *@return the result
157: */
158: public Object visit(TypeDeclSummary node, Object data);
159:
160: /**
161: * Visit a message send summary.
162: *
163: *@param node the summary that we are visiting
164: *@param data the data that was passed in
165: *@return the result
166: */
167: public Object visit(MessageSendSummary node, Object data);
168:
169: /**
170: * Visit a field access summary.
171: *
172: *@param node the summary that we are visiting
173: *@param data the data that was passed in
174: *@return the result
175: */
176: public Object visit(FieldAccessSummary node, Object data);
177: }
|