KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jeantessier > classreader > Visitor


1 /*
2  * Copyright (c) 2001-2005, Jean Tessier
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Jean Tessier nor the names of his contributors
17  * may be used to endorse or promote products derived from this software
18  * without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */

32
33 package com.jeantessier.classreader;
34
35 import java.util.*;
36
37 public interface Visitor {
38     // Classfile
39
public void visitClassfiles(Collection classfiles);
40     public void visitClassfile(Classfile classfile);
41
42     // ConstantPool entries
43
public void visitConstantPool(ConstantPool constantPool);
44     public void visitClass_info(Class_info entry);
45     public void visitFieldRef_info(FieldRef_info entry);
46     public void visitMethodRef_info(MethodRef_info entry);
47     public void visitInterfaceMethodRef_info(InterfaceMethodRef_info entry);
48     public void visitString_info(String_info entry);
49     public void visitInteger_info(Integer_info entry);
50     public void visitFloat_info(Float_info entry);
51     public void visitLong_info(Long_info entry);
52     public void visitDouble_info(Double_info entry);
53     public void visitNameAndType_info(NameAndType_info entry);
54     public void visitUTF8_info(UTF8_info entry);
55
56     // Features
57
public void visitField_info(Field_info entry);
58     public void visitMethod_info(Method_info entry);
59
60     // Attributes
61
public void visitConstantValue_attribute(ConstantValue_attribute attribute);
62     public void visitCode_attribute(Code_attribute attribute);
63     public void visitExceptions_attribute(Exceptions_attribute attribute);
64     public void visitInnerClasses_attribute(InnerClasses_attribute attribute);
65     public void visitSynthetic_attribute(Synthetic_attribute attribute);
66     public void visitSourceFile_attribute(SourceFile_attribute attribute);
67     public void visitLineNumberTable_attribute(LineNumberTable_attribute attribute);
68     public void visitLocalVariableTable_attribute(LocalVariableTable_attribute attribute);
69     public void visitDeprecated_attribute(Deprecated_attribute attribute);
70     public void visitCustom_attribute(Custom_attribute attribute);
71
72     // Attribute helpers
73
public void visitExceptionHandler(ExceptionHandler helper);
74     public void visitInnerClass(InnerClass helper);
75     public void visitLineNumber(LineNumber helper);
76     public void visitLocalVariable(LocalVariable helper);
77 }
78
Popular Tags