001: /*
002: * ProGuard -- shrinking, optimization, obfuscation, and preverification
003: * of Java bytecode.
004: *
005: * Copyright (c) 2002-2007 Eric Lafortune (eric@graphics.cornell.edu)
006: *
007: * This program is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU General Public License as published by the Free
009: * Software Foundation; either version 2 of the License, or (at your option)
010: * any later version.
011: *
012: * This program is distributed in the hope that it will be useful, but WITHOUT
013: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
014: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
015: * more details.
016: *
017: * You should have received a copy of the GNU General Public License along
018: * with this program; if not, write to the Free Software Foundation, Inc.,
019: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: */
021: package proguard.classfile.attribute.visitor;
022:
023: import proguard.classfile.*;
024: import proguard.classfile.attribute.*;
025: import proguard.classfile.attribute.annotation.*;
026: import proguard.classfile.attribute.preverification.*;
027:
028: /**
029: * This interface specifies the methods for a visitor of <code>Attribute</code>
030: * objects.
031: *
032: * @author Eric Lafortune
033: */
034: public interface AttributeVisitor {
035: // Attributes that are attached to classes.
036:
037: public void visitUnknownAttribute(Clazz clazz,
038: UnknownAttribute unknownAttribute);
039:
040: public void visitSourceFileAttribute(Clazz clazz,
041: SourceFileAttribute sourceFileAttribute);
042:
043: public void visitSourceDirAttribute(Clazz clazz,
044: SourceDirAttribute sourceDirAttribute);
045:
046: public void visitInnerClassesAttribute(Clazz clazz,
047: InnerClassesAttribute innerClassesAttribute);
048:
049: public void visitEnclosingMethodAttribute(Clazz clazz,
050: EnclosingMethodAttribute enclosingMethodAttribute);
051:
052: // Attributes that are attached to classes, fields, and methods.
053:
054: public void visitDeprecatedAttribute(Clazz clazz,
055: DeprecatedAttribute deprecatedAttribute);
056:
057: public void visitDeprecatedAttribute(Clazz clazz, Field field,
058: DeprecatedAttribute deprecatedAttribute);
059:
060: public void visitDeprecatedAttribute(Clazz clazz, Method method,
061: DeprecatedAttribute deprecatedAttribute);
062:
063: public void visitSyntheticAttribute(Clazz clazz,
064: SyntheticAttribute syntheticAttribute);
065:
066: public void visitSyntheticAttribute(Clazz clazz, Field field,
067: SyntheticAttribute syntheticAttribute);
068:
069: public void visitSyntheticAttribute(Clazz clazz, Method method,
070: SyntheticAttribute syntheticAttribute);
071:
072: public void visitSignatureAttribute(Clazz clazz,
073: SignatureAttribute signatureAttribute);
074:
075: public void visitSignatureAttribute(Clazz clazz, Field field,
076: SignatureAttribute signatureAttribute);
077:
078: public void visitSignatureAttribute(Clazz clazz, Method method,
079: SignatureAttribute signatureAttribute);
080:
081: // Attributes that are attached to fields.
082:
083: public void visitConstantValueAttribute(Clazz clazz, Field field,
084: ConstantValueAttribute constantValueAttribute);
085:
086: // Attributes that are attached to methods.
087:
088: public void visitExceptionsAttribute(Clazz clazz, Method method,
089: ExceptionsAttribute exceptionsAttribute);
090:
091: public void visitCodeAttribute(Clazz clazz, Method method,
092: CodeAttribute codeAttribute);
093:
094: // Attributes that are attached to code attributes.
095:
096: public void visitStackMapAttribute(Clazz clazz, Method method,
097: CodeAttribute codeAttribute,
098: StackMapAttribute stackMapAttribute);
099:
100: public void visitStackMapTableAttribute(Clazz clazz, Method method,
101: CodeAttribute codeAttribute,
102: StackMapTableAttribute stackMapTableAttribute);
103:
104: public void visitLineNumberTableAttribute(Clazz clazz,
105: Method method, CodeAttribute codeAttribute,
106: LineNumberTableAttribute lineNumberTableAttribute);
107:
108: public void visitLocalVariableTableAttribute(Clazz clazz,
109: Method method, CodeAttribute codeAttribute,
110: LocalVariableTableAttribute localVariableTableAttribute);
111:
112: public void visitLocalVariableTypeTableAttribute(
113: Clazz clazz,
114: Method method,
115: CodeAttribute codeAttribute,
116: LocalVariableTypeTableAttribute localVariableTypeTableAttribute);
117:
118: // Annotation attributes.
119:
120: public void visitRuntimeVisibleAnnotationsAttribute(
121: Clazz clazz,
122: RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute);
123:
124: public void visitRuntimeVisibleAnnotationsAttribute(
125: Clazz clazz,
126: Field field,
127: RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute);
128:
129: public void visitRuntimeVisibleAnnotationsAttribute(
130: Clazz clazz,
131: Method method,
132: RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute);
133:
134: public void visitRuntimeInvisibleAnnotationsAttribute(
135: Clazz clazz,
136: RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute);
137:
138: public void visitRuntimeInvisibleAnnotationsAttribute(
139: Clazz clazz,
140: Field field,
141: RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute);
142:
143: public void visitRuntimeInvisibleAnnotationsAttribute(
144: Clazz clazz,
145: Method method,
146: RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute);
147:
148: public void visitRuntimeVisibleParameterAnnotationsAttribute(
149: Clazz clazz,
150: Method method,
151: RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute);
152:
153: public void visitRuntimeInvisibleParameterAnnotationsAttribute(
154: Clazz clazz,
155: Method method,
156: RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute);
157:
158: public void visitAnnotationDefaultAttribute(Clazz clazz,
159: Method method,
160: AnnotationDefaultAttribute annotationDefaultAttribute);
161: }
|