summaryrefslogtreecommitdiff
path: root/src/proguard/classfile/attribute/annotation
diff options
context:
space:
mode:
Diffstat (limited to 'src/proguard/classfile/attribute/annotation')
-rw-r--r--src/proguard/classfile/attribute/annotation/Annotation.java143
-rw-r--r--src/proguard/classfile/attribute/annotation/AnnotationDefaultAttribute.java73
-rw-r--r--src/proguard/classfile/attribute/annotation/AnnotationElementValue.java76
-rw-r--r--src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java114
-rw-r--r--src/proguard/classfile/attribute/annotation/ArrayElementValue.java82
-rw-r--r--src/proguard/classfile/attribute/annotation/ClassElementValue.java104
-rw-r--r--src/proguard/classfile/attribute/annotation/ConstantElementValue.java71
-rw-r--r--src/proguard/classfile/attribute/annotation/ElementValue.java126
-rw-r--r--src/proguard/classfile/attribute/annotation/EnumConstantElementValue.java138
-rw-r--r--src/proguard/classfile/attribute/annotation/ParameterAnnotationsAttribute.java83
-rw-r--r--src/proguard/classfile/attribute/annotation/RuntimeInvisibleAnnotationsAttribute.java70
-rw-r--r--src/proguard/classfile/attribute/annotation/RuntimeInvisibleParameterAnnotationsAttribute.java62
-rw-r--r--src/proguard/classfile/attribute/annotation/RuntimeInvisibleTypeAnnotationsAttribute.java77
-rw-r--r--src/proguard/classfile/attribute/annotation/RuntimeVisibleAnnotationsAttribute.java70
-rw-r--r--src/proguard/classfile/attribute/annotation/RuntimeVisibleParameterAnnotationsAttribute.java62
-rw-r--r--src/proguard/classfile/attribute/annotation/RuntimeVisibleTypeAnnotationsAttribute.java77
-rw-r--r--src/proguard/classfile/attribute/annotation/TypeAnnotation.java162
-rw-r--r--src/proguard/classfile/attribute/annotation/TypeAnnotationsAttribute.java98
-rw-r--r--src/proguard/classfile/attribute/annotation/TypePathInfo.java50
-rw-r--r--src/proguard/classfile/attribute/annotation/package.html4
-rw-r--r--src/proguard/classfile/attribute/annotation/target/CatchTargetInfo.java82
-rw-r--r--src/proguard/classfile/attribute/annotation/target/EmptyTargetInfo.java72
-rw-r--r--src/proguard/classfile/attribute/annotation/target/FormalParameterTargetInfo.java81
-rw-r--r--src/proguard/classfile/attribute/annotation/target/LocalVariableTargetElement.java53
-rw-r--r--src/proguard/classfile/attribute/annotation/target/LocalVariableTargetInfo.java99
-rw-r--r--src/proguard/classfile/attribute/annotation/target/OffsetTargetInfo.java82
-rw-r--r--src/proguard/classfile/attribute/annotation/target/SuperTypeTargetInfo.java72
-rw-r--r--src/proguard/classfile/attribute/annotation/target/TargetInfo.java97
-rw-r--r--src/proguard/classfile/attribute/annotation/target/ThrowsTargetInfo.java81
-rw-r--r--src/proguard/classfile/attribute/annotation/target/TypeArgumentTargetInfo.java85
-rw-r--r--src/proguard/classfile/attribute/annotation/target/TypeParameterBoundTargetInfo.java87
-rw-r--r--src/proguard/classfile/attribute/annotation/target/TypeParameterTargetInfo.java79
-rw-r--r--src/proguard/classfile/attribute/annotation/target/visitor/LocalVariableTargetElementVisitor.java37
-rw-r--r--src/proguard/classfile/attribute/annotation/target/visitor/TargetInfoVisitor.java50
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/AllAnnotationVisitor.java161
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/AllElementValueVisitor.java206
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/AnnotatedClassVisitor.java62
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/AnnotationToMemberVisitor.java62
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/AnnotationTypeFilter.java110
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/AnnotationVisitor.java42
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/ElementValueVisitor.java51
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/TypeAnnotationVisitor.java41
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/TypePathInfoVisitor.java41
-rw-r--r--src/proguard/classfile/attribute/annotation/visitor/package.html3
44 files changed, 0 insertions, 3578 deletions
diff --git a/src/proguard/classfile/attribute/annotation/Annotation.java b/src/proguard/classfile/attribute/annotation/Annotation.java
deleted file mode 100644
index 3e24a9e..0000000
--- a/src/proguard/classfile/attribute/annotation/Annotation.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.visitor.ElementValueVisitor;
-import proguard.classfile.visitor.ClassVisitor;
-
-/**
- * Representation of an annotation.
- *
- * @author Eric Lafortune
- */
-public class Annotation implements VisitorAccepter
-{
- public int u2typeIndex;
- public int u2elementValuesCount;
- public ElementValue[] elementValues;
-
- /**
- * An extra field pointing to the Clazz objects referenced in the
- * type string. This field is typically filled out by the <code>{@link
- * proguard.classfile.util.ClassReferenceInitializer
- * ClassReferenceInitializer}</code>.
- * References to primitive types are ignored.
- */
- public Clazz[] referencedClasses;
-
- /**
- * An extra field in which visitors can store information.
- */
- public Object visitorInfo;
-
-
- /**
- * Creates an uninitialized Annotation.
- */
- public Annotation()
- {
- }
-
-
- /**
- * Creates an initialized Annotation.
- */
- public Annotation(int u2typeIndex,
- int u2elementValuesCount,
- ElementValue[] elementValues)
- {
- this.u2typeIndex = u2typeIndex;
- this.u2elementValuesCount = u2elementValuesCount;
- this.elementValues = elementValues;
- }
-
-
- /**
- * Returns the type.
- */
- public String getType(Clazz clazz)
- {
- return clazz.getString(u2typeIndex);
- }
-
-
-
- /**
- * Applies the given visitor to the first referenced class. This is the
- * main annotation class.
- */
- public void referencedClassAccept(ClassVisitor classVisitor)
- {
- if (referencedClasses != null)
- {
- Clazz referencedClass = referencedClasses[0];
- if (referencedClass != null)
- {
- referencedClass.accept(classVisitor);
- }
- }
- }
-
-
- /**
- * Applies the given visitor to all referenced classes.
- */
- public void referencedClassesAccept(ClassVisitor classVisitor)
- {
- if (referencedClasses != null)
- {
- for (int index = 0; index < referencedClasses.length; index++)
- {
- Clazz referencedClass = referencedClasses[index];
- if (referencedClass != null)
- {
- referencedClass.accept(classVisitor);
- }
- }
- }
- }
-
-
- /**
- * Applies the given visitor to all element value pairs.
- */
- public void elementValuesAccept(Clazz clazz, ElementValueVisitor elementValueVisitor)
- {
- for (int index = 0; index < u2elementValuesCount; index++)
- {
- elementValues[index].accept(clazz, this, elementValueVisitor);
- }
- }
-
-
- // Implementations for VisitorAccepter.
-
- public Object getVisitorInfo()
- {
- return visitorInfo;
- }
-
- public void setVisitorInfo(Object visitorInfo)
- {
- this.visitorInfo = visitorInfo;
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/AnnotationDefaultAttribute.java b/src/proguard/classfile/attribute/annotation/AnnotationDefaultAttribute.java
deleted file mode 100644
index 1b06e82..0000000
--- a/src/proguard/classfile/attribute/annotation/AnnotationDefaultAttribute.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.Attribute;
-import proguard.classfile.attribute.annotation.visitor.ElementValueVisitor;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-
-/**
- * This Attribute represents an annotation default attribute.
- *
- * @author Eric Lafortune
- */
-public class AnnotationDefaultAttribute extends Attribute
-{
- public ElementValue defaultValue;
-
-
- /**
- * Creates an uninitialized AnnotationDefaultAttribute.
- */
- public AnnotationDefaultAttribute()
- {
- }
-
-
- /**
- * Creates an initialized AnnotationDefaultAttribute.
- */
- public AnnotationDefaultAttribute(int u2attributeNameIndex,
- ElementValue defaultValue)
- {
- super(u2attributeNameIndex);
-
- this.defaultValue = defaultValue;
- }
-
-
- /**
- * Applies the given visitor to the default element value.
- */
- public void defaultValueAccept(Clazz clazz, ElementValueVisitor elementValueVisitor)
- {
- defaultValue.accept(clazz, null, elementValueVisitor);
- }
-
-
- // Implementations for Attribute.
-
- public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitAnnotationDefaultAttribute(clazz, method, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/AnnotationElementValue.java b/src/proguard/classfile/attribute/annotation/AnnotationElementValue.java
deleted file mode 100644
index 1e6365c..0000000
--- a/src/proguard/classfile/attribute/annotation/AnnotationElementValue.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.visitor.*;
-
-/**
- * This ElementValue represents an annotation element value.
- *
- * @author Eric Lafortune
- */
-public class AnnotationElementValue extends ElementValue
-{
- public Annotation annotationValue;
-
-
- /**
- * Creates an uninitialized AnnotationElementValue.
- */
- public AnnotationElementValue()
- {
- }
-
-
- /**
- * Creates an initialized AnnotationElementValue.
- */
- public AnnotationElementValue(int u2elementNameIndex,
- Annotation annotationValue)
- {
- super(u2elementNameIndex);
-
- this.annotationValue = annotationValue;
- }
-
-
- /**
- * Applies the given visitor to the annotation.
- */
- public void annotationAccept(Clazz clazz, AnnotationVisitor annotationVisitor)
- {
- annotationVisitor.visitAnnotation(clazz, annotationValue);
- }
-
-
- // Implementations for ElementValue.
-
- public char getTag()
- {
- return ClassConstants.ELEMENT_VALUE_ANNOTATION;
- }
-
- public void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
- {
- elementValueVisitor.visitAnnotationElementValue(clazz, annotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java
deleted file mode 100644
index dcb7cf6..0000000
--- a/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.*;
-import proguard.classfile.attribute.annotation.visitor.AnnotationVisitor;
-
-/**
- * This Attribute represents an annotations attribute.
- *
- * @author Eric Lafortune
- */
-public abstract class AnnotationsAttribute extends Attribute
-{
- public int u2annotationsCount;
- public Annotation[] annotations;
-
-
- /**
- * Creates an uninitialized AnnotationsAttribute.
- */
- protected AnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized AnnotationsAttribute.
- */
- protected AnnotationsAttribute(int u2attributeNameIndex,
- int u2annotationsCount,
- Annotation[] annotations)
- {
- super(u2attributeNameIndex);
-
- this.u2annotationsCount = u2annotationsCount;
- this.annotations = annotations;
- }
-
-
- /**
- * Applies the given visitor to all class annotations.
- */
- public void annotationsAccept(Clazz clazz, AnnotationVisitor annotationVisitor)
- {
- for (int index = 0; index < u2annotationsCount; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of Annotation.
- annotationVisitor.visitAnnotation(clazz, annotations[index]);
- }
- }
-
-
- /**
- * Applies the given visitor to all field annotations.
- */
- public void annotationsAccept(Clazz clazz, Field field, AnnotationVisitor annotationVisitor)
- {
- for (int index = 0; index < u2annotationsCount; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of Annotation.
- annotationVisitor.visitAnnotation(clazz, field, annotations[index]);
- }
- }
-
-
- /**
- * Applies the given visitor to all method annotations.
- */
- public void annotationsAccept(Clazz clazz, Method method, AnnotationVisitor annotationVisitor)
- {
- for (int index = 0; index < u2annotationsCount; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of Annotation.
- annotationVisitor.visitAnnotation(clazz, method, annotations[index]);
- }
- }
-
-
- /**
- * Applies the given visitor to all code attribute annotations.
- */
- public void annotationsAccept(Clazz clazz, Method method, CodeAttribute codeAttribute, AnnotationVisitor annotationVisitor)
- {
- for (int index = 0; index < u2annotationsCount; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of Annotation.
- annotationVisitor.visitAnnotation(clazz, method, codeAttribute, annotations[index]);
- }
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/ArrayElementValue.java b/src/proguard/classfile/attribute/annotation/ArrayElementValue.java
deleted file mode 100644
index 4d814c0..0000000
--- a/src/proguard/classfile/attribute/annotation/ArrayElementValue.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.visitor.ElementValueVisitor;
-
-/**
- * This ElementValue represents an array element value.
- *
- * @author Eric Lafortune
- */
-public class ArrayElementValue extends ElementValue
-{
- public int u2elementValuesCount;
- public ElementValue[] elementValues;
-
-
- /**
- * Creates an uninitialized ArrayElementValue.
- */
- public ArrayElementValue()
- {
- }
-
-
- /**
- * Creates an initialized ArrayElementValue.
- */
- public ArrayElementValue(int u2elementNameIndex,
- int u2elementValuesCount,
- ElementValue[] elementValues)
- {
- super(u2elementNameIndex);
-
- this.u2elementValuesCount = u2elementValuesCount;
- this.elementValues = elementValues;
- }
-
-
- // Implementations for ElementValue.
-
- public char getTag()
- {
- return ClassConstants.ELEMENT_VALUE_ARRAY;
- }
-
- public void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
- {
- elementValueVisitor.visitArrayElementValue(clazz, annotation, this);
- }
-
-
- /**
- * Applies the given visitor to all nested element values.
- */
- public void elementValuesAccept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
- {
- for (int index = 0; index < u2elementValuesCount; index++)
- {
- elementValues[index].accept(clazz, annotation, elementValueVisitor);
- }
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/ClassElementValue.java b/src/proguard/classfile/attribute/annotation/ClassElementValue.java
deleted file mode 100644
index 0e5de1e..0000000
--- a/src/proguard/classfile/attribute/annotation/ClassElementValue.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.visitor.ElementValueVisitor;
-import proguard.classfile.visitor.ClassVisitor;
-
-/**
- * This ElementValue represents a class element value.
- *
- * @author Eric Lafortune
- */
-public class ClassElementValue extends ElementValue
-{
- public int u2classInfoIndex;
-
- /**
- * An extra field pointing to the Clazz objects referenced in the
- * type name string. This field is filled out by the <code>{@link
- * proguard.classfile.util.ClassReferenceInitializer ClassReferenceInitializer}</code>.
- * References to primitive types are ignored.
- */
- public Clazz[] referencedClasses;
-
-
- /**
- * Creates an uninitialized ClassElementValue.
- */
- public ClassElementValue()
- {
- }
-
-
- /**
- * Creates an initialized ClassElementValue.
- */
- public ClassElementValue(int u2elementNameIndex,
- int u2classInfoIndex)
- {
- super(u2elementNameIndex);
-
- this.u2classInfoIndex = u2classInfoIndex;
- }
-
-
- /**
- * Returns the class info name.
- */
- public String getClassName(Clazz clazz)
- {
- return clazz.getString(u2classInfoIndex);
- }
-
-
- /**
- * Applies the given visitor to all referenced classes.
- */
- public void referencedClassesAccept(ClassVisitor classVisitor)
- {
- if (referencedClasses != null)
- {
- for (int index = 0; index < referencedClasses.length; index++)
- {
- Clazz referencedClass = referencedClasses[index];
- if (referencedClass != null)
- {
- referencedClass.accept(classVisitor);
- }
- }
- }
- }
-
-
- // Implementations for ElementValue.
-
- public char getTag()
- {
- return ClassConstants.ELEMENT_VALUE_CLASS;
- }
-
- public void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
- {
- elementValueVisitor.visitClassElementValue(clazz, annotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/ConstantElementValue.java b/src/proguard/classfile/attribute/annotation/ConstantElementValue.java
deleted file mode 100644
index 5ff51db..0000000
--- a/src/proguard/classfile/attribute/annotation/ConstantElementValue.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.Clazz;
-import proguard.classfile.attribute.annotation.visitor.ElementValueVisitor;
-
-/**
- * This ElementValue represents a constant element value.
- *
- * @author Eric Lafortune
- */
-public class ConstantElementValue extends ElementValue
-{
- public final char u1tag;
- public int u2constantValueIndex;
-
-
- /**
- * Creates an uninitialized ConstantElementValue.
- */
- public ConstantElementValue(char u1tag)
- {
- this.u1tag = u1tag;
- }
-
-
- /**
- * Creates an initialized ConstantElementValue.
- */
- public ConstantElementValue(char u1tag,
- int u2elementNameIndex,
- int u2constantValueIndex)
- {
- super(u2elementNameIndex);
-
- this.u1tag = u1tag;
- this.u2constantValueIndex = u2constantValueIndex;
- }
-
-
- // Implementations for ElementValue.
-
- public char getTag()
- {
- return u1tag;
- }
-
- public void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
- {
- elementValueVisitor.visitConstantElementValue(clazz, annotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/ElementValue.java b/src/proguard/classfile/attribute/annotation/ElementValue.java
deleted file mode 100644
index 9c0f2c9..0000000
--- a/src/proguard/classfile/attribute/annotation/ElementValue.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.visitor.ElementValueVisitor;
-import proguard.classfile.visitor.MemberVisitor;
-
-/**
- * This abstract class represents an element value that is attached to an
- * annotation or an annotation default. Specific types of element values are
- * subclassed from it.
- *
- * @author Eric Lafortune
- */
-public abstract class ElementValue implements VisitorAccepter
-{
- /**
- * An extra field for the optional element name. It is used in element value
- * pairs of annotations. Otherwise, it is 0.
- */
- public int u2elementNameIndex;
-
- /**
- * An extra field pointing to the referenced <code>Clazz</code>
- * object, if applicable. This field is typically filled out by the
- * <code>{@link proguard.classfile.util.ClassReferenceInitializer}</code>.
- */
- public Clazz referencedClass;
-
- /**
- * An extra field pointing to the referenced <code>Method</code>
- * object, if applicable. This field is typically filled out by the
- * <code>{@link proguard.classfile.util.ClassReferenceInitializer}</code>.
- */
- public Method referencedMethod;
-
- /**
- * An extra field in which visitors can store information.
- */
- public Object visitorInfo;
-
-
- /**
- * Creates an uninitialized ElementValue.
- */
- protected ElementValue()
- {
- }
-
-
- /**
- * Creates an initialized ElementValue.
- */
- protected ElementValue(int u2elementNameIndex)
- {
- this.u2elementNameIndex = u2elementNameIndex;
- }
-
-
- /**
- * Returns the element name.
- */
- public String getMethodName(Clazz clazz)
- {
- return clazz.getString(u2elementNameIndex);
- }
-
-
- // Abstract methods to be implemented by extensions.
-
- /**
- * Returns the tag of this element value.
- */
- public abstract char getTag();
-
-
- /**
- * Accepts the given visitor.
- */
- public abstract void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor);
-
-
-
- /**
- * Applies the given visitor to the referenced method.
- */
- public void referencedMethodAccept(MemberVisitor memberVisitor)
- {
- if (referencedMethod != null)
- {
- referencedMethod.accept(referencedClass, memberVisitor);
- }
- }
-
-
- // Implementations for VisitorAccepter.
-
- public Object getVisitorInfo()
- {
- return visitorInfo;
- }
-
- public void setVisitorInfo(Object visitorInfo)
- {
- this.visitorInfo = visitorInfo;
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/EnumConstantElementValue.java b/src/proguard/classfile/attribute/annotation/EnumConstantElementValue.java
deleted file mode 100644
index 1105100..0000000
--- a/src/proguard/classfile/attribute/annotation/EnumConstantElementValue.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.visitor.ElementValueVisitor;
-import proguard.classfile.visitor.*;
-
-/**
- * This ElementValue represents an enumeration constant element value.
- *
- * @author Eric Lafortune
- */
-public class EnumConstantElementValue extends ElementValue
-{
- public int u2typeNameIndex;
- public int u2constantNameIndex;
-
- /**
- * An extra field pointing to the Clazz objects referenced in the
- * type name string. This field is typically filled out by the <code>{@link
- * proguard.classfile.util.ClassReferenceInitializer
- * ClassReferenceInitializer}</code>.
- * References to primitive types are ignored.
- */
- public Clazz[] referencedClasses;
-
- /**
- * An extra field optionally pointing to the referenced enum Field object.
- * This field is typically filled out by the <code>{@link
- * proguard.classfile.util.ClassReferenceInitializer
- * ClassReferenceInitializer}</code>.
- */
- public Field referencedField;
-
-
- /**
- * Creates an uninitialized EnumConstantElementValue.
- */
- public EnumConstantElementValue()
- {
- }
-
-
- /**
- * Creates an initialized EnumConstantElementValue.
- */
- public EnumConstantElementValue(int u2elementNameIndex,
- int u2typeNameIndex,
- int u2constantNameIndex)
- {
- super(u2elementNameIndex);
-
- this.u2typeNameIndex = u2typeNameIndex;
- this.u2constantNameIndex = u2constantNameIndex;
- }
-
-
- /**
- * Returns the enumeration type name.
- */
- public String getTypeName(Clazz clazz)
- {
- return clazz.getString(u2typeNameIndex);
- }
-
-
- /**
- * Returns the constant name.
- */
- public String getConstantName(Clazz clazz)
- {
- return clazz.getString(u2constantNameIndex);
- }
-
-
- /**
- * Applies the given visitor to all referenced classes.
- */
- public void referencedClassesAccept(ClassVisitor classVisitor)
- {
- if (referencedClasses != null)
- {
- for (int index = 0; index < referencedClasses.length; index++)
- {
- Clazz referencedClass = referencedClasses[index];
- if (referencedClass != null)
- {
- referencedClass.accept(classVisitor);
- }
- }
- }
- }
-
-
- /**
- * Applies the given visitor to the referenced field.
- */
- public void referencedFieldAccept(MemberVisitor memberVisitor)
- {
- if (referencedField != null)
- {
- referencedField.accept(referencedClasses[0],
- memberVisitor);
- }
- }
-
-
- // Implementations for ElementValue.
-
- public char getTag()
- {
- return ClassConstants.ELEMENT_VALUE_ENUM_CONSTANT;
- }
-
- public void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
- {
- elementValueVisitor.visitEnumConstantElementValue(clazz, annotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/ParameterAnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/ParameterAnnotationsAttribute.java
deleted file mode 100644
index 4b0cb1c..0000000
--- a/src/proguard/classfile/attribute/annotation/ParameterAnnotationsAttribute.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.Attribute;
-import proguard.classfile.attribute.annotation.visitor.AnnotationVisitor;
-
-/**
- * This Attribute represents a parameter annotations attribute.
- *
- * @author Eric Lafortune
- */
-public abstract class ParameterAnnotationsAttribute extends Attribute
-{
- public int u1parametersCount;
- public int[] u2parameterAnnotationsCount;
- public Annotation[][] parameterAnnotations;
-
-
- /**
- * Creates an uninitialized ParameterAnnotationsAttribute.
- */
- protected ParameterAnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized ParameterAnnotationsAttribute.
- */
- protected ParameterAnnotationsAttribute(int u2attributeNameIndex,
- int u1parametersCount,
- int[] u2parameterAnnotationsCount,
- Annotation[][] parameterAnnotations)
- {
- super(u2attributeNameIndex);
-
- this.u1parametersCount = u1parametersCount;
- this.u2parameterAnnotationsCount = u2parameterAnnotationsCount;
- this.parameterAnnotations = parameterAnnotations;
- }
-
-
- /**
- * Applies the given visitor to all annotations.
- */
- public void annotationsAccept(Clazz clazz, Method method, AnnotationVisitor annotationVisitor)
- {
- // Loop over all parameters.
- for (int parameterIndex = 0; parameterIndex < u1parametersCount; parameterIndex++)
- {
- int annotationsCount = u2parameterAnnotationsCount[parameterIndex];
- Annotation[] annotations = parameterAnnotations[parameterIndex];
-
- // Loop over all parameter annotations.
- for (int index = 0; index < annotationsCount; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of Annotation.
- annotationVisitor.visitAnnotation(clazz, method, parameterIndex, annotations[index]);
- }
- }
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/RuntimeInvisibleAnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/RuntimeInvisibleAnnotationsAttribute.java
deleted file mode 100644
index 84d9d61..0000000
--- a/src/proguard/classfile/attribute/annotation/RuntimeInvisibleAnnotationsAttribute.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-
-/**
- * This Attribute represents a runtime invisible annotations attribute.
- *
- * @author Eric Lafortune
- */
-public class RuntimeInvisibleAnnotationsAttribute extends AnnotationsAttribute
-{
- /**
- * Creates an uninitialized RuntimeInvisibleAnnotationsAttribute.
- */
- public RuntimeInvisibleAnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized RuntimeInvisibleAnnotationsAttribute.
- */
- public RuntimeInvisibleAnnotationsAttribute(int u2attributeNameIndex,
- int u2annotationsCount,
- Annotation[] annotations)
- {
- super(u2attributeNameIndex, u2annotationsCount, annotations);
- }
-
-
-// Implementations for Attribute.
-
- public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeInvisibleAnnotationsAttribute(clazz, this);
- }
-
-
- public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeInvisibleAnnotationsAttribute(clazz, field, this);
- }
-
-
- public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeInvisibleAnnotationsAttribute(clazz, method, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/RuntimeInvisibleParameterAnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/RuntimeInvisibleParameterAnnotationsAttribute.java
deleted file mode 100644
index 0a5e1d7..0000000
--- a/src/proguard/classfile/attribute/annotation/RuntimeInvisibleParameterAnnotationsAttribute.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-
-/**
- * This Attribute represents a runtime invisible parameter annotations attribute.
- *
- * @author Eric Lafortune
- */
-public class RuntimeInvisibleParameterAnnotationsAttribute extends ParameterAnnotationsAttribute
-{
- /**
- * Creates an uninitialized RuntimeInvisibleParameterAnnotationsAttribute.
- */
- public RuntimeInvisibleParameterAnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized RuntimeInvisibleParameterAnnotationsAttribute.
- */
- public RuntimeInvisibleParameterAnnotationsAttribute(int u2attributeNameIndex,
- int u1parametersCount,
- int[] u2parameterAnnotationsCount,
- Annotation[][] parameterAnnotations)
- {
- super(u2attributeNameIndex,
- u1parametersCount,
- u2parameterAnnotationsCount,
- parameterAnnotations);
- }
-
-
- // Implementations for Attribute.
-
- public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeInvisibleParameterAnnotationsAttribute(clazz, method, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/RuntimeInvisibleTypeAnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/RuntimeInvisibleTypeAnnotationsAttribute.java
deleted file mode 100644
index 2e1ca95..0000000
--- a/src/proguard/classfile/attribute/annotation/RuntimeInvisibleTypeAnnotationsAttribute.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-
-/**
- * This Attribute represents a runtime invisible type annotations attribute.
- *
- * @author Eric Lafortune
- */
-public class RuntimeInvisibleTypeAnnotationsAttribute extends TypeAnnotationsAttribute
-{
- /**
- * Creates an uninitialized RuntimeInvisibleTypeAnnotationsAttribute.
- */
- public RuntimeInvisibleTypeAnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized RuntimeInvisibleTypeAnnotationsAttribute.
- */
- public RuntimeInvisibleTypeAnnotationsAttribute(int u2attributeNameIndex,
- int u2annotationsCount,
- TypeAnnotation[] annotations)
- {
- super(u2attributeNameIndex, u2annotationsCount, annotations);
- }
-
-
- // Implementations for Attribute.
-
- public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeInvisibleTypeAnnotationsAttribute(clazz, this);
- }
-
-
- public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeInvisibleTypeAnnotationsAttribute(clazz, field, this);
- }
-
-
- public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeInvisibleTypeAnnotationsAttribute(clazz, method, this);
- }
-
-
- public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeInvisibleTypeAnnotationsAttribute(clazz, method, codeAttribute, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/RuntimeVisibleAnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/RuntimeVisibleAnnotationsAttribute.java
deleted file mode 100644
index 89acf04..0000000
--- a/src/proguard/classfile/attribute/annotation/RuntimeVisibleAnnotationsAttribute.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-
-/**
- * This Attribute represents a runtime visible annotations attribute.
- *
- * @author Eric Lafortune
- */
-public class RuntimeVisibleAnnotationsAttribute extends AnnotationsAttribute
-{
- /**
- * Creates an uninitialized RuntimeVisibleAnnotationsAttribute.
- */
- public RuntimeVisibleAnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized RuntimeVisibleAnnotationsAttribute.
- */
- public RuntimeVisibleAnnotationsAttribute(int u2attributeNameIndex,
- int u2annotationsCount,
- Annotation[] annotations)
- {
- super(u2attributeNameIndex, u2annotationsCount, annotations);
- }
-
-
- // Implementations for Attribute.
-
- public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeVisibleAnnotationsAttribute(clazz, this);
- }
-
-
- public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeVisibleAnnotationsAttribute(clazz, field, this);
- }
-
-
- public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeVisibleAnnotationsAttribute(clazz, method, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/RuntimeVisibleParameterAnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/RuntimeVisibleParameterAnnotationsAttribute.java
deleted file mode 100644
index cc273c2..0000000
--- a/src/proguard/classfile/attribute/annotation/RuntimeVisibleParameterAnnotationsAttribute.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-
-/**
- * This Attribute represents a runtime visible parameter annotations attribute.
- *
- * @author Eric Lafortune
- */
-public class RuntimeVisibleParameterAnnotationsAttribute extends ParameterAnnotationsAttribute
-{
- /**
- * Creates an uninitialized RuntimeVisibleParameterAnnotationsAttribute.
- */
- public RuntimeVisibleParameterAnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized RuntimeVisibleParameterAnnotationsAttribute.
- */
- public RuntimeVisibleParameterAnnotationsAttribute(int u2attributeNameIndex,
- int u1parametersCount,
- int[] u2parameterAnnotationsCount,
- Annotation[][] parameterAnnotations)
- {
- super(u2attributeNameIndex,
- u1parametersCount,
- u2parameterAnnotationsCount,
- parameterAnnotations);
- }
-
-
- // Implementations for Attribute.
-
- public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeVisibleParameterAnnotationsAttribute(clazz, method, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/RuntimeVisibleTypeAnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/RuntimeVisibleTypeAnnotationsAttribute.java
deleted file mode 100644
index 084827a..0000000
--- a/src/proguard/classfile/attribute/annotation/RuntimeVisibleTypeAnnotationsAttribute.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-
-/**
- * This Attribute represents a runtime visible type annotations attribute.
- *
- * @author Eric Lafortune
- */
-public class RuntimeVisibleTypeAnnotationsAttribute extends TypeAnnotationsAttribute
-{
- /**
- * Creates an uninitialized RuntimeVisibleTypeAnnotationsAttribute.
- */
- public RuntimeVisibleTypeAnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized RuntimeVisibleTypeAnnotationsAttribute.
- */
- public RuntimeVisibleTypeAnnotationsAttribute(int u2attributeNameIndex,
- int u2annotationsCount,
- TypeAnnotation[] annotations)
- {
- super(u2attributeNameIndex, u2annotationsCount, annotations);
- }
-
-
- // Implementations for Attribute.
-
- public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeVisibleTypeAnnotationsAttribute(clazz, this);
- }
-
-
- public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeVisibleTypeAnnotationsAttribute(clazz, field, this);
- }
-
-
- public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeVisibleTypeAnnotationsAttribute(clazz, method, this);
- }
-
-
- public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
- {
- attributeVisitor.visitRuntimeVisibleTypeAnnotationsAttribute(clazz, method, codeAttribute, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/TypeAnnotation.java b/src/proguard/classfile/attribute/annotation/TypeAnnotation.java
deleted file mode 100644
index 86e4ddf..0000000
--- a/src/proguard/classfile/attribute/annotation/TypeAnnotation.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.target.TargetInfo;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-import proguard.classfile.attribute.annotation.visitor.*;
-
-/**
- * Representation of a type annotation.
- *
- * @author Eric Lafortune
- */
-public class TypeAnnotation extends Annotation
-{
- public TargetInfo targetInfo;
- public TypePathInfo[] typePath;
-
-
- /**
- * Creates an uninitialized TypeAnnotation.
- */
- public TypeAnnotation()
- {
- }
-
-
- /**
- * Creates an initialized TypeAnnotation.
- */
- public TypeAnnotation(int u2typeIndex,
- int u2elementValuesCount,
- ElementValue[] elementValues,
- TargetInfo targetInfo,
- TypePathInfo[] typePath)
- {
- super(u2typeIndex, u2elementValuesCount, elementValues);
-
- this.targetInfo = targetInfo;
- this.typePath = typePath;
- }
-
-
- /**
- * Applies the given visitor to the target info.
- */
- public void targetInfoAccept(Clazz clazz, TargetInfoVisitor targetInfoVisitor)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- targetInfo.accept(clazz, this, targetInfoVisitor);
- }
-
-
- /**
- * Applies the given visitor to the target info.
- */
- public void targetInfoAccept(Clazz clazz, Field field, TargetInfoVisitor targetInfoVisitor)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- targetInfo.accept(clazz, field, this, targetInfoVisitor);
- }
-
-
- /**
- * Applies the given visitor to the target info.
- */
- public void targetInfoAccept(Clazz clazz, Method method, TargetInfoVisitor targetInfoVisitor)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- targetInfo.accept(clazz, method, this, targetInfoVisitor);
- }
-
-
- /**
- * Applies the given visitor to the target info.
- */
- public void targetInfoAccept(Clazz clazz, Method method, CodeAttribute codeAttribute, TargetInfoVisitor targetInfoVisitor)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- targetInfo.accept(clazz, method, codeAttribute, this, targetInfoVisitor);
- }
-
-
- /**
- * Applies the given visitor to all type path elements.
- */
- public void typePathInfosAccept(Clazz clazz, TypePathInfoVisitor typePathVisitor)
- {
- for (int index = 0; index < typePath.length; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- typePathVisitor.visitTypePathInfo(clazz, this, typePath[index]);
- }
- }
-
-
- /**
- * Applies the given visitor to all type path elements.
- */
- public void typePathInfosAccept(Clazz clazz, Field field, TypePathInfoVisitor typePathVisitor)
- {
- for (int index = 0; index < typePath.length; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- typePathVisitor.visitTypePathInfo(clazz, field, this, typePath[index]);
- }
- }
-
-
- /**
- * Applies the given visitor to all type path elements.
- */
- public void typePathInfosAccept(Clazz clazz, Method method, TypePathInfoVisitor typePathVisitor)
- {
- for (int index = 0; index < typePath.length; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- typePathVisitor.visitTypePathInfo(clazz, method, this, typePath[index]);
- }
- }
-
-
- /**
- * Applies the given visitor to all type path elements.
- */
- public void typePathInfosAccept(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TypePathInfoVisitor typePathVisitor)
- {
- for (int index = 0; index < typePath.length; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- typePathVisitor.visitTypePathInfo(clazz, method, codeAttribute, typeAnnotation, typePath[index]);
- }
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/TypeAnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/TypeAnnotationsAttribute.java
deleted file mode 100644
index 7606e05..0000000
--- a/src/proguard/classfile/attribute/annotation/TypeAnnotationsAttribute.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.visitor.*;
-
-/**
- * This Attribute represents a type annotations attribute.
- *
- * @author Eric Lafortune
- */
-public abstract class TypeAnnotationsAttribute extends AnnotationsAttribute
-{
- /**
- * Creates an uninitialized TypeAnnotationsAttribute.
- */
- protected TypeAnnotationsAttribute()
- {
- }
-
-
- /**
- * Creates an initialized TypeAnnotationsAttribute.
- */
- protected TypeAnnotationsAttribute(int u2attributeNameIndex,
- int u2annotationsCount,
- TypeAnnotation[] annotations)
- {
- super(u2attributeNameIndex, u2annotationsCount, annotations);
- }
-
-
- /**
- * Applies the given visitor to all class annotations.
- */
- public void typeAnnotationsAccept(Clazz clazz, TypeAnnotationVisitor typeAnnotationVisitor)
- {
- TypeAnnotation[] annotations = (TypeAnnotation[])this.annotations;
-
- for (int index = 0; index < u2annotationsCount; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of Annotation.
- typeAnnotationVisitor.visitTypeAnnotation(clazz, annotations[index]);
- }
- }
-
-
- /**
- * Applies the given visitor to all field annotations.
- */
- public void typeAnnotationsAccept(Clazz clazz, Field field, TypeAnnotationVisitor typeAnnotationVisitor)
- {
- TypeAnnotation[] annotations = (TypeAnnotation[])this.annotations;
-
- for (int index = 0; index < u2annotationsCount; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of Annotation.
- typeAnnotationVisitor.visitTypeAnnotation(clazz, field, annotations[index]);
- }
- }
-
-
- /**
- * Applies the given visitor to all method annotations.
- */
- public void typeAnnotationsAccept(Clazz clazz, Method method, TypeAnnotationVisitor typeAnnotationVisitor)
- {
- TypeAnnotation[] annotations = (TypeAnnotation[])this.annotations;
-
- for (int index = 0; index < u2annotationsCount; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of Annotation.
- typeAnnotationVisitor.visitTypeAnnotation(clazz, method, annotations[index]);
- }
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/TypePathInfo.java b/src/proguard/classfile/attribute/annotation/TypePathInfo.java
deleted file mode 100644
index 9b40f7c..0000000
--- a/src/proguard/classfile/attribute/annotation/TypePathInfo.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation;
-
-/**
- * Representation of a path element in a type annotation.
- *
- * @author Eric Lafortune
- */
-public class TypePathInfo
-{
- public int u1typePathKind;
- public int u1typeArgumentIndex;
-
-
- /**
- * Creates an uninitialized TypePathInfo.
- */
- public TypePathInfo()
- {
- }
-
-
- /**
- * Creates an initialized TypePathInfo.
- */
- public TypePathInfo(int u1typePathKind, int u1typeArgumentIndex)
- {
- this.u1typePathKind = u1typePathKind;
- this.u1typeArgumentIndex = u1typeArgumentIndex;
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/package.html b/src/proguard/classfile/attribute/annotation/package.html
deleted file mode 100644
index 6aacff3..0000000
--- a/src/proguard/classfile/attribute/annotation/package.html
+++ /dev/null
@@ -1,4 +0,0 @@
-<body>
-This package contains classes to represent the annotation attributes inside
-class files.
-</body>
diff --git a/src/proguard/classfile/attribute/annotation/target/CatchTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/CatchTargetInfo.java
deleted file mode 100644
index 9421b9c..0000000
--- a/src/proguard/classfile/attribute/annotation/target/CatchTargetInfo.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of a 'catch' annotation target.
- *
- * @author Eric Lafortune
- */
-public class CatchTargetInfo extends TargetInfo
-{
- public int u2exceptionTableIndex;
-
-
- /**
- * Creates an uninitialized CatchTargetInfo.
- */
- public CatchTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized CatchTargetInfo.
- */
- public CatchTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized CatchTargetInfo.
- */
- protected CatchTargetInfo(byte u1targetType,
- int u2exceptionTableIndex)
- {
- super(u1targetType);
-
- this.u2exceptionTableIndex = u2exceptionTableIndex;
- }
-
-
- // Implementations for TargetInfo.
-
- /**
- * Lets the visitor visit, with Method and CodeAttribute null.
- */
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitCatchTargetInfo(clazz, null, null, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitCatchTargetInfo(clazz, method, codeAttribute, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/EmptyTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/EmptyTargetInfo.java
deleted file mode 100644
index fb0d794..0000000
--- a/src/proguard/classfile/attribute/annotation/target/EmptyTargetInfo.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of an empty annotation target.
- *
- * @author Eric Lafortune
- */
-public class EmptyTargetInfo extends TargetInfo
-{
- /**
- * Creates an uninitialized EmptyTargetInfo.
- */
- public EmptyTargetInfo()
- {
- }
-
-
- /**
- * Creates an initialized EmptyTargetInfo.
- */
- public EmptyTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- // Implementations for TargetInfo.
-
- /**
- * Lets the visitor visit, with Field null.
- */
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitEmptyTargetInfo(clazz, (Field)null, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Field field, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitEmptyTargetInfo(clazz, field, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitEmptyTargetInfo(clazz, method, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/FormalParameterTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/FormalParameterTargetInfo.java
deleted file mode 100644
index 04bd9c5..0000000
--- a/src/proguard/classfile/attribute/annotation/target/FormalParameterTargetInfo.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of a formal parameter annotation target.
- *
- * @author Eric Lafortune
- */
-public class FormalParameterTargetInfo extends TargetInfo
-{
- public int u1formalParameterIndex;
-
-
- /**
- * Creates an uninitialized FormalParameterTargetInfo.
- */
- public FormalParameterTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized FormalParameterTargetInfo.
- */
- public FormalParameterTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized FormalParameterTargetInfo.
- */
- public FormalParameterTargetInfo(byte u1targetType,
- int u1formalParameterIndex)
- {
- super(u1targetType);
-
- this.u1formalParameterIndex = u1formalParameterIndex;
- }
-
-
- // Implementations for TargetInfo.
-
- /**
- * Lets the visitor visit, with Method null.
- */
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitFormalParameterTargetInfo(clazz, null, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitFormalParameterTargetInfo(clazz, method, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/LocalVariableTargetElement.java b/src/proguard/classfile/attribute/annotation/target/LocalVariableTargetElement.java
deleted file mode 100644
index bcf41dc..0000000
--- a/src/proguard/classfile/attribute/annotation/target/LocalVariableTargetElement.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-/**
- * Representation of an local variable target table entry.
- *
- * @author Eric Lafortune
- */
-public class LocalVariableTargetElement
-{
- public int u2startPC;
- public int u2length;
- public int u2index;
-
- /**
- * Creates an uninitialized LocalVariableTargetElement.
- */
- public LocalVariableTargetElement()
- {
- }
-
-
- /**
- * Creates an initialized LocalVariableTargetElement.
- */
- public LocalVariableTargetElement(int u2startPC,
- int u2length,
- int u2index)
- {
- this.u2startPC = u2startPC;
- this.u2length = u2length;
- this.u2index = u2index;
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/LocalVariableTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/LocalVariableTargetInfo.java
deleted file mode 100644
index dd9246c..0000000
--- a/src/proguard/classfile/attribute/annotation/target/LocalVariableTargetInfo.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.*;
-
-/**
- * Representation of a local variable annotation target.
- *
- * @author Eric Lafortune
- */
-public class LocalVariableTargetInfo extends TargetInfo
-{
- public int u2tableLength;
- public LocalVariableTargetElement[] table;
-
-
- /**
- * Creates an uninitialized LocalVariableTargetInfo.
- */
- public LocalVariableTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized LocalVariableTargetInfo.
- */
- public LocalVariableTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized LocalVariableTargetInfo.
- */
- protected LocalVariableTargetInfo(byte u1targetType,
- int u2tableLength,
- LocalVariableTargetElement[] table)
- {
- super(u1targetType);
-
- this.u2tableLength = u2tableLength;
- this.table = table;
- }
-
-
- /**
- * Applies the given visitor to all target elements.
- */
- public void targetElementsAccept(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetElementVisitor localVariableTargetElementVisitor)
- {
- for (int index = 0; index < u2tableLength; index++)
- {
- // We don't need double dispatching here, since there is only one
- // type of TypePathInfo.
- localVariableTargetElementVisitor.visitLocalVariableTargetElement(clazz, method, codeAttribute, typeAnnotation, this, table[index]);
- }
- }
-
-
- // Implementations for TargetInfo.
-
- /**
- * Lets the visitor visit, with Method and CodeAttribute null.
- */
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitLocalVariableTargetInfo(clazz, null, null, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitLocalVariableTargetInfo(clazz, method, codeAttribute, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/OffsetTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/OffsetTargetInfo.java
deleted file mode 100644
index 312046b..0000000
--- a/src/proguard/classfile/attribute/annotation/target/OffsetTargetInfo.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of an offset annotation target.
- *
- * @author Eric Lafortune
- */
-public class OffsetTargetInfo extends TargetInfo
-{
- public int u2offset;
-
-
- /**
- * Creates an uninitialized OffsetTargetInfo.
- */
- public OffsetTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized OffsetTargetInfo.
- */
- public OffsetTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized OffsetTargetInfo.
- */
- protected OffsetTargetInfo(byte u1targetType,
- int u2offset)
- {
- super(u1targetType);
-
- this.u2offset = u2offset;
- }
-
-
- // Implementations for TargetInfo.
-
- /**
- * Lets the visitor visit, with Method and CodeAttribute null.
- */
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitOffsetTargetInfo(clazz, null, null, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitOffsetTargetInfo(clazz, method, codeAttribute, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/SuperTypeTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/SuperTypeTargetInfo.java
deleted file mode 100644
index 0db7ea4..0000000
--- a/src/proguard/classfile/attribute/annotation/target/SuperTypeTargetInfo.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.Clazz;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of a super type annotation target.
- *
- * @author Eric Lafortune
- */
-public class SuperTypeTargetInfo extends TargetInfo
-{
- public int u2superTypeIndex;
-
-
- /**
- * Creates an uninitialized SuperTypeTargetInfo.
- */
- public SuperTypeTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized SuperTypeTargetInfo.
- */
- public SuperTypeTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized SuperTypeTargetInfo.
- */
- public SuperTypeTargetInfo(byte u1targetType,
- int u2superTypeIndex)
- {
- super(u1targetType);
-
- this.u2superTypeIndex = u2superTypeIndex;
- }
-
-
- // Implementations for TargetInfo.
-
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitSuperTypeTargetInfo(clazz, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/TargetInfo.java b/src/proguard/classfile/attribute/annotation/target/TargetInfo.java
deleted file mode 100644
index efee2e2..0000000
--- a/src/proguard/classfile/attribute/annotation/target/TargetInfo.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of an annotation target.
- *
- * @author Eric Lafortune
- */
-public abstract class TargetInfo
-{
- public byte u1targetType;
-
-
- /**
- * Creates an uninitialized TargetInfo.
- */
- protected TargetInfo()
- {
- }
-
-
- /**
- * Creates an initialized TargetInfo.
- */
- protected TargetInfo(byte u1targetType)
- {
- this.u1targetType = u1targetType;
- }
-
-
- /**
- * Returns the type of the target.
- */
- public byte getTargetType()
- {
- return u1targetType;
- }
-
-
- // Methods to be implemented by extensions.
-
- /**
- * Accepts the given visitor, in the context of a type annotation on a class.
- */
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- throw new UnsupportedOperationException("Unsupported type annotation [0x"+Integer.toHexString(u1targetType)+"] on a class");
- }
-
- /**
- * Accepts the given visitor, in the context of a type annotation on a field.
- */
- public void accept(Clazz clazz, Field field, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- throw new UnsupportedOperationException("Unsupported type annotation [0x"+Integer.toHexString(u1targetType)+"] on a field");
- }
-
- /**
- * Accepts the given visitor, in the context of a type annotation on a method.
- */
- public void accept(Clazz clazz, Method method, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- throw new UnsupportedOperationException("Unsupported type annotation [0x"+Integer.toHexString(u1targetType)+"] on a method");
- }
-
- /**
- * Accepts the given visitor, in the context of a type annotation code.
- */
- public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- throw new UnsupportedOperationException("Unsupported type annotation [0x"+Integer.toHexString(u1targetType)+"] on code");
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/ThrowsTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/ThrowsTargetInfo.java
deleted file mode 100644
index d5b2db7..0000000
--- a/src/proguard/classfile/attribute/annotation/target/ThrowsTargetInfo.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of a 'throws' annotation target.
- *
- * @author Eric Lafortune
- */
-public class ThrowsTargetInfo extends TargetInfo
-{
- public int u2throwsTypeIndex;
-
-
- /**
- * Creates an uninitialized ThrowsTargetInfo.
- */
- public ThrowsTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized ThrowsTargetInfo.
- */
- public ThrowsTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized ThrowsTargetInfo.
- */
- public ThrowsTargetInfo(byte u1targetType,
- int u2throwsTypeIndex)
- {
- super(u1targetType);
-
- this.u2throwsTypeIndex = u2throwsTypeIndex;
- }
-
-
- // Implementations for TargetInfo.
-
- /**
- * Lets the visitor visit, with Method null.
- */
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitThrowsTargetInfo(clazz, null, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitThrowsTargetInfo(clazz, method, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/TypeArgumentTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/TypeArgumentTargetInfo.java
deleted file mode 100644
index 4aef72e..0000000
--- a/src/proguard/classfile/attribute/annotation/target/TypeArgumentTargetInfo.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of an offset annotation target.
- *
- * @author Eric Lafortune
- */
-public class TypeArgumentTargetInfo extends TargetInfo
-{
- public int u2offset;
- public int u1typeArgumentIndex;
-
-
- /**
- * Creates an uninitialized TypeArgumentTargetInfo.
- */
- public TypeArgumentTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized TypeArgumentTargetInfo.
- */
- public TypeArgumentTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized TypeArgumentTargetInfo.
- */
- protected TypeArgumentTargetInfo(byte u1targetType,
- int u2offset,
- int u1typeArgumentIndex)
- {
- super(u1targetType);
-
- this.u2offset = u2offset;
- this.u1typeArgumentIndex = u1typeArgumentIndex;
- }
-
-
- // Implementations for TargetInfo.
-
- /**
- * Lets the visitor visit, with Method and CodeAttribute null.
- */
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitTypeArgumentTargetInfo(clazz, null, null, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitTypeArgumentTargetInfo(clazz, method, codeAttribute, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/TypeParameterBoundTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/TypeParameterBoundTargetInfo.java
deleted file mode 100644
index 0f485ee..0000000
--- a/src/proguard/classfile/attribute/annotation/target/TypeParameterBoundTargetInfo.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of a type parameter bound annotation target.
- *
- * @author Eric Lafortune
- */
-public class TypeParameterBoundTargetInfo extends TargetInfo
-{
- public int u1typeParameterIndex;
- public int u1boundIndex;
-
-
- /**
- * Creates an uninitialized TypeParameterBoundTargetInfo.
- */
- public TypeParameterBoundTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized TypeParameterBoundTargetInfo.
- */
- public TypeParameterBoundTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized TypeParameterBoundTargetInfo.
- */
- public TypeParameterBoundTargetInfo(byte u1targetType,
- int u1typeParameterIndex,
- int u1boundIndex)
- {
- super(u1targetType);
-
- this.u1typeParameterIndex = u1typeParameterIndex;
- this.u1boundIndex = u1boundIndex;
- }
-
-
- // Implementations for TargetInfo.
-
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitTypeParameterBoundTargetInfo(clazz, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Field field, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitTypeParameterBoundTargetInfo(clazz, field, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitTypeParameterBoundTargetInfo(clazz, method, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/TypeParameterTargetInfo.java b/src/proguard/classfile/attribute/annotation/target/TypeParameterTargetInfo.java
deleted file mode 100644
index 3150a26..0000000
--- a/src/proguard/classfile/attribute/annotation/target/TypeParameterTargetInfo.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor;
-
-/**
- * Representation of a type parameter annotation target.
- *
- * @author Eric Lafortune
- */
-public class TypeParameterTargetInfo extends TargetInfo
-{
- public int u1typeParameterIndex;
-
-
- /**
- * Creates an uninitialized TypeParameterTargetInfo.
- */
- public TypeParameterTargetInfo()
- {
- }
-
-
- /**
- * Creates a partially initialized TypeParameterTargetInfo.
- */
- public TypeParameterTargetInfo(byte u1targetType)
- {
- super(u1targetType);
- }
-
-
- /**
- * Creates an initialized TypeParameterTargetInfo.
- */
- public TypeParameterTargetInfo(byte u1targetType,
- int u1typeParameterIndex)
- {
- super(u1targetType);
-
- this.u1typeParameterIndex = u1typeParameterIndex;
- }
-
-
- // Implementations for TargetInfo.
-
- public void accept(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitTypeParameterTargetInfo(clazz, typeAnnotation, this);
- }
-
-
- public void accept(Clazz clazz, Method method, TypeAnnotation typeAnnotation, TargetInfoVisitor targetInfoVisitor)
- {
- targetInfoVisitor.visitTypeParameterTargetInfo(clazz, method, typeAnnotation, this);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/visitor/LocalVariableTargetElementVisitor.java b/src/proguard/classfile/attribute/annotation/target/visitor/LocalVariableTargetElementVisitor.java
deleted file mode 100644
index 62fe148..0000000
--- a/src/proguard/classfile/attribute/annotation/target/visitor/LocalVariableTargetElementVisitor.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.TypeAnnotation;
-import proguard.classfile.attribute.annotation.target.*;
-
-/**
- * This interface specifies the methods for a visitor of LocalVariableTargetElement
- * instances.
- *
- * @author Eric Lafortune
- */
-public interface LocalVariableTargetElementVisitor
-{
- public void visitLocalVariableTargetElement(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetInfo localVariableTargetInfo, LocalVariableTargetElement localVariableTargetElement);
-}
diff --git a/src/proguard/classfile/attribute/annotation/target/visitor/TargetInfoVisitor.java b/src/proguard/classfile/attribute/annotation/target/visitor/TargetInfoVisitor.java
deleted file mode 100644
index 33e7d32..0000000
--- a/src/proguard/classfile/attribute/annotation/target/visitor/TargetInfoVisitor.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.target.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.*;
-import proguard.classfile.attribute.annotation.target.*;
-
-/**
- * This interface specifies the methods for a visitor of <code>TargetInfo</code>
- * objects.
- *
- * @author Eric Lafortune
- */
-public interface TargetInfoVisitor
-{
- public void visitTypeParameterTargetInfo( Clazz clazz, TypeAnnotation typeAnnotation, TypeParameterTargetInfo typeParameterTargetInfo);
- public void visitTypeParameterTargetInfo( Clazz clazz, Method method, TypeAnnotation typeAnnotation, TypeParameterTargetInfo typeParameterTargetInfo);
- public void visitSuperTypeTargetInfo( Clazz clazz, TypeAnnotation typeAnnotation, SuperTypeTargetInfo superTypeTargetInfo);
- public void visitTypeParameterBoundTargetInfo(Clazz clazz, TypeAnnotation typeAnnotation, TypeParameterBoundTargetInfo typeParameterBoundTargetInfo);
- public void visitTypeParameterBoundTargetInfo(Clazz clazz, Field field, TypeAnnotation typeAnnotation, TypeParameterBoundTargetInfo typeParameterBoundTargetInfo);
- public void visitTypeParameterBoundTargetInfo(Clazz clazz, Method method, TypeAnnotation typeAnnotation, TypeParameterBoundTargetInfo typeParameterBoundTargetInfo);
- public void visitEmptyTargetInfo( Clazz clazz, Field field, TypeAnnotation typeAnnotation, EmptyTargetInfo emptyTargetInfo);
- public void visitEmptyTargetInfo( Clazz clazz, Method method, TypeAnnotation typeAnnotation, EmptyTargetInfo emptyTargetInfo);
- public void visitFormalParameterTargetInfo( Clazz clazz, Method method, TypeAnnotation typeAnnotation, FormalParameterTargetInfo formalParameterTargetInfo);
- public void visitThrowsTargetInfo( Clazz clazz, Method method, TypeAnnotation typeAnnotation, ThrowsTargetInfo throwsTargetInfo);
- public void visitLocalVariableTargetInfo( Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetInfo localVariableTargetInfo);
- public void visitCatchTargetInfo( Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, CatchTargetInfo catchTargetInfo);
- public void visitOffsetTargetInfo( Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, OffsetTargetInfo offsetTargetInfo);
- public void visitTypeArgumentTargetInfo( Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TypeArgumentTargetInfo typeArgumentTargetInfo);
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/AllAnnotationVisitor.java b/src/proguard/classfile/attribute/annotation/visitor/AllAnnotationVisitor.java
deleted file mode 100644
index b4513d7..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/AllAnnotationVisitor.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.*;
-import proguard.classfile.attribute.annotation.*;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-import proguard.classfile.util.SimplifiedVisitor;
-
-/**
- * This AttributeVisitor lets a given AnnotationVisitor visit all Annotation
- * objects of the attributes it visits.
- *
- * @author Eric Lafortune
- */
-public class AllAnnotationVisitor
-extends SimplifiedVisitor
-implements AttributeVisitor
-{
- private final AnnotationVisitor annotationVisitor;
-
-
- /**
- * Creates a new AllAnnotationVisitor.
- * @param annotationVisitor the AnnotationVisitor to which visits will be
- * delegated.
- */
- public AllAnnotationVisitor(AnnotationVisitor annotationVisitor)
- {
- this.annotationVisitor = annotationVisitor;
- }
-
-
- // Implementations for AttributeVisitor.
-
- public void visitAnyAttribute(Clazz clazz, Attribute attribute) {}
-
-
- public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleAnnotationsAttribute.annotationsAccept(clazz, annotationVisitor);
- }
-
-
- public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, Field field, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleAnnotationsAttribute.annotationsAccept(clazz, field, annotationVisitor);
- }
-
-
- public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, Method method, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleAnnotationsAttribute.annotationsAccept(clazz, method, annotationVisitor);
- }
-
-
- public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleAnnotationsAttribute.annotationsAccept(clazz, annotationVisitor);
- }
-
-
- public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, Field field, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleAnnotationsAttribute.annotationsAccept(clazz, field, annotationVisitor);
- }
-
-
- public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, Method method, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleAnnotationsAttribute.annotationsAccept(clazz, method, annotationVisitor);
- }
-
-
- public void visitAnyParameterAnnotationsAttribute(Clazz clazz, Method method, ParameterAnnotationsAttribute parameterAnnotationsAttribute)
- {
- // Visit the annotations.
- parameterAnnotationsAttribute.annotationsAccept(clazz, method, annotationVisitor);
- }
-
-
- public void visitRuntimeVisibleTypeAnnotationsAttribute(Clazz clazz, RuntimeVisibleTypeAnnotationsAttribute runtimeVisibleTypeAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleTypeAnnotationsAttribute.annotationsAccept(clazz, annotationVisitor);
- }
-
-
- public void visitRuntimeVisibleTypeAnnotationsAttribute(Clazz clazz, Field field, RuntimeVisibleTypeAnnotationsAttribute runtimeVisibleTypeAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleTypeAnnotationsAttribute.annotationsAccept(clazz, field, annotationVisitor);
- }
-
-
- public void visitRuntimeVisibleTypeAnnotationsAttribute(Clazz clazz, Method method, RuntimeVisibleTypeAnnotationsAttribute runtimeVisibleTypeAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleTypeAnnotationsAttribute.annotationsAccept(clazz, method, annotationVisitor);
- }
-
-
- public void visitRuntimeVisibleTypeAnnotationsAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, RuntimeVisibleTypeAnnotationsAttribute runtimeVisibleTypeAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleTypeAnnotationsAttribute.annotationsAccept(clazz, method, codeAttribute, annotationVisitor);
- }
-
-
- public void visitRuntimeInvisibleTypeAnnotationsAttribute(Clazz clazz, RuntimeInvisibleTypeAnnotationsAttribute runtimeInvisibleTypeAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleTypeAnnotationsAttribute.annotationsAccept(clazz, annotationVisitor);
- }
-
-
- public void visitRuntimeInvisibleTypeAnnotationsAttribute(Clazz clazz, Field field, RuntimeInvisibleTypeAnnotationsAttribute runtimeInvisibleTypeAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleTypeAnnotationsAttribute.annotationsAccept(clazz, field, annotationVisitor);
- }
-
-
- public void visitRuntimeInvisibleTypeAnnotationsAttribute(Clazz clazz, Method method, RuntimeInvisibleTypeAnnotationsAttribute runtimeInvisibleTypeAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleTypeAnnotationsAttribute.annotationsAccept(clazz, method, annotationVisitor);
- }
-
-
- public void visitRuntimeInvisibleTypeAnnotationsAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, RuntimeInvisibleTypeAnnotationsAttribute runtimeInvisibleTypeAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleTypeAnnotationsAttribute.annotationsAccept(clazz, method, codeAttribute, annotationVisitor);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/AllElementValueVisitor.java b/src/proguard/classfile/attribute/annotation/visitor/AllElementValueVisitor.java
deleted file mode 100644
index 4413082..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/AllElementValueVisitor.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.*;
-import proguard.classfile.attribute.annotation.*;
-import proguard.classfile.attribute.visitor.AttributeVisitor;
-import proguard.classfile.util.SimplifiedVisitor;
-
-/**
- * This AttributeVisitor and AnnotationVisitor lets a given ElementValueVisitor
- * visit all ElementValue objects of the attributes or annotations that it
- * visits.
- *
- * @author Eric Lafortune
- */
-public class AllElementValueVisitor
-extends SimplifiedVisitor
-implements AttributeVisitor,
- AnnotationVisitor,
- ElementValueVisitor
-{
- private final boolean deep;
- private final ElementValueVisitor elementValueVisitor;
-
-
- /**
- * Creates a new AllElementValueVisitor.
- * @param elementValueVisitor the AllElementValueVisitor to which visits
- * will be delegated.
- */
- public AllElementValueVisitor(ElementValueVisitor elementValueVisitor)
- {
- this(false, elementValueVisitor);
- }
-
-
- /**
- * Creates a new AllElementValueVisitor.
- * @param deep specifies whether the element values
- * further down the hierarchy should be
- * visited too.
- * @param elementValueVisitor the AllElementValueVisitor to which visits
- * will be delegated.
- */
- public AllElementValueVisitor(boolean deep,
- ElementValueVisitor elementValueVisitor)
- {
- this.deep = deep;
- this.elementValueVisitor = elementValueVisitor;
- }
-
-
- // Implementations for AttributeVisitor.
-
- public void visitAnyAttribute(Clazz clazz, Attribute attribute) {}
-
-
- public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleAnnotationsAttribute.annotationsAccept(clazz, this);
- }
-
-
- public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, Field field, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleAnnotationsAttribute.annotationsAccept(clazz, field, this);
- }
-
-
- public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, Method method, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeVisibleAnnotationsAttribute.annotationsAccept(clazz, method, this);
- }
-
-
- public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleAnnotationsAttribute.annotationsAccept(clazz, this);
- }
-
-
- public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, Field field, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleAnnotationsAttribute.annotationsAccept(clazz, field, this);
- }
-
-
- public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, Method method, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
- {
- // Visit the annotations.
- runtimeInvisibleAnnotationsAttribute.annotationsAccept(clazz, method, this);
- }
-
-
- public void visitAnyParameterAnnotationsAttribute(Clazz clazz, Method method, ParameterAnnotationsAttribute parameterAnnotationsAttribute)
- {
- // Visit the annotations.
- parameterAnnotationsAttribute.annotationsAccept(clazz, method, this);
- }
-
-
- public void visitAnnotationDefaultAttribute(Clazz clazz, Method method, AnnotationDefaultAttribute annotationDefaultAttribute)
- {
- // Visit the default element value.
- annotationDefaultAttribute.defaultValueAccept(clazz, this);
- }
-
-
- // Implementations for AnnotationVisitor.
-
- public void visitAnnotation(Clazz clazz, Annotation annotation)
- {
- annotation.elementValuesAccept(clazz, this);
- }
-
-
- public void visitAnnotation(Clazz clazz, Field field, Annotation annotation)
- {
- annotation.elementValuesAccept(clazz, this);
- }
-
-
- public void visitAnnotation(Clazz clazz, Method method, Annotation annotation)
- {
- annotation.elementValuesAccept(clazz, this);
- }
-
-
- public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation)
- {
- annotation.elementValuesAccept(clazz, this);
- }
-
-
- public void visitAnnotation(Clazz clazz, Method method, CodeAttribute codeAttribute, Annotation annotation)
- {
- annotation.elementValuesAccept(clazz, this);
- }
-
-
- // Implementations for ElementValueVisitor.
-
- public void visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue)
- {
- elementValueVisitor.visitConstantElementValue(clazz, annotation, constantElementValue);
- }
-
-
- public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue)
- {
- elementValueVisitor.visitEnumConstantElementValue(clazz, annotation, enumConstantElementValue);
- }
-
-
- public void visitClassElementValue(Clazz clazz, Annotation annotation, ClassElementValue classElementValue)
- {
- elementValueVisitor.visitClassElementValue(clazz, annotation, classElementValue);
- }
-
-
- public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue)
- {
- elementValueVisitor.visitAnnotationElementValue(clazz, annotation, annotationElementValue);
-
- if (deep)
- {
- annotationElementValue.annotationAccept(clazz, this);
- }
- }
-
-
- public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
- {
- elementValueVisitor.visitArrayElementValue(clazz, annotation, arrayElementValue);
-
- if (deep)
- {
- arrayElementValue.elementValuesAccept(clazz, annotation, elementValueVisitor);
- }
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/AnnotatedClassVisitor.java b/src/proguard/classfile/attribute/annotation/visitor/AnnotatedClassVisitor.java
deleted file mode 100644
index 241e9e6..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/AnnotatedClassVisitor.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.Clazz;
-import proguard.classfile.attribute.annotation.Annotation;
-import proguard.classfile.util.SimplifiedVisitor;
-import proguard.classfile.visitor.ClassVisitor;
-
-
-/**
- * This AnnotationVisitor delegates all visits to a given ClassVisitor.
- * The latter visits the class of each visited annotation, although
- * never twice in a row.
- *
- * @author Eric Lafortune
- */
-public class AnnotatedClassVisitor
-extends SimplifiedVisitor
-implements AnnotationVisitor
-{
- private final ClassVisitor classVisitor;
-
- private Clazz lastVisitedClass;
-
-
- public AnnotatedClassVisitor(ClassVisitor classVisitor)
- {
- this.classVisitor = classVisitor;
- }
-
-
- // Implementations for AnnotationVisitor.
-
- public void visitAnnotation(Clazz clazz, Annotation annotation)
- {
- if (!clazz.equals(lastVisitedClass))
- {
- clazz.accept(classVisitor);
-
- lastVisitedClass = clazz;
- }
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/AnnotationToMemberVisitor.java b/src/proguard/classfile/attribute/annotation/visitor/AnnotationToMemberVisitor.java
deleted file mode 100644
index 6bb2454..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/AnnotationToMemberVisitor.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.annotation.Annotation;
-import proguard.classfile.util.SimplifiedVisitor;
-import proguard.classfile.visitor.MemberVisitor;
-
-
-/**
- * This AnnotationVisitor delegates all visits to a given MemberVisitor.
- * The latter visits the class member of each visited class member annotation
- * or method parameter annotation, although never twice in a row.
- *
- * @author Eric Lafortune
- */
-public class AnnotationToMemberVisitor
-extends SimplifiedVisitor
-implements AnnotationVisitor
-{
- private final MemberVisitor memberVisitor;
-
- private Member lastVisitedMember;
-
-
- public AnnotationToMemberVisitor(MemberVisitor memberVisitor)
- {
- this.memberVisitor = memberVisitor;
- }
-
-
- // Implementations for AnnotationVisitor.
-
- public void visitAnnotation(Clazz clazz, Member member, Annotation annotation)
- {
- if (!member.equals(lastVisitedMember))
- {
- member.accept(clazz, memberVisitor);
-
- lastVisitedMember = member;
- }
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/AnnotationTypeFilter.java b/src/proguard/classfile/attribute/annotation/visitor/AnnotationTypeFilter.java
deleted file mode 100644
index ad7b316..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/AnnotationTypeFilter.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.Annotation;
-import proguard.util.*;
-
-/**
- * This <code>AnnotationVisitor</code> delegates its visits to another given
- * <code>AnnotationVisitor</code>, but only when the visited annotation has
- * a type that matches a given regular expression.
- *
- * @author Eric Lafortune
- */
-public class AnnotationTypeFilter
-implements AnnotationVisitor
-{
- private final StringMatcher regularExpressionMatcher;
- private final AnnotationVisitor annotationVisitor;
-
-
- /**
- * Creates a new ClassNameFilter.
- * @param regularExpression the regular expression against which annotation
- * type names will be matched.
- * @param annotationVisitor the <code>annotationVisitor</code> to which
- * visits will be delegated.
- */
- public AnnotationTypeFilter(String regularExpression,
- AnnotationVisitor annotationVisitor)
- {
- this.regularExpressionMatcher = new ListParser(new ClassNameParser()).parse(regularExpression);
- this.annotationVisitor = annotationVisitor;
- }
-
-
- // Implementations for AnnotationVisitor.
-
- public void visitAnnotation(Clazz clazz, Annotation annotation)
- {
- if (accepted(annotation.getType(clazz)))
- {
- annotationVisitor.visitAnnotation(clazz, annotation);
- }
- }
-
-
- public void visitAnnotation(Clazz clazz, Field field, Annotation annotation)
- {
- if (accepted(annotation.getType(clazz)))
- {
- annotationVisitor.visitAnnotation(clazz, field, annotation);
- }
- }
-
-
- public void visitAnnotation(Clazz clazz, Method method, Annotation annotation)
- {
- if (accepted(annotation.getType(clazz)))
- {
- annotationVisitor.visitAnnotation(clazz, method, annotation);
- }
- }
-
-
- public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation)
- {
- if (accepted(annotation.getType(clazz)))
- {
- annotationVisitor.visitAnnotation(clazz, method, parameterIndex, annotation);
- }
- }
-
-
- public void visitAnnotation(Clazz clazz, Method method, CodeAttribute codeAttribute, Annotation annotation)
- {
- if (accepted(annotation.getType(clazz)))
- {
- annotationVisitor.visitAnnotation(clazz, method, codeAttribute, annotation);
- }
- }
-
-
- // Small utility methods.
-
- private boolean accepted(String name)
- {
- return regularExpressionMatcher.matches(name);
- }
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/AnnotationVisitor.java b/src/proguard/classfile/attribute/annotation/visitor/AnnotationVisitor.java
deleted file mode 100644
index 3225c97..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/AnnotationVisitor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.Annotation;
-
-/**
- * This interface specifies the methods for a visitor of
- * <code>Annotation</code> objects. Note that there is only a single
- * implementation of <code>Annotation</code>, such that this interface
- * is not strictly necessary as a visitor.
- *
- * @author Eric Lafortune
- */
-public interface AnnotationVisitor
-{
- public void visitAnnotation(Clazz clazz, Annotation annotation);
- public void visitAnnotation(Clazz clazz, Field field, Annotation annotation);
- public void visitAnnotation(Clazz clazz, Method method, Annotation annotation);
- public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation);
- public void visitAnnotation(Clazz clazz, Method method, CodeAttribute codeAttribute, Annotation annotation);
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/ElementValueVisitor.java b/src/proguard/classfile/attribute/annotation/visitor/ElementValueVisitor.java
deleted file mode 100644
index 453c14b..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/ElementValueVisitor.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.Clazz;
-import proguard.classfile.attribute.annotation.*;
-
-/**
- * This interface specifies the methods for a visitor of <code>ElementValue</code>
- * objects.
- *
- * @author Eric Lafortune
- */
-public interface ElementValueVisitor
-{
- public void visitConstantElementValue( Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue);
- public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue);
- public void visitClassElementValue( Clazz clazz, Annotation annotation, ClassElementValue classElementValue);
- public void visitAnnotationElementValue( Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue);
- public void visitArrayElementValue( Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue);
-
-// public void visitConstantElementValue( Clazz clazz, Field field, Annotation annotation, ConstantElementValue constantElementValue);
-// public void visitEnumConstantElementValue(Clazz clazz, Field field, Annotation annotation, EnumConstantElementValue enumConstantElementValue);
-// public void visitClassElementValue( Clazz clazz, Field field, Annotation annotation, ClassElementValue classElementValue);
-// public void visitAnnotationElementValue( Clazz clazz, Field field, Annotation annotation, AnnotationElementValue annotationElementValue);
-// public void visitArrayElementValue( Clazz clazz, Field field, Annotation annotation, ArrayElementValue arrayElementValue);
-//
-// public void visitConstantElementValue( Clazz clazz, Method method, Annotation annotation, ConstantElementValue constantElementValue);
-// public void visitEnumConstantElementValue(Clazz clazz, Method method, Annotation annotation, EnumConstantElementValue enumConstantElementValue);
-// public void visitClassElementValue( Clazz clazz, Method method, Annotation annotation, ClassElementValue classElementValue);
-// public void visitAnnotationElementValue( Clazz clazz, Method method, Annotation annotation, AnnotationElementValue annotationElementValue);
-// public void visitArrayElementValue( Clazz clazz, Method method, Annotation annotation, ArrayElementValue arrayElementValue);
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/TypeAnnotationVisitor.java b/src/proguard/classfile/attribute/annotation/visitor/TypeAnnotationVisitor.java
deleted file mode 100644
index 3a01887..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/TypeAnnotationVisitor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.*;
-
-/**
- * This interface specifies the methods for a visitor of
- * TypeAnnotation instances. Note that there is only a single
- * implementation of TypeAnnotation, such that this interface
- * is not strictly necessary as a visitor.
- *
- * @author Eric Lafortune
- */
-public interface TypeAnnotationVisitor
-{
- public void visitTypeAnnotation(Clazz clazz, TypeAnnotation typeAnnotation);
- public void visitTypeAnnotation(Clazz clazz, Field field, TypeAnnotation typeAnnotation);
- public void visitTypeAnnotation(Clazz clazz, Method method, TypeAnnotation typeAnnotation);
- public void visitTypeAnnotation(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation);
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/TypePathInfoVisitor.java b/src/proguard/classfile/attribute/annotation/visitor/TypePathInfoVisitor.java
deleted file mode 100644
index ab7d51b..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/TypePathInfoVisitor.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * ProGuard -- shrinking, optimization, obfuscation, and preverification
- * of Java bytecode.
- *
- * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-package proguard.classfile.attribute.annotation.visitor;
-
-import proguard.classfile.*;
-import proguard.classfile.attribute.CodeAttribute;
-import proguard.classfile.attribute.annotation.*;
-
-/**
- * This interface specifies the methods for a visitor of
- * TypePathInfo instances. Note that there is only a single
- * implementation of TypePathInfo, such that this interface
- * is not strictly necessary as a visitor.
- *
- * @author Eric Lafortune
- */
-public interface TypePathInfoVisitor
-{
- public void visitTypePathInfo(Clazz clazz, TypeAnnotation typeAnnotation, TypePathInfo typePathInfo);
- public void visitTypePathInfo(Clazz clazz, Field field, TypeAnnotation typeAnnotation, TypePathInfo typePathInfo);
- public void visitTypePathInfo(Clazz clazz, Method method, TypeAnnotation typeAnnotation, TypePathInfo typePathInfo);
- public void visitTypePathInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TypePathInfo typePathInfo);
-}
diff --git a/src/proguard/classfile/attribute/annotation/visitor/package.html b/src/proguard/classfile/attribute/annotation/visitor/package.html
deleted file mode 100644
index 10d0648..0000000
--- a/src/proguard/classfile/attribute/annotation/visitor/package.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<body>
-This package contains visitors for annotation attributes and their components.
-</body>