Tag BCEL-6.0 RC4

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/bcel/tags/BCEL_6_0_RC4@1694940 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/NOTICE.txt b/NOTICE.txt
index 4ec1f05..d72d03a 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1,5 +1,5 @@
 Apache Commons BCEL
-Copyright 2004-2014 The Apache Software Foundation
+Copyright 2004-2015 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
diff --git a/README.txt b/README.txt
index 367bcad..8e75e54 100644
--- a/README.txt
+++ b/README.txt
@@ -1,12 +1,12 @@
 Running a console based verifier
 
-   java org.apache.bcel.verifier.Verifier fully.qualified.class.Name
+   java org.apache.commons.bcel6.verifier.Verifier fully.qualified.class.Name
 
  lets JustIce work standalone.
  If you get a "java.lang.OutOfMemoryError", you should increase the
  maximum Java heap space. A command like
 
-   java -Xmx1887436800 org.apache.bcel.verifier.Verifier f.q.c.Name
+   java -Xmx1887436800 org.apache.commons.bcel6.verifier.Verifier f.q.c.Name
 
  will usually resolve the problem. The value above is suitable for
  big server machines; if your machine starts swapping to disk, try
@@ -18,7 +18,7 @@
 
  If you prefer a graphical application, you should use a command like
 
-   java org.apache.bcel.verifier.GraphicalVerifier
+   java org.apache.commons.bcel6.verifier.GraphicalVerifier
 
  to launch one. Again, you may have to resolve a memory issue depending
  on the classes to verify.
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 32fbbe7..e5838a9 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,6 +1,6 @@
               Apache Commons BCEL 6.0 RELEASE NOTES
 
-The Apache Commons team is pleased to announce the release of BCEL 6.0!
+The Apache Commons BCEL team is pleased to announce the commons-bcel6-6.0 release!
 
 The Byte Code Engineering Library (BCEL) is intended to give users a convenient
 way to analyze, create, and manipulate compiled .class files. Classes are
@@ -14,10 +14,16 @@
 Compatibility with 5.2
 ----------------------
 
-Binary compatible - Yes
+Binary compatible - No
 
-Source compatible - Yes, except:
- - The org.apache.bcel.classfile.Visitor interface has been enhanced with
+Source compatible - Yes, sort of;
+ - Maven coordinates update:
+    org.apache.bcel:bcel:5.2 -> org.apache.commons:commons-bcel6:6.0
+
+ - Rename package imports: 
+    org.apache.bcel -> org.apache.commons.bcel6
+
+ - The org.apache.commons.bcel6.classfile.Visitor interface has been enhanced with
    additional methods. If you implemented it directly instead of extending
    the EmptyVisitor class you'll have to implement the new methods.
 
@@ -28,81 +34,134 @@
    the AttributeReader will no longer be called in these cases.
 
 
-Enhancements from 5.2
----------------------
-
-[BCEL-76]  Add parent type processing for ClassPath class.
-[BCEL-83]  Add support for getResource and getResourceAsStream to ClassPath
-[BCEL-92]  Properly parse StackMapTable attributes in Java 6 classfiles
-[BCEL-104] Javadoc overhaul
-[BCEL-119] BCEL is unnecessarily slow
-[BCEL-157] Add support for INVOKEDYNAMIC and MethodHandles 
-[BCEL-160] Why using unstable sort at MethodGen.getLocalVariables() ?
-[BCEL-163] Incorporate patch file from Findbugs
-[BCEL-175] Implement the MethodParameters attribute
+-------------------------------------------------------------------------------
+Changes in this version include:
 
 
-Bug fixes from 5.2
-------------------
+Fixed Bugs:
+o Bug fixes and improvements to InvokeDynamic and BootStrapMethods implementation.
+        Issue: BCEL-209. Thanks to Mark Roberts. 
+o Verification error when an invoke references a method defined in superclass.
+        Issue: BCEL-187. Thanks to Jérôme Leroux. 
+o Remove ObjectType cache.  Issue: BCEL-218. Thanks to chas. 
+o The verifier now checks if methods with a void return type attempt to return an
+        object.  Issue: BCEL-184. Thanks to Jérôme Leroux. 
+o The verifier now checks if methods with a void return type attempt to return an
+        object.  Issue: BCEL-184. Thanks to Jérôme Leroux. 
+o MethodGen.removeLocalVariable now properly unreference the removed variable
+        from the targetters of the instruction handlers delimiting the scope of 
+        the variable.  Issue: BCEL-207. Thanks to Mark Roberts. 
+o Utility.signatureToString() no longer throws a ClassFormatException on TypeVariables
+        found in generic signatures.  Issue: BCEL-197. Thanks to Mark Roberts. 
+o Removed the 'index' variable from the LocalVariableGen's hash code. 
+        Issue: BCEL-194. Thanks to Mark Roberts. 
+o The verifier should not check for run time compatibility of objects assigned to 
+        arrays.  Issue: BCEL-193. Thanks to Jérôme Leroux. 
+o Correct verification of the return value of a method.  Issue: BCEL-188. Thanks 
+        to Jérôme Leroux. 
+o Performance degradation with the UTF8 cache. getInstance no longer uses cache  
+        Issue: BCEL-186. 
+o org.apache.bcel.util.ClassLoaderRepository.loadClass(String) leaks input streams.
+        Issue: BCEL-181. 
+o Mistake in "Peephole optimizer" example at http://commons.apache.org/bcel/manual.html 
+        Issue: BCEL-28. 
+o BCEL cannot be used as java.system.class.loader  Issue: BCEL-74. 
+o XSLT transforms broken in Turkish Locale.  Issue: BCEL-77. 
+o java.lang.ClassFormatError: LVTT entry for 'local' in class file 
+        org/shiftone/jrat/test/dummy/CrashTestDummy does not match any LVT entry  
+        Issue: BCEL-79. 
+o ClassParser.parse() throws NullPointerException if class does not exist and 
+        ClassParser(String) constructor is used  Issue: BCEL-81. 
+o ArrayOutOfBoundsException in InstructionFinder  Issue: BCEL-85. 
+o Website: Incorrect URL for source; version 5.2 is not in the bug page  
+        Issue: BCEL-87.
+o bcelified method doesn't pass verification  Issue: BCEL-88. 
+o return type not verified by JustIce  Issue: BCEL-89. 
+o @since tag incorrect for Annotation classes in BCEL trunk  Issue: BCEL-94. 
+o InstructionFactory missing % operator for Float, Double  Issue: BCEL-95. 
+o Fields in Annotations and AnnotationEntry are inaccessible to subclasses  
+        Issue: BCEL-96. 
+o Add support for getResources to ClassPath  Issue: BCEL-97. 
+o Two source files in repository are empty  Issue: BCEL-98. 
+o Maven POM file calls in apache regex but code does not use it  Issue: BCEL-99. 
+o ClassParser throws unintelligible Exception  Issue: BCEL-100. 
+o verifier raises an AssertionViolatedException when done against Java 5 files
+        with generics/annotations  Issue: BCEL-101. 
+o Verifier fails in pass 2 with "Number of LocalVariableTable attributes of 
+        Code attribute" on static methods.  Issue: BCEL-102. 
+o ParameterAnnotationEntries are read not dumped  Issue: BCEL-107. 
+o RuntimeVisible Annotations duplicated  Issue: BCEL-108. 
+o ARRAYLENGTH incorrectly not StackConsumer  Issue: BCEL-112. 
+o Error in method search() defined in org.apache.bcel.util.InstructionFinder
+        Issue: BCEL-114. 
+o Deleting all instructions of a list shows wrong behaviour  Issue: BCEL-115. 
+o Make BCEL JAR OSGi compatible  Issue: BCEL-120. 
+o ArrayIndexOutOfBoundsException thrown from TABLESWITCH.initFromFile  
+        Issue: BCEL-122. 
+o tableswitch/lookupswitch invalid alignment of 4-byte operands  Issue: BCEL-124.
+o Incorrect size calculation in InstructionFinder  Issue: BCEL-125. 
+o Class files containing "ParameterAnnotations" are dumped incorrectly  
+        Issue: BCEL-130. 
+o Class files containing "StackMapTable" attributes (on method code) are dumped
+        incorrectly  Issue: BCEL-131. 
+o org.apache.bcel.classfile.ClassParser: NullPointerException caused by fileopen 
+        failed  Issue: BCEL-132. 
+o org.apache.bcel.classfile.ClassParser: NullPointerException caused by invalid
+        filename  Issue: BCEL-133. 
+o ExecutionVisitor doesn't support Class constant type for LDC and LDC_W 
+        Issue: BCEL-134. 
+o BCELifier issue: BCELFactory fails to handle float and long constants.
+        Issue: BCEL-135. 
+o "Invalid method signature: TT;" when using MethodGen for a method having a
+        generic parameter  Issue: BCEL-137. 
+o FieldInstruction.getFieldSize() doesn't decode Type.getTypeSize() output.
+        Issue: BCEL-138. 
+o org.apache.bcel.generic.Instruction.equals(Object) does not follow 
+        Object.equals(Object) rules  Issue: BCEL-140. 
+o Select instructions should implement StackConsumer instead of StackProducer
+        Issue: BCEL-141. 
+o Fix CPL License issues with EnclosingMethod.java and 
+        LocalVariableTypeTable.java  Issue: BCEL-143. 
+o Type.getReturnTypeSize() doesn't decode Type.getTypeSize() output.
+        Issue: BCEL-145. 
+o SyntheticRepository.loadClass() fails to close the inputStream.
+        Issue: BCEL-146. 
+o BCELifier produces incorrect code for methods containing loads of class 
+        literals from constant pool  Issue: BCEL-148. 
+o Code attribute size not updated  Issue: BCEL-151. 
+o Incorrect link for Jasmin assembler language  Issue: BCEL-152. 
+o Examples not present in source or binary downloads  Issue: BCEL-153. 
+o ClassParser.parse() generates NPE if it cannot open the file  Issue: BCEL-154. 
+o InstConstraintVisitor does not handle class constants  Issue: BCEL-155. 
+o Pass3bVerifier crashes on empty methods  Issue: BCEL-156. 
+o LocalVariableGen.getLocalVariable() computes incorrect length  Issue: BCEL-159. 
+o Method does not have a method to access parameter annotations  Issue: BCEL-164. 
+o ClassPath.getResource does not correctly perform URL escaping  Issue: BCEL-167. 
+o ClassParser fails to parse JDK classes in Java 8: ClassFormatException: Invalid
+        byte tag in constant pool  Issue: BCEL-173. 
+o Verification of interfaces with default methods fails with Java 8
+        Issue: BCEL-174. 
+o When reading the number of parameters in a MethodParameters structure
+        only read a single byte as per the JVM specification.  Issue: BCEL-177. 
 
-[BCEL-28]  Mistake in "Peephole optimizer" example at http://commons.apache.org/bcel/manual.html
-[BCEL-74]  BCEL cannot be used as java.system.class.loader
-[BCEL-77]  XSLT transforms broken in Turkish Locale.
-[BCEL-79]  java.lang.ClassFormatError: LVTT entry for 'local' in class file org/shiftone/jrat/test/dummy/CrashTestDummy does not match any LVT entry
-[BCEL-81]  ClassParser.parse() throws NullPointerException if class does not exist and ClassParser(String) constructor is used
-[BCEL-85]  ArrayOutOfBoundsException in InstructionFinder
-[BCEL-87]  Website: Incorrect URL for source; version 5.2 is not in the bug page
-[BCEL-88]  bcelified method doesn't pass verification
-[BCEL-89]  return type not verified by JustIce
-[BCEL-94]  @since tag incorrect for Annotation classes in BCEL trunk
-[BCEL-95]  InstructionFactory missing % operator for Float, Double
-[BCEL-96]  Fields in Annotations and AnnotationEntry are inaccessible to subclasses
-[BCEL-97]  Add support for getResources to ClassPath
-[BCEL-98]  Two source files in repository are empty
-[BCEL-99]  Maven POM file calls in apache regex but code does not use it
-[BCEL-100] ClassParser throws unintelligible Exception
-[BCEL-101] verifier raises ....AssertionViolatedException when done against Java5 files with generics/annotations
-[BCEL-102] Verifier fails in pass 2 with "Number of LocalVariableTable attributes of Code attribute" on static methods.
-[BCEL-107] ParameterAnnotationEntries are read not dumped
-[BCEL-108] RuntimeVisible Annotations duplicated
-[BCEL-112] ARRAYLENGTH incorrectly not StackConsumer
-[BCEL-114] Error in method search() defined in org.apache.bcel.util.InstructionFinder
-[BCEL-115] Deleting all instructions of a list shows wrong behaviour
-[BCEL-120] Make BCEL JAR OSGi compatible
-[BCEL-122] ArrayIndexOutOfBoundsException thrown from TABLESWITCH.initFromFile
-[BCEL-124] tableswitch/lookupswitch invalid alignment of 4-byte operands
-[BCEL-125] Incorrect size calculation in InstructionFinder
-[BCEL-130] Class files containing "ParameterAnnotations" are dumped incorrectly
-[BCEL-131] Class files containing "StackMapTable" attributes (on method code) are dumped incorrectly
-[BCEL-132] org.apache.bcel.classfile.ClassParser: NullPointerException caused by fileopen failed
-[BCEL-133] org.apache.bcel.classfile.ClassParser: NullPointerException caused by invalid filename
-[BCEL-134] ExecutionVisitor doesn't support Class constant type for LDC and LDC_W
-[BCEL-135] BCELifier issue: BCELFactory fails to handle float and long constants
-[BCEL-137] "Invalid method signature: TT;" when using MethodGen for a method having a generic parameter
-[BCEL-138] FieldInstruction.getFieldSize() doesn't decode Type.getTypeSize() output
-[BCEL-140] org.apache.bcel.generic.Instruction.equals(Object) does not follow Object.equals(Object) rules
-[BCEL-141] Select instructions should implement StackConsumer instead of StackProducer
-[BCEL-143] Fix CPL License issues with EnclosingMethod.java and LocalVariableTypeTable.java
-[BCEL-145] Type.getReturnTypeSize() doesn't decode Type.getTypeSize() output
-[BCEL-146] SyntheticRepository.loadClass() fails to close the inputStream
-[BCEL-148] BCELifier produces incorrect code for methods containing loads of class literals from constant pool
-[BCEL-151] Code attribute size not updated
-[BCEL-152] Incorrect link for Jasmin assembler language
-[BCEL-153] Examples not present in source or binary downloads
-[BCEL-154] ClassParser.parse() generates NPE if it cannot open the file
-[BCEL-155] InstConstraintVisitor does not handle class constants
-[BCEL-156] Pass3bVerifier crashes on empty methods
-[BCEL-159] LocalVariableGen.getLocalVariable() computes incorrect length
-[BCEL-164] Method does not have a method to access parameter annotations
-[BCEL-167] ClassPath.getResource does not correctly perform URL escaping
-[BCEL-173] ClassParser fails to parse JDK classes in Java 8: ClassFormatException: Invalid byte tag in constant pool
-[BCEL-174] Verification of interfaces with default methods fails with Java 8
-[BCEL-177] MethodParameters should read 1 byte not two for parameter count
-[BCEL-181] ClassLoaderRepository.loadClass(String) leaks input streams
-[BCEL-184] JustIce verifier does not check correctly the returned value of a method
-[BCEL-194] LocalVariableGen hashCode() function is incorrrect
-[BCEL-197] Add support for TypeVariables to Utility.signatureToString()
-[BCEL-207] MethodGen.removeLocalVariable(s) doesn't remove the associated Targetters
+Changes:
+o Major release of BCEL requires updating package name and maven coordinates.
+        Issue: BCEL-222. 
+o Make org.apache.bcel.classfile.ConstantPool.ConstantPool(DataInput) public.
+        Issue: BCEL-219. Thanks to Maxim Degtyarev. 
+o Add parent type processing for ClassPath class.  Issue: BCEL-76. 
+o Add support for getResource and getResourceAsStream to ClassPath  Issue: BCEL-83. 
+o Properly parse StackMapTable attributes in Java 6 classfiles  Issue: BCEL-92. 
+o Javadoc overhaul  Issue: BCEL-104. 
+o BCEL is unnecessarily slow  Issue: BCEL-119. 
+o Add support for INVOKEDYNAMIC and MethodHandles  Issue: BCEL-157. 
+o Why using unstable sort at MethodGen.getLocalVariables() ?  Issue: BCEL-160. 
+o Incorporate patch file from Findbugs  Issue: BCEL-163. 
+o Implement the MethodParameters attribute  Issue: BCEL-175. 
+
+
+Have fun!
+-Apache Commons BCEL team
 
 Feedback
 --------
diff --git a/pom.xml b/pom.xml
index 421eb0a..4237b00 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,8 +17,7 @@
   * specific language governing permissions and limitations
   * under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -28,10 +27,10 @@
     <version>38</version>
   </parent>
 
-  <groupId>org.apache.bcel</groupId>
-  <artifactId>bcel</artifactId>
+  <groupId>org.apache.commons</groupId>
+  <artifactId>commons-bcel6</artifactId>
   <packaging>jar</packaging>
-  <version>6.0-SNAPSHOT</version>
+  <version>6.0</version>
   <name>Apache Commons BCEL</name>
   <description>Apache Commons Bytecode Engineering Library</description>
 
@@ -49,7 +48,7 @@
     <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-bcel</commons.scmPubUrl>
     <!-- Configuration properties for the OSGi maven-bundle-plugin -->
     <commons.osgi.symbolicName>org.apache.${commons.componentid}</commons.osgi.symbolicName>
-    <commons.osgi.export>org.apache.bcel.*;version=${project.version};-noimport:=true</commons.osgi.export>
+    <commons.osgi.export>org.apache.commons.bcel6.*;version=${project.version};-noimport:=true</commons.osgi.export>
     <commons.osgi.import>*</commons.osgi.import>
     <commons.osgi.dynamicImport />
     <commons.osgi.private />
@@ -171,9 +170,9 @@
   </issueManagement>
 
   <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/bcel/trunk</connection>
-    <developerConnection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/bcel/trunk</developerConnection>
-    <url>http://svn.apache.org/repos/asf/commons/proper/bcel/trunk</url>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/bcel/tags/BCEL_6_0_RC4</connection>
+    <developerConnection>scm:svn:http://svn.apache.org/repos/asf/commons/proper/bcel/tags/BCEL_6_0_RC4</developerConnection>
+    <url>http://svn.apache.org/repos/asf/commons/proper/bcel/tags/BCEL_6_0_RC4</url>
   </scm>
 
   <build>
@@ -437,7 +436,7 @@
                   <executable>java</executable>
                   <arguments>
                     <argument>-classpath</argument>
-                    <classpath/>
+                    <classpath />
                     <argument>org.openjdk.jmh.Main</argument>
                     <argument>-rf</argument>
                     <argument>json</argument>
diff --git a/src/assembly/bin.xml b/src/assembly/bin.xml
new file mode 100644
index 0000000..a58c2e5
--- /dev/null
+++ b/src/assembly/bin.xml
@@ -0,0 +1,45 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<assembly>
+    <id>bin</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+    <includeSiteDirectory>false</includeSiteDirectory>
+    <fileSets>
+        <fileSet>
+            <includes>
+                <include>LICENSE.txt</include>
+                <include>NOTICE.txt</include>
+                <include>README.txt</include>
+                <include>RELEASE-NOTES.txt</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>target</directory>
+            <outputDirectory></outputDirectory>
+            <includes>
+                <include>*.jar</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>target/site/apidocs</directory>
+            <outputDirectory>apidocs</outputDirectory>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/src/assembly/src.xml b/src/assembly/src.xml
new file mode 100644
index 0000000..0c216ec
--- /dev/null
+++ b/src/assembly/src.xml
@@ -0,0 +1,40 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<assembly>
+    <id>src</id>
+    <formats>
+        <format>tar.gz</format>
+        <format>zip</format>
+    </formats>
+    <baseDirectory>${project.artifactId}-${commons.release.version}-src</baseDirectory>
+    <fileSets>
+        <fileSet>
+            <includes>
+                <include>checkstyle.xml</include>
+                <include>LICENSE.txt</include>
+                <include>NOTICE.txt</include>
+                <include>pmd.xml</include>
+                <include>pom.xml</include>
+                <include>README.txt</include>
+                <include>RELEASE-NOTES.txt</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src</directory>
+        </fileSet>
+    </fileSets>
+</assembly>
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e1d7c6e..eabfb47 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -63,6 +63,9 @@
 
   <body>
     <release version="6.0" date="TBA" description="Major release with Java 7 and 8 support">
+      <action issue="BCEL-222" type="update">
+        Major release of BCEL requires updating package name and maven coordinates.
+      </action>
       <action issue="BCEL-219" type="update" due-to="Maxim Degtyarev">
         Make org.apache.bcel.classfile.ConstantPool.ConstantPool(DataInput) public.
       </action>
diff --git a/src/examples/HelloWorldBuilder.java b/src/examples/HelloWorldBuilder.java
index 9a54c57..5c00cfe 100644
--- a/src/examples/HelloWorldBuilder.java
+++ b/src/examples/HelloWorldBuilder.java
@@ -18,22 +18,22 @@
 
 import java.io.IOException;
 
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.ALOAD;
-import org.apache.bcel.generic.ASTORE;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.GOTO;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.LocalVariableGen;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.PUSH;
-import org.apache.bcel.generic.Type;
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ALOAD;
+import org.apache.commons.bcel6.generic.ASTORE;
+import org.apache.commons.bcel6.generic.ArrayType;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.GOTO;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionFactory;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.LocalVariableGen;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.PUSH;
+import org.apache.commons.bcel6.generic.Type;
 
 /**
  * Create HelloWorld class:
diff --git a/src/examples/JasminVisitor.java b/src/examples/JasminVisitor.java
index 1eaa6fb..06702a6 100644
--- a/src/examples/JasminVisitor.java
+++ b/src/examples/JasminVisitor.java
@@ -24,32 +24,32 @@
 import java.util.Hashtable;
 import java.util.StringTokenizer;
 
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.ConstantValue;
-import org.apache.bcel.classfile.Deprecated;
-import org.apache.bcel.classfile.ExceptionTable;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Synthetic;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.generic.BranchHandle;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.CodeExceptionGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.LineNumberGen;
-import org.apache.bcel.generic.LocalVariableGen;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.Select;
-import org.apache.bcel.generic.TABLESWITCH;
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.ConstantValue;
+import org.apache.commons.bcel6.classfile.Deprecated;
+import org.apache.commons.bcel6.classfile.ExceptionTable;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.Synthetic;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.generic.BranchHandle;
+import org.apache.commons.bcel6.generic.BranchInstruction;
+import org.apache.commons.bcel6.generic.CodeExceptionGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.Instruction;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.LineNumberGen;
+import org.apache.commons.bcel6.generic.LocalVariableGen;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.Select;
+import org.apache.commons.bcel6.generic.TABLESWITCH;
 
 /**
  * Disassemble Java class object into the <a href="http://jasmin.sourceforge.net">
@@ -58,7 +58,7 @@
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @version $Id$
  */
-public class JasminVisitor extends org.apache.bcel.classfile.EmptyVisitor {
+public class JasminVisitor extends org.apache.commons.bcel6.classfile.EmptyVisitor {
     private JavaClass clazz;
     private PrintWriter out;
     private String class_name;
@@ -75,7 +75,7 @@
      * Start traversal using DefaultVisitor pattern.
      */
     public void disassemble() {
-        new org.apache.bcel.classfile.DescendingVisitor(clazz, this).visit();
+        new org.apache.commons.bcel6.classfile.DescendingVisitor(clazz, this).visit();
         out.close();
     }
 
diff --git a/src/examples/Mini/ASTExpr.java b/src/examples/Mini/ASTExpr.java
index 7388d86..0d96ed6 100644
--- a/src/examples/Mini/ASTExpr.java
+++ b/src/examples/Mini/ASTExpr.java
@@ -19,19 +19,19 @@
 /* JJT: 0.3pre1 */
 
 package Mini;
-import org.apache.bcel.generic.BranchHandle;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.GOTO;
-import org.apache.bcel.generic.IF_ICMPEQ;
-import org.apache.bcel.generic.IF_ICMPGE;
-import org.apache.bcel.generic.IF_ICMPGT;
-import org.apache.bcel.generic.IF_ICMPLE;
-import org.apache.bcel.generic.IF_ICMPLT;
-import org.apache.bcel.generic.IF_ICMPNE;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.PUSH;
+import org.apache.commons.bcel6.generic.BranchHandle;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.GOTO;
+import org.apache.commons.bcel6.generic.IF_ICMPEQ;
+import org.apache.commons.bcel6.generic.IF_ICMPGE;
+import org.apache.commons.bcel6.generic.IF_ICMPGT;
+import org.apache.commons.bcel6.generic.IF_ICMPLE;
+import org.apache.commons.bcel6.generic.IF_ICMPLT;
+import org.apache.commons.bcel6.generic.IF_ICMPNE;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.PUSH;
 
 /**
  * Represents arithmetic expressions such as `(a + 12 == b) OR c'.
@@ -48,7 +48,7 @@
  * are discarded in the first pass.
 */
 public class ASTExpr extends SimpleNode 
-implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constants {
+implements MiniParserConstants, MiniParserTreeConstants, org.apache.commons.bcel6.Constants {
   protected int         kind=-1;    // Single twig to leaf?
   private   int         unop=-1;    // Special case: Unary operand applied
   protected ASTExpr[]   exprs;      // Sub expressions
diff --git a/src/examples/Mini/ASTFunAppl.java b/src/examples/Mini/ASTFunAppl.java
index 1249c79..b33e5f0 100644
--- a/src/examples/Mini/ASTFunAppl.java
+++ b/src/examples/Mini/ASTFunAppl.java
@@ -19,11 +19,11 @@
 /* JJT: 0.3pre1 */
 
 package Mini;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.INVOKESTATIC;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.Type;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.INVOKESTATIC;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.Type;
 
 /**
  *
@@ -31,7 +31,7 @@
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
 public class ASTFunAppl extends ASTExpr implements MiniParserTreeConstants,
-  org.apache.bcel.Constants {
+  org.apache.commons.bcel6.Constants {
   private ASTIdent name;
   private Function function; // Points to Function in environment
 
diff --git a/src/examples/Mini/ASTFunDecl.java b/src/examples/Mini/ASTFunDecl.java
index e5e9a7d..a312aa3 100644
--- a/src/examples/Mini/ASTFunDecl.java
+++ b/src/examples/Mini/ASTFunDecl.java
@@ -21,26 +21,27 @@
 package Mini;
 import java.io.PrintWriter;
 import java.util.Iterator;
-import org.apache.bcel.generic.ALOAD;
-import org.apache.bcel.generic.ASTORE;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.BranchHandle;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.GETSTATIC;
-import org.apache.bcel.generic.GOTO;
-import org.apache.bcel.generic.INVOKEVIRTUAL;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InstructionTargeter;
-import org.apache.bcel.generic.LocalVariableGen;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.TargetLostException;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.util.InstructionFinder;
+
+import org.apache.commons.bcel6.generic.ALOAD;
+import org.apache.commons.bcel6.generic.ASTORE;
+import org.apache.commons.bcel6.generic.ArrayType;
+import org.apache.commons.bcel6.generic.BranchHandle;
+import org.apache.commons.bcel6.generic.BranchInstruction;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.GETSTATIC;
+import org.apache.commons.bcel6.generic.GOTO;
+import org.apache.commons.bcel6.generic.INVOKEVIRTUAL;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.InstructionTargeter;
+import org.apache.commons.bcel6.generic.LocalVariableGen;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.TargetLostException;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.util.InstructionFinder;
 
 /**
  *
@@ -48,7 +49,7 @@
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
 public class ASTFunDecl extends SimpleNode
-implements MiniParserTreeConstants, org.apache.bcel.Constants {
+implements MiniParserTreeConstants, org.apache.commons.bcel6.Constants {
   private ASTIdent    name;
   private ASTIdent[]  argv;
   private ASTExpr     body;
diff --git a/src/examples/Mini/ASTIdent.java b/src/examples/Mini/ASTIdent.java
index 95b3fbd..f64e926 100644
--- a/src/examples/Mini/ASTIdent.java
+++ b/src/examples/Mini/ASTIdent.java
@@ -19,19 +19,19 @@
 /* JJT: 0.3pre1 */
 
 package Mini;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.ILOAD;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.LocalVariableGen;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.PUSH;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.ILOAD;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.LocalVariableGen;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.PUSH;
 
 /**
  *
  * @version $Id$
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public class ASTIdent extends ASTExpr implements org.apache.bcel.Constants {
+public class ASTIdent extends ASTExpr implements org.apache.commons.bcel6.Constants {
   private String   name;
   private Variable reference; // Reference in environment to decl of this ident
 
diff --git a/src/examples/Mini/ASTIfExpr.java b/src/examples/Mini/ASTIfExpr.java
index 8c7308f..1361e60 100644
--- a/src/examples/Mini/ASTIfExpr.java
+++ b/src/examples/Mini/ASTIfExpr.java
@@ -19,20 +19,20 @@
 /* JJT: 0.3pre1 */
 
 package Mini;
-import org.apache.bcel.generic.BranchHandle;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.GOTO;
-import org.apache.bcel.generic.IFEQ;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
+import org.apache.commons.bcel6.generic.BranchHandle;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.GOTO;
+import org.apache.commons.bcel6.generic.IFEQ;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
 
 /**
  *
  * @version $Id$
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public class ASTIfExpr extends ASTExpr implements org.apache.bcel.Constants {
+public class ASTIfExpr extends ASTExpr implements org.apache.commons.bcel6.Constants {
   private ASTExpr if_expr, then_expr, else_expr;
 
   // Generated methods
diff --git a/src/examples/Mini/ASTInteger.java b/src/examples/Mini/ASTInteger.java
index c086b92..771f5e7 100644
--- a/src/examples/Mini/ASTInteger.java
+++ b/src/examples/Mini/ASTInteger.java
@@ -19,10 +19,10 @@
 /* JJT: 0.3pre1 */
 
 package Mini;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.PUSH;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.PUSH;
 
 /**
  *
diff --git a/src/examples/Mini/ASTLetExpr.java b/src/examples/Mini/ASTLetExpr.java
index 72ef336..0c43514 100644
--- a/src/examples/Mini/ASTLetExpr.java
+++ b/src/examples/Mini/ASTLetExpr.java
@@ -19,21 +19,21 @@
 /* JJT: 0.3pre1 */
 
 package Mini;
-import org.apache.bcel.generic.BasicType;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.ISTORE;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.LocalVariableGen;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.Type;
+import org.apache.commons.bcel6.generic.BasicType;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.ISTORE;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.LocalVariableGen;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.Type;
 
 /**
  *
  * @version $Id$
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public class ASTLetExpr extends ASTExpr implements org.apache.bcel.Constants {
+public class ASTLetExpr extends ASTExpr implements org.apache.commons.bcel6.Constants {
   private ASTIdent[]  idents;
   private ASTExpr[]   exprs;
   private ASTExpr     body;
diff --git a/src/examples/Mini/ASTProgram.java b/src/examples/Mini/ASTProgram.java
index 65aa17a..8cb7423 100644
--- a/src/examples/Mini/ASTProgram.java
+++ b/src/examples/Mini/ASTProgram.java
@@ -21,23 +21,23 @@
 package Mini;
 import java.io.PrintWriter;
 
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.generic.ALOAD;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.GETSTATIC;
-import org.apache.bcel.generic.ILOAD;
-import org.apache.bcel.generic.INVOKESPECIAL;
-import org.apache.bcel.generic.INVOKESTATIC;
-import org.apache.bcel.generic.INVOKEVIRTUAL;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.NEW;
-import org.apache.bcel.generic.PUSH;
-import org.apache.bcel.generic.PUTSTATIC;
-import org.apache.bcel.generic.RETURN;
-import org.apache.bcel.generic.Type;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.generic.ALOAD;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.GETSTATIC;
+import org.apache.commons.bcel6.generic.ILOAD;
+import org.apache.commons.bcel6.generic.INVOKESPECIAL;
+import org.apache.commons.bcel6.generic.INVOKESTATIC;
+import org.apache.commons.bcel6.generic.INVOKEVIRTUAL;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.NEW;
+import org.apache.commons.bcel6.generic.PUSH;
+import org.apache.commons.bcel6.generic.PUTSTATIC;
+import org.apache.commons.bcel6.generic.RETURN;
+import org.apache.commons.bcel6.generic.Type;
 
 /**
  * Root node of everything, direct children are nodes of type FunDecl
@@ -46,7 +46,7 @@
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
 public class ASTProgram extends SimpleNode
-implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constants {
+implements MiniParserConstants, MiniParserTreeConstants, org.apache.commons.bcel6.Constants {
   private ASTFunDecl[] fun_decls; // Children: Function declarations
   private Environment  env;       // Environment contains variables and functions
 
diff --git a/src/examples/Mini/Function.java b/src/examples/Mini/Function.java
index 0ceafbc..380a83e 100644
--- a/src/examples/Mini/Function.java
+++ b/src/examples/Mini/Function.java
@@ -24,7 +24,7 @@
  * @version $Id$
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public class Function implements org.apache.bcel.Constants, EnvEntry {
+public class Function implements org.apache.commons.bcel6.Constants, EnvEntry {
   private ASTIdent   name;         // Reference to the original declaration
   private ASTIdent[] args;         // Reference to argument identifiers
 //  private ASTExpr    body;         // Reference to function expression body
diff --git a/src/examples/Mini/MiniC.java b/src/examples/Mini/MiniC.java
index 0bcd0f0..08eab14 100644
--- a/src/examples/Mini/MiniC.java
+++ b/src/examples/Mini/MiniC.java
@@ -20,11 +20,12 @@
 import java.io.FileOutputStream;
 import java.io.PrintWriter;
 import java.util.Vector;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.ConstantPoolGen;
 
-public class MiniC implements org.apache.bcel.Constants {
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+
+public class MiniC implements org.apache.commons.bcel6.Constants {
   private static Vector<String> errors   = null;
   private static Vector<String> warnings = null;
   private static String file     = null;
diff --git a/src/examples/Mini/Variable.java b/src/examples/Mini/Variable.java
index c3658dc..1dbc334 100644
--- a/src/examples/Mini/Variable.java
+++ b/src/examples/Mini/Variable.java
@@ -16,7 +16,7 @@
  *
  */
 package Mini;
-import org.apache.bcel.generic.LocalVariableGen;
+import org.apache.commons.bcel6.generic.LocalVariableGen;
 
 /**
  * Represents a variable declared in a LET expression or a FUN declaration.
diff --git a/src/examples/Package.java b/src/examples/Package.java
index 2c7c2c5..b3d9a1a 100644
--- a/src/examples/Package.java
+++ b/src/examples/Package.java
@@ -27,14 +27,14 @@
 import java.util.jar.JarOutputStream;
 import java.util.zip.ZipEntry;
 
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.util.ClassPath;
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.util.ClassPath;
 
 /**
  * Package the client. Creates a jar file in the current directory
diff --git a/src/examples/Peephole.java b/src/examples/Peephole.java
index 334da0c..c4bd3b4 100644
--- a/src/examples/Peephole.java
+++ b/src/examples/Peephole.java
@@ -18,16 +18,16 @@
 
 import java.util.Iterator;
 
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InstructionTargeter;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.TargetLostException;
-import org.apache.bcel.util.InstructionFinder;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.InstructionTargeter;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.TargetLostException;
+import org.apache.commons.bcel6.util.InstructionFinder;
 
 /**
  * Remove NOPs from given class
diff --git a/src/examples/ProxyCreator.java b/src/examples/ProxyCreator.java
index c89d939..8374342 100644
--- a/src/examples/ProxyCreator.java
+++ b/src/examples/ProxyCreator.java
@@ -19,25 +19,25 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.generic.ALOAD;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.GETSTATIC;
-import org.apache.bcel.generic.INVOKEVIRTUAL;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.PUSH;
-import org.apache.bcel.generic.Type;
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.generic.ALOAD;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.GETSTATIC;
+import org.apache.commons.bcel6.generic.INVOKEVIRTUAL;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionFactory;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.PUSH;
+import org.apache.commons.bcel6.generic.Type;
 
 /**
  * Dynamically creates and uses a proxy for {@code java.awt.event.ActionListener}
  * via the classloader mechanism if called with
- * <pre>java org.apache.bcel.util.JavaWrapper ProxyCreator</pre>
+ * <pre>java org.apache.commons.bcel6.util.JavaWrapper ProxyCreator</pre>
  *
  * The trick is to encode the byte code we need into the class name
  * using the Utility.encode() method. This will result however in big
@@ -48,8 +48,8 @@
  *
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @version $Id$
- * @see org.apache.bcel.util.JavaWrapper
- * @see org.apache.bcel.util.ClassLoader
+ * @see org.apache.commons.bcel6.util.JavaWrapper
+ * @see org.apache.commons.bcel6.util.ClassLoader
  * @see Utility
  */
 public class ProxyCreator {
@@ -77,7 +77,7 @@
         ClassLoader loader = ProxyCreator.class.getClassLoader();
 
         // instanceof won't work here ...
-        if (loader.getClass().toString().equals("class org.apache.bcel.util.ClassLoader")) {
+        if (loader.getClass().toString().equals("class org.apache.commons.bcel6.util.ClassLoader")) {
             // Real class name will be set by the class loader
             ClassGen cg = new ClassGen("foo", "java.lang.Object", "", Constants.ACC_PUBLIC,
                     new String[]{"java.awt.event.ActionListener"});
@@ -129,7 +129,7 @@
 
             a.actionPerformed(new ActionEvent(a, ActionEvent.ACTION_PERFORMED, "hello"));
         } else {
-            System.err.println("Call me with java org.apache.bcel.util.JavaWrapper ProxyCreator");
+            System.err.println("Call me with java org.apache.commons.bcel6.util.JavaWrapper ProxyCreator");
         }
     }
 
diff --git a/src/examples/TransitiveHull.java b/src/examples/TransitiveHull.java
index 2c41e49..e774754 100644
--- a/src/examples/TransitiveHull.java
+++ b/src/examples/TransitiveHull.java
@@ -19,22 +19,22 @@
 import java.util.Arrays;
 import java.util.regex.Pattern;
 
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.ConstantCP;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantInterfaceMethodref;
-import org.apache.bcel.classfile.ConstantMethodref;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.util.ClassQueue;
-import org.apache.bcel.util.ClassSet;
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.ConstantCP;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
+import org.apache.commons.bcel6.classfile.ConstantMethodref;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.generic.ArrayType;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.util.ClassQueue;
+import org.apache.commons.bcel6.util.ClassSet;
 
 /**
  * Find all classes referenced by given start class and all classes referenced
@@ -52,7 +52,7 @@
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @version $Id$
  */
-public class TransitiveHull extends org.apache.bcel.classfile.EmptyVisitor {
+public class TransitiveHull extends org.apache.commons.bcel6.classfile.EmptyVisitor {
 
     private ClassQueue queue;
     private ClassSet set;
@@ -85,7 +85,7 @@
             JavaClass clazz = queue.dequeue();
             cp = clazz.getConstantPool();
 
-            new org.apache.bcel.classfile.DescendingVisitor(clazz, this).visit();
+            new org.apache.commons.bcel6.classfile.DescendingVisitor(clazz, this).visit();
         }
     }
 
diff --git a/src/examples/helloify.java b/src/examples/helloify.java
index 08a55f6..f1524e8 100644
--- a/src/examples/helloify.java
+++ b/src/examples/helloify.java
@@ -16,23 +16,23 @@
  *
  */
 
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.GETSTATIC;
-import org.apache.bcel.generic.INVOKESPECIAL;
-import org.apache.bcel.generic.INVOKEVIRTUAL;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.PUSH;
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.GETSTATIC;
+import org.apache.commons.bcel6.generic.INVOKESPECIAL;
+import org.apache.commons.bcel6.generic.INVOKEVIRTUAL;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.PUSH;
 
 /**
  * Read class file(s) and patch all of its methods, so that they print
diff --git a/src/examples/id.java b/src/examples/id.java
index cdb9410..918bb0b 100644
--- a/src/examples/id.java
+++ b/src/examples/id.java
@@ -16,14 +16,14 @@
  *
  */
 
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.FieldGen;
-import org.apache.bcel.generic.MethodGen;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.FieldGen;
+import org.apache.commons.bcel6.generic.MethodGen;
 
 /**
  * Test BCEL if an input file is identical to the outfile generated
diff --git a/src/examples/listclass.java b/src/examples/listclass.java
index 80d23ef..a60bf1d 100644
--- a/src/examples/listclass.java
+++ b/src/examples/listclass.java
@@ -22,16 +22,16 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
 
 /**
  * Read class file(s) and display its contents. The command line usage is:
diff --git a/src/examples/maxstack.java b/src/examples/maxstack.java
index ad11bdb..0eb5146 100644
--- a/src/examples/maxstack.java
+++ b/src/examples/maxstack.java
@@ -16,12 +16,12 @@
  *
  */
 
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.MethodGen;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.MethodGen;
 
 /**
  * Read class file(s) and examine all of its methods, determining the
diff --git a/src/examples/patchclass.java b/src/examples/patchclass.java
index 65aed55..03c16a8 100644
--- a/src/examples/patchclass.java
+++ b/src/examples/patchclass.java
@@ -16,10 +16,10 @@
  *
  */
 
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.JavaClass;
 
 /**
  * Patch all Utf8 constants in the given class file <em>file</em>.class
diff --git a/src/main/java/org/apache/bcel/Constants.java b/src/main/java/org/apache/bcel/Constants.java
deleted file mode 100644
index e2c5970..0000000
--- a/src/main/java/org/apache/bcel/Constants.java
+++ /dev/null
@@ -1,1533 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel;
-
-/**
- * Constants for the project, mostly defined in the JVM specification.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface Constants {
-
-  /** Major version number of class files for Java 1.1.
-   *  @see #MINOR_1_1
-   *  */
-  public final static short MAJOR_1_1 = 45;
-
-  /** Minor version number of class files for Java 1.1.
-   *  @see #MAJOR_1_1
-   *  */
-  public final static short MINOR_1_1 = 3;
-
-  /** Major version number of class files for Java 1.2.
-   *  @see #MINOR_1_2
-   *  */
-  public final static short MAJOR_1_2 = 46;
-
-  /** Minor version number of class files for Java 1.2.
-   *  @see #MAJOR_1_2
-   *  */
-  public final static short MINOR_1_2 = 0;
-
-  /** Major version number of class files for Java 1.2.
-   *  @see #MINOR_1_2
-   *  */
-  public final static short MAJOR_1_3 = 47;
-
-  /** Minor version number of class files for Java 1.3.
-   *  @see #MAJOR_1_3
-   *  */
-  public final static short MINOR_1_3 = 0;
-
-  /** Major version number of class files for Java 1.3.
-   *  @see #MINOR_1_3
-   *  */
-  public final static short MAJOR_1_4 = 48;
-
-  /** Minor version number of class files for Java 1.4.
-   *  @see #MAJOR_1_4
-   *  */
-  public final static short MINOR_1_4 = 0;
-
-  /** Major version number of class files for Java 1.4.
-   *  @see #MINOR_1_4
-   *  */
-  public final static short MAJOR_1_5 = 49;
-
-  /** Minor version number of class files for Java 1.5.
-   *  @see #MAJOR_1_5
-   *  */
-  public final static short MINOR_1_5 = 0;
-
-  /** Major version number of class files for Java 1.6.
-   *  @see #MINOR_1_6
-   *  */
-  public final static short MAJOR_1_6 = 50;
-
-  /** Minor version number of class files for Java 1.6.
-   *  @see #MAJOR_1_6
-   *  */
-  public final static short MINOR_1_6 = 0;
-
-  /** Major version number of class files for Java 1.7.
-   *  @see #MINOR_1_7
-   *  */
-  public final static short MAJOR_1_7 = 51;
-
-  /** Minor version number of class files for Java 1.7.
-   *  @see #MAJOR_1_7
-   *  */
-  public final static short MINOR_1_7 = 0;
-
-  /** Major version number of class files for Java 1.8.
-   *  @see #MINOR_1_8
-   *  */
-  public final static short MAJOR_1_8 = 52;
-
-  /** Minor version number of class files for Java 1.8.
-   *  @see #MAJOR_1_8
-   *  */
-  public final static short MINOR_1_8 = 0;
-
-  /** Default major version number.  Class file is for Java 1.1.
-   *  @see #MAJOR_1_1
-   *  */
-  public final static short MAJOR = MAJOR_1_1;
-
-  /** Default major version number.  Class file is for Java 1.1.
-   *  @see #MAJOR_1_1
-   *  */
-  public final static short MINOR     = MINOR_1_1;
-
-  /** Maximum value for an unsigned short.
-   */
-  public final static int MAX_SHORT = 65535; // 2^16 - 1
-
-  /** Maximum value for an unsigned byte.
-   */
-  public final static int MAX_BYTE  = 255; // 2^8 - 1
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see "<a href='http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.5'>Flag definitions for Fields in the Java Virtual Machine Specification (Java SE 8 Edition).</a>"
-   *  @see "<a href='http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.6'>Flag definitions for Methods in the Java Virtual Machine Specification (Java SE 8 Edition).</a>"
-   *  @see "<a href='http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.6-300-D.1-D.1'>Flag definitions for Classes in the Java Virtual Machine Specification (Java SE 8 Edition).</a>"
-   */
-  public final static short ACC_PUBLIC       = 0x0001;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_PRIVATE      = 0x0002;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_PROTECTED    = 0x0004;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_STATIC       = 0x0008;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_FINAL        = 0x0010;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_SYNCHRONIZED = 0x0020;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_VOLATILE     = 0x0040;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_BRIDGE       = 0x0040;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_TRANSIENT    = 0x0080;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_VARARGS      = 0x0080;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_NATIVE       = 0x0100;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_INTERFACE    = 0x0200;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_ABSTRACT     = 0x0400;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_STRICT       = 0x0800;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_SYNTHETIC    = 0x1000;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_ANNOTATION   = 0x2000;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_ENUM         = 0x4000;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_MANDATED     = (short) 0x8000;
-
-  // Applies to classes compiled by new compilers only
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short ACC_SUPER        = 0x0020;
-
-  /** One of the access flags for fields, methods, or classes.
-   *  @see #ACC_PUBLIC
-   */
-  public final static short MAX_ACC_FLAG     = ACC_ENUM;
-
-  /** The names of the access flags. */
-  public final static String[] ACCESS_NAMES = {
-    "public", "private", "protected", "static", "final", "synchronized",
-    "volatile", "transient", "native", "interface", "abstract", "strictfp",
-    "synthetic", "annotation", "enum"
-  };
-
-  /** Marks a constant pool entry as type UTF-8.  */
-  public final static byte CONSTANT_Utf8               = 1;
-
-  /** Marks a constant pool entry as type Integer.  */
-  public final static byte CONSTANT_Integer            = 3;
-
-  /** Marks a constant pool entry as type Float.  */
-  public final static byte CONSTANT_Float              = 4;
-
-  /** Marks a constant pool entry as type Long.  */
-  public final static byte CONSTANT_Long               = 5;
-
-  /** Marks a constant pool entry as type Double.  */
-  public final static byte CONSTANT_Double             = 6;
-
-  /** Marks a constant pool entry as a Class.  */
-  public final static byte CONSTANT_Class              = 7;
-
-  /** Marks a constant pool entry as a Field Reference.  */
-  public final static byte CONSTANT_Fieldref           = 9;
-
-  /** Marks a constant pool entry as type String.  */
-  public final static byte CONSTANT_String             = 8;
-
-  /** Marks a constant pool entry as a Method Reference.  */
-  public final static byte CONSTANT_Methodref          = 10;
-
-  /** Marks a constant pool entry as an Interface Method Reference.  */
-  public final static byte CONSTANT_InterfaceMethodref = 11;
-
-  /** Marks a constant pool entry as a name and type.  */
-  public final static byte CONSTANT_NameAndType        = 12;
-
-  /** Marks a constant pool entry as a Method Handle.  */
-  public static final byte CONSTANT_MethodHandle       = 15;
-
-  /** Marks a constant pool entry as a Method Type.    */
-  public static final byte CONSTANT_MethodType         = 16;
-
-  /** Marks a constant pool entry as an Invoke Dynamic */
-  public static final byte CONSTANT_InvokeDynamic      = 18;
-
-  /** The names of the types of entries in a constant pool. */
-  public static final String[] CONSTANT_NAMES = {
-    "", "CONSTANT_Utf8", "", "CONSTANT_Integer",
-    "CONSTANT_Float", "CONSTANT_Long", "CONSTANT_Double",
-    "CONSTANT_Class", "CONSTANT_String", "CONSTANT_Fieldref",
-    "CONSTANT_Methodref", "CONSTANT_InterfaceMethodref",
-    "CONSTANT_NameAndType", "", "", "CONSTANT_MethodHandle",
-    "CONSTANT_MethodType", "", "CONSTANT_InvokeDynamic" };
-
-  /** The name of the static initializer, also called &quot;class
-   *  initialization method&quot; or &quot;interface initialization
-   *   method&quot;. This is &quot;&lt;clinit&gt;&quot;.
-   */
-  public final static String STATIC_INITIALIZER_NAME = "<clinit>";
-
-  /** The name of every constructor method in a class, also called
-   * &quot;instance initialization method&quot;. This is &quot;&lt;init&gt;&quot;.
-   */
-  public final static String CONSTRUCTOR_NAME = "<init>";
-
-  /** The names of the interfaces implemented by arrays */
-  public final static String[] INTERFACES_IMPLEMENTED_BY_ARRAYS = {"java.lang.Cloneable", "java.io.Serializable"};
-
-  /**
-   * One of the limitations of the Java Virtual Machine.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.11"> The Java Virtual Machine Specification, Second Edition, page 152, chapter 4.10.</a>
-   */
-  public static final int MAX_CP_ENTRIES     = 65535;
-
-  /**
-   * One of the limitations of the Java Virtual Machine.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.11"> The Java Virtual Machine Specification, Second Edition, page 152, chapter 4.10.</a>
-   */
-  public static final int MAX_CODE_SIZE      = 65536; //bytes
-
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short NOP              = 0;
-
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ACONST_NULL      = 1;
-
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ICONST_M1        = 2;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ICONST_0         = 3;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ICONST_1         = 4;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ICONST_2         = 5;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ICONST_3         = 6;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ICONST_4         = 7;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ICONST_5         = 8;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LCONST_0         = 9;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LCONST_1         = 10;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FCONST_0         = 11;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FCONST_1         = 12;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FCONST_2         = 13;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DCONST_0         = 14;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DCONST_1         = 15;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short BIPUSH           = 16;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short SIPUSH           = 17;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LDC              = 18;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LDC_W            = 19;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LDC2_W           = 20;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ILOAD            = 21;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LLOAD            = 22;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FLOAD            = 23;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DLOAD            = 24;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ALOAD            = 25;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ILOAD_0          = 26;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ILOAD_1          = 27;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ILOAD_2          = 28;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ILOAD_3          = 29;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LLOAD_0          = 30;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LLOAD_1          = 31;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LLOAD_2          = 32;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LLOAD_3          = 33;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FLOAD_0          = 34;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FLOAD_1          = 35;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FLOAD_2          = 36;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FLOAD_3          = 37;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DLOAD_0          = 38;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DLOAD_1          = 39;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DLOAD_2          = 40;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DLOAD_3          = 41;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ALOAD_0          = 42;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ALOAD_1          = 43;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ALOAD_2          = 44;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ALOAD_3          = 45;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IALOAD           = 46;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LALOAD           = 47;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FALOAD           = 48;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DALOAD           = 49;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short AALOAD           = 50;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short BALOAD           = 51;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short CALOAD           = 52;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short SALOAD           = 53;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISTORE           = 54;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSTORE           = 55;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSTORE           = 56;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSTORE           = 57;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ASTORE           = 58;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISTORE_0         = 59;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISTORE_1         = 60;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISTORE_2         = 61;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISTORE_3         = 62;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSTORE_0         = 63;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSTORE_1         = 64;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSTORE_2         = 65;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSTORE_3         = 66;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSTORE_0         = 67;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSTORE_1         = 68;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSTORE_2         = 69;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSTORE_3         = 70;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSTORE_0         = 71;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSTORE_1         = 72;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSTORE_2         = 73;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSTORE_3         = 74;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ASTORE_0         = 75;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ASTORE_1         = 76;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ASTORE_2         = 77;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ASTORE_3         = 78;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IASTORE          = 79;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LASTORE          = 80;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FASTORE          = 81;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DASTORE          = 82;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short AASTORE          = 83;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short BASTORE          = 84;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short CASTORE          = 85;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short SASTORE          = 86;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short POP              = 87;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short POP2             = 88;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DUP              = 89;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DUP_X1           = 90;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DUP_X2           = 91;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DUP2             = 92;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DUP2_X1          = 93;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DUP2_X2          = 94;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short SWAP             = 95;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IADD             = 96;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LADD             = 97;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FADD             = 98;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DADD             = 99;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISUB             = 100;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSUB             = 101;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSUB             = 102;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSUB             = 103;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IMUL             = 104;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LMUL             = 105;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FMUL             = 106;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DMUL             = 107;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IDIV             = 108;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LDIV             = 109;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FDIV             = 110;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DDIV             = 111;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IREM             = 112;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LREM             = 113;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FREM             = 114;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DREM             = 115;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INEG             = 116;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LNEG             = 117;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FNEG             = 118;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DNEG             = 119;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISHL             = 120;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSHL             = 121;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISHR             = 122;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSHR             = 123;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IUSHR            = 124;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LUSHR            = 125;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IAND             = 126;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LAND             = 127;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IOR              = 128;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LOR              = 129;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IXOR             = 130;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LXOR             = 131;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IINC             = 132;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2L              = 133;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2F              = 134;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2D              = 135;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short L2I              = 136;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short L2F              = 137;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short L2D              = 138;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short F2I              = 139;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short F2L              = 140;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short F2D              = 141;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short D2I              = 142;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short D2L              = 143;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short D2F              = 144;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2B              = 145;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INT2BYTE         = 145; // Old notion
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2C              = 146;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INT2CHAR         = 146; // Old notion
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2S              = 147;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INT2SHORT        = 147; // Old notion
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LCMP             = 148;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FCMPL            = 149;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FCMPG            = 150;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DCMPL            = 151;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DCMPG            = 152;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IFEQ             = 153;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IFNE             = 154;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IFLT             = 155;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IFGE             = 156;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IFGT             = 157;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IFLE             = 158;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IF_ICMPEQ        = 159;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IF_ICMPNE        = 160;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IF_ICMPLT        = 161;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IF_ICMPGE        = 162;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IF_ICMPGT        = 163;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IF_ICMPLE        = 164;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IF_ACMPEQ        = 165;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IF_ACMPNE        = 166;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short GOTO             = 167;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short JSR              = 168;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short RET              = 169;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short TABLESWITCH      = 170;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LOOKUPSWITCH     = 171;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IRETURN          = 172;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LRETURN          = 173;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FRETURN          = 174;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DRETURN          = 175;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ARETURN          = 176;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short RETURN           = 177;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short GETSTATIC        = 178;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short PUTSTATIC        = 179;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short GETFIELD         = 180;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short PUTFIELD         = 181;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INVOKEVIRTUAL    = 182;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INVOKESPECIAL    = 183;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INVOKENONVIRTUAL = 183; // Old name in JDK 1.0
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INVOKESTATIC     = 184;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INVOKEINTERFACE  = 185;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INVOKEDYNAMIC    = 186;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short NEW              = 187;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short NEWARRAY         = 188;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ANEWARRAY        = 189;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ARRAYLENGTH      = 190;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ATHROW           = 191;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short CHECKCAST        = 192;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INSTANCEOF       = 193;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short MONITORENTER     = 194;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short MONITOREXIT      = 195;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short WIDE             = 196;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short MULTIANEWARRAY   = 197;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IFNULL           = 198;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IFNONNULL        = 199;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short GOTO_W           = 200;
-  /** Java VM opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short JSR_W            = 201;
-
-  /** JVM internal opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2">Reserved opcodes in the Java Virtual Machine Specification</a> */
-  public static final short BREAKPOINT                = 202;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short LDC_QUICK                 = 203;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short LDC_W_QUICK               = 204;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short LDC2_W_QUICK              = 205;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short GETFIELD_QUICK            = 206;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short PUTFIELD_QUICK            = 207;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short GETFIELD2_QUICK           = 208;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short PUTFIELD2_QUICK           = 209;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short GETSTATIC_QUICK           = 210;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short PUTSTATIC_QUICK           = 211;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short GETSTATIC2_QUICK          = 212;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short PUTSTATIC2_QUICK          = 213;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short INVOKEVIRTUAL_QUICK       = 214;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short INVOKENONVIRTUAL_QUICK    = 215;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short INVOKESUPER_QUICK         = 216;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short INVOKESTATIC_QUICK        = 217;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short INVOKEINTERFACE_QUICK     = 218;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short INVOKEVIRTUALOBJECT_QUICK = 219;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short NEW_QUICK                 = 221;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short ANEWARRAY_QUICK           = 222;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short MULTIANEWARRAY_QUICK      = 223;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short CHECKCAST_QUICK           = 224;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short INSTANCEOF_QUICK          = 225;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short INVOKEVIRTUAL_QUICK_W     = 226;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short GETFIELD_QUICK_W          = 227;
-  /** JVM internal opcode.
-   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
-  public static final short PUTFIELD_QUICK_W          = 228;
-  /** JVM internal opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2">Reserved opcodes in the Java Virtual Machine Specification</a> */
-  public static final short IMPDEP1                   = 254;
-  /** JVM internal opcode.
-   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2">Reserved opcodes in the Java Virtual Machine Specification</a> */
-  public static final short IMPDEP2                   = 255;
-
-  /**
-   * BCEL virtual instruction for pushing an arbitrary data type onto the stack.  Will be converted to the appropriate JVM
-   * opcode when the class is dumped.
-   */
-  public static final short PUSH             = 4711;
-  /**
-   * BCEL virtual instruction for either LOOKUPSWITCH or TABLESWITCH.  Will be converted to the appropriate JVM
-   * opcode when the class is dumped.
-   */
-  public static final short SWITCH           = 4712;
-
-  /** Illegal opcode. */
-  public static final short  UNDEFINED      = -1;
-  /** Illegal opcode. */
-  public static final short  UNPREDICTABLE  = -2;
-  /** Illegal opcode. */
-  public static final short  RESERVED       = -3;
-  /** Mnemonic for an illegal opcode. */
-  public static final String ILLEGAL_OPCODE = "<illegal opcode>";
-  /** Mnemonic for an illegal type. */
-  public static final String ILLEGAL_TYPE   = "<illegal type>";
-
-  /** Boolean data type. */
-  public static final byte T_BOOLEAN = 4;
-  /** Char data type. */
-  public static final byte T_CHAR    = 5;
-  /** Float data type. */
-  public static final byte T_FLOAT   = 6;
-  /** Double data type. */
-  public static final byte T_DOUBLE  = 7;
-  /** Byte data type. */
-  public static final byte T_BYTE    = 8;
-  /** Short data type. */
-  public static final byte T_SHORT   = 9;
-  /** Int data type. */
-  public static final byte T_INT     = 10;
-  /** Long data type. */
-  public static final byte T_LONG    = 11;
-
-  /** Void data type (non-standard). */
-  public static final byte T_VOID      = 12; // Non-standard
-  /** Array data type. */
-  public static final byte T_ARRAY     = 13;
-  /** Object data type. */
-  public static final byte T_OBJECT    = 14;
-  /** Reference data type (deprecated). */
-  public static final byte T_REFERENCE = 14; // Deprecated
-  /** Unknown data type. */
-  public static final byte T_UNKNOWN   = 15;
-  /** Address data type. */
-  public static final byte T_ADDRESS   = 16;
-
-  /** The primitive type names corresponding to the T_XX constants,
-   * e.g., TYPE_NAMES[T_INT] = "int"
-   */
-  public static final String[] TYPE_NAMES = {
-    ILLEGAL_TYPE, ILLEGAL_TYPE,  ILLEGAL_TYPE, ILLEGAL_TYPE,
-    "boolean", "char", "float", "double", "byte", "short", "int", "long",
-    "void", "array", "object", "unknown", "address"
-  };
-
-  /** The primitive class names corresponding to the T_XX constants,
-   * e.g., CLASS_TYPE_NAMES[T_INT] = "java.lang.Integer"
-   */
-  public static final String[] CLASS_TYPE_NAMES = {
-    ILLEGAL_TYPE, ILLEGAL_TYPE,  ILLEGAL_TYPE, ILLEGAL_TYPE,
-    "java.lang.Boolean", "java.lang.Character", "java.lang.Float",
-    "java.lang.Double", "java.lang.Byte", "java.lang.Short",
-    "java.lang.Integer", "java.lang.Long", "java.lang.Void",
-    ILLEGAL_TYPE, ILLEGAL_TYPE,  ILLEGAL_TYPE,  ILLEGAL_TYPE
-  };
-
-  /** The signature characters corresponding to primitive types,
-   * e.g., SHORT_TYPE_NAMES[T_INT] = "I"
-   */
-  public static final String[] SHORT_TYPE_NAMES = {
-    ILLEGAL_TYPE, ILLEGAL_TYPE,  ILLEGAL_TYPE, ILLEGAL_TYPE,
-    "Z", "C", "F", "D", "B", "S", "I", "J",
-    "V", ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE
-  };
-
-  /**
-   * Number of byte code operands for each opcode, i.e., number of bytes after the tag byte
-   * itself.  Indexed by opcode, so NO_OF_OPERANDS[BIPUSH] = the number of operands for a bipush
-   * instruction.
-   */
-  public static final short[] NO_OF_OPERANDS = {
-    0/*nop*/, 0/*aconst_null*/, 0/*iconst_m1*/, 0/*iconst_0*/,
-    0/*iconst_1*/, 0/*iconst_2*/, 0/*iconst_3*/, 0/*iconst_4*/,
-    0/*iconst_5*/, 0/*lconst_0*/, 0/*lconst_1*/, 0/*fconst_0*/,
-    0/*fconst_1*/, 0/*fconst_2*/, 0/*dconst_0*/, 0/*dconst_1*/,
-    1/*bipush*/, 2/*sipush*/, 1/*ldc*/, 2/*ldc_w*/, 2/*ldc2_w*/,
-    1/*iload*/, 1/*lload*/, 1/*fload*/, 1/*dload*/, 1/*aload*/,
-    0/*iload_0*/, 0/*iload_1*/, 0/*iload_2*/, 0/*iload_3*/,
-    0/*lload_0*/, 0/*lload_1*/, 0/*lload_2*/, 0/*lload_3*/,
-    0/*fload_0*/, 0/*fload_1*/, 0/*fload_2*/, 0/*fload_3*/,
-    0/*dload_0*/, 0/*dload_1*/, 0/*dload_2*/, 0/*dload_3*/,
-    0/*aload_0*/, 0/*aload_1*/, 0/*aload_2*/, 0/*aload_3*/,
-    0/*iaload*/, 0/*laload*/, 0/*faload*/, 0/*daload*/,
-    0/*aaload*/, 0/*baload*/, 0/*caload*/, 0/*saload*/,
-    1/*istore*/, 1/*lstore*/, 1/*fstore*/, 1/*dstore*/,
-    1/*astore*/, 0/*istore_0*/, 0/*istore_1*/, 0/*istore_2*/,
-    0/*istore_3*/, 0/*lstore_0*/, 0/*lstore_1*/, 0/*lstore_2*/,
-    0/*lstore_3*/, 0/*fstore_0*/, 0/*fstore_1*/, 0/*fstore_2*/,
-    0/*fstore_3*/, 0/*dstore_0*/, 0/*dstore_1*/, 0/*dstore_2*/,
-    0/*dstore_3*/, 0/*astore_0*/, 0/*astore_1*/, 0/*astore_2*/,
-    0/*astore_3*/, 0/*iastore*/, 0/*lastore*/, 0/*fastore*/,
-    0/*dastore*/, 0/*aastore*/, 0/*bastore*/, 0/*castore*/,
-    0/*sastore*/, 0/*pop*/, 0/*pop2*/, 0/*dup*/, 0/*dup_x1*/,
-    0/*dup_x2*/, 0/*dup2*/, 0/*dup2_x1*/, 0/*dup2_x2*/, 0/*swap*/,
-    0/*iadd*/, 0/*ladd*/, 0/*fadd*/, 0/*dadd*/, 0/*isub*/,
-    0/*lsub*/, 0/*fsub*/, 0/*dsub*/, 0/*imul*/, 0/*lmul*/,
-    0/*fmul*/, 0/*dmul*/, 0/*idiv*/, 0/*ldiv*/, 0/*fdiv*/,
-    0/*ddiv*/, 0/*irem*/, 0/*lrem*/, 0/*frem*/, 0/*drem*/,
-    0/*ineg*/, 0/*lneg*/, 0/*fneg*/, 0/*dneg*/, 0/*ishl*/,
-    0/*lshl*/, 0/*ishr*/, 0/*lshr*/, 0/*iushr*/, 0/*lushr*/,
-    0/*iand*/, 0/*land*/, 0/*ior*/, 0/*lor*/, 0/*ixor*/, 0/*lxor*/,
-    2/*iinc*/, 0/*i2l*/, 0/*i2f*/, 0/*i2d*/, 0/*l2i*/, 0/*l2f*/,
-    0/*l2d*/, 0/*f2i*/, 0/*f2l*/, 0/*f2d*/, 0/*d2i*/, 0/*d2l*/,
-    0/*d2f*/, 0/*i2b*/, 0/*i2c*/, 0/*i2s*/, 0/*lcmp*/, 0/*fcmpl*/,
-    0/*fcmpg*/, 0/*dcmpl*/, 0/*dcmpg*/, 2/*ifeq*/, 2/*ifne*/,
-    2/*iflt*/, 2/*ifge*/, 2/*ifgt*/, 2/*ifle*/, 2/*if_icmpeq*/,
-    2/*if_icmpne*/, 2/*if_icmplt*/, 2/*if_icmpge*/, 2/*if_icmpgt*/,
-    2/*if_icmple*/, 2/*if_acmpeq*/, 2/*if_acmpne*/, 2/*goto*/,
-    2/*jsr*/, 1/*ret*/, UNPREDICTABLE/*tableswitch*/, UNPREDICTABLE/*lookupswitch*/,
-    0/*ireturn*/, 0/*lreturn*/, 0/*freturn*/,
-    0/*dreturn*/, 0/*areturn*/, 0/*return*/,
-    2/*getstatic*/, 2/*putstatic*/, 2/*getfield*/,
-    2/*putfield*/, 2/*invokevirtual*/, 2/*invokespecial*/, 2/*invokestatic*/,
-    4/*invokeinterface*/, 4/*invokedynamic*/, 2/*new*/,
-    1/*newarray*/, 2/*anewarray*/,
-    0/*arraylength*/, 0/*athrow*/, 2/*checkcast*/,
-    2/*instanceof*/, 0/*monitorenter*/,
-    0/*monitorexit*/, UNPREDICTABLE/*wide*/, 3/*multianewarray*/,
-    2/*ifnull*/, 2/*ifnonnull*/, 4/*goto_w*/,
-    4/*jsr_w*/, 0/*breakpoint*/, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, RESERVED/*impdep1*/, RESERVED/*impdep2*/
-  };
-
-  /**
-   * How the byte code operands are to be interpreted for each opcode.
-   * Indexed by opcode.  TYPE_OF_OPERANDS[ILOAD] = an array of shorts
-   * describing the data types for the instruction.
-   */
-  public static final short[][] TYPE_OF_OPERANDS = {
-    {}/*nop*/, {}/*aconst_null*/, {}/*iconst_m1*/, {}/*iconst_0*/,
-    {}/*iconst_1*/, {}/*iconst_2*/, {}/*iconst_3*/, {}/*iconst_4*/,
-    {}/*iconst_5*/, {}/*lconst_0*/, {}/*lconst_1*/, {}/*fconst_0*/,
-    {}/*fconst_1*/, {}/*fconst_2*/, {}/*dconst_0*/, {}/*dconst_1*/,
-    {T_BYTE}/*bipush*/, {T_SHORT}/*sipush*/, {T_BYTE}/*ldc*/,
-    {T_SHORT}/*ldc_w*/, {T_SHORT}/*ldc2_w*/,
-    {T_BYTE}/*iload*/, {T_BYTE}/*lload*/, {T_BYTE}/*fload*/,
-    {T_BYTE}/*dload*/, {T_BYTE}/*aload*/, {}/*iload_0*/,
-    {}/*iload_1*/, {}/*iload_2*/, {}/*iload_3*/, {}/*lload_0*/,
-    {}/*lload_1*/, {}/*lload_2*/, {}/*lload_3*/, {}/*fload_0*/,
-    {}/*fload_1*/, {}/*fload_2*/, {}/*fload_3*/, {}/*dload_0*/,
-    {}/*dload_1*/, {}/*dload_2*/, {}/*dload_3*/, {}/*aload_0*/,
-    {}/*aload_1*/, {}/*aload_2*/, {}/*aload_3*/, {}/*iaload*/,
-    {}/*laload*/, {}/*faload*/, {}/*daload*/, {}/*aaload*/,
-    {}/*baload*/, {}/*caload*/, {}/*saload*/, {T_BYTE}/*istore*/,
-    {T_BYTE}/*lstore*/, {T_BYTE}/*fstore*/, {T_BYTE}/*dstore*/,
-    {T_BYTE}/*astore*/, {}/*istore_0*/, {}/*istore_1*/,
-    {}/*istore_2*/, {}/*istore_3*/, {}/*lstore_0*/, {}/*lstore_1*/,
-    {}/*lstore_2*/, {}/*lstore_3*/, {}/*fstore_0*/, {}/*fstore_1*/,
-    {}/*fstore_2*/, {}/*fstore_3*/, {}/*dstore_0*/, {}/*dstore_1*/,
-    {}/*dstore_2*/, {}/*dstore_3*/, {}/*astore_0*/, {}/*astore_1*/,
-    {}/*astore_2*/, {}/*astore_3*/, {}/*iastore*/, {}/*lastore*/,
-    {}/*fastore*/, {}/*dastore*/, {}/*aastore*/, {}/*bastore*/,
-    {}/*castore*/, {}/*sastore*/, {}/*pop*/, {}/*pop2*/, {}/*dup*/,
-    {}/*dup_x1*/, {}/*dup_x2*/, {}/*dup2*/, {}/*dup2_x1*/,
-    {}/*dup2_x2*/, {}/*swap*/, {}/*iadd*/, {}/*ladd*/, {}/*fadd*/,
-    {}/*dadd*/, {}/*isub*/, {}/*lsub*/, {}/*fsub*/, {}/*dsub*/,
-    {}/*imul*/, {}/*lmul*/, {}/*fmul*/, {}/*dmul*/, {}/*idiv*/,
-    {}/*ldiv*/, {}/*fdiv*/, {}/*ddiv*/, {}/*irem*/, {}/*lrem*/,
-    {}/*frem*/, {}/*drem*/, {}/*ineg*/, {}/*lneg*/, {}/*fneg*/,
-    {}/*dneg*/, {}/*ishl*/, {}/*lshl*/, {}/*ishr*/, {}/*lshr*/,
-    {}/*iushr*/, {}/*lushr*/, {}/*iand*/, {}/*land*/, {}/*ior*/,
-    {}/*lor*/, {}/*ixor*/, {}/*lxor*/, {T_BYTE, T_BYTE}/*iinc*/,
-    {}/*i2l*/, {}/*i2f*/, {}/*i2d*/, {}/*l2i*/, {}/*l2f*/, {}/*l2d*/,
-    {}/*f2i*/, {}/*f2l*/, {}/*f2d*/, {}/*d2i*/, {}/*d2l*/, {}/*d2f*/,
-    {}/*i2b*/, {}/*i2c*/,{}/*i2s*/, {}/*lcmp*/, {}/*fcmpl*/,
-    {}/*fcmpg*/, {}/*dcmpl*/, {}/*dcmpg*/, {T_SHORT}/*ifeq*/,
-    {T_SHORT}/*ifne*/, {T_SHORT}/*iflt*/, {T_SHORT}/*ifge*/,
-    {T_SHORT}/*ifgt*/, {T_SHORT}/*ifle*/, {T_SHORT}/*if_icmpeq*/,
-    {T_SHORT}/*if_icmpne*/, {T_SHORT}/*if_icmplt*/,
-    {T_SHORT}/*if_icmpge*/, {T_SHORT}/*if_icmpgt*/,
-    {T_SHORT}/*if_icmple*/, {T_SHORT}/*if_acmpeq*/,
-    {T_SHORT}/*if_acmpne*/, {T_SHORT}/*goto*/, {T_SHORT}/*jsr*/,
-    {T_BYTE}/*ret*/, {}/*tableswitch*/, {}/*lookupswitch*/,
-    {}/*ireturn*/, {}/*lreturn*/, {}/*freturn*/, {}/*dreturn*/,
-    {}/*areturn*/, {}/*return*/, {T_SHORT}/*getstatic*/,
-    {T_SHORT}/*putstatic*/, {T_SHORT}/*getfield*/,
-    {T_SHORT}/*putfield*/, {T_SHORT}/*invokevirtual*/,
-    {T_SHORT}/*invokespecial*/, {T_SHORT}/*invokestatic*/,
-    {T_SHORT, T_BYTE, T_BYTE}/*invokeinterface*/, {T_SHORT, T_BYTE, T_BYTE}/*invokedynamic*/,
-    {T_SHORT}/*new*/, {T_BYTE}/*newarray*/,
-    {T_SHORT}/*anewarray*/, {}/*arraylength*/, {}/*athrow*/,
-    {T_SHORT}/*checkcast*/, {T_SHORT}/*instanceof*/,
-    {}/*monitorenter*/, {}/*monitorexit*/, {T_BYTE}/*wide*/,
-    {T_SHORT, T_BYTE}/*multianewarray*/, {T_SHORT}/*ifnull*/,
-    {T_SHORT}/*ifnonnull*/, {T_INT}/*goto_w*/, {T_INT}/*jsr_w*/,
-    {}/*breakpoint*/, {}, {}, {}, {}, {}, {}, {},
-    {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
-    {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
-    {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
-    {}/*impdep1*/, {}/*impdep2*/
-  };
-
-  /**
-   * Names of opcodes.  Indexed by opcode.  OPCODE_NAMES[ALOAD] = "aload".
-   */
-  public static final String[] OPCODE_NAMES = {
-    "nop", "aconst_null", "iconst_m1", "iconst_0", "iconst_1",
-    "iconst_2", "iconst_3", "iconst_4", "iconst_5", "lconst_0",
-    "lconst_1", "fconst_0", "fconst_1", "fconst_2", "dconst_0",
-    "dconst_1", "bipush", "sipush", "ldc", "ldc_w", "ldc2_w", "iload",
-    "lload", "fload", "dload", "aload", "iload_0", "iload_1", "iload_2",
-    "iload_3", "lload_0", "lload_1", "lload_2", "lload_3", "fload_0",
-    "fload_1", "fload_2", "fload_3", "dload_0", "dload_1", "dload_2",
-    "dload_3", "aload_0", "aload_1", "aload_2", "aload_3", "iaload",
-    "laload", "faload", "daload", "aaload", "baload", "caload", "saload",
-    "istore", "lstore", "fstore", "dstore", "astore", "istore_0",
-    "istore_1", "istore_2", "istore_3", "lstore_0", "lstore_1",
-    "lstore_2", "lstore_3", "fstore_0", "fstore_1", "fstore_2",
-    "fstore_3", "dstore_0", "dstore_1", "dstore_2", "dstore_3",
-    "astore_0", "astore_1", "astore_2", "astore_3", "iastore", "lastore",
-    "fastore", "dastore", "aastore", "bastore", "castore", "sastore",
-    "pop", "pop2", "dup", "dup_x1", "dup_x2", "dup2", "dup2_x1",
-    "dup2_x2", "swap", "iadd", "ladd", "fadd", "dadd", "isub", "lsub",
-    "fsub", "dsub", "imul", "lmul", "fmul", "dmul", "idiv", "ldiv",
-    "fdiv", "ddiv", "irem", "lrem", "frem", "drem", "ineg", "lneg",
-    "fneg", "dneg", "ishl", "lshl", "ishr", "lshr", "iushr", "lushr",
-    "iand", "land", "ior", "lor", "ixor", "lxor", "iinc", "i2l", "i2f",
-    "i2d", "l2i", "l2f", "l2d", "f2i", "f2l", "f2d", "d2i", "d2l", "d2f",
-    "i2b", "i2c", "i2s", "lcmp", "fcmpl", "fcmpg",
-    "dcmpl", "dcmpg", "ifeq", "ifne", "iflt", "ifge", "ifgt", "ifle",
-    "if_icmpeq", "if_icmpne", "if_icmplt", "if_icmpge", "if_icmpgt",
-    "if_icmple", "if_acmpeq", "if_acmpne", "goto", "jsr", "ret",
-    "tableswitch", "lookupswitch", "ireturn", "lreturn", "freturn",
-    "dreturn", "areturn", "return", "getstatic", "putstatic", "getfield",
-    "putfield", "invokevirtual", "invokespecial", "invokestatic",
-    "invokeinterface", "invokedynamic", "new", "newarray", "anewarray",
-    "arraylength", "athrow", "checkcast", "instanceof", "monitorenter",
-    "monitorexit", "wide", "multianewarray", "ifnull", "ifnonnull",
-    "goto_w", "jsr_w", "breakpoint", ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
-    ILLEGAL_OPCODE, "impdep1", "impdep2"
-  };
-
-  /**
-   * Number of words consumed on operand stack by instructions.
-   * Indexed by opcode.  CONSUME_STACK[FALOAD] = number of words
-   * consumed from the stack by a faload instruction.
-   */
-  public static final int[] CONSUME_STACK = {
-    0/*nop*/, 0/*aconst_null*/, 0/*iconst_m1*/, 0/*iconst_0*/, 0/*iconst_1*/,
-    0/*iconst_2*/, 0/*iconst_3*/, 0/*iconst_4*/, 0/*iconst_5*/, 0/*lconst_0*/,
-    0/*lconst_1*/, 0/*fconst_0*/, 0/*fconst_1*/, 0/*fconst_2*/, 0/*dconst_0*/,
-    0/*dconst_1*/, 0/*bipush*/, 0/*sipush*/, 0/*ldc*/, 0/*ldc_w*/, 0/*ldc2_w*/, 0/*iload*/,
-    0/*lload*/, 0/*fload*/, 0/*dload*/, 0/*aload*/, 0/*iload_0*/, 0/*iload_1*/, 0/*iload_2*/,
-    0/*iload_3*/, 0/*lload_0*/, 0/*lload_1*/, 0/*lload_2*/, 0/*lload_3*/, 0/*fload_0*/,
-    0/*fload_1*/, 0/*fload_2*/, 0/*fload_3*/, 0/*dload_0*/, 0/*dload_1*/, 0/*dload_2*/,
-    0/*dload_3*/, 0/*aload_0*/, 0/*aload_1*/, 0/*aload_2*/, 0/*aload_3*/, 2/*iaload*/,
-    2/*laload*/, 2/*faload*/, 2/*daload*/, 2/*aaload*/, 2/*baload*/, 2/*caload*/, 2/*saload*/,
-    1/*istore*/, 2/*lstore*/, 1/*fstore*/, 2/*dstore*/, 1/*astore*/, 1/*istore_0*/,
-    1/*istore_1*/, 1/*istore_2*/, 1/*istore_3*/, 2/*lstore_0*/, 2/*lstore_1*/,
-    2/*lstore_2*/, 2/*lstore_3*/, 1/*fstore_0*/, 1/*fstore_1*/, 1/*fstore_2*/,
-    1/*fstore_3*/, 2/*dstore_0*/, 2/*dstore_1*/, 2/*dstore_2*/, 2/*dstore_3*/,
-    1/*astore_0*/, 1/*astore_1*/, 1/*astore_2*/, 1/*astore_3*/, 3/*iastore*/, 4/*lastore*/,
-    3/*fastore*/, 4/*dastore*/, 3/*aastore*/, 3/*bastore*/, 3/*castore*/, 3/*sastore*/,
-    1/*pop*/, 2/*pop2*/, 1/*dup*/, 2/*dup_x1*/, 3/*dup_x2*/, 2/*dup2*/, 3/*dup2_x1*/,
-    4/*dup2_x2*/, 2/*swap*/, 2/*iadd*/, 4/*ladd*/, 2/*fadd*/, 4/*dadd*/, 2/*isub*/, 4/*lsub*/,
-    2/*fsub*/, 4/*dsub*/, 2/*imul*/, 4/*lmul*/, 2/*fmul*/, 4/*dmul*/, 2/*idiv*/, 4/*ldiv*/,
-    2/*fdiv*/, 4/*ddiv*/, 2/*irem*/, 4/*lrem*/, 2/*frem*/, 4/*drem*/, 1/*ineg*/, 2/*lneg*/,
-    1/*fneg*/, 2/*dneg*/, 2/*ishl*/, 3/*lshl*/, 2/*ishr*/, 3/*lshr*/, 2/*iushr*/, 3/*lushr*/,
-    2/*iand*/, 4/*land*/, 2/*ior*/, 4/*lor*/, 2/*ixor*/, 4/*lxor*/, 0/*iinc*/,
-    1/*i2l*/, 1/*i2f*/, 1/*i2d*/, 2/*l2i*/, 2/*l2f*/, 2/*l2d*/, 1/*f2i*/, 1/*f2l*/,
-    1/*f2d*/, 2/*d2i*/, 2/*d2l*/, 2/*d2f*/, 1/*i2b*/, 1/*i2c*/, 1/*i2s*/,
-    4/*lcmp*/, 2/*fcmpl*/, 2/*fcmpg*/, 4/*dcmpl*/, 4/*dcmpg*/, 1/*ifeq*/, 1/*ifne*/,
-    1/*iflt*/, 1/*ifge*/, 1/*ifgt*/, 1/*ifle*/, 2/*if_icmpeq*/, 2/*if_icmpne*/, 2/*if_icmplt*/,
-    2 /*if_icmpge*/, 2/*if_icmpgt*/, 2/*if_icmple*/, 2/*if_acmpeq*/, 2/*if_acmpne*/,
-    0/*goto*/, 0/*jsr*/, 0/*ret*/, 1/*tableswitch*/, 1/*lookupswitch*/, 1/*ireturn*/,
-    2/*lreturn*/, 1/*freturn*/, 2/*dreturn*/, 1/*areturn*/, 0/*return*/, 0/*getstatic*/,
-    UNPREDICTABLE/*putstatic*/, 1/*getfield*/, UNPREDICTABLE/*putfield*/,
-    UNPREDICTABLE/*invokevirtual*/, UNPREDICTABLE/*invokespecial*/,
-    UNPREDICTABLE/*invokestatic*/,
-    UNPREDICTABLE/*invokeinterface*/, UNPREDICTABLE/*invokedynamic*/, 0/*new*/, 1/*newarray*/, 1/*anewarray*/,
-    1/*arraylength*/, 1/*athrow*/, 1/*checkcast*/, 1/*instanceof*/, 1/*monitorenter*/,
-    1/*monitorexit*/, 0/*wide*/, UNPREDICTABLE/*multianewarray*/, 1/*ifnull*/, 1/*ifnonnull*/,
-    0/*goto_w*/, 0/*jsr_w*/, 0/*breakpoint*/, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNPREDICTABLE/*impdep1*/, UNPREDICTABLE/*impdep2*/
-  };
-
-  /**
-   * Number of words produced onto operand stack by instructions.
-   * Indexed by opcode.  CONSUME_STACK[DALOAD] = number of words
-   * consumed from the stack by a daload instruction.
-   */
-  public static final int[] PRODUCE_STACK = {
-    0/*nop*/, 1/*aconst_null*/, 1/*iconst_m1*/, 1/*iconst_0*/, 1/*iconst_1*/,
-    1/*iconst_2*/, 1/*iconst_3*/, 1/*iconst_4*/, 1/*iconst_5*/, 2/*lconst_0*/,
-    2/*lconst_1*/, 1/*fconst_0*/, 1/*fconst_1*/, 1/*fconst_2*/, 2/*dconst_0*/,
-    2/*dconst_1*/, 1/*bipush*/, 1/*sipush*/, 1/*ldc*/, 1/*ldc_w*/, 2/*ldc2_w*/, 1/*iload*/,
-    2/*lload*/, 1/*fload*/, 2/*dload*/, 1/*aload*/, 1/*iload_0*/, 1/*iload_1*/, 1/*iload_2*/,
-    1/*iload_3*/, 2/*lload_0*/, 2/*lload_1*/, 2/*lload_2*/, 2/*lload_3*/, 1/*fload_0*/,
-    1/*fload_1*/, 1/*fload_2*/, 1/*fload_3*/, 2/*dload_0*/, 2/*dload_1*/, 2/*dload_2*/,
-    2/*dload_3*/, 1/*aload_0*/, 1/*aload_1*/, 1/*aload_2*/, 1/*aload_3*/, 1/*iaload*/,
-    2/*laload*/, 1/*faload*/, 2/*daload*/, 1/*aaload*/, 1/*baload*/, 1/*caload*/, 1/*saload*/,
-    0/*istore*/, 0/*lstore*/, 0/*fstore*/, 0/*dstore*/, 0/*astore*/, 0/*istore_0*/,
-    0/*istore_1*/, 0/*istore_2*/, 0/*istore_3*/, 0/*lstore_0*/, 0/*lstore_1*/,
-    0/*lstore_2*/, 0/*lstore_3*/, 0/*fstore_0*/, 0/*fstore_1*/, 0/*fstore_2*/,
-    0/*fstore_3*/, 0/*dstore_0*/, 0/*dstore_1*/, 0/*dstore_2*/, 0/*dstore_3*/,
-    0/*astore_0*/, 0/*astore_1*/, 0/*astore_2*/, 0/*astore_3*/, 0/*iastore*/, 0/*lastore*/,
-    0/*fastore*/, 0/*dastore*/, 0/*aastore*/, 0/*bastore*/, 0/*castore*/, 0/*sastore*/,
-    0/*pop*/, 0/*pop2*/, 2/*dup*/, 3/*dup_x1*/, 4/*dup_x2*/, 4/*dup2*/, 5/*dup2_x1*/,
-    6/*dup2_x2*/, 2/*swap*/, 1/*iadd*/, 2/*ladd*/, 1/*fadd*/, 2/*dadd*/, 1/*isub*/, 2/*lsub*/,
-    1/*fsub*/, 2/*dsub*/, 1/*imul*/, 2/*lmul*/, 1/*fmul*/, 2/*dmul*/, 1/*idiv*/, 2/*ldiv*/,
-    1/*fdiv*/, 2/*ddiv*/, 1/*irem*/, 2/*lrem*/, 1/*frem*/, 2/*drem*/, 1/*ineg*/, 2/*lneg*/,
-    1/*fneg*/, 2/*dneg*/, 1/*ishl*/, 2/*lshl*/, 1/*ishr*/, 2/*lshr*/, 1/*iushr*/, 2/*lushr*/,
-    1/*iand*/, 2/*land*/, 1/*ior*/, 2/*lor*/, 1/*ixor*/, 2/*lxor*/,
-    0/*iinc*/, 2/*i2l*/, 1/*i2f*/, 2/*i2d*/, 1/*l2i*/, 1/*l2f*/, 2/*l2d*/, 1/*f2i*/,
-    2/*f2l*/, 2/*f2d*/, 1/*d2i*/, 2/*d2l*/, 1/*d2f*/,
-    1/*i2b*/, 1/*i2c*/, 1/*i2s*/, 1/*lcmp*/, 1/*fcmpl*/, 1/*fcmpg*/,
-    1/*dcmpl*/, 1/*dcmpg*/, 0/*ifeq*/, 0/*ifne*/, 0/*iflt*/, 0/*ifge*/, 0/*ifgt*/, 0/*ifle*/,
-    0/*if_icmpeq*/, 0/*if_icmpne*/, 0/*if_icmplt*/, 0/*if_icmpge*/, 0/*if_icmpgt*/,
-    0/*if_icmple*/, 0/*if_acmpeq*/, 0/*if_acmpne*/, 0/*goto*/, 1/*jsr*/, 0/*ret*/,
-    0/*tableswitch*/, 0/*lookupswitch*/, 0/*ireturn*/, 0/*lreturn*/, 0/*freturn*/,
-    0/*dreturn*/, 0/*areturn*/, 0/*return*/, UNPREDICTABLE/*getstatic*/, 0/*putstatic*/,
-    UNPREDICTABLE/*getfield*/, 0/*putfield*/, UNPREDICTABLE/*invokevirtual*/,
-    UNPREDICTABLE/*invokespecial*/, UNPREDICTABLE/*invokestatic*/,
-    UNPREDICTABLE/*invokeinterface*/, UNPREDICTABLE/*invokedynamic*/, 1/*new*/, 1/*newarray*/, 1/*anewarray*/,
-    1/*arraylength*/, 1/*athrow*/, 1/*checkcast*/, 1/*instanceof*/, 0/*monitorenter*/,
-    0/*monitorexit*/, 0/*wide*/, 1/*multianewarray*/, 0/*ifnull*/, 0/*ifnonnull*/,
-    0/*goto_w*/, 1/*jsr_w*/, 0/*breakpoint*/, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
-    UNDEFINED, UNPREDICTABLE/*impdep1*/, UNPREDICTABLE/*impdep2*/
-  };
-
-  /** Attributes and their corresponding names.
-   */
-  public static final byte ATTR_UNKNOWN                                 = -1;
-  public static final byte ATTR_SOURCE_FILE                             = 0;
-  public static final byte ATTR_CONSTANT_VALUE                          = 1;
-  public static final byte ATTR_CODE                                    = 2;
-  public static final byte ATTR_EXCEPTIONS                              = 3;
-  public static final byte ATTR_LINE_NUMBER_TABLE                       = 4;
-  public static final byte ATTR_LOCAL_VARIABLE_TABLE                    = 5;
-  public static final byte ATTR_INNER_CLASSES                           = 6;
-  public static final byte ATTR_SYNTHETIC                               = 7;
-  public static final byte ATTR_DEPRECATED                              = 8;
-  public static final byte ATTR_PMG                                     = 9;
-  public static final byte ATTR_SIGNATURE                               = 10;
-  public static final byte ATTR_STACK_MAP                               = 11;
-  public static final byte ATTR_RUNTIME_VISIBLE_ANNOTATIONS             = 12;
-  public static final byte ATTR_RUNTIME_INVISIBLE_ANNOTATIONS           = 13;
-  public static final byte ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS   = 14;
-  public static final byte ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS = 15;
-  public static final byte ATTR_ANNOTATION_DEFAULT                      = 16;
-  public static final byte ATTR_LOCAL_VARIABLE_TYPE_TABLE               = 17;
-  public static final byte ATTR_ENCLOSING_METHOD                        = 18;
-  public static final byte ATTR_STACK_MAP_TABLE                         = 19;
-  public static final byte ATTR_BOOTSTRAP_METHODS                       = 20;
-  public static final byte ATTR_METHOD_PARAMETERS                       = 21;
-
-  public static final short KNOWN_ATTRIBUTES = 22; // count of attributes
-
-  /** @deprecated Use {@link #ATTR_RUNTIME_VISIBLE_ANNOTATIONS} instead */
-  @Deprecated
-public static final byte ATTR_RUNTIMEVISIBLE_ANNOTATIONS              = ATTR_RUNTIME_VISIBLE_ANNOTATIONS;
-  /** @deprecated Use {@link #ATTR_RUNTIME_INVISIBLE_ANNOTATIONS} instead */
-  @Deprecated
-public static final byte ATTR_RUNTIMEINVISIBLE_ANNOTATIONS            = ATTR_RUNTIME_INVISIBLE_ANNOTATIONS;
-  /** @deprecated Use {@link #ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS} instead */
-  @Deprecated
-public static final byte ATTR_RUNTIMEVISIBLE_PARAMETER_ANNOTATIONS    = ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS;
-  /** @deprecated Use {@link #ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS} instead */
-  @Deprecated
-public static final byte ATTR_RUNTIMEINVISIBLE_PARAMETER_ANNOTATIONS  = ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS;
-
-  // TODO: mutable public array!!
-  public static final String[] ATTRIBUTE_NAMES = {
-    "SourceFile", "ConstantValue", "Code", "Exceptions",
-    "LineNumberTable", "LocalVariableTable",
-    "InnerClasses", "Synthetic", "Deprecated",
-    "PMGClass", "Signature", "StackMap",
-    "RuntimeVisibleAnnotations", "RuntimeInvisibleAnnotations",
-    "RuntimeVisibleParameterAnnotations", "RuntimeInvisibleParameterAnnotations",
-    "AnnotationDefault", "LocalVariableTypeTable", "EnclosingMethod", "StackMapTable",
-    "BootstrapMethods", "MethodParameters"
-  };
-
-  /** Constants used in the StackMap attribute.
-   */
-  public static final byte ITEM_Bogus      = 0;
-  public static final byte ITEM_Integer    = 1;
-  public static final byte ITEM_Float      = 2;
-  public static final byte ITEM_Double     = 3;
-  public static final byte ITEM_Long       = 4;
-  public static final byte ITEM_Null       = 5;
-  public static final byte ITEM_InitObject = 6;
-  public static final byte ITEM_Object     = 7;
-  public static final byte ITEM_NewObject  = 8;
-
-  public static final String[] ITEM_NAMES = {
-    "Bogus", "Integer", "Float", "Double", "Long",
-    "Null", "InitObject", "Object", "NewObject"
-  };
-
-  /** Constants used to identify StackMapEntry types.
-   *
-   * For those types which can specify a range, the
-   * constant names the lowest value.
-   */
-  public static final int SAME_FRAME = 0;
-  public static final int SAME_LOCALS_1_STACK_ITEM_FRAME = 64;
-  public static final int SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED = 247;
-  public static final int CHOP_FRAME = 248;
-  public static final int SAME_FRAME_EXTENDED = 251;
-  public static final int APPEND_FRAME = 252;
-  public static final int FULL_FRAME = 255;
-
-  /** Constants that define the maximum value of
-   * those constants which store ranges. */
-
-  public static final int SAME_FRAME_MAX = 63;
-  public static final int SAME_LOCALS_1_STACK_ITEM_FRAME_MAX = 127;
-  public static final int CHOP_FRAME_MAX = 250;
-  public static final int APPEND_FRAME_MAX = 254;
-
-
-  // Constants defining the behavior of the Method Handles (JVMS �5.4.3.5)
-  
-  public static final byte REF_getField         = 1;
-  public static final byte REF_getStatic        = 2;
-  public static final byte REF_putField         = 3;
-  public static final byte REF_putStatic        = 4;
-  public static final byte REF_invokeVirtual    = 5;
-  public static final byte REF_invokeStatic     = 6;
-  public static final byte REF_invokeSpecial    = 7;
-  public static final byte REF_newInvokeSpecial = 8;
-  public static final byte REF_invokeInterface  = 9;
-  
-  /** The names of the referencd_kinds of a CONSTANT_MethodHandle_info. */
-  public static final String[] METHODHANDLE_NAMES = {
-      "", "getField", "getStatic", "putField", "putStatic", "invokeVirtual",
-      "invokeStatic", "invokeSpecial", "newInvokeSpecial", "invokeInterface" };
-
-}
diff --git a/src/main/java/org/apache/bcel/ExceptionConstants.java b/src/main/java/org/apache/bcel/ExceptionConstants.java
deleted file mode 100644
index 589e8c3..0000000
--- a/src/main/java/org/apache/bcel/ExceptionConstants.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel;
-
-/**
- * Exception constants.
- *
- * @version $Id$
- * @author  E. Haase
- */
-public interface ExceptionConstants {
-
-    /** The mother of all exceptions
-     */
-    public static final Class<Throwable> THROWABLE = Throwable.class;
-    /** Super class of any run-time exception
-     */
-    public static final Class<RuntimeException> RUNTIME_EXCEPTION = RuntimeException.class;
-    /** Super class of any linking exception (aka Linkage Error)
-     */
-    public static final Class<LinkageError> LINKING_EXCEPTION = LinkageError.class;
-    /** Linking Exceptions
-     */
-    public static final Class<ClassCircularityError> CLASS_CIRCULARITY_ERROR = ClassCircularityError.class;
-    public static final Class<ClassFormatError> CLASS_FORMAT_ERROR = ClassFormatError.class;
-    public static final Class<ExceptionInInitializerError> EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError.class;
-    public static final Class<IncompatibleClassChangeError> INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError.class;
-    public static final Class<AbstractMethodError> ABSTRACT_METHOD_ERROR = AbstractMethodError.class;
-    public static final Class<IllegalAccessError> ILLEGAL_ACCESS_ERROR = IllegalAccessError.class;
-    public static final Class<InstantiationError> INSTANTIATION_ERROR = InstantiationError.class;
-    public static final Class<NoSuchFieldError> NO_SUCH_FIELD_ERROR = NoSuchFieldError.class;
-    public static final Class<NoSuchMethodError> NO_SUCH_METHOD_ERROR = NoSuchMethodError.class;
-    public static final Class<NoClassDefFoundError> NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class;
-    public static final Class<UnsatisfiedLinkError> UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class;
-    public static final Class<VerifyError> VERIFY_ERROR = VerifyError.class;
-    /* UnsupportedClassVersionError is new in JDK 1.2 */
-    //public static final Class UnsupportedClassVersionError = UnsupportedClassVersionError.class;
-    /** Run-Time Exceptions 
-     */
-    public static final Class<NullPointerException> NULL_POINTER_EXCEPTION = NullPointerException.class;
-    public static final Class<ArrayIndexOutOfBoundsException> ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException.class;
-    public static final Class<ArithmeticException> ARITHMETIC_EXCEPTION = ArithmeticException.class;
-    public static final Class<NegativeArraySizeException> NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException.class;
-    public static final Class<ClassCastException> CLASS_CAST_EXCEPTION = ClassCastException.class;
-    public static final Class<IllegalMonitorStateException> ILLEGAL_MONITOR_STATE = IllegalMonitorStateException.class;
-    /** Pre-defined exception arrays according to chapters 5.1-5.4 of the Java Virtual
-     * Machine Specification 
-     */
-    public static final Class<?>[] EXCS_CLASS_AND_INTERFACE_RESOLUTION = {
-            NO_CLASS_DEF_FOUND_ERROR, CLASS_FORMAT_ERROR, VERIFY_ERROR, ABSTRACT_METHOD_ERROR,
-            EXCEPTION_IN_INITIALIZER_ERROR, ILLEGAL_ACCESS_ERROR
-    }; // Chapter 5.1
-    public static final Class<?>[] EXCS_FIELD_AND_METHOD_RESOLUTION = {
-            NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR
-    }; // Chapter 5.2
-    public static final Class<?>[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0]; // Chapter 5.3 (as below)
-    public static final Class<?>[] EXCS_STRING_RESOLUTION = new Class[0];
-    // Chapter 5.4 (no errors but the ones that _always_ could happen! How stupid.)
-    public static final Class<?>[] EXCS_ARRAY_EXCEPTION = {
-            NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
-    };
-}
diff --git a/src/main/java/org/apache/bcel/Repository.java b/src/main/java/org/apache/bcel/Repository.java
deleted file mode 100644
index 0d64a63..0000000
--- a/src/main/java/org/apache/bcel/Repository.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel;
-
-import java.io.IOException;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.util.ClassPath;
-import org.apache.bcel.util.SyntheticRepository;
-
-/**
- * The repository maintains informations about class interdependencies, e.g.,
- * whether a class is a sub-class of another. Delegates actual class loading
- * to SyntheticRepository with current class path by default.
- *
- * @see org.apache.bcel.util.Repository
- * @see org.apache.bcel.util.SyntheticRepository
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class Repository {
-
-    private static org.apache.bcel.util.Repository _repository = SyntheticRepository.getInstance();
-
-
-    /** @return currently used repository instance
-     */
-    public static org.apache.bcel.util.Repository getRepository() {
-        return _repository;
-    }
-
-
-    /** Set repository instance to be used for class loading
-     */
-    public static void setRepository( org.apache.bcel.util.Repository rep ) {
-        _repository = rep;
-    }
-
-
-    /** Lookup class somewhere found on your CLASSPATH, or whereever the
-     * repository instance looks for it.
-     *
-     * @return class object for given fully qualified class name
-     * @throws ClassNotFoundException if the class could not be found or
-     * parsed correctly
-     */
-    public static JavaClass lookupClass( String class_name ) throws ClassNotFoundException {
-        return _repository.loadClass(class_name);
-    }
-
-
-    /**
-     * Try to find class source using the internal repository instance.
-     * @see Class
-     * @return JavaClass object for given runtime class
-     * @throws ClassNotFoundException if the class could not be found or
-     * parsed correctly
-     */
-    public static JavaClass lookupClass( Class<?> clazz ) throws ClassNotFoundException {
-        return _repository.loadClass(clazz);
-    }
-
-
-    /**
-     * @return class file object for given Java class by looking on the
-     *  system class path; returns null if the class file can't be
-     *  found
-     */
-    public static ClassPath.ClassFile lookupClassFile( String class_name ) {
-        try {
-            ClassPath path = _repository.getClassPath();
-            if (path == null) {
-                return null;
-            }
-            return path.getClassFile(class_name);
-        } catch (IOException e) {
-            return null;
-        }
-    }
-
-
-    /** Clear the repository.
-     */
-    public static void clearCache() {
-        _repository.clear();
-    }
-
-
-    /**
-     * Add clazz to repository if there isn't an equally named class already in there.
-     *
-     * @return old entry in repository
-     */
-    public static JavaClass addClass( JavaClass clazz ) {
-        JavaClass old = _repository.findClass(clazz.getClassName());
-        _repository.storeClass(clazz);
-        return old;
-    }
-
-
-    /**
-     * Remove class with given (fully qualified) name from repository.
-     */
-    public static void removeClass( String clazz ) {
-        _repository.removeClass(_repository.findClass(clazz));
-    }
-
-
-    /**
-     * Remove given class from repository.
-     */
-    public static void removeClass( JavaClass clazz ) {
-        _repository.removeClass(clazz);
-    }
-
-
-    /**
-     * @return list of super classes of clazz in ascending order, i.e.,
-     * Object is always the last element
-     * @throws ClassNotFoundException if any of the superclasses can't be found
-     */
-    public static JavaClass[] getSuperClasses( JavaClass clazz ) throws ClassNotFoundException {
-        return clazz.getSuperClasses();
-    }
-
-
-    /**
-     * @return list of super classes of clazz in ascending order, i.e.,
-     * Object is always the last element.
-     * @throws ClassNotFoundException if the named class or any of its
-     *  superclasses can't be found
-     */
-    public static JavaClass[] getSuperClasses( String class_name ) throws ClassNotFoundException {
-        JavaClass jc = lookupClass(class_name);
-        return getSuperClasses(jc);
-    }
-
-
-    /**
-     * @return all interfaces implemented by class and its super
-     * classes and the interfaces that those interfaces extend, and so on.
-     * (Some people call this a transitive hull).
-     * @throws ClassNotFoundException if any of the class's
-     *  superclasses or superinterfaces can't be found
-     */
-    public static JavaClass[] getInterfaces( JavaClass clazz ) throws ClassNotFoundException {
-        return clazz.getAllInterfaces();
-    }
-
-
-    /**
-     * @return all interfaces implemented by class and its super
-     * classes and the interfaces that extend those interfaces, and so on
-     * @throws ClassNotFoundException if the named class can't be found,
-     *   or if any of its superclasses or superinterfaces can't be found
-     */
-    public static JavaClass[] getInterfaces( String class_name ) throws ClassNotFoundException {
-        return getInterfaces(lookupClass(class_name));
-    }
-
-
-    /**
-     * Equivalent to runtime "instanceof" operator.
-     * @return true, if clazz is an instance of super_class
-     * @throws ClassNotFoundException if any superclasses or superinterfaces
-     *   of clazz can't be found
-     */
-    public static boolean instanceOf( JavaClass clazz, JavaClass super_class )
-            throws ClassNotFoundException {
-        return clazz.instanceOf(super_class);
-    }
-
-
-    /**
-     * @return true, if clazz is an instance of super_class
-     * @throws ClassNotFoundException if either clazz or super_class
-     *   can't be found
-     */
-    public static boolean instanceOf( String clazz, String super_class )
-            throws ClassNotFoundException {
-        return instanceOf(lookupClass(clazz), lookupClass(super_class));
-    }
-
-
-    /**
-     * @return true, if clazz is an instance of super_class
-     * @throws ClassNotFoundException if super_class can't be found
-     */
-    public static boolean instanceOf( JavaClass clazz, String super_class )
-            throws ClassNotFoundException {
-        return instanceOf(clazz, lookupClass(super_class));
-    }
-
-
-    /**
-     * @return true, if clazz is an instance of super_class
-     * @throws ClassNotFoundException if clazz can't be found
-     */
-    public static boolean instanceOf( String clazz, JavaClass super_class )
-            throws ClassNotFoundException {
-        return instanceOf(lookupClass(clazz), super_class);
-    }
-
-
-    /**
-     * @return true, if clazz is an implementation of interface inter
-     * @throws ClassNotFoundException if any superclasses or superinterfaces
-     *   of clazz can't be found
-     */
-    public static boolean implementationOf( JavaClass clazz, JavaClass inter )
-            throws ClassNotFoundException {
-        return clazz.implementationOf(inter);
-    }
-
-
-    /**
-     * @return true, if clazz is an implementation of interface inter
-     * @throws ClassNotFoundException if clazz, inter, or any superclasses
-     *   or superinterfaces of clazz can't be found
-     */
-    public static boolean implementationOf( String clazz, String inter )
-            throws ClassNotFoundException {
-        return implementationOf(lookupClass(clazz), lookupClass(inter));
-    }
-
-
-    /**
-     * @return true, if clazz is an implementation of interface inter
-     * @throws ClassNotFoundException if inter or any superclasses
-     *   or superinterfaces of clazz can't be found
-     */
-    public static boolean implementationOf( JavaClass clazz, String inter )
-            throws ClassNotFoundException {
-        return implementationOf(clazz, lookupClass(inter));
-    }
-
-
-    /**
-     * @return true, if clazz is an implementation of interface inter
-     * @throws ClassNotFoundException if clazz or any superclasses or
-     *   superinterfaces of clazz can't be found
-     */
-    public static boolean implementationOf( String clazz, JavaClass inter )
-            throws ClassNotFoundException {
-        return implementationOf(lookupClass(clazz), inter);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/AccessFlags.java b/src/main/java/org/apache/bcel/classfile/AccessFlags.java
deleted file mode 100644
index d3da47c..0000000
--- a/src/main/java/org/apache/bcel/classfile/AccessFlags.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import org.apache.bcel.Constants;
-
-/**
- * Super class for all objects that have modifiers like private, final, ...
- * I.e. classes, fields, and methods.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class AccessFlags implements java.io.Serializable {
-
-    private static final long serialVersionUID = 2845404654039163061L;
-    protected int access_flags; // TODO make private (has getter & setter)
-
-
-    public AccessFlags() {
-    }
-
-
-    /**
-     * @param a inital access flags
-     */
-    public AccessFlags(int a) {
-        access_flags = a;
-    }
-
-
-    /** 
-     * @return Access flags of the object aka. "modifiers".
-     */
-    public final int getAccessFlags() {
-        return access_flags;
-    }
-
-
-    /** 
-     * @return Access flags of the object aka. "modifiers".
-     */
-    public final int getModifiers() {
-        return access_flags;
-    }
-
-
-    /** Set access flags aka "modifiers".
-     * @param access_flags Access flags of the object. 
-     */
-    public final void setAccessFlags( int access_flags ) {
-        this.access_flags = access_flags;
-    }
-
-
-    /** Set access flags aka "modifiers".
-     * @param access_flags Access flags of the object. 
-     */
-    public final void setModifiers( int access_flags ) {
-        setAccessFlags(access_flags);
-    }
-
-
-    private void setFlag( int flag, boolean set ) {
-        if ((access_flags & flag) != 0) { // Flag is set already
-            if (!set) {
-                access_flags ^= flag;
-            }
-        } else { // Flag not set
-            if (set) {
-                access_flags |= flag;
-            }
-        }
-    }
-
-
-    public final void isPublic( boolean flag ) {
-        setFlag(Constants.ACC_PUBLIC, flag);
-    }
-
-
-    public final boolean isPublic() {
-        return (access_flags & Constants.ACC_PUBLIC) != 0;
-    }
-
-
-    public final void isPrivate( boolean flag ) {
-        setFlag(Constants.ACC_PRIVATE, flag);
-    }
-
-
-    public final boolean isPrivate() {
-        return (access_flags & Constants.ACC_PRIVATE) != 0;
-    }
-
-
-    public final void isProtected( boolean flag ) {
-        setFlag(Constants.ACC_PROTECTED, flag);
-    }
-
-
-    public final boolean isProtected() {
-        return (access_flags & Constants.ACC_PROTECTED) != 0;
-    }
-
-
-    public final void isStatic( boolean flag ) {
-        setFlag(Constants.ACC_STATIC, flag);
-    }
-
-
-    public final boolean isStatic() {
-        return (access_flags & Constants.ACC_STATIC) != 0;
-    }
-
-
-    public final void isFinal( boolean flag ) {
-        setFlag(Constants.ACC_FINAL, flag);
-    }
-
-
-    public final boolean isFinal() {
-        return (access_flags & Constants.ACC_FINAL) != 0;
-    }
-
-
-    public final void isSynchronized( boolean flag ) {
-        setFlag(Constants.ACC_SYNCHRONIZED, flag);
-    }
-
-
-    public final boolean isSynchronized() {
-        return (access_flags & Constants.ACC_SYNCHRONIZED) != 0;
-    }
-
-
-    public final void isVolatile( boolean flag ) {
-        setFlag(Constants.ACC_VOLATILE, flag);
-    }
-
-
-    public final boolean isVolatile() {
-        return (access_flags & Constants.ACC_VOLATILE) != 0;
-    }
-
-
-    public final void isTransient( boolean flag ) {
-        setFlag(Constants.ACC_TRANSIENT, flag);
-    }
-
-
-    public final boolean isTransient() {
-        return (access_flags & Constants.ACC_TRANSIENT) != 0;
-    }
-
-
-    public final void isNative( boolean flag ) {
-        setFlag(Constants.ACC_NATIVE, flag);
-    }
-
-
-    public final boolean isNative() {
-        return (access_flags & Constants.ACC_NATIVE) != 0;
-    }
-
-
-    public final void isInterface( boolean flag ) {
-        setFlag(Constants.ACC_INTERFACE, flag);
-    }
-
-
-    public final boolean isInterface() {
-        return (access_flags & Constants.ACC_INTERFACE) != 0;
-    }
-
-
-    public final void isAbstract( boolean flag ) {
-        setFlag(Constants.ACC_ABSTRACT, flag);
-    }
-
-
-    public final boolean isAbstract() {
-        return (access_flags & Constants.ACC_ABSTRACT) != 0;
-    }
-
-
-    public final void isStrictfp( boolean flag ) {
-        setFlag(Constants.ACC_STRICT, flag);
-    }
-
-
-    public final boolean isStrictfp() {
-        return (access_flags & Constants.ACC_STRICT) != 0;
-    }
-
-
-    public final void isSynthetic( boolean flag ) {
-        setFlag(Constants.ACC_SYNTHETIC, flag);
-    }
-
-
-    public final boolean isSynthetic() {
-        return (access_flags & Constants.ACC_SYNTHETIC) != 0;
-    }
-
-
-    public final void isAnnotation( boolean flag ) {
-        setFlag(Constants.ACC_ANNOTATION, flag);
-    }
-
-
-    public final boolean isAnnotation() {
-        return (access_flags & Constants.ACC_ANNOTATION) != 0;
-    }
-
-
-    public final void isEnum( boolean flag ) {
-        setFlag(Constants.ACC_ENUM, flag);
-    }
-
-
-    public final boolean isEnum() {
-        return (access_flags & Constants.ACC_ENUM) != 0;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/AnnotationDefault.java b/src/main/java/org/apache/bcel/classfile/AnnotationDefault.java
deleted file mode 100644
index a1c7240..0000000
--- a/src/main/java/org/apache/bcel/classfile/AnnotationDefault.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/**
- * Represents the default value of a annotation for a method info
- *
- * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @version $Id: AnnotationDefault 1 2005-02-13 03:15:08Z dbrosius $
- * @since 6.0
- */
-public class AnnotationDefault extends Attribute {
-    
-    private static final long serialVersionUID = -4017327188724019487L;
-
-    private ElementValue default_value;
-
-    /**
-     * @param name_index    Index pointing to the name <em>Code</em>
-     * @param length        Content length in bytes
-     * @param input         Input stream
-     * @param constant_pool Array of constants
-     */
-    AnnotationDefault(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
-        this(name_index, length, (ElementValue) null, constant_pool);
-        default_value = ElementValue.readElementValue(input, constant_pool);
-    }
-
-    /**
-     * @param name_index    Index pointing to the name <em>Code</em>
-     * @param length        Content length in bytes
-     * @param defaultValue  the annotation's default value
-     * @param constant_pool Array of constants
-     */
-    public AnnotationDefault(int name_index, int length, ElementValue defaultValue, ConstantPool constant_pool) {
-        super(Constants.ATTR_ANNOTATION_DEFAULT, name_index, length, constant_pool);
-        setDefaultValue(defaultValue);
-    }
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept(Visitor v) {
-        v.visitAnnotationDefault(this);
-    }
-
-    /**
-     * @param defaultValue the default value of this methodinfo's annotation
-     */
-    public final void setDefaultValue(ElementValue defaultValue) {
-        default_value = defaultValue;
-    }
-
-    /**
-     * @return the default value
-     */
-    public final ElementValue getDefaultValue() {
-        return default_value;
-    }
-
-    @Override
-    public Attribute copy(ConstantPool _constant_pool) {
-        throw new RuntimeException("Not implemented yet!");
-    }
-
-    @Override
-    public final void dump(DataOutputStream dos) throws IOException {
-        super.dump(dos);
-        default_value.dump(dos);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java b/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java
deleted file mode 100644
index 4c699c5..0000000
--- a/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * @since 6.0
- */
-public class AnnotationElementValue extends ElementValue
-{
-        // For annotation element values, this is the annotation
-        private final AnnotationEntry annotationEntry;
-
-        public AnnotationElementValue(int type, AnnotationEntry annotationEntry,
-                        ConstantPool cpool)
-        {
-                super(type, cpool);
-                if (type != ANNOTATION) {
-                    throw new RuntimeException(
-                                    "Only element values of type annotation can be built with this ctor - type specified: " + type);
-                }
-                this.annotationEntry = annotationEntry;
-        }
-
-        @Override
-        public void dump(DataOutputStream dos) throws IOException
-        {
-                dos.writeByte(type); // u1 type of value (ANNOTATION == '@')
-                annotationEntry.dump(dos);
-        }
-
-        @Override
-        public String stringifyValue()
-        {
-                return annotationEntry.toString();
-        }
-
-        @Override
-        public String toString()
-        {
-                return stringifyValue();
-        }
-
-        public AnnotationEntry getAnnotationEntry()
-        {
-                return annotationEntry;
-        }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java b/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java
deleted file mode 100644
index ff768fb..0000000
--- a/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.bcel.Constants;
-
-/**
- * represents one annotation in the annotation table
- * 
- * @version $Id: AnnotationEntry
- * @author <A HREF="mailto:dbrosius@mebigfatguy.com">D. Brosius</A>
- * @since 6.0
- */
-public class AnnotationEntry implements Node, Constants, Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private final int type_index;
-    private final ConstantPool constant_pool;
-    private final boolean isRuntimeVisible;
-
-    private List<ElementValuePair> element_value_pairs;
-
-    /**
-     * Factory method to create an AnnotionEntry from a DataInput
-     * 
-     * @param input
-     * @param constant_pool
-     * @param isRuntimeVisible
-     * @return the entry
-     * @throws IOException
-     */
-    public static AnnotationEntry read(DataInput input, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException {
-
-        final AnnotationEntry annotationEntry = new AnnotationEntry(input.readUnsignedShort(), constant_pool, isRuntimeVisible);
-        final int num_element_value_pairs = (input.readUnsignedShort());
-        annotationEntry.element_value_pairs = new ArrayList<ElementValuePair>();
-        for (int i = 0; i < num_element_value_pairs; i++) {
-            annotationEntry.element_value_pairs.add(new ElementValuePair(input.readUnsignedShort(), ElementValue.readElementValue(input, constant_pool),
-                    constant_pool));
-        }
-        return annotationEntry;
-    }
-
-    public AnnotationEntry(int type_index, ConstantPool constant_pool, boolean isRuntimeVisible) {
-        this.type_index = type_index;
-        this.constant_pool = constant_pool;
-        this.isRuntimeVisible = isRuntimeVisible;
-    }
-
-    public int getTypeIndex() {
-        return type_index;
-    }
-
-    public ConstantPool getConstantPool() {
-        return constant_pool;
-    }
-
-    public boolean isRuntimeVisible() {
-        return isRuntimeVisible;
-    }
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
-     * I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
-     * 
-     * @param v Visitor object
-     */
-    public void accept(Visitor v) {
-        v.visitAnnotationEntry(this);
-    }
-
-    /**
-     * @return the annotation type name
-     */
-    public String getAnnotationType() {
-        final ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(type_index, CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-    /**
-     * @return the annotation type index
-     */
-    public int getAnnotationTypeIndex() {
-        return type_index;
-    }
-
-    /**
-     * @return the number of element value pairs in this annotation entry
-     */
-    public final int getNumElementValuePairs() {
-        return element_value_pairs.size();
-    }
-
-    /**
-     * @return the element value pairs in this annotation entry
-     */
-    public ElementValuePair[] getElementValuePairs() {
-        // TODO return List
-        return element_value_pairs.toArray(new ElementValuePair[element_value_pairs.size()]);
-    }
-
-    public void dump(DataOutputStream dos) throws IOException {
-        dos.writeShort(type_index); // u2 index of type name in cpool
-        dos.writeShort(element_value_pairs.size()); // u2 element_value pair
-        // count
-        for (final ElementValuePair envp : element_value_pairs) {
-            envp.dump(dos);
-        }
-    }
-
-    public void addElementNameValuePair(ElementValuePair elementNameValuePair) {
-        element_value_pairs.add(elementNameValuePair);
-    }
-
-    public String toShortString() {
-        final StringBuilder result = new StringBuilder();
-        result.append("@");
-        result.append(getAnnotationType());
-        if (getElementValuePairs().length > 0) {
-            result.append("(");
-            for (int i = 0; i < getElementValuePairs().length; i++) {
-                final ElementValuePair element = getElementValuePairs()[i];
-                result.append(element.toShortString());
-            }
-            result.append(")");
-        }
-        return result.toString();
-    }
-
-    public static AnnotationEntry[] createAnnotationEntries(Attribute[] attrs) {
-        // Find attributes that contain annotation data
-        List<AnnotationEntry> accumulatedAnnotations = new ArrayList<AnnotationEntry>(attrs.length);
-        for (Attribute attribute : attrs) {
-            if (attribute instanceof Annotations) {
-                Annotations runtimeAnnotations = (Annotations) attribute;
-                Collections.addAll(accumulatedAnnotations, runtimeAnnotations.getAnnotationEntries());
-            }
-        }
-        return accumulatedAnnotations.toArray(new AnnotationEntry[accumulatedAnnotations.size()]);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Annotations.java b/src/main/java/org/apache/bcel/classfile/Annotations.java
deleted file mode 100644
index 113c314..0000000
--- a/src/main/java/org/apache/bcel/classfile/Annotations.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * base class for annotations
- * 
- * @version $Id: Annotations
- * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public abstract class Annotations extends Attribute {
-
-    private static final long serialVersionUID = 1L;
-
-    private AnnotationEntry[] annotation_table;
-    private final boolean isRuntimeVisible;
-
-    /**
-     * @param annotation_type the subclass type of the annotation
-     * @param name_index Index pointing to the name <em>Code</em>
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     */
-    Annotations(byte annotation_type, int name_index, int length, DataInput input, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException {
-        this(annotation_type, name_index, length, (AnnotationEntry[]) null, constant_pool, isRuntimeVisible);
-        final int annotation_table_length = (input.readUnsignedShort());
-        annotation_table = new AnnotationEntry[annotation_table_length];
-        for (int i = 0; i < annotation_table_length; i++) {
-            annotation_table[i] = AnnotationEntry.read(input, constant_pool, isRuntimeVisible);
-        }
-    }
-
-    /**
-     * @param annotation_type the subclass type of the annotation
-     * @param name_index Index pointing to the name <em>Code</em>
-     * @param length Content length in bytes
-     * @param annotation_table the actual annotations
-     * @param constant_pool Array of constants
-     */
-    public Annotations(byte annotation_type, int name_index, int length, AnnotationEntry[] annotation_table, ConstantPool constant_pool, boolean isRuntimeVisible) {
-        super(annotation_type, name_index, length, constant_pool);
-        setAnnotationTable(annotation_table);
-        this.isRuntimeVisible = isRuntimeVisible;
-    }
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
-     * I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
-     * 
-     * @param v Visitor object
-     */
-    @Override
-    public void accept(Visitor v) {
-        v.visitAnnotation(this);
-    }
-
-    /**
-     * @param annotation_table the entries to set in this annotation
-     */
-    public final void setAnnotationTable(AnnotationEntry[] annotation_table) {
-        this.annotation_table = annotation_table;
-    }
-
-    /**
-     * returns the array of annotation entries in this annotation
-     */
-    public AnnotationEntry[] getAnnotationEntries() {
-        return annotation_table;
-    }
-
-    /**
-     * @return the number of annotation entries in this annotation
-     */
-    public final int getNumAnnotations() {
-        if (annotation_table == null) {
-            return 0;
-        }
-        return annotation_table.length;
-    }
-
-    public boolean isRuntimeVisible() {
-        return isRuntimeVisible;
-    }
-
-    protected void writeAnnotations(DataOutputStream dos) throws IOException {
-        if (annotation_table == null) {
-            return;
-        }
-        dos.writeShort(annotation_table.length);
-        for (AnnotationEntry element : annotation_table) {
-            element.dump(dos);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java b/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java
deleted file mode 100644
index 5829726..0000000
--- a/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * @since 6.0
- */
-public class ArrayElementValue extends ElementValue
-{
-    // For array types, this is the array
-    private final ElementValue[] evalues;
-
-    @Override
-    public String toString()
-    {
-        StringBuilder sb = new StringBuilder();
-        sb.append("{");
-        for (int i = 0; i < evalues.length; i++)
-        {
-            sb.append(evalues[i].toString());
-            if ((i + 1) < evalues.length) {
-                sb.append(",");
-            }
-        }
-        sb.append("}");
-        return sb.toString();
-    }
-
-    public ArrayElementValue(int type, ElementValue[] datums, ConstantPool cpool)
-    {
-        super(type, cpool);
-        if (type != ARRAY) {
-            throw new RuntimeException(
-                    "Only element values of type array can be built with this ctor - type specified: " + type);
-        }
-        this.evalues = datums;
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 type of value (ARRAY == '[')
-        dos.writeShort(evalues.length);
-        for (ElementValue evalue : evalues) {
-            evalue.dump(dos);
-        }
-    }
-
-    @Override
-    public String stringifyValue()
-    {
-        StringBuilder sb = new StringBuilder();
-        sb.append("[");
-        for (int i = 0; i < evalues.length; i++)
-        {
-            sb.append(evalues[i].stringifyValue());
-            if ((i + 1) < evalues.length) {
-                sb.append(",");
-            }
-        }
-        sb.append("]");
-        return sb.toString();
-    }
-
-    public ElementValue[] getElementValuesArray()
-    {
-        return evalues;
-    }
-
-    public int getElementValuesArraySize()
-    {
-        return evalues.length;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Attribute.java b/src/main/java/org/apache/bcel/classfile/Attribute.java
deleted file mode 100644
index 8cf157a..0000000
--- a/src/main/java/org/apache/bcel/classfile/Attribute.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.bcel.Constants;
-
-/**
- * Abstract super class for <em>Attribute</em> objects. Currently the
- * <em>ConstantValue</em>, <em>SourceFile</em>, <em>Code</em>,
- * <em>Exceptiontable</em>, <em>LineNumberTable</em>,
- * <em>LocalVariableTable</em>, <em>InnerClasses</em> and
- * <em>Synthetic</em> attributes are supported. The <em>Unknown</em>
- * attribute stands for non-standard-attributes.
- * 
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see ConstantValue
- * @see SourceFile
- * @see Code
- * @see Unknown
- * @see ExceptionTable
- * @see LineNumberTable
- * @see LocalVariableTable
- * @see InnerClasses
- * @see Synthetic
- * @see Deprecated
- * @see Signature
- */
-public abstract class Attribute implements Cloneable, Node, Serializable
-{
-    private static final long serialVersionUID = -1707826820310002955L;
-
-    protected int name_index; // Points to attribute name in constant pool TODO make private (has getter & setter)
-
-    protected int length; // Content length of attribute field TODO make private (has getter & setter)
-
-    protected byte tag; // Tag to distinguish subclasses TODO make private & final; supposed to be immutable
-
-    protected ConstantPool constant_pool; // TODO make private (has getter & setter)
-
-    protected Attribute(byte tag, int name_index, int length, ConstantPool constant_pool)
-    {
-        this.tag = tag;
-        this.name_index = name_index;
-        this.length = length;
-        this.constant_pool = constant_pool;
-    }
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     * 
-     * @param v
-     *            Visitor object
-     */
-    public abstract void accept(Visitor v);
-
-    /**
-     * Dump attribute to file stream in binary format.
-     * 
-     * @param file
-     *            Output file stream
-     * @throws IOException
-     */
-    public void dump(DataOutputStream file) throws IOException
-    {
-        file.writeShort(name_index);
-        file.writeInt(length);
-    }
-
-    private static final Map<String, Object> readers = new HashMap<String, Object>();
-
-    /**
-     * Add an Attribute reader capable of parsing (user-defined) attributes
-     * named "name". You should not add readers for the standard attributes such
-     * as "LineNumberTable", because those are handled internally.
-     * 
-     * @param name the name of the attribute as stored in the class file
-     * @param r    the reader object
-     * @deprecated Use {@link #addAttributeReader(String, UnknownAttributeReader)} instead
-     */
-    public static void addAttributeReader(String name, AttributeReader r)
-    {
-        readers.put(name, r);
-    }
-
-    /**
-     * Add an Attribute reader capable of parsing (user-defined) attributes
-     * named "name". You should not add readers for the standard attributes such
-     * as "LineNumberTable", because those are handled internally.
-     * 
-     * @param name the name of the attribute as stored in the class file
-     * @param r    the reader object
-     */
-    public static void addAttributeReader(String name, UnknownAttributeReader r)
-    {
-        readers.put(name, r);
-    }
-
-    /**
-     * Remove attribute reader
-     * 
-     * @param name the name of the attribute as stored in the class file
-     */
-    public static void removeAttributeReader(String name)
-    {
-        readers.remove(name);
-    }
-
-    /**
-     * Class method reads one attribute from the input data stream. This method
-     * must not be accessible from the outside. It is called by the Field and
-     * Method constructor methods.
-     * 
-     * @see Field
-     * @see Method
-     * 
-     * @param file Input stream
-     * @param constant_pool Array of constants
-     * @return Attribute
-     * @throws IOException
-     * @throws ClassFormatException
-     */
-    public static Attribute readAttribute(DataInputStream file, ConstantPool constant_pool)
-            throws IOException, ClassFormatException
-    {
-        return readAttribute((DataInput) file, constant_pool);
-    }
-
-    /**
-     * Class method reads one attribute from the input data stream. This method
-     * must not be accessible from the outside. It is called by the Field and
-     * Method constructor methods.
-     * 
-     * @see Field
-     * @see Method
-     * 
-     * @param file Input stream
-     * @param constant_pool Array of constants
-     * @return Attribute
-     * @throws IOException
-     * @throws ClassFormatException
-     */
-    public static Attribute readAttribute(DataInput file, ConstantPool constant_pool)
-            throws IOException, ClassFormatException
-    {
-        byte tag = Constants.ATTR_UNKNOWN; // Unknown attribute
-        // Get class name from constant pool via `name_index' indirection
-        int name_index = file.readUnsignedShort();
-        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8);
-        String name = c.getBytes();
-        
-        // Length of data in bytes
-        int length = file.readInt();
-        
-        // Compare strings to find known attribute
-        for (byte i = 0; i < Constants.KNOWN_ATTRIBUTES; i++)
-        {
-            if (name.equals(Constants.ATTRIBUTE_NAMES[i]))
-            {
-                tag = i; // found!
-                break;
-            }
-        }
-
-        // Call proper constructor, depending on `tag'
-        switch (tag)
-        {
-            case Constants.ATTR_UNKNOWN:
-                Object r = readers.get(name);
-                if (r instanceof UnknownAttributeReader)
-                {
-                    return ((UnknownAttributeReader) r).createAttribute(name_index, length, file, constant_pool);
-                }
-                else if (r instanceof  AttributeReader && file instanceof DataInputStream)
-                {
-                    return ((AttributeReader) r).createAttribute(name_index, length, (DataInputStream) file, constant_pool);
-                }
-                return new Unknown(name_index, length, file, constant_pool);
-            case Constants.ATTR_CONSTANT_VALUE:
-                return new ConstantValue(name_index, length, file, constant_pool);
-            case Constants.ATTR_SOURCE_FILE:
-                return new SourceFile(name_index, length, file, constant_pool);
-            case Constants.ATTR_CODE:
-                return new Code(name_index, length, file, constant_pool);
-            case Constants.ATTR_EXCEPTIONS:
-                return new ExceptionTable(name_index, length, file, constant_pool);
-            case Constants.ATTR_LINE_NUMBER_TABLE:
-                return new LineNumberTable(name_index, length, file, constant_pool);
-            case Constants.ATTR_LOCAL_VARIABLE_TABLE:
-                return new LocalVariableTable(name_index, length, file, constant_pool);
-            case Constants.ATTR_INNER_CLASSES:
-                return new InnerClasses(name_index, length, file, constant_pool);
-            case Constants.ATTR_SYNTHETIC:
-                return new Synthetic(name_index, length, file, constant_pool);
-            case Constants.ATTR_DEPRECATED:
-                return new Deprecated(name_index, length, file, constant_pool);
-            case Constants.ATTR_PMG:
-                return new PMGClass(name_index, length, file, constant_pool);
-            case Constants.ATTR_SIGNATURE:
-                return new Signature(name_index, length, file, constant_pool);
-            case Constants.ATTR_STACK_MAP:
-                return new StackMap(name_index, length, file, constant_pool);
-            case Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS:
-                return new RuntimeVisibleAnnotations(name_index, length, file, constant_pool);
-            case Constants.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS:
-                return new RuntimeInvisibleAnnotations(name_index, length, file, constant_pool);
-            case Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS:
-                return new RuntimeVisibleParameterAnnotations(name_index, length, file, constant_pool);
-            case Constants.ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS:
-                return new RuntimeInvisibleParameterAnnotations(name_index, length, file, constant_pool);
-            case Constants.ATTR_ANNOTATION_DEFAULT:
-                return new AnnotationDefault(name_index, length, file, constant_pool);
-            case Constants.ATTR_LOCAL_VARIABLE_TYPE_TABLE:
-                return new LocalVariableTypeTable(name_index, length, file, constant_pool);
-            case Constants.ATTR_ENCLOSING_METHOD:
-                return new EnclosingMethod(name_index, length, file, constant_pool);
-            case Constants.ATTR_STACK_MAP_TABLE:
-                return new StackMapTable(name_index, length, file, constant_pool);
-            case Constants.ATTR_BOOTSTRAP_METHODS:
-                return new BootstrapMethods(name_index, length, file, constant_pool);
-            case Constants.ATTR_METHOD_PARAMETERS:
-                return new MethodParameters(name_index, length, file, constant_pool);
-            default:
-                // Never reached
-                throw new IllegalStateException("Unrecognized attribute type tag parsed: " + tag);
-        }
-    }
-
-    /**
-     * @return Name of attribute
-     */
-    public String getName()
-    {
-        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-    /**
-     * @return Length of attribute field in bytes.
-     */
-    public final int getLength()
-    {
-        return length;
-    }
-
-    /**
-     * @param length length in bytes.
-     */
-    public final void setLength(int length)
-    {
-        this.length = length;
-    }
-
-    /**
-     * @param name_index of attribute.
-     */
-    public final void setNameIndex(int name_index)
-    {
-        this.name_index = name_index;
-    }
-
-    /**
-     * @return Name index in constant pool of attribute name.
-     */
-    public final int getNameIndex()
-    {
-        return name_index;
-    }
-
-    /**
-     * @return Tag of attribute, i.e., its type. Value may not be altered, thus there is no setTag() method.
-     */
-    public final byte getTag()
-    {
-        return tag;
-    }
-
-    /**
-     * @return Constant pool used by this object.
-     * @see ConstantPool
-     */
-    public final ConstantPool getConstantPool()
-    {
-        return constant_pool;
-    }
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     * @see ConstantPool
-     */
-    public final void setConstantPool(ConstantPool constant_pool)
-    {
-        this.constant_pool = constant_pool;
-    }
-
-    /**
-     * Use copy() if you want to have a deep copy(), i.e., with all references
-     * copied correctly.
-     * 
-     * @return shallow copy of this attribute
-     */
-    @Override
-    public Object clone()
-    {
-        Attribute attr = null;
-        try
-        {
-            attr = (Attribute) super.clone();
-        }
-        catch (CloneNotSupportedException e)
-        {
-            throw new Error("Clone Not Supported"); // never happens
-        }
-        return attr;
-    }
-
-    /**
-     * @return deep copy of this attribute
-     */
-    public abstract Attribute copy(ConstantPool _constant_pool);
-
-    /**
-     * @return attribute name.
-     */
-    @Override
-    public String toString()
-    {
-        return Constants.ATTRIBUTE_NAMES[tag];
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/AttributeReader.java b/src/main/java/org/apache/bcel/classfile/AttributeReader.java
deleted file mode 100644
index 0306a08..0000000
--- a/src/main/java/org/apache/bcel/classfile/AttributeReader.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-/**
- * Unknown (non-standard) attributes may be read via user-defined factory
- * objects that can be registered with the Attribute.addAttributeReader
- * method. These factory objects should implement this interface.
-
- * @see Attribute
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * 
- * @deprecated Use UnknownAttributeReader instead 
- */
-public interface AttributeReader {
-
-    /**
-     When this attribute reader is added via the static method
-     Attribute.addAttributeReader, an attribute name is associated with it.
-     As the class file parser parses attributes, it will call various
-     AttributeReaders based on the name of the attributes it is
-     constructing.
-
-     @param name_index An index into the constant pool, indexing a
-     ConstantUtf8 that represents the name of the attribute.
-
-     @param length The length of the data contained in the attribute.  This
-     is written into the constant pool and should agree with what the
-     factory expects the length to be.
-
-     @param file This is the data input stream that the factory needs to read
-     its data from.
-
-     @param constant_pool This is the constant pool associated with the
-     Attribute that we are constructing.
-
-     @return The user-defined AttributeReader should take this data and use
-     it to construct an attribute.  In the case of errors, a null can be
-     returned which will cause the parsing of the class file to fail.
-
-     @see Attribute#addAttributeReader( String, AttributeReader )
-     */
-    Attribute createAttribute( int name_index, int length, java.io.DataInputStream file, ConstantPool constant_pool );
-}
diff --git a/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java b/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java
deleted file mode 100644
index 4736161..0000000
--- a/src/main/java/org/apache/bcel/classfile/BootstrapMethod.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a bootstrap method attribute, i.e., the bootstrap
- * method ref, the number of bootstrap arguments and an array of the
- * bootstrap arguments.
- * 
- * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.23">The class File Format : The BootstrapMethods Attribute</a>
- * @since 6.0
- */
-public class BootstrapMethod implements Serializable, Cloneable {
-
-    private static final long serialVersionUID = -4517534834047695344L;
-
-    /** Index of the CONSTANT_MethodHandle_info structure in the constant_pool table */
-    private int bootstrap_method_ref;
-
-    private int num_bootstrap_arguments;
-
-    /** Array of references to the constant_pool table */
-    private int[] bootstrap_arguments;
-
-
-    /**
-     * Initialize from another object.
-     */
-    public BootstrapMethod(BootstrapMethod c) {
-        this(c.getBootstrapMethodRef(), c.getNumBootstrapArguments(), c.getBootstrapArguments());
-    }
-
-    /**
-     * Construct object from input stream.
-     * 
-     * @param input Input stream
-     * @throws IOException
-     */
-    BootstrapMethod(DataInput input) throws IOException {
-        this(input.readUnsignedShort(), input.readUnsignedShort(), (int[]) null);
-
-        bootstrap_arguments = new int[num_bootstrap_arguments];
-        for (int i = 0; i < num_bootstrap_arguments; i++) {
-            bootstrap_arguments[i] = input.readUnsignedShort();
-        }
-    }
-
-
-    /**
-     * @param bootstrap_method_ref int index into constant_pool of CONSTANT_MethodHandle
-     * @param num_bootstrap_arguments int count of number of boostrap arguments
-     * @param bootstrap_arguments int[] indices into constant_pool of CONSTANT_<type>_info
-     */
-    public BootstrapMethod(int bootstrap_method_ref, int num_bootstrap_arguments, int[] bootstrap_arguments) {
-        this.bootstrap_method_ref = bootstrap_method_ref;
-        this.num_bootstrap_arguments = num_bootstrap_arguments;
-        this.bootstrap_arguments = bootstrap_arguments;
-    }
-
-    /**
-     * @return index into constant_pool of bootstrap_method
-     */
-    public int getBootstrapMethodRef() {
-        return bootstrap_method_ref;
-    }
-
-    /**
-     * @param bootstrap_method_ref int index into constant_pool of CONSTANT_MethodHandle
-     */
-    public void setBootstrapMethodRef(int bootstrap_method_ref) {
-        this.bootstrap_method_ref = bootstrap_method_ref;
-    }
-
-    /**
-     * @return int[] of bootstrap_method indices into constant_pool of CONSTANT_<type>_info
-     */
-    public int[] getBootstrapArguments() {
-        return bootstrap_arguments;
-    }
-
-    /**
-     * @return count of number of boostrap arguments
-     */
-    public int getNumBootstrapArguments() {
-        return num_bootstrap_arguments;
-    }
-
-    /**
-     * @param bootstrap_arguments int[] indices into constant_pool of CONSTANT_<type>_info
-     */
-    public void setBootstrapArguments(int[] bootstrap_arguments) {
-        this.bootstrap_arguments = bootstrap_arguments;
-    }
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return "BootstrapMethod(" + bootstrap_method_ref + ", " + num_bootstrap_arguments + ", "
-               //UNDONE
-               //+ bootstrap_arguments + ")";
-               + "UNDONE)";
-    }
-
-    /**
-     * @return Resolved string representation
-     */
-    public final String toString( ConstantPool constant_pool ) {
-        StringBuilder buf = new StringBuilder();
-        String bootstrap_method_name;
-        bootstrap_method_name = constant_pool.constantToString(bootstrap_method_ref,
-                Constants.CONSTANT_MethodHandle);
-        buf.append(Utility.compactClassName(bootstrap_method_name));
-        if (num_bootstrap_arguments > 0) {
-            buf.append("\n     Method Arguments:");
-            for (int i = 0; i < num_bootstrap_arguments; i++) {
-                buf.append("\n     ").append(i).append(": ");
-                buf.append(constant_pool.constantToString(constant_pool.getConstant(bootstrap_arguments[i])));
-            }
-        }
-        return buf.toString();
-    }
-
-    /**
-     * Dump object to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump(DataOutputStream file) throws IOException {
-        file.writeShort(bootstrap_method_ref);
-        file.writeShort(bootstrap_arguments.length);
-        for (int bootstrap_argument : bootstrap_arguments) {
-            file.writeShort(bootstrap_argument);
-        }
-    }
-
-    /**
-     * @return deep copy of this object
-     */
-    public BootstrapMethod copy() {
-        try {
-            return (BootstrapMethod) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/BootstrapMethods.java b/src/main/java/org/apache/bcel/classfile/BootstrapMethods.java
deleted file mode 100644
index 911ea1e..0000000
--- a/src/main/java/org/apache/bcel/classfile/BootstrapMethods.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a BootstrapMethods attribute.
- *
- * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.23">The class File Format : The BootstrapMethods Attribute</a>
- * @since 6.0
- */
-public class BootstrapMethods extends Attribute {
-
-    private static final long serialVersionUID = -2169230245012340809L;
-
-    private BootstrapMethod[] bootstrap_methods;
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public BootstrapMethods(BootstrapMethods c) {
-        this(c.getNameIndex(), c.getLength(), c.getBootstrapMethods(), c.getConstantPool());
-    }
-
-
-    /**
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param bootstrap_methods array of bootstrap methods
-     * @param constant_pool Array of constants
-     */
-    public BootstrapMethods(int name_index, int length, BootstrapMethod[] bootstrap_methods, ConstantPool constant_pool) {
-        super(Constants.ATTR_BOOTSTRAP_METHODS, name_index, length, constant_pool);
-        this.bootstrap_methods = bootstrap_methods;
-    }
-
-    /**
-     * Construct object from Input stream.
-     *
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    BootstrapMethods(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
-        this(name_index, length, (BootstrapMethod[]) null, constant_pool);
-
-        int num_bootstrap_methods = input.readUnsignedShort();
-        bootstrap_methods = new BootstrapMethod[num_bootstrap_methods];
-        for (int i = 0; i < num_bootstrap_methods; i++) {
-            bootstrap_methods[i] = new BootstrapMethod(input);
-        }
-    }
-
-    /**
-     * @return array of bootstrap method "records"
-     */
-    public final BootstrapMethod[] getBootstrapMethods() {
-        return bootstrap_methods;
-    }
-
-    /**
-     * @param bootstrap_methods the array of bootstrap methods
-     */
-    public final void setBootstrapMethods(BootstrapMethod[] bootstrap_methods) {
-        this.bootstrap_methods = bootstrap_methods;
-    }
-
-    /**
-     * @param v Visitor object
-     */
-    @Override
-    public void accept(Visitor v) {
-        v.visitBootstrapMethods(this);
-    }
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public BootstrapMethods copy(ConstantPool _constant_pool) {
-        BootstrapMethods c = (BootstrapMethods) clone();
-        c.bootstrap_methods = new BootstrapMethod[bootstrap_methods.length];
-
-        for (int i = 0; i < bootstrap_methods.length; i++) {
-            c.bootstrap_methods[i] = bootstrap_methods[i].copy();
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-
-    /**
-     * Dump bootstrap methods attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump(DataOutputStream file) throws IOException {
-        super.dump(file);
-
-        file.writeShort(bootstrap_methods.length);
-        for (BootstrapMethod bootstrap_method : bootstrap_methods) {
-            bootstrap_method.dump(file);
-        }
-    }
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder();
-        buf.append("BootstrapMethods(");
-        buf.append(bootstrap_methods.length);
-        buf.append("):\n");
-        for (int i = 0; i < bootstrap_methods.length; i++) {
-            buf.append("  ").append(i).append(": ");
-            buf.append(bootstrap_methods[i].toString(constant_pool)).append("\n");
-        }
-        return buf.toString();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ClassElementValue.java b/src/main/java/org/apache/bcel/classfile/ClassElementValue.java
deleted file mode 100644
index 46a81a5..0000000
--- a/src/main/java/org/apache/bcel/classfile/ClassElementValue.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * @since 6.0
- */
-public class ClassElementValue extends ElementValue
-{
-    // For primitive types and string type, this points to the value entry in
-    // the cpool
-    // For 'class' this points to the class entry in the cpool
-    private final int idx;
-
-    public ClassElementValue(int type, int idx, ConstantPool cpool)
-    {
-        super(type, cpool);
-        this.idx = idx;
-    }
-
-    public int getIndex()
-    {
-        return idx;
-    }
-
-    public String getClassString()
-    {
-        ConstantUtf8 c = (ConstantUtf8) cpool.getConstant(idx,
-                Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-    @Override
-    public String stringifyValue()
-    {
-        ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx,
-                Constants.CONSTANT_Utf8);
-        return cu8.getBytes();
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 kind of value
-        dos.writeShort(idx);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ClassFormatException.java b/src/main/java/org/apache/bcel/classfile/ClassFormatException.java
deleted file mode 100644
index 07f8c20..0000000
--- a/src/main/java/org/apache/bcel/classfile/ClassFormatException.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-/** 
- * Thrown when the BCEL attempts to read a class file and determines
- * that the file is malformed or otherwise cannot be interpreted as a
- * class file.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ClassFormatException extends RuntimeException {
-
-    private static final long serialVersionUID = -3569097343160139969L;
-
-    public ClassFormatException() {
-        super();
-    }
-
-
-    public ClassFormatException(String s) {
-        super(s);
-    }
-
-    public ClassFormatException(String s, Throwable initCause) {
-        super(s, initCause);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ClassParser.java b/src/main/java/org/apache/bcel/classfile/ClassParser.java
deleted file mode 100644
index d58fdff..0000000
--- a/src/main/java/org/apache/bcel/classfile/ClassParser.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.BufferedInputStream;
-import java.io.DataInputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import org.apache.bcel.Constants;
-
-/**
- * Wrapper class that parses a given Java .class file. The method <A
- * href ="#parse">parse</A> returns a <A href ="JavaClass.html">
- * JavaClass</A> object on success. When an I/O error or an
- * inconsistency occurs an appropiate exception is propagated back to
- * the caller.
- *
- * The structure and the names comply, except for a few conveniences,
- * exactly with the <A href="http://docs.oracle.com/javase/specs/">
- * JVM specification 1.0</a>. See this paper for
- * further details about the structure of a bytecode file.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
- */
-public final class ClassParser {
-
-    private DataInputStream dataInputStream;
-    private final boolean fileOwned;
-    private final String file_name;
-    private String zip_file;
-    private int class_name_index, superclass_name_index;
-    private int major, minor; // Compiler version
-    private int access_flags; // Access rights of parsed class
-    private int[] interfaces; // Names of implemented interfaces
-    private ConstantPool constant_pool; // collection of constants
-    private Field[] fields; // class fields, i.e., its variables
-    private Method[] methods; // methods defined in the class
-    private Attribute[] attributes; // attributes defined in the class
-    private final boolean is_zip; // Loaded from zip file
-    private static final int BUFSIZE = 8192;
-
-
-    /**
-     * Parse class from the given stream.
-     *
-     * @param inputStream Input stream
-     * @param file_name File name
-     */
-    public ClassParser(InputStream inputStream, String file_name) {
-        this.file_name = file_name;
-        fileOwned = false;
-        String clazz = inputStream.getClass().getName(); // Not a very clean solution ...
-        is_zip = clazz.startsWith("java.util.zip.") || clazz.startsWith("java.util.jar.");
-        if (inputStream instanceof DataInputStream) {
-            this.dataInputStream = (DataInputStream) inputStream;
-        } else {
-            this.dataInputStream = new DataInputStream(new BufferedInputStream(inputStream, BUFSIZE));
-        }
-    }
-
-
-    /** Parse class from given .class file.
-     *
-     * @param file_name file name
-     */
-    public ClassParser(String file_name) {
-        is_zip = false;
-        this.file_name = file_name;
-        fileOwned = true;
-    }
-
-
-    /** Parse class from given .class file in a ZIP-archive
-     *
-     * @param zip_file zip file name
-     * @param file_name file name
-     */
-    public ClassParser(String zip_file, String file_name) {
-        is_zip = true;
-        fileOwned = true;
-        this.zip_file = zip_file;
-        this.file_name = file_name;
-    }
-
-
-    /**
-     * Parse the given Java class file and return an object that represents
-     * the contained data, i.e., constants, methods, fields and commands.
-     * A <em>ClassFormatException</em> is raised, if the file is not a valid
-     * .class file. (This does not include verification of the byte code as it
-     * is performed by the java interpreter).
-     *
-     * @return Class object representing the parsed class file
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    public JavaClass parse() throws IOException, ClassFormatException {
-        ZipFile zip = null;
-        try {
-            if (fileOwned) {
-                if (is_zip) {
-                    zip = new ZipFile(zip_file);
-                    ZipEntry entry = zip.getEntry(file_name);
-
-                    if (entry == null) {
-                        throw new IOException("File " + file_name + " not found");
-                    }
-
-                    dataInputStream = new DataInputStream(new BufferedInputStream(zip.getInputStream(entry),
-                            BUFSIZE));
-                } else {
-                    dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(
-                            file_name), BUFSIZE));
-                }
-            }
-            /****************** Read headers ********************************/
-            // Check magic tag of class file
-            readID();
-            // Get compiler version
-            readVersion();
-            /****************** Read constant pool and related **************/
-            // Read constant pool entries
-            readConstantPool();
-            // Get class information
-            readClassInfo();
-            // Get interface information, i.e., implemented interfaces
-            readInterfaces();
-            /****************** Read class fields and methods ***************/
-            // Read class fields, i.e., the variables of the class
-            readFields();
-            // Read class methods, i.e., the functions in the class
-            readMethods();
-            // Read class attributes
-            readAttributes();
-            // Check for unknown variables
-            //Unknown[] u = Unknown.getUnknownAttributes();
-            //for(int i=0; i < u.length; i++)
-            //  System.err.println("WARNING: " + u[i]);
-            // Everything should have been read now
-            //      if(file.available() > 0) {
-            //        int bytes = file.available();
-            //        byte[] buf = new byte[bytes];
-            //        file.read(buf);
-            //        if(!(is_zip && (buf.length == 1))) {
-            //      System.err.println("WARNING: Trailing garbage at end of " + file_name);
-            //      System.err.println(bytes + " extra bytes: " + Utility.toHexString(buf));
-            //        }
-            //      }
-        } finally {
-            // Read everything of interest, so close the file
-            if (fileOwned) {
-                try {
-                    if (dataInputStream != null) {
-                        dataInputStream.close();
-                    }
-                    if (zip != null) {
-                        zip.close();
-                    }
-                } catch (IOException ioe) {
-                    //ignore close exceptions
-                }
-            }
-        }
-        // Return the information we have gathered in a new object
-        return new JavaClass(class_name_index, superclass_name_index, file_name, major, minor,
-                access_flags, constant_pool, interfaces, fields, methods, attributes, is_zip
-                        ? JavaClass.ZIP
-                        : JavaClass.FILE);
-    }
-
-
-    /**
-     * Read information about the attributes of the class.
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    private void readAttributes() throws IOException, ClassFormatException {
-        int attributes_count = dataInputStream.readUnsignedShort();
-        attributes = new Attribute[attributes_count];
-        for (int i = 0; i < attributes_count; i++) {
-            attributes[i] = Attribute.readAttribute(dataInputStream, constant_pool);
-        }
-    }
-
-
-    /**
-     * Read information about the class and its super class.
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    private void readClassInfo() throws IOException, ClassFormatException {
-        access_flags = dataInputStream.readUnsignedShort();
-        /* Interfaces are implicitely abstract, the flag should be set
-         * according to the JVM specification.
-         */
-        if ((access_flags & Constants.ACC_INTERFACE) != 0) {
-            access_flags |= Constants.ACC_ABSTRACT;
-        }
-        if (((access_flags & Constants.ACC_ABSTRACT) != 0)
-                && ((access_flags & Constants.ACC_FINAL) != 0)) {
-            throw new ClassFormatException("Class " + file_name + " can't be both final and abstract");
-        }
-        class_name_index = dataInputStream.readUnsignedShort();
-        superclass_name_index = dataInputStream.readUnsignedShort();
-    }
-
-
-    /**
-     * Read constant pool entries.
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    private void readConstantPool() throws IOException, ClassFormatException {
-        constant_pool = new ConstantPool(dataInputStream);
-    }
-
-
-    /**
-     * Read information about the fields of the class, i.e., its variables.
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    private void readFields() throws IOException, ClassFormatException {
-        int fields_count = dataInputStream.readUnsignedShort();
-        fields = new Field[fields_count];
-        for (int i = 0; i < fields_count; i++) {
-            fields[i] = new Field(dataInputStream, constant_pool);
-        }
-    }
-
-
-    /******************** Private utility methods **********************/
-    /**
-     * Check whether the header of the file is ok.
-     * Of course, this has to be the first action on successive file reads.
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    private void readID() throws IOException, ClassFormatException {
-        int magic = 0xCAFEBABE;
-        if (dataInputStream.readInt() != magic) {
-            throw new ClassFormatException(file_name + " is not a Java .class file");
-        }
-    }
-
-
-    /**
-     * Read information about the interfaces implemented by this class.
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    private void readInterfaces() throws IOException, ClassFormatException {
-        int interfaces_count = dataInputStream.readUnsignedShort();
-        interfaces = new int[interfaces_count];
-        for (int i = 0; i < interfaces_count; i++) {
-            interfaces[i] = dataInputStream.readUnsignedShort();
-        }
-    }
-
-
-    /**
-     * Read information about the methods of the class.
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    private void readMethods() throws IOException, ClassFormatException {
-        int methods_count = dataInputStream.readUnsignedShort();
-        methods = new Method[methods_count];
-        for (int i = 0; i < methods_count; i++) {
-            methods[i] = new Method(dataInputStream, constant_pool);
-        }
-    }
-
-
-    /**
-     * Read major and minor version of compiler which created the file.
-     * @throws  IOException
-     * @throws  ClassFormatException
-     */
-    private void readVersion() throws IOException, ClassFormatException {
-        minor = dataInputStream.readUnsignedShort();
-        major = dataInputStream.readUnsignedShort();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Code.java b/src/main/java/org/apache/bcel/classfile/Code.java
deleted file mode 100644
index d257acb..0000000
--- a/src/main/java/org/apache/bcel/classfile/Code.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/** 
- * This class represents a chunk of Java byte code contained in a
- * method. It is instantiated by the
- * <em>Attribute.readAttribute()</em> method. A <em>Code</em>
- * attribute contains informations about operand stack, local
- * variables, byte code and the exceptions handled within this
- * method.
- *
- * This attribute has attributes itself, namely <em>LineNumberTable</em> which
- * is used for debugging purposes and <em>LocalVariableTable</em> which 
- * contains information about the local variables.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Attribute
- * @see     CodeException
- * @see     LineNumberTable
- * @see LocalVariableTable
- */
-public final class Code extends Attribute {
-
-    private static final long serialVersionUID = -432884354459701506L;
-    private int max_stack; // Maximum size of stack used by this method
-    private int max_locals; // Number of local variables
-    private byte[] code; // Actual byte code
-    private CodeException[] exception_table; // Table of handled exceptions
-    private Attribute[] attributes; // or LocalVariable
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public Code(Code c) {
-        this(c.getNameIndex(), c.getLength(), c.getMaxStack(), c.getMaxLocals(), c.getCode(), c
-                .getExceptionTable(), c.getAttributes(), c.getConstantPool());
-    }
-
-
-    /**
-     * @param name_index Index pointing to the name <em>Code</em>
-     * @param length Content length in bytes
-     * @param file Input stream
-     * @param constant_pool Array of constants
-     */
-    Code(int name_index, int length, DataInput file, ConstantPool constant_pool)
-            throws IOException {
-        // Initialize with some default values which will be overwritten later
-        this(name_index, length, file.readUnsignedShort(), file.readUnsignedShort(), (byte[]) null,
-                (CodeException[]) null, (Attribute[]) null, constant_pool);
-        int code_length = file.readInt();
-        code = new byte[code_length]; // Read byte code
-        file.readFully(code);
-        /* Read exception table that contains all regions where an exception
-         * handler is active, i.e., a try { ... } catch() block.
-         */
-        int exception_table_length = file.readUnsignedShort();
-        exception_table = new CodeException[exception_table_length];
-        for (int i = 0; i < exception_table_length; i++) {
-            exception_table[i] = new CodeException(file);
-        }
-        /* Read all attributes, currently `LineNumberTable' and
-         * `LocalVariableTable'
-         */
-        int attributes_count = file.readUnsignedShort();
-        attributes = new Attribute[attributes_count];
-        for (int i = 0; i < attributes_count; i++) {
-            attributes[i] = Attribute.readAttribute(file, constant_pool);
-        }
-        /* Adjust length, because of setAttributes in this(), s.b.  length
-         * is incorrect, because it didn't take the internal attributes
-         * into account yet! Very subtle bug, fixed in 3.1.1.
-         */
-        this.length = length;
-    }
-
-
-    /**
-     * @param name_index Index pointing to the name <em>Code</em>
-     * @param length Content length in bytes
-     * @param max_stack Maximum size of stack
-     * @param max_locals Number of local variables
-     * @param code Actual byte code
-     * @param exception_table Table of handled exceptions
-     * @param attributes Attributes of code: LineNumber or LocalVariable
-     * @param constant_pool Array of constants
-     */
-    public Code(int name_index, int length, int max_stack, int max_locals, byte[] code,
-            CodeException[] exception_table, Attribute[] attributes, ConstantPool constant_pool) {
-        super(Constants.ATTR_CODE, name_index, length, constant_pool);
-        this.max_stack = max_stack;
-        this.max_locals = max_locals;
-        setCode(code);
-        setExceptionTable(exception_table);
-        setAttributes(attributes); // Overwrites length!
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitCode(this);
-    }
-
-
-    /**
-     * Dump code attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(max_stack);
-        file.writeShort(max_locals);
-        file.writeInt(code.length);
-        file.write(code, 0, code.length);
-        file.writeShort(exception_table.length);
-        for (CodeException exception : exception_table) {
-            exception.dump(file);
-        }
-        file.writeShort(attributes.length);
-        for (Attribute attribute : attributes) {
-            attribute.dump(file);
-        }
-    }
-
-
-    /**
-     * @return Collection of code attributes.
-     * @see Attribute
-     */
-    public final Attribute[] getAttributes() {
-        return attributes;
-    }
-
-
-    /**
-     * @return LineNumberTable of Code, if it has one
-     */
-    public LineNumberTable getLineNumberTable() {
-        for (Attribute attribute : attributes) {
-            if (attribute instanceof LineNumberTable) {
-                return (LineNumberTable) attribute;
-            }
-        }
-        return null;
-    }
-
-
-    /**
-     * @return LocalVariableTable of Code, if it has one
-     */
-    public LocalVariableTable getLocalVariableTable() {
-        for (Attribute attribute : attributes) {
-            if (attribute instanceof LocalVariableTable) {
-                return (LocalVariableTable) attribute;
-            }
-        }
-        return null;
-    }
-
-
-    /**
-     * @return Actual byte code of the method.
-     */
-    public final byte[] getCode() {
-        return code;
-    }
-
-
-    /**
-     * @return Table of handled exceptions.
-     * @see CodeException
-     */
-    public final CodeException[] getExceptionTable() {
-        return exception_table;
-    }
-
-
-    /**
-     * @return Number of local variables.
-     */
-    public final int getMaxLocals() {
-        return max_locals;
-    }
-
-
-    /**
-     * @return Maximum size of stack used by this method.
-     */
-    public final int getMaxStack() {
-        return max_stack;
-    }
-
-
-    /**
-     * @return the internal length of this code attribute (minus the first 6 bytes) 
-     * and excluding all its attributes
-     */
-    private int getInternalLength() {
-        return 2 /*max_stack*/+ 2 /*max_locals*/+ 4 /*code length*/
-                + code.length /*byte-code*/
-                + 2 /*exception-table length*/
-                + 8 * (exception_table == null ? 0 : exception_table.length) /* exception table */
-                + 2 /* attributes count */;
-    }
-
-
-    /**
-     * @return the full size of this code attribute, minus its first 6 bytes,
-     * including the size of all its contained attributes
-     */
-    private int calculateLength() {
-        int len = 0;
-        if (attributes != null) {
-            for (Attribute attribute : attributes) {
-                len += attribute.length + 6 /*attribute header size*/;
-            }
-        }
-        return len + getInternalLength();
-    }
-
-
-    /**
-     * @param attributes the attributes to set for this Code
-     */
-    public final void setAttributes( Attribute[] attributes ) {
-        this.attributes = attributes != null ? attributes : new Attribute[0];
-        length = calculateLength(); // Adjust length
-    }
-
-
-    /**
-     * @param code byte code
-     */
-    public final void setCode( byte[] code ) {
-        this.code = code != null ? code : new byte[0];
-        length = calculateLength(); // Adjust length
-    }
-
-
-    /**
-     * @param exception_table exception table
-     */
-    public final void setExceptionTable( CodeException[] exception_table ) {
-        this.exception_table = exception_table != null ? exception_table : new CodeException[0];
-        length = calculateLength(); // Adjust length
-    }
-
-
-    /**
-     * @param max_locals maximum number of local variables
-     */
-    public final void setMaxLocals( int max_locals ) {
-        this.max_locals = max_locals;
-    }
-
-
-    /**
-     * @param max_stack maximum stack size
-     */
-    public final void setMaxStack( int max_stack ) {
-        this.max_stack = max_stack;
-    }
-
-
-    /**
-     * @return String representation of code chunk.
-     */
-    public final String toString( boolean verbose ) {
-        StringBuilder buf = new StringBuilder(100);
-        buf.append("Code(max_stack = ").append(max_stack).append(", max_locals = ").append(
-                max_locals).append(", code_length = ").append(code.length).append(")\n").append(
-                Utility.codeToString(code, constant_pool, 0, -1, verbose));
-        if (exception_table.length > 0) {
-            buf.append("\nException handler(s) = \n").append("From\tTo\tHandler\tType\n");
-            for (CodeException exception : exception_table) {
-                buf.append(exception.toString(constant_pool, verbose)).append("\n");
-            }
-        }
-        if (attributes.length > 0) {
-            buf.append("\nAttribute(s) = \n");
-            for (Attribute attribute : attributes) {
-                buf.append(attribute.toString()).append("\n");
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return String representation of code chunk.
-     */
-    @Override
-    public final String toString() {
-        return toString(true);
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     * 
-     * @param _constant_pool the constant pool to duplicate
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        Code c = (Code) clone();
-        if (code != null) {
-            c.code = new byte[code.length];
-            System.arraycopy(code, 0, c.code, 0, code.length);
-        }
-        c.constant_pool = _constant_pool;
-        c.exception_table = new CodeException[exception_table.length];
-        for (int i = 0; i < exception_table.length; i++) {
-            c.exception_table[i] = exception_table[i].copy();
-        }
-        c.attributes = new Attribute[attributes.length];
-        for (int i = 0; i < attributes.length; i++) {
-            c.attributes[i] = attributes[i].copy(_constant_pool);
-        }
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/CodeException.java b/src/main/java/org/apache/bcel/classfile/CodeException.java
deleted file mode 100644
index 16ddc23..0000000
--- a/src/main/java/org/apache/bcel/classfile/CodeException.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class represents an entry in the exception table of the <em>Code</em>
- * attribute and is used only there. It contains a range in which a
- * particular exception handler is active.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Code
- */
-public final class CodeException implements Cloneable, Constants, Node, Serializable {
-
-    private static final long serialVersionUID = 2972500041254967221L;
-    private int start_pc; // Range in the code the exception handler is
-    private int end_pc; // active. start_pc is inclusive, end_pc exclusive
-    private int handler_pc; /* Starting address of exception handler, i.e.,
-     * an offset from start of code.
-     */
-    private int catch_type; /* If this is zero the handler catches any
-     * exception, otherwise it points to the
-     * exception class which is to be caught.
-     */
-
-
-    /**
-     * Initialize from another object.
-     */
-    public CodeException(CodeException c) {
-        this(c.getStartPC(), c.getEndPC(), c.getHandlerPC(), c.getCatchType());
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * @param file Input stream
-     * @throws IOException
-     */
-    CodeException(DataInput file) throws IOException {
-        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
-                .readUnsignedShort());
-    }
-
-
-    /**
-     * @param start_pc Range in the code the exception handler is active,
-     * start_pc is inclusive while
-     * @param end_pc is exclusive
-     * @param handler_pc Starting address of exception handler, i.e.,
-     * an offset from start of code.
-     * @param catch_type If zero the handler catches any 
-     * exception, otherwise it points to the exception class which is 
-     * to be caught.
-     */
-    public CodeException(int start_pc, int end_pc, int handler_pc, int catch_type) {
-        this.start_pc = start_pc;
-        this.end_pc = end_pc;
-        this.handler_pc = handler_pc;
-        this.catch_type = catch_type;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitCodeException(this);
-    }
-
-
-    /**
-     * Dump code exception to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(start_pc);
-        file.writeShort(end_pc);
-        file.writeShort(handler_pc);
-        file.writeShort(catch_type);
-    }
-
-
-    /**
-     * @return 0, if the handler catches any exception, otherwise it points to
-     * the exception class which is to be caught.
-     */
-    public final int getCatchType() {
-        return catch_type;
-    }
-
-
-    /**
-     * @return Exclusive end index of the region where the handler is active.
-     */
-    public final int getEndPC() {
-        return end_pc;
-    }
-
-
-    /**
-     * @return Starting address of exception handler, relative to the code.
-     */
-    public final int getHandlerPC() {
-        return handler_pc;
-    }
-
-
-    /**
-     * @return Inclusive start index of the region where the handler is active.
-     */
-    public final int getStartPC() {
-        return start_pc;
-    }
-
-
-    /**
-     * @param catch_type the type of exception that is caught
-     */
-    public final void setCatchType( int catch_type ) {
-        this.catch_type = catch_type;
-    }
-
-
-    /**
-     * @param end_pc end of handled block
-     */
-    public final void setEndPC( int end_pc ) {
-        this.end_pc = end_pc;
-    }
-
-
-    /**
-     * @param handler_pc where the actual code is
-     */
-    public final void setHandlerPC( int handler_pc ) {
-        this.handler_pc = handler_pc;
-    }
-
-
-    /**
-     * @param start_pc start of handled block
-     */
-    public final void setStartPC( int start_pc ) {
-        this.start_pc = start_pc;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return "CodeException(start_pc = " + start_pc + ", end_pc = " + end_pc + ", handler_pc = "
-                + handler_pc + ", catch_type = " + catch_type + ")";
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    public final String toString( ConstantPool cp, boolean verbose ) {
-        String str;
-        if (catch_type == 0) {
-            str = "<Any exception>(0)";
-        } else {
-            str = Utility.compactClassName(cp.getConstantString(catch_type, CONSTANT_Class), false)
-                    + (verbose ? "(" + catch_type + ")" : "");
-        }
-        return start_pc + "\t" + end_pc + "\t" + handler_pc + "\t" + str;
-    }
-
-
-    public final String toString( ConstantPool cp ) {
-        return toString(cp, true);
-    }
-
-
-    /**
-     * @return deep copy of this object
-     */
-    public CodeException copy() {
-        try {
-            return (CodeException) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Constant.java b/src/main/java/org/apache/bcel/classfile/Constant.java
deleted file mode 100644
index f7a3dbc..0000000
--- a/src/main/java/org/apache/bcel/classfile/Constant.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.util.BCELComparator;
-
-/**
- * Abstract superclass for classes to represent the different constant types
- * in the constant pool of a class file. The classes keep closely to
- * the JVM specification.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class Constant implements Cloneable, Node, Serializable {
-
-    private static final long serialVersionUID = 5739037344085356353L;
-    private static BCELComparator _cmp = new BCELComparator() {
-
-        public boolean equals( Object o1, Object o2 ) {
-            Constant THIS = (Constant) o1;
-            Constant THAT = (Constant) o2;
-            return THIS.toString().equals(THAT.toString());
-        }
-
-
-        public int hashCode( Object o ) {
-            Constant THIS = (Constant) o;
-            return THIS.toString().hashCode();
-        }
-    };
-    /* In fact this tag is redundant since we can distinguish different
-     * `Constant' objects by their type, i.e., via `instanceof'. In some
-     * places we will use the tag for switch()es anyway.
-     *
-     * First, we want match the specification as closely as possible. Second we
-     * need the tag as an index to select the corresponding class name from the 
-     * `CONSTANT_NAMES' array.
-     */
-    protected byte tag; // TODO should be private & final
-
-
-    Constant(byte tag) {
-        this.tag = tag;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public abstract void accept( Visitor v );
-
-
-    public abstract void dump( DataOutputStream file ) throws IOException;
-
-
-    /**
-     * @return Tag of constant, i.e., its type. No setTag() method to avoid
-     * confusion.
-     */
-    public final byte getTag() {
-        return tag;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public String toString() {
-        return Constants.CONSTANT_NAMES[tag] + "[" + tag + "]";
-    }
-
-
-    /**
-     * @return deep copy of this constant
-     */
-    public Constant copy() {
-        try {
-            return (Constant) super.clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-
-
-    @Override
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new Error("Clone Not Supported"); // never happens
-        }
-    }
-
-
-    /**
-     * Read one constant from the given input, the type depends on a tag byte.
-     *
-     * @param input Input stream
-     * @return Constant object
-     */
-    static Constant readConstant( DataInput input ) throws IOException,
-            ClassFormatException {
-        byte b = input.readByte(); // Read tag byte
-        switch (b) {
-            case Constants.CONSTANT_Class:
-                return new ConstantClass(input);
-            case Constants.CONSTANT_Fieldref:
-                return new ConstantFieldref(input);
-            case Constants.CONSTANT_Methodref:
-                return new ConstantMethodref(input);
-            case Constants.CONSTANT_InterfaceMethodref:
-                return new ConstantInterfaceMethodref(input);
-            case Constants.CONSTANT_String:
-                return new ConstantString(input);
-            case Constants.CONSTANT_Integer:
-                return new ConstantInteger(input);
-            case Constants.CONSTANT_Float:
-                return new ConstantFloat(input);
-            case Constants.CONSTANT_Long:
-                return new ConstantLong(input);
-            case Constants.CONSTANT_Double:
-                return new ConstantDouble(input);
-            case Constants.CONSTANT_NameAndType:
-                return new ConstantNameAndType(input);
-            case Constants.CONSTANT_Utf8:
-                return ConstantUtf8.getInstance(input);
-            case Constants.CONSTANT_MethodHandle:
-                return new ConstantMethodHandle(input);
-            case Constants.CONSTANT_MethodType:
-                return new ConstantMethodType(input);
-            case Constants.CONSTANT_InvokeDynamic:
-                return new ConstantInvokeDynamic(input);
-            default:
-                throw new ClassFormatException("Invalid byte tag in constant pool: " + b);
-        }
-    }
-
-
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
-
-
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default two Constant objects are said to be equal when
-     * the result of toString() is equal.
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        return _cmp.equals(this, obj);
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default return the hashcode of the result of toString().
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return _cmp.hashCode(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantCP.java b/src/main/java/org/apache/bcel/classfile/ConstantCP.java
deleted file mode 100644
index 21255eb..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantCP.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * Abstract super class for Fieldref, Methodref, InterfaceMethodref and
- *                          InvokeDynamic constants.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     ConstantFieldref
- * @see     ConstantMethodref
- * @see     ConstantInterfaceMethodref
- * @see     ConstantInvokeDynamic
- */
-public abstract class ConstantCP extends Constant {
-
-    private static final long serialVersionUID = -6275762995206209402L;
-    /** References to the constants containing the class and the field signature
-     */
-    // Note that this field is used to store the
-    // bootstrap_method_attr_index of a ConstantInvokeDynamic.
-    protected int class_index; // TODO make private (has getter & setter)
-    // This field has the same meaning for all subclasses.
-    protected int name_and_type_index; // TODO make private (has getter & setter)
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantCP(ConstantCP c) {
-        this(c.getTag(), c.getClassIndex(), c.getNameAndTypeIndex());
-    }
-
-
-    /**
-     * Initialize instance from file data.
-     *
-     * @param tag  Constant type tag
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantCP(byte tag, DataInput file) throws IOException {
-        this(tag, file.readUnsignedShort(), file.readUnsignedShort());
-    }
-
-
-    /**
-     * @param class_index Reference to the class containing the field
-     * @param name_and_type_index and the field signature
-     */
-    protected ConstantCP(byte tag, int class_index, int name_and_type_index) {
-        super(tag);
-        this.class_index = class_index;
-        this.name_and_type_index = name_and_type_index;
-    }
-
-
-    /** 
-     * Dump constant field reference to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeShort(class_index);
-        file.writeShort(name_and_type_index);
-    }
-
-
-    /**
-     * @return Reference (index) to class this constant refers to.
-     */
-    public final int getClassIndex() {
-        return class_index;
-    }
-
-
-    /**
-     * @return Reference (index) to bootstrap method this constant refers to.
-     *
-     * Note that this method is a functional duplicate of getClassIndex
-     * for use by ConstantInvokeDynamic.
-     */
-    public final int getBootstrapMethodAttrIndex() {
-        return class_index;  // AKA bootstrap_method_attr_index
-    }
-
-
-    /**
-     * @param class_index points to Constant_class 
-     */
-    public final void setClassIndex( int class_index ) {
-        this.class_index = class_index;
-    }
-
-
-    /**
-     * @param bootstrap_method_attr_index points to a BootstrapMethod. 
-     *
-     * Note that this method is a functional duplicate of setClassIndex
-     * for use by ConstantInvokeDynamic.
-     */
-    public final void setBootstrapMethodAttrIndex(int bootstrap_method_attr_index) {
-        this.class_index = bootstrap_method_attr_index;
-    }
-
-
-    /**
-     * @return Reference (index) to signature of the field.
-     */
-    public final int getNameAndTypeIndex() {
-        return name_and_type_index;
-    }
-
-
-    /**
-     * @param name_and_type_index points to Constant_NameAndType
-     */
-    public final void setNameAndTypeIndex( int name_and_type_index ) {
-        this.name_and_type_index = name_and_type_index;
-    }
-
-
-    /**
-     * @return Class this field belongs to.
-     */
-    public String getClass( ConstantPool cp ) {
-        return cp.constantToString(class_index, Constants.CONSTANT_Class);
-    }
-
-
-    /**
-     * @return String representation.
-     *
-     * not final as ConstantInvokeDynamic needs to modify
-     */
-    @Override
-    public String toString() {
-        return super.toString() + "(class_index = " + class_index + ", name_and_type_index = "
-                + name_and_type_index + ")";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantClass.java b/src/main/java/org/apache/bcel/classfile/ConstantClass.java
deleted file mode 100644
index 3fa64f0..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantClass.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a (external) class.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public final class ConstantClass extends Constant implements ConstantObject {
-
-    private static final long serialVersionUID = -1083450233715258720L;
-    private int name_index; // Identical to ConstantString except for the name
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantClass(ConstantClass c) {
-        this(c.getNameIndex());
-    }
-
-
-    /**
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantClass(DataInput file) throws IOException {
-        this(file.readUnsignedShort());
-    }
-
-
-    /**
-     * @param name_index Name index in constant pool.  Should refer to a
-     * ConstantUtf8.
-     */
-    public ConstantClass(int name_index) {
-        super(Constants.CONSTANT_Class);
-        this.name_index = name_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantClass(this);
-    }
-
-
-    /** 
-     * Dump constant class to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeShort(name_index);
-    }
-
-
-    /**
-     * @return Name index in constant pool of class name.
-     */
-    public final int getNameIndex() {
-        return name_index;
-    }
-
-
-    /**
-     * @param name_index the name index in the constant pool of this Constant Class
-     */
-    public final void setNameIndex( int name_index ) {
-        this.name_index = name_index;
-    }
-
-
-    /** @return String object
-     */
-    public Object getConstantValue( ConstantPool cp ) {
-        Constant c = cp.getConstant(name_index, Constants.CONSTANT_Utf8);
-        return ((ConstantUtf8) c).getBytes();
-    }
-
-
-    /** @return dereferenced string
-     */
-    public String getBytes( ConstantPool cp ) {
-        return (String) getConstantValue(cp);
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(name_index = " + name_index + ")";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantDouble.java b/src/main/java/org/apache/bcel/classfile/ConstantDouble.java
deleted file mode 100644
index 0f2ffcf..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantDouble.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a Double object.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public final class ConstantDouble extends Constant implements ConstantObject {
-
-    private static final long serialVersionUID = -7394764537394782136L;
-    private double bytes;
-
-
-    /** 
-     * @param bytes Data
-     */
-    public ConstantDouble(double bytes) {
-        super(Constants.CONSTANT_Double);
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantDouble(ConstantDouble c) {
-        this(c.getBytes());
-    }
-
-
-    /** 
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantDouble(DataInput file) throws IOException {
-        this(file.readDouble());
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantDouble(this);
-    }
-
-
-    /**
-     * Dump constant double to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeDouble(bytes);
-    }
-
-
-    /**
-     * @return data, i.e., 8 bytes.
-     */
-    public final double getBytes() {
-        return bytes;
-    }
-
-
-    /**
-     * @param bytes the raw bytes that represent the double value
-     */
-    public final void setBytes( double bytes ) {
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(bytes = " + bytes + ")";
-    }
-
-
-    /** @return Double object
-     */
-    public Object getConstantValue( ConstantPool cp ) {
-        return new Double(bytes);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantFieldref.java b/src/main/java/org/apache/bcel/classfile/ConstantFieldref.java
deleted file mode 100644
index 9eb2c59..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantFieldref.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/** 
- * This class represents a constant pool reference to a field.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class ConstantFieldref extends ConstantCP {
-
-    private static final long serialVersionUID = -3993784840787819802L;
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantFieldref(ConstantFieldref c) {
-        super(Constants.CONSTANT_Fieldref, c.getClassIndex(), c.getNameAndTypeIndex());
-    }
-
-
-    /**
-     * Initialize instance from input data.
-     *
-     * @param input input stream
-     * @throws IOException
-     */
-    ConstantFieldref(DataInput input) throws IOException {
-        super(Constants.CONSTANT_Fieldref, input);
-    }
-
-
-    /**
-     * @param class_index Reference to the class containing the Field
-     * @param name_and_type_index and the Field signature
-     */
-    public ConstantFieldref(int class_index, int name_and_type_index) {
-        super(Constants.CONSTANT_Fieldref, class_index, name_and_type_index);
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of Fields,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantFieldref(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantFloat.java b/src/main/java/org/apache/bcel/classfile/ConstantFloat.java
deleted file mode 100644
index 6ce33c9..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantFloat.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a float object.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public final class ConstantFloat extends Constant implements ConstantObject {
-
-    private static final long serialVersionUID = -2316732495687628398L;
-    private float bytes;
-
-
-    /** 
-     * @param bytes Data
-     */
-    public ConstantFloat(float bytes) {
-        super(Constants.CONSTANT_Float);
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public ConstantFloat(ConstantFloat c) {
-        this(c.getBytes());
-    }
-
-
-    /** 
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantFloat(DataInput file) throws IOException {
-        this(file.readFloat());
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantFloat(this);
-    }
-
-
-    /**
-     * Dump constant float to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeFloat(bytes);
-    }
-
-
-    /**
-     * @return data, i.e., 4 bytes.
-     */
-    public final float getBytes() {
-        return bytes;
-    }
-
-
-    /**
-     * @param bytes the raw bytes that represent this float
-     */
-    public final void setBytes( float bytes ) {
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(bytes = " + bytes + ")";
-    }
-
-
-    /** @return Float object
-     */
-    public Object getConstantValue( ConstantPool cp ) {
-        return new Float(bytes);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantInteger.java b/src/main/java/org/apache/bcel/classfile/ConstantInteger.java
deleted file mode 100644
index 56c2d06..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantInteger.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to an int object.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public final class ConstantInteger extends Constant implements ConstantObject {
-
-    private static final long serialVersionUID = -7040676276945754375L;
-    private int bytes;
-
-
-    /** 
-     * @param bytes Data
-     */
-    public ConstantInteger(int bytes) {
-        super(Constants.CONSTANT_Integer);
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantInteger(ConstantInteger c) {
-        this(c.getBytes());
-    }
-
-
-    /** 
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantInteger(DataInput file) throws IOException {
-        this(file.readInt());
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantInteger(this);
-    }
-
-
-    /**
-     * Dump constant integer to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeInt(bytes);
-    }
-
-
-    /**
-     * @return data, i.e., 4 bytes.
-     */
-    public final int getBytes() {
-        return bytes;
-    }
-
-
-    /**
-     * @param bytes the raw bytes that represent this integer
-     */
-    public final void setBytes( int bytes ) {
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(bytes = " + bytes + ")";
-    }
-
-
-    /** @return Integer object
-     */
-    public Object getConstantValue( ConstantPool cp ) {
-        return Integer.valueOf(bytes);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantInterfaceMethodref.java b/src/main/java/org/apache/bcel/classfile/ConstantInterfaceMethodref.java
deleted file mode 100644
index 72d1567..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantInterfaceMethodref.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/** 
- * This class represents a constant pool reference to an interface method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class ConstantInterfaceMethodref extends ConstantCP {
-
-    private static final long serialVersionUID = -5311546335360612639L;
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantInterfaceMethodref(ConstantInterfaceMethodref c) {
-        super(Constants.CONSTANT_InterfaceMethodref, c.getClassIndex(), c.getNameAndTypeIndex());
-    }
-
-
-    /**
-     * Initialize instance from input data.
-     *
-     * @param input input stream
-     * @throws IOException
-     */
-    ConstantInterfaceMethodref(DataInput input) throws IOException {
-        super(Constants.CONSTANT_InterfaceMethodref, input);
-    }
-
-
-    /**
-     * @param class_index Reference to the class containing the method
-     * @param name_and_type_index and the method signature
-     */
-    public ConstantInterfaceMethodref(int class_index, int name_and_type_index) {
-        super(Constants.CONSTANT_InterfaceMethodref, class_index, name_and_type_index);
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantInterfaceMethodref(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantInvokeDynamic.java b/src/main/java/org/apache/bcel/classfile/ConstantInvokeDynamic.java
deleted file mode 100644
index 3378af9..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantInvokeDynamic.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a invoke dynamic.
- * 
- * @see     Constant
- * @since 6.0
- */
-public final class ConstantInvokeDynamic extends ConstantCP {
-
-    private static final long serialVersionUID = 4310367359017396174L;
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantInvokeDynamic(ConstantInvokeDynamic c) {
-        super(Constants.CONSTANT_InvokeDynamic, c.getBootstrapMethodAttrIndex(), c.getNameAndTypeIndex());
-    }
-
-
-    /**
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantInvokeDynamic(DataInput file) throws IOException {
-        super(Constants.CONSTANT_InvokeDynamic, file);
-    }
-
-
-    public ConstantInvokeDynamic(int bootstrap_method_attr_index, int name_and_type_index) {
-        super(Constants.CONSTANT_InvokeDynamic, bootstrap_method_attr_index, name_and_type_index);
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitly
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantInvokeDynamic(this);
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        // UNDONE: need to string replace "class_index" with "bootstrap_method_attr_index"
-        return super.toString();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantLong.java b/src/main/java/org/apache/bcel/classfile/ConstantLong.java
deleted file mode 100644
index 1fd3363..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantLong.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a long object.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public final class ConstantLong extends Constant implements ConstantObject {
-
-    private static final long serialVersionUID = 8495971186433816161L;
-    private long bytes;
-
-
-    /** 
-     * @param bytes Data
-     */
-    public ConstantLong(long bytes) {
-        super(Constants.CONSTANT_Long);
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantLong(ConstantLong c) {
-        this(c.getBytes());
-    }
-
-
-    /** 
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantLong(DataInput file) throws IOException {
-        this(file.readLong());
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantLong(this);
-    }
-
-
-    /**
-     * Dump constant long to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeLong(bytes);
-    }
-
-
-    /**
-     * @return data, i.e., 8 bytes.
-     */
-    public final long getBytes() {
-        return bytes;
-    }
-
-
-    /**
-     * @param bytes the raw bytes that represent this long
-     */
-    public final void setBytes( long bytes ) {
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(bytes = " + bytes + ")";
-    }
-
-
-    /** @return Long object
-     */
-    public Object getConstantValue( ConstantPool cp ) {
-        return Long.valueOf(bytes);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantMethodHandle.java b/src/main/java/org/apache/bcel/classfile/ConstantMethodHandle.java
deleted file mode 100644
index 80fd97f..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantMethodHandle.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a method handle.
- * 
- * @see     Constant
- * @since 6.0
- */
-public final class ConstantMethodHandle extends Constant {
-
-    private static final long serialVersionUID = -7875124116920198044L;
-    private int reference_kind;
-    private int reference_index;
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantMethodHandle(ConstantMethodHandle c) {
-        this(c.getReferenceKind(), c.getReferenceIndex());
-    }
-
-
-    /**
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantMethodHandle(DataInput file) throws IOException {
-        this(file.readUnsignedByte(), file.readUnsignedShort());
-    }
-
-
-    public ConstantMethodHandle(int reference_kind, int reference_index) {
-        super(Constants.CONSTANT_MethodHandle);
-        this.reference_kind = reference_kind;
-        this.reference_index = reference_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitly
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        // TODO Add .visitMethodHandle to Visitor interface
-    }
-
-
-    /**
-     * Dump method kind and index to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeByte(reference_kind);
-        file.writeShort(reference_index);
-    }
-
-
-    public int getReferenceKind() {
-        return reference_kind;
-    }
-
-
-    public void setReferenceKind(int reference_kind) {
-        this.reference_kind = reference_kind;
-    }
-
-
-    public int getReferenceIndex() {
-        return reference_index;
-    }
-
-
-    public void setReferenceIndex(int reference_index) {
-        this.reference_index = reference_index;
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(reference_kind = " + reference_kind +
-                ", reference_index = " + reference_index + ")";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantMethodType.java b/src/main/java/org/apache/bcel/classfile/ConstantMethodType.java
deleted file mode 100644
index 653f115..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantMethodType.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a method type.
- * 
- * @see     Constant
- * @since 6.0
- */
-public final class ConstantMethodType extends Constant {
-
-    private static final long serialVersionUID = 6750768220616618881L;
-    private int descriptor_index;
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantMethodType(ConstantMethodType c) {
-        this(c.getDescriptorIndex());
-    }
-
-
-    /**
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantMethodType(DataInput file) throws IOException {
-        this(file.readUnsignedShort());
-    }
-
-
-    public ConstantMethodType(int descriptor_index) {
-        super(Constants.CONSTANT_MethodType);
-        this.descriptor_index = descriptor_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitly
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        // TODO Add .visitMethodType to Visitor interface
-    }
-
-
-    /**
-     * Dump name and signature index to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeShort(descriptor_index);
-    }
-
-
-    public int getDescriptorIndex() {
-        return descriptor_index;
-    }
-
-
-    public void setDescriptorIndex(int descriptor_index) {
-        this.descriptor_index = descriptor_index;
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(descriptor_index = " + descriptor_index + ")";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantMethodref.java b/src/main/java/org/apache/bcel/classfile/ConstantMethodref.java
deleted file mode 100644
index 345e726..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantMethodref.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/** 
- * This class represents a constant pool reference to a method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class ConstantMethodref extends ConstantCP {
-
-    private static final long serialVersionUID = -864296320352750967L;
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantMethodref(ConstantMethodref c) {
-        super(Constants.CONSTANT_Methodref, c.getClassIndex(), c.getNameAndTypeIndex());
-    }
-
-
-    /**
-     * Initialize instance from input data.
-     *
-     * @param input input stream
-     * @throws IOException
-     */
-    ConstantMethodref(DataInput input) throws IOException {
-        super(Constants.CONSTANT_Methodref, input);
-    }
-
-
-    /**
-     * @param class_index Reference to the class containing the method
-     * @param name_and_type_index and the method signature
-     */
-    public ConstantMethodref(int class_index, int name_and_type_index) {
-        super(Constants.CONSTANT_Methodref, class_index, name_and_type_index);
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantMethodref(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantNameAndType.java b/src/main/java/org/apache/bcel/classfile/ConstantNameAndType.java
deleted file mode 100644
index 2bc2db8..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantNameAndType.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to the name and signature
- * of a field or method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public final class ConstantNameAndType extends Constant {
-
-    private static final long serialVersionUID = -7913354727264034451L;
-    private int name_index; // Name of field/method
-    private int signature_index; // and its signature.
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantNameAndType(ConstantNameAndType c) {
-        this(c.getNameIndex(), c.getSignatureIndex());
-    }
-
-
-    /**
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantNameAndType(DataInput file) throws IOException {
-        this(file.readUnsignedShort(), file.readUnsignedShort());
-    }
-
-
-    /**
-     * @param name_index Name of field/method
-     * @param signature_index and its signature
-     */
-    public ConstantNameAndType(int name_index, int signature_index) {
-        super(Constants.CONSTANT_NameAndType);
-        this.name_index = name_index;
-        this.signature_index = signature_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantNameAndType(this);
-    }
-
-
-    /**
-     * Dump name and signature index to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeShort(name_index);
-        file.writeShort(signature_index);
-    }
-
-
-    /**
-     * @return Name index in constant pool of field/method name.
-     */
-    public final int getNameIndex() {
-        return name_index;
-    }
-
-
-    /** @return name
-     */
-    public final String getName( ConstantPool cp ) {
-        return cp.constantToString(getNameIndex(), Constants.CONSTANT_Utf8);
-    }
-
-
-    /**
-     * @return Index in constant pool of field/method signature.
-     */
-    public final int getSignatureIndex() {
-        return signature_index;
-    }
-
-
-    /** @return signature
-     */
-    public final String getSignature( ConstantPool cp ) {
-        return cp.constantToString(getSignatureIndex(), Constants.CONSTANT_Utf8);
-    }
-
-
-    /**
-     * @param name_index the name index of this constant
-     */
-    public final void setNameIndex( int name_index ) {
-        this.name_index = name_index;
-    }
-
-
-    /**
-     * @param signature_index the signature index in the constant pool of this type
-     */
-    public final void setSignatureIndex( int signature_index ) {
-        this.signature_index = signature_index;
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(name_index = " + name_index + ", signature_index = "
-                + signature_index + ")";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantObject.java b/src/main/java/org/apache/bcel/classfile/ConstantObject.java
deleted file mode 100644
index c9936ad..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantObject.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-/** 
- * This interface denotes those constants that have a "natural" value,
- * such as ConstantLong, ConstantString, etc..
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public interface ConstantObject {
-
-    /** @return object representing the constant, e.g., Long for ConstantLong
-     */
-    Object getConstantValue( ConstantPool cp );
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantPool.java b/src/main/java/org/apache/bcel/classfile/ConstantPool.java
deleted file mode 100644
index b2f5b20..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantPool.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-import org.apache.bcel.Constants;
-
-/**
- * This class represents the constant pool, i.e., a table of constants, of
- * a parsed classfile. It may contain null references, due to the JVM
- * specification that skips an entry after an 8-byte constant (double,
- * long) entry.  Those interested in generating constant pools
- * programatically should see <a href="../generic/ConstantPoolGen.html">
- * ConstantPoolGen</a>.
-
- * @version $Id$
- * @see     Constant
- * @see     org.apache.bcel.generic.ConstantPoolGen
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ConstantPool implements Cloneable, Node, Serializable {
-
-    private static final long serialVersionUID = -9093478476423540196L;
-    private Constant[] constant_pool;
-
-
-    /**
-     * @param constant_pool Array of constants
-     */
-    public ConstantPool(Constant[] constant_pool) {
-        setConstantPool(constant_pool);
-    }
-
-
-    /**
-     * Read constants from given input stream.
-     *
-     * @param input Input stream
-     * @throws IOException
-     * @throws ClassFormatException
-     */
-    public ConstantPool(DataInput input) throws IOException, ClassFormatException {
-        byte tag;
-        int constant_pool_count = input.readUnsignedShort();
-        constant_pool = new Constant[constant_pool_count];
-        /* constant_pool[0] is unused by the compiler and may be used freely
-         * by the implementation.
-         */
-        for (int i = 1; i < constant_pool_count; i++) {
-            constant_pool[i] = Constant.readConstant(input);
-            /* Quote from the JVM specification:
-             * "All eight byte constants take up two spots in the constant pool.
-             * If this is the n'th byte in the constant pool, then the next item
-             * will be numbered n+2"
-             * 
-             * Thus we have to increment the index counter.
-             */
-            tag = constant_pool[i].getTag();
-            if ((tag == Constants.CONSTANT_Double) || (tag == Constants.CONSTANT_Long)) {
-                i++;
-            }
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitConstantPool(this);
-    }
-
-
-    /**
-     * Resolve constant to a string representation.
-     *
-     * @param  c Constant to be printed
-     * @return String representation
-     */
-    public String constantToString( Constant c ) throws ClassFormatException {
-        String str;
-        int i;
-        byte tag = c.getTag();
-        switch (tag) {
-            case Constants.CONSTANT_Class:
-                i = ((ConstantClass) c).getNameIndex();
-                c = getConstant(i, Constants.CONSTANT_Utf8);
-                str = Utility.compactClassName(((ConstantUtf8) c).getBytes(), false);
-                break;
-            case Constants.CONSTANT_String:
-                i = ((ConstantString) c).getStringIndex();
-                c = getConstant(i, Constants.CONSTANT_Utf8);
-                str = "\"" + escape(((ConstantUtf8) c).getBytes()) + "\"";
-                break;
-            case Constants.CONSTANT_Utf8:
-                str = ((ConstantUtf8) c).getBytes();
-                break;
-            case Constants.CONSTANT_Double:
-                str = String.valueOf(((ConstantDouble) c).getBytes());
-                break;
-            case Constants.CONSTANT_Float:
-                str = String.valueOf(((ConstantFloat) c).getBytes());
-                break;
-            case Constants.CONSTANT_Long:
-                str = String.valueOf(((ConstantLong) c).getBytes());
-                break;
-            case Constants.CONSTANT_Integer:
-                str = String.valueOf(((ConstantInteger) c).getBytes());
-                break;
-            case Constants.CONSTANT_NameAndType:
-                str = (constantToString(((ConstantNameAndType) c).getNameIndex(),
-                        Constants.CONSTANT_Utf8)
-                        + ":" + constantToString(((ConstantNameAndType) c).getSignatureIndex(),
-                        Constants.CONSTANT_Utf8));
-                break;
-            case Constants.CONSTANT_InterfaceMethodref:
-            case Constants.CONSTANT_Methodref:
-            case Constants.CONSTANT_Fieldref:
-                str = (constantToString(((ConstantCP) c).getClassIndex(), Constants.CONSTANT_Class)
-                        + "." + constantToString(((ConstantCP) c).getNameAndTypeIndex(),
-                        Constants.CONSTANT_NameAndType));
-                break;
-            case Constants.CONSTANT_MethodHandle:
-                // Note that the ReferenceIndex may point to a Fieldref, Methodref or
-                // InterfaceMethodref - so we need to peek ahead to get the actual type.
-                ConstantMethodHandle cmh = (ConstantMethodHandle) c;
-                str = Constants.METHODHANDLE_NAMES[cmh.getReferenceKind()]
-                        + " " + constantToString(cmh.getReferenceIndex(),
-                        getConstant(cmh.getReferenceIndex()).getTag());
-                break;            
-            case Constants.CONSTANT_MethodType:
-                ConstantMethodType cmt = (ConstantMethodType) c;
-                str = constantToString(cmt.getDescriptorIndex(), Constants.CONSTANT_Utf8);
-                break;
-            case Constants.CONSTANT_InvokeDynamic:
-                ConstantInvokeDynamic cid = ((ConstantInvokeDynamic) c);
-                str = cid.getBootstrapMethodAttrIndex()
-                        + ":" + constantToString(cid.getNameAndTypeIndex(),
-                        Constants.CONSTANT_NameAndType);
-                break;
-            default: // Never reached
-                throw new RuntimeException("Unknown constant type " + tag);
-        }
-        return str;
-    }
-
-
-    private static String escape( String str ) {
-        int len = str.length();
-        StringBuilder buf = new StringBuilder(len + 5);
-        char[] ch = str.toCharArray();
-        for (int i = 0; i < len; i++) {
-            switch (ch[i]) {
-                case '\n':
-                    buf.append("\\n");
-                    break;
-                case '\r':
-                    buf.append("\\r");
-                    break;
-                case '\t':
-                    buf.append("\\t");
-                    break;
-                case '\b':
-                    buf.append("\\b");
-                    break;
-                case '"':
-                    buf.append("\\\"");
-                    break;
-                default:
-                    buf.append(ch[i]);
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * Retrieve constant at `index' from constant pool and resolve it to
-     * a string representation.
-     *
-     * @param  index of constant in constant pool
-     * @param  tag expected type
-     * @return String representation
-     */
-    public String constantToString( int index, byte tag ) throws ClassFormatException {
-        Constant c = getConstant(index, tag);
-        return constantToString(c);
-    }
-
-
-    /** 
-     * Dump constant pool to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(constant_pool.length);
-        for (int i = 1; i < constant_pool.length; i++) {
-            if (constant_pool[i] != null) {
-                constant_pool[i].dump(file);
-            }
-        }
-    }
-
-
-    /**
-     * Get constant from constant pool.
-     *
-     * @param  index Index in constant pool
-     * @return Constant value
-     * @see    Constant
-     */
-    public Constant getConstant( int index ) {
-        if (index >= constant_pool.length || index < 0) {
-            throw new ClassFormatException("Invalid constant pool reference: " + index
-                    + ". Constant pool size is: " + constant_pool.length);
-        }
-        return constant_pool[index];
-    }
-
-
-    /**
-     * Get constant from constant pool and check whether it has the
-     * expected type.
-     *
-     * @param  index Index in constant pool
-     * @param  tag Tag of expected constant, i.e., its type
-     * @return Constant value
-     * @see    Constant
-     * @throws  ClassFormatException
-     */
-    public Constant getConstant( int index, byte tag ) throws ClassFormatException {
-        Constant c;
-        c = getConstant(index);
-        if (c == null) {
-            throw new ClassFormatException("Constant pool at index " + index + " is null.");
-        }
-        if (c.getTag() != tag) {
-            throw new ClassFormatException("Expected class `" + Constants.CONSTANT_NAMES[tag]
-                    + "' at index " + index + " and got " + c);
-        }
-        return c;
-    }
-
-
-    /**
-     * @return Array of constants.
-     * @see    Constant
-     */
-    public Constant[] getConstantPool() {
-        return constant_pool;
-    }
-
-
-    /**
-     * Get string from constant pool and bypass the indirection of 
-     * `ConstantClass' and `ConstantString' objects. I.e. these classes have
-     * an index field that points to another entry of the constant pool of
-     * type `ConstantUtf8' which contains the real data.
-     *
-     * @param  index Index in constant pool
-     * @param  tag Tag of expected constant, either ConstantClass or ConstantString
-     * @return Contents of string reference
-     * @see    ConstantClass
-     * @see    ConstantString
-     * @throws  ClassFormatException
-     */
-    public String getConstantString( int index, byte tag ) throws ClassFormatException {
-        Constant c;
-        int i;
-        c = getConstant(index, tag);
-        /* This switch() is not that elegant, since the two classes have the
-         * same contents, they just differ in the name of the index
-         * field variable.
-         * But we want to stick to the JVM naming conventions closely though
-         * we could have solved these more elegantly by using the same
-         * variable name or by subclassing.
-         */
-        switch (tag) {
-            case Constants.CONSTANT_Class:
-                i = ((ConstantClass) c).getNameIndex();
-                break;
-            case Constants.CONSTANT_String:
-                i = ((ConstantString) c).getStringIndex();
-                break;
-            default:
-                throw new RuntimeException("getConstantString called with illegal tag " + tag);
-        }
-        // Finally get the string from the constant pool
-        c = getConstant(i, Constants.CONSTANT_Utf8);
-        return ((ConstantUtf8) c).getBytes();
-    }
-
-
-    /**
-     * @return Length of constant pool.
-     */
-    public int getLength() {
-        return constant_pool == null ? 0 : constant_pool.length;
-    }
-
-
-    /**
-     * @param constant Constant to set
-     */
-    public void setConstant( int index, Constant constant ) {
-        constant_pool[index] = constant;
-    }
-
-
-    /**
-     * @param constant_pool
-     */
-    public void setConstantPool( Constant[] constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public String toString() {
-        StringBuilder buf = new StringBuilder();
-        for (int i = 1; i < constant_pool.length; i++) {
-            buf.append(i).append(")").append(constant_pool[i]).append("\n");
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this constant pool
-     */
-    public ConstantPool copy() {
-        ConstantPool c = null;
-        try {
-            c = (ConstantPool) clone();
-            c.constant_pool = new Constant[constant_pool.length];
-            for (int i = 1; i < constant_pool.length; i++) {
-                if (constant_pool[i] != null) {
-                    c.constant_pool[i] = constant_pool[i].copy();
-                }
-            }
-        } catch (CloneNotSupportedException e) {
-        }
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantString.java b/src/main/java/org/apache/bcel/classfile/ConstantString.java
deleted file mode 100644
index 7d26f18..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantString.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a String object.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public final class ConstantString extends Constant implements ConstantObject {
-
-    private static final long serialVersionUID = 6603144389219397225L;
-    private int string_index; // Identical to ConstantClass except for this name
-
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantString(ConstantString c) {
-        this(c.getStringIndex());
-    }
-
-
-    /** 
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantString(DataInput file) throws IOException {
-        this(file.readUnsignedShort());
-    }
-
-
-    /**
-     * @param string_index Index of Constant_Utf8 in constant pool
-     */
-    public ConstantString(int string_index) {
-        super(Constants.CONSTANT_String);
-        this.string_index = string_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantString(this);
-    }
-
-
-    /**
-     * Dump constant field reference to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeShort(string_index);
-    }
-
-
-    /**
-     * @return Index in constant pool of the string (ConstantUtf8).
-     */
-    public final int getStringIndex() {
-        return string_index;
-    }
-
-
-    /**
-     * @param string_index the index into the constant of the string value
-     */
-    public final void setStringIndex( int string_index ) {
-        this.string_index = string_index;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(string_index = " + string_index + ")";
-    }
-
-
-    /** @return String object
-     */
-    public Object getConstantValue( ConstantPool cp ) {
-        Constant c = cp.getConstant(string_index, Constants.CONSTANT_Utf8);
-        return ((ConstantUtf8) c).getBytes();
-    }
-
-
-    /** @return dereferenced string
-     */
-    public String getBytes( ConstantPool cp ) {
-        return (String) getConstantValue(cp);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java b/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java
deleted file mode 100644
index f754f83..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class is derived from the abstract 
- * <A HREF="org.apache.bcel.classfile.Constant.html">Constant</A> class 
- * and represents a reference to a Utf8 encoded string.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Constant
- */
-public final class ConstantUtf8 extends Constant {
-
-    private static final long serialVersionUID = -8709101585611518985L;
-    private final String bytes;
-
-    private static volatile int considered = 0;
-    private static volatile int hits = 0;
-    private static volatile int skipped = 0;
-    private static volatile int created = 0;
-
-    // Set the size to 0 or below to skip caching entirely
-    private static final int MAX_CACHED_SIZE = Integer.getInteger("bcel.maxcached.size", 200).intValue();
-    private static final boolean BCEL_STATISTICS = Boolean.getBoolean("bcel.statistics");
-
-
-    private static class CACHE_HOLDER {
-
-        private static final int MAX_CACHE_ENTRIES = 20000;
-        private static final int INITIAL_CACHE_CAPACITY = (int)(MAX_CACHE_ENTRIES/0.75);
-
-        private static final HashMap<String, ConstantUtf8> CACHE = 
-                new LinkedHashMap<String, ConstantUtf8>(INITIAL_CACHE_CAPACITY, 0.75f, true) {
-            private static final long serialVersionUID = -8506975356158971766L;
-
-            @Override
-            protected boolean removeEldestEntry(Map.Entry<String, ConstantUtf8> eldest) {
-                 return size() > MAX_CACHE_ENTRIES;
-            }
-        };
-
-    }
-
-    // for accesss by test code
-    static void printStats() {
-        System.err.println("Cache hit " + hits + "/" + considered +", " + skipped + " skipped");
-        System.err.println("Total of " + created + " ConstantUtf8 objects created");
-    }
-    
-    // for accesss by test code
-    static void clearStats() {
-        hits = considered = skipped = created = 0;
-    }
-
-    static {
-        if (BCEL_STATISTICS) {
-            Runtime.getRuntime().addShutdownHook(new Thread() {
-                @Override
-                public void run() {
-                    printStats();
-                }
-            });
-        }
-    }
-
-    public static ConstantUtf8 getCachedInstance(String s) {
-        if (s.length() > MAX_CACHED_SIZE) {
-            skipped++;
-            return  new ConstantUtf8(s);
-        }
-        considered++;
-        synchronized (ConstantUtf8.class) { // might be better with a specific lock object
-            ConstantUtf8 result = CACHE_HOLDER.CACHE.get(s);
-            if (result != null) {
-                    hits++;
-                    return result;
-                }
-            result = new ConstantUtf8(s);
-            CACHE_HOLDER.CACHE.put(s, result);
-            return result;
-        }
-    }
-
-    public static ConstantUtf8 getInstance(String s) {
-        return new ConstantUtf8(s);
-    }
-
-    public static ConstantUtf8 getInstance (DataInput input)  throws IOException {
-        return getInstance(input.readUTF());
-    }
-
-    /**
-     * Initialize from another object.
-     */
-    public ConstantUtf8(ConstantUtf8 c) {
-        this(c.getBytes());
-    }
-
-
-    /**
-     * Initialize instance from file data.
-     *
-     * @param file Input stream
-     * @throws IOException
-     */
-    ConstantUtf8(DataInput file) throws IOException {
-        super(Constants.CONSTANT_Utf8);
-        bytes = file.readUTF();
-        created++;
-    }
-
-
-    /**
-     * @param bytes Data
-     */
-    public ConstantUtf8(String bytes) {
-        super(Constants.CONSTANT_Utf8);
-        if (bytes == null) {
-            throw new IllegalArgumentException("bytes must not be null!");
-        }
-        this.bytes = bytes;
-        created++;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantUtf8(this);
-    }
-
-
-    /**
-     * Dump String in Utf8 format to file stream.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(tag);
-        file.writeUTF(bytes);
-    }
-
-
-    /**
-     * @return Data converted to string.
-     */
-    public final String getBytes() {
-        return bytes;
-    }
-
-
-    /**
-     * @param bytes the raw bytes of this Utf-8
-     * @deprecated
-     */
-    @java.lang.Deprecated
-    public final void setBytes( String bytes ) {
-        throw new UnsupportedOperationException();
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        return super.toString() + "(\"" + Utility.replace(bytes, "\n", "\\n") + "\")";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ConstantValue.java b/src/main/java/org/apache/bcel/classfile/ConstantValue.java
deleted file mode 100644
index 677f5d7..0000000
--- a/src/main/java/org/apache/bcel/classfile/ConstantValue.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class is derived from <em>Attribute</em> and represents a constant 
- * value, i.e., a default value for initializing a class field.
- * This class is instantiated by the <em>Attribute.readAttribute()</em> method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Attribute
- */
-public final class ConstantValue extends Attribute {
-
-    private static final long serialVersionUID = -5668999920978520157L;
-    private int constantvalue_index;
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public ConstantValue(ConstantValue c) {
-        this(c.getNameIndex(), c.getLength(), c.getConstantValueIndex(), c.getConstantPool());
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * @param name_index Name index in constant pool
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    ConstantValue(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, input.readUnsignedShort(), constant_pool);
-    }
-
-
-    /**
-     * @param name_index Name index in constant pool
-     * @param length Content length in bytes
-     * @param constantvalue_index Index in constant pool
-     * @param constant_pool Array of constants
-     */
-    public ConstantValue(int name_index, int length, int constantvalue_index,
-            ConstantPool constant_pool) {
-        super(Constants.ATTR_CONSTANT_VALUE, name_index, length, constant_pool);
-        this.constantvalue_index = constantvalue_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitConstantValue(this);
-    }
-
-
-    /**
-     * Dump constant value attribute to file stream on binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(constantvalue_index);
-    }
-
-
-    /**
-     * @return Index in constant pool of constant value.
-     */
-    public final int getConstantValueIndex() {
-        return constantvalue_index;
-    }
-
-
-    /**
-     * @param constantvalue_index the index info the constant pool of this constant value
-     */
-    public final void setConstantValueIndex( int constantvalue_index ) {
-        this.constantvalue_index = constantvalue_index;
-    }
-
-
-    /**
-     * @return String representation of constant value.
-     */
-    @Override
-    public final String toString() {
-        Constant c = constant_pool.getConstant(constantvalue_index);
-        String buf;
-        int i;
-        // Print constant to string depending on its type
-        switch (c.getTag()) {
-            case Constants.CONSTANT_Long:
-                buf = String.valueOf(((ConstantLong) c).getBytes());
-                break;
-            case Constants.CONSTANT_Float:
-                buf = String.valueOf(((ConstantFloat) c).getBytes());
-                break;
-            case Constants.CONSTANT_Double:
-                buf = String.valueOf(((ConstantDouble) c).getBytes());
-                break;
-            case Constants.CONSTANT_Integer:
-                buf = String.valueOf(((ConstantInteger) c).getBytes());
-                break;
-            case Constants.CONSTANT_String:
-                i = ((ConstantString) c).getStringIndex();
-                c = constant_pool.getConstant(i, Constants.CONSTANT_Utf8);
-                buf = "\"" + Utility.convertString(((ConstantUtf8) c).getBytes()) + "\"";
-                break;
-            default:
-                throw new IllegalStateException("Type of ConstValue invalid: " + c);
-        }
-        return buf;
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        ConstantValue c = (ConstantValue) clone();
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Deprecated.java b/src/main/java/org/apache/bcel/classfile/Deprecated.java
deleted file mode 100644
index 041264f..0000000
--- a/src/main/java/org/apache/bcel/classfile/Deprecated.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * This class is derived from <em>Attribute</em> and denotes that this is a
- * deprecated method.
- * It is instantiated from the <em>Attribute.readAttribute()</em> method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Attribute
- */
-public final class Deprecated extends Attribute {
-
-    private static final long serialVersionUID = -2242528405240201000L;
-    private byte[] bytes;
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Deprecated(Deprecated c) {
-        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
-    }
-
-
-    /**
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param bytes Attribute contents
-     * @param constant_pool Array of constants
-     */
-    public Deprecated(int name_index, int length, byte[] bytes, ConstantPool constant_pool) {
-        super(Constants.ATTR_DEPRECATED, name_index, length, constant_pool);
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * 
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    Deprecated(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, (byte[]) null, constant_pool);
-        if (length > 0) {
-            bytes = new byte[length];
-            input.readFully(bytes);
-            System.err.println("Deprecated attribute with length > 0");
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitDeprecated(this);
-    }
-
-
-    /**
-     * Dump source file attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        if (length > 0) {
-            file.write(bytes, 0, length);
-        }
-    }
-
-
-    /**
-     * @return data bytes.
-     */
-    public final byte[] getBytes() {
-        return bytes;
-    }
-
-
-    /**
-     * @param bytes the raw bytes that represents this byte array
-     */
-    public final void setBytes( byte[] bytes ) {
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * @return attribute name
-     */
-    @Override
-    public final String toString() {
-        return Constants.ATTRIBUTE_NAMES[Constants.ATTR_DEPRECATED];
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        Deprecated c = (Deprecated) clone();
-        if (bytes != null) {
-            c.bytes = new byte[bytes.length];
-            System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java b/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java
deleted file mode 100644
index bb6c550..0000000
--- a/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.util.Stack;
-
-/**
- * Traverses a JavaClass with another Visitor object 'piggy-backed' that is
- * applied to all components of a JavaClass object. I.e. this class supplies the
- * traversal strategy, other classes can make use of it.
- * 
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DescendingVisitor implements Visitor
-{
-    private final JavaClass clazz;
-
-    private final Visitor visitor;
-
-    private final Stack<Object> stack = new Stack<Object>();
-
-    /**
-     * @return container of current entitity, i.e., predecessor during traversal
-     */
-    public Object predecessor()
-    {
-        return predecessor(0);
-    }
-
-    /**
-     * @param level
-     *            nesting level, i.e., 0 returns the direct predecessor
-     * @return container of current entitity, i.e., predecessor during traversal
-     */
-    public Object predecessor(int level)
-    {
-        int size = stack.size();
-        if ((size < 2) || (level < 0))
-        {
-            return null;
-        }
-        return stack.elementAt(size - (level + 2)); // size - 1 == current
-    }
-
-    /**
-     * @return current object
-     */
-    public Object current()
-    {
-        return stack.peek();
-    }
-
-    /**
-     * @param clazz
-     *            Class to traverse
-     * @param visitor
-     *            visitor object to apply to all components
-     */
-    public DescendingVisitor(JavaClass clazz, Visitor visitor)
-    {
-        this.clazz = clazz;
-        this.visitor = visitor;
-    }
-
-    /**
-     * Start traversal.
-     */
-    public void visit()
-    {
-        clazz.accept(this);
-    }
-
-    public void visitJavaClass(JavaClass _clazz)
-    {
-        stack.push(_clazz);
-        _clazz.accept(visitor);
-        Field[] fields = _clazz.getFields();
-        for (Field field : fields) {
-            field.accept(this);
-        }
-        Method[] methods = _clazz.getMethods();
-        for (Method method : methods) {
-            method.accept(this);
-        }
-        Attribute[] attributes = _clazz.getAttributes();
-        for (Attribute attribute : attributes) {
-            attribute.accept(this);
-        }
-        _clazz.getConstantPool().accept(this);
-        stack.pop();
-    }
-
-    public void visitAnnotation(Annotations annotation)
-    {
-        stack.push(annotation);
-        annotation.accept(visitor);
-        AnnotationEntry[] entries = annotation.getAnnotationEntries();
-        for (AnnotationEntry entrie : entries) {
-            entrie.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitAnnotationEntry(AnnotationEntry annotationEntry)
-    {
-        stack.push(annotationEntry);
-        annotationEntry.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitField(Field field)
-    {
-        stack.push(field);
-        field.accept(visitor);
-        Attribute[] attributes = field.getAttributes();
-        for (Attribute attribute : attributes) {
-            attribute.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitConstantValue(ConstantValue cv)
-    {
-        stack.push(cv);
-        cv.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitMethod(Method method)
-    {
-        stack.push(method);
-        method.accept(visitor);
-        Attribute[] attributes = method.getAttributes();
-        for (Attribute attribute : attributes) {
-            attribute.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitExceptionTable(ExceptionTable table)
-    {
-        stack.push(table);
-        table.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitCode(Code code)
-    {
-        stack.push(code);
-        code.accept(visitor);
-        CodeException[] table = code.getExceptionTable();
-        for (CodeException element : table) {
-            element.accept(this);
-        }
-        Attribute[] attributes = code.getAttributes();
-        for (Attribute attribute : attributes) {
-            attribute.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitCodeException(CodeException ce)
-    {
-        stack.push(ce);
-        ce.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitLineNumberTable(LineNumberTable table)
-    {
-        stack.push(table);
-        table.accept(visitor);
-        LineNumber[] numbers = table.getLineNumberTable();
-        for (LineNumber number : numbers) {
-            number.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitLineNumber(LineNumber number)
-    {
-        stack.push(number);
-        number.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitLocalVariableTable(LocalVariableTable table)
-    {
-        stack.push(table);
-        table.accept(visitor);
-        LocalVariable[] vars = table.getLocalVariableTable();
-        for (LocalVariable var : vars) {
-            var.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitStackMap(StackMap table)
-    {
-        stack.push(table);
-        table.accept(visitor);
-        StackMapEntry[] vars = table.getStackMap();
-        for (StackMapEntry var : vars) {
-            var.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitStackMapEntry(StackMapEntry var)
-    {
-        stack.push(var);
-        var.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitStackMapTable(StackMapTable table)
-    {
-        stack.push(table);
-        table.accept(visitor);
-        StackMapTableEntry[] vars = table.getStackMapTable();
-        for (StackMapTableEntry var : vars) {
-            var.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitStackMapTableEntry(StackMapTableEntry var)
-    {
-        stack.push(var);
-        var.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitLocalVariable(LocalVariable var)
-    {
-        stack.push(var);
-        var.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantPool(ConstantPool cp)
-    {
-        stack.push(cp);
-        cp.accept(visitor);
-        Constant[] constants = cp.getConstantPool();
-        for (int i = 1; i < constants.length; i++)
-        {
-            if (constants[i] != null)
-            {
-                constants[i].accept(this);
-            }
-        }
-        stack.pop();
-    }
-
-    public void visitConstantClass(ConstantClass constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantDouble(ConstantDouble constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantFieldref(ConstantFieldref constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantFloat(ConstantFloat constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantInteger(ConstantInteger constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantInterfaceMethodref(
-            ConstantInterfaceMethodref constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantInvokeDynamic(
-            ConstantInvokeDynamic constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantLong(ConstantLong constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantMethodref(ConstantMethodref constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantNameAndType(ConstantNameAndType constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantString(ConstantString constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitConstantUtf8(ConstantUtf8 constant)
-    {
-        stack.push(constant);
-        constant.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitInnerClasses(InnerClasses ic)
-    {
-        stack.push(ic);
-        ic.accept(visitor);
-        InnerClass[] ics = ic.getInnerClasses();
-        for (InnerClass ic2 : ics) {
-            ic2.accept(this);
-        }
-        stack.pop();
-    }
-
-    public void visitInnerClass(InnerClass inner)
-    {
-        stack.push(inner);
-        inner.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitBootstrapMethods(BootstrapMethods bm)
-    {
-        stack.push(bm);
-        bm.accept(visitor);
-        // BootstrapMethod[] bms = bm.getBootstrapMethods();
-        // for (int i = 0; i < bms.length; i++)
-        // {
-        //     bms[i].accept(this);
-        // }
-        stack.pop();
-    }
-
-    public void visitDeprecated(Deprecated attribute)
-    {
-        stack.push(attribute);
-        attribute.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitSignature(Signature attribute)
-    {
-        stack.push(attribute);
-        attribute.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitSourceFile(SourceFile attribute)
-    {
-        stack.push(attribute);
-        attribute.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitSynthetic(Synthetic attribute)
-    {
-        stack.push(attribute);
-        attribute.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitUnknown(Unknown attribute)
-    {
-        stack.push(attribute);
-        attribute.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitAnnotationDefault(AnnotationDefault obj)
-    {
-        stack.push(obj);
-        obj.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitEnclosingMethod(EnclosingMethod obj)
-    {
-        stack.push(obj);
-        obj.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
-    {
-        stack.push(obj);
-        obj.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitParameterAnnotation(ParameterAnnotations obj)
-    {
-        stack.push(obj);
-        obj.accept(visitor);
-        stack.pop();
-    }
-
-    public void visitMethodParameters(MethodParameters obj)
-    {
-        stack.push(obj);
-        obj.accept(visitor);
-        stack.pop();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ElementValue.java b/src/main/java/org/apache/bcel/classfile/ElementValue.java
deleted file mode 100644
index 52ceb22..0000000
--- a/src/main/java/org/apache/bcel/classfile/ElementValue.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * @version $Id: ElementValue
- * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public abstract class ElementValue
-{
-    protected int type; // TODO should be final
-
-    protected ConstantPool cpool; // TODO should be final
-
-    @Override
-    public String toString()
-    {
-        return stringifyValue();
-    }
-
-    protected ElementValue(int type, ConstantPool cpool)
-    {
-        this.type = type;
-        this.cpool = cpool;
-    }
-
-    public int getElementValueType()
-    {
-        return type;
-    }
-
-    public abstract String stringifyValue();
-
-    public abstract void dump(DataOutputStream dos) throws IOException;
-
-    public static final byte STRING            = 's';
-    public static final byte ENUM_CONSTANT     = 'e';
-    public static final byte CLASS             = 'c';
-    public static final byte ANNOTATION        = '@';
-    public static final byte ARRAY             = '[';
-    public static final byte PRIMITIVE_INT     = 'I';
-    public static final byte PRIMITIVE_BYTE    = 'B';
-    public static final byte PRIMITIVE_CHAR    = 'C';
-    public static final byte PRIMITIVE_DOUBLE  = 'D';
-    public static final byte PRIMITIVE_FLOAT   = 'F';
-    public static final byte PRIMITIVE_LONG    = 'J';
-    public static final byte PRIMITIVE_SHORT   = 'S';
-    public static final byte PRIMITIVE_BOOLEAN = 'Z';
-
-    public static ElementValue readElementValue(DataInput input, ConstantPool cpool) throws IOException
-    {
-        byte type = input.readByte();
-        switch (type)
-        {
-            case PRIMITIVE_BYTE:
-            case PRIMITIVE_CHAR:
-            case PRIMITIVE_DOUBLE:
-            case PRIMITIVE_FLOAT:
-            case PRIMITIVE_INT:
-            case PRIMITIVE_LONG:
-            case PRIMITIVE_SHORT:
-            case PRIMITIVE_BOOLEAN:
-            case STRING:
-                return new SimpleElementValue(type, input.readUnsignedShort(), cpool);
-            
-            case ENUM_CONSTANT:
-                return new EnumElementValue(ENUM_CONSTANT, input.readUnsignedShort(), input.readUnsignedShort(), cpool);
-            
-            case CLASS:
-                return new ClassElementValue(CLASS, input.readUnsignedShort(), cpool);
-
-            case ANNOTATION:
-                // TODO isRuntimeVisible
-                return new AnnotationElementValue(ANNOTATION, AnnotationEntry.read(input, cpool, false), cpool);
-
-            case ARRAY:
-                int numArrayVals = input.readUnsignedShort();
-                ElementValue[] evalues = new ElementValue[numArrayVals];
-                for (int j = 0; j < numArrayVals; j++)
-                {
-                    evalues[j] = ElementValue.readElementValue(input, cpool);
-                }
-                return new ArrayElementValue(ARRAY, evalues, cpool);
-
-            default:
-                throw new RuntimeException("Unexpected element value kind in annotation: " + type);
-        }
-    }
-
-    public String toShortString()
-    {
-        return stringifyValue();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ElementValuePair.java b/src/main/java/org/apache/bcel/classfile/ElementValuePair.java
deleted file mode 100644
index 5866f2d..0000000
--- a/src/main/java/org/apache/bcel/classfile/ElementValuePair.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * an annotation's element value pair
- * 
- * @version $Id: ElementValuePair
- * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public class ElementValuePair
-{
-    private final ElementValue elementValue;
-
-    private final ConstantPool constantPool;
-
-    private final int elementNameIndex;
-
-    public ElementValuePair(int elementNameIndex, ElementValue elementValue,
-            ConstantPool constantPool)
-    {
-        this.elementValue = elementValue;
-        this.elementNameIndex = elementNameIndex;
-        this.constantPool = constantPool;
-    }
-
-    public String getNameString()
-    {
-        ConstantUtf8 c = (ConstantUtf8) constantPool.getConstant(
-                elementNameIndex, Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-    public final ElementValue getValue()
-    {
-        return elementValue;
-    }
-
-    public int getNameIndex()
-    {
-        return elementNameIndex;
-    }
-
-    public String toShortString()
-    {
-        StringBuilder result = new StringBuilder();
-        result.append(getNameString()).append("=").append(
-                getValue().toShortString());
-        return result.toString();
-    }
-
-    protected void dump(DataOutputStream dos) throws IOException {
-        dos.writeShort(elementNameIndex); // u2 name of the element
-        elementValue.dump(dos);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/EmptyVisitor.java b/src/main/java/org/apache/bcel/classfile/EmptyVisitor.java
deleted file mode 100644
index 42bc30f..0000000
--- a/src/main/java/org/apache/bcel/classfile/EmptyVisitor.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-/**
- * Visitor with empty method bodies, can be extended and used in conjunction
- * with the DescendingVisitor class, e.g. By courtesy of David Spencer.
- * 
- * @see DescendingVisitor
- * @version $Id$
- */
-public class EmptyVisitor implements Visitor
-{
-    protected EmptyVisitor()
-    {
-    }
-
-    public void visitAnnotation(Annotations obj)
-    {
-    }
-
-    public void visitParameterAnnotation(ParameterAnnotations obj)
-    {
-    }
-
-    public void visitAnnotationEntry(AnnotationEntry obj)
-    {
-    }
-
-    public void visitAnnotationDefault(AnnotationDefault obj)
-    {
-    }
-
-    public void visitCode(Code obj)
-    {
-    }
-
-    public void visitCodeException(CodeException obj)
-    {
-    }
-
-    public void visitConstantClass(ConstantClass obj)
-    {
-    }
-
-    public void visitConstantDouble(ConstantDouble obj)
-    {
-    }
-
-    public void visitConstantFieldref(ConstantFieldref obj)
-    {
-    }
-
-    public void visitConstantFloat(ConstantFloat obj)
-    {
-    }
-
-    public void visitConstantInteger(ConstantInteger obj)
-    {
-    }
-
-    public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)
-    {
-    }
-
-    public void visitConstantInvokeDynamic(ConstantInvokeDynamic obj)
-    {
-    }
-
-    public void visitConstantLong(ConstantLong obj)
-    {
-    }
-
-    public void visitConstantMethodref(ConstantMethodref obj)
-    {
-    }
-
-    public void visitConstantNameAndType(ConstantNameAndType obj)
-    {
-    }
-
-    public void visitConstantPool(ConstantPool obj)
-    {
-    }
-
-    public void visitConstantString(ConstantString obj)
-    {
-    }
-
-    public void visitConstantUtf8(ConstantUtf8 obj)
-    {
-    }
-
-    public void visitConstantValue(ConstantValue obj)
-    {
-    }
-
-    public void visitDeprecated(Deprecated obj)
-    {
-    }
-
-    public void visitExceptionTable(ExceptionTable obj)
-    {
-    }
-
-    public void visitField(Field obj)
-    {
-    }
-
-    public void visitInnerClass(InnerClass obj)
-    {
-    }
-
-    public void visitInnerClasses(InnerClasses obj)
-    {
-    }
-
-    public void visitBootstrapMethods(BootstrapMethods obj)
-    {
-    }
-
-    public void visitJavaClass(JavaClass obj)
-    {
-    }
-
-    public void visitLineNumber(LineNumber obj)
-    {
-    }
-
-    public void visitLineNumberTable(LineNumberTable obj)
-    {
-    }
-
-    public void visitLocalVariable(LocalVariable obj)
-    {
-    }
-
-    public void visitLocalVariableTable(LocalVariableTable obj)
-    {
-    }
-
-    public void visitMethod(Method obj)
-    {
-    }
-
-    public void visitSignature(Signature obj)
-    {
-    }
-
-    public void visitSourceFile(SourceFile obj)
-    {
-    }
-
-    public void visitSynthetic(Synthetic obj)
-    {
-    }
-
-    public void visitUnknown(Unknown obj)
-    {
-    }
-
-    public void visitStackMap(StackMap obj)
-    {
-    }
-
-    public void visitStackMapEntry(StackMapEntry obj)
-    {
-    }
-
-    public void visitStackMapTable(StackMapTable obj)
-    {
-    }
-
-    public void visitStackMapTableEntry(StackMapTableEntry obj)
-    {
-    }
-
-    public void visitEnclosingMethod(EnclosingMethod obj)
-    {
-    }
-
-    public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
-    {
-    }
-
-    public void visitMethodParameters(MethodParameters obj)
-    {
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java b/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java
deleted file mode 100644
index 6d6d6c0..0000000
--- a/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/**
- * This attribute exists for local or 
- * anonymous classes and ... there can be only one.
- * 
- * @since 6.0
- */
-public class EnclosingMethod extends Attribute {
-
-    private static final long serialVersionUID = 9136852385761725494L;
-
-    // Pointer to the CONSTANT_Class_info structure representing the 
-    // innermost class that encloses the declaration of the current class.
-    private int classIndex;
-
-    // If the current class is not immediately enclosed by a method or 
-    // constructor, then the value of the method_index item must be zero.  
-    // Otherwise, the value of the  method_index item must point to a 
-    // CONSTANT_NameAndType_info structure representing the name and the 
-    // type of a method in the class referenced by the class we point 
-    // to in the class_index.  *It is the compiler responsibility* to 
-    // ensure that the method identified by this index is the closest 
-    // lexically enclosing method that includes the local/anonymous class.
-    private int methodIndex;
-
-    // Ctors - and code to read an attribute in.
-    EnclosingMethod(int nameIndex, int len, DataInput input, ConstantPool cpool) throws IOException {
-        this(nameIndex, len, input.readUnsignedShort(), input.readUnsignedShort(), cpool);
-    }
-
-    private EnclosingMethod(int nameIndex, int len, int classIdx,int methodIdx, ConstantPool cpool) {
-        super(Constants.ATTR_ENCLOSING_METHOD, nameIndex, len, cpool);
-        classIndex  = classIdx;
-        methodIndex = methodIdx;
-    }
-
-    @Override
-    public void accept(Visitor v) {
-      v.visitEnclosingMethod(this);
-    }
-
-    @Override
-    public Attribute copy(ConstantPool constant_pool) {
-        throw new RuntimeException("Not implemented yet!");
-        // is this next line sufficient?
-        // return (EnclosingMethod)clone();
-    }
-
-    // Accessors
-    public final int getEnclosingClassIndex() { return classIndex; }  
-    public final int getEnclosingMethodIndex(){ return methodIndex;}
-
-    public final void setEnclosingClassIndex(int idx) {classIndex = idx;}
-    public final void setEnclosingMethodIndex(int idx){methodIndex= idx;}
-
-    public final ConstantClass getEnclosingClass() {
-        ConstantClass c = 
-            (ConstantClass)constant_pool.getConstant(classIndex,Constants.CONSTANT_Class);
-        return c;
-    }
-
-    public final ConstantNameAndType getEnclosingMethod() {
-        if (methodIndex == 0) {
-            return null;
-        }
-        ConstantNameAndType nat = 
-            (ConstantNameAndType)constant_pool.getConstant(methodIndex,Constants.CONSTANT_NameAndType);
-        return nat;
-    }
-
-    @Override
-    public final void dump(DataOutputStream file) throws IOException {
-        super.dump(file);
-        file.writeShort(classIndex);
-        file.writeShort(methodIndex);
-    }    
-}
diff --git a/src/main/java/org/apache/bcel/classfile/EnumElementValue.java b/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
deleted file mode 100644
index 8cd3af7..0000000
--- a/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * @since 6.0
- */
-public class EnumElementValue extends ElementValue
-{
-    // For enum types, these two indices point to the type and value
-    private final int typeIdx;
-
-    private final int valueIdx;
-
-    public EnumElementValue(int type, int typeIdx, int valueIdx,
-            ConstantPool cpool)
-    {
-        super(type, cpool);
-        if (type != ENUM_CONSTANT) {
-            throw new RuntimeException(
-                    "Only element values of type enum can be built with this ctor - type specified: " + type);
-        }
-        this.typeIdx = typeIdx;
-        this.valueIdx = valueIdx;
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 type of value (ENUM_CONSTANT == 'e')
-        dos.writeShort(typeIdx); // u2
-        dos.writeShort(valueIdx); // u2
-    }
-
-    @Override
-    public String stringifyValue()
-    {
-        ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(valueIdx,
-                Constants.CONSTANT_Utf8);
-        return cu8.getBytes();
-    }
-
-    public String getEnumTypeString()
-    {
-        ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(typeIdx,
-                Constants.CONSTANT_Utf8);
-        return cu8.getBytes();// Utility.signatureToString(cu8.getBytes());
-    }
-
-    public String getEnumValueString()
-    {
-        ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(valueIdx,
-                Constants.CONSTANT_Utf8);
-        return cu8.getBytes();
-    }
-
-    public int getValueIndex()
-    {
-        return valueIdx;
-    }
-
-    public int getTypeIndex()
-    {
-        return typeIdx;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ExceptionTable.java b/src/main/java/org/apache/bcel/classfile/ExceptionTable.java
deleted file mode 100644
index 10fe688..0000000
--- a/src/main/java/org/apache/bcel/classfile/ExceptionTable.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/** 
- * This class represents the table of exceptions that are thrown by a
- * method. This attribute may be used once per method.  The name of
- * this class is <em>ExceptionTable</em> for historical reasons; The
- * Java Virtual Machine Specification, Second Edition defines this
- * attribute using the name <em>Exceptions</em> (which is inconsistent
- * with the other classes).
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Code
- */
-public final class ExceptionTable extends Attribute {
-
-    private static final long serialVersionUID = 2045358830660883220L;
-
-    private int[] exception_index_table; // constant pool
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public ExceptionTable(ExceptionTable c) {
-        this(c.getNameIndex(), c.getLength(), c.getExceptionIndexTable(), c.getConstantPool());
-    }
-
-
-    /**
-     * @param name_index Index in constant pool
-     * @param length Content length in bytes
-     * @param exception_index_table Table of indices in constant pool
-     * @param constant_pool Array of constants
-     */
-    public ExceptionTable(int name_index, int length, int[] exception_index_table,
-            ConstantPool constant_pool) {
-        super(Constants.ATTR_EXCEPTIONS, name_index, length, constant_pool);
-        setExceptionIndexTable(exception_index_table);
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * @param name_index Index in constant pool
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    ExceptionTable(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
-        this(name_index, length, (int[]) null, constant_pool);
-        int number_of_exceptions = input.readUnsignedShort();
-        exception_index_table = new int[number_of_exceptions];
-        for (int i = 0; i < number_of_exceptions; i++) {
-            exception_index_table[i] = input.readUnsignedShort();
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionTable(this);
-    }
-
-
-    /**
-     * Dump exceptions attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(exception_index_table.length);
-        for (int index : exception_index_table) {
-            file.writeShort(index);
-        }
-    }
-
-
-    /**
-     * @return Array of indices into constant pool of thrown exceptions.
-     */
-    public final int[] getExceptionIndexTable() {
-        return exception_index_table;
-    }
-
-
-    /**
-     * @return Length of exception table.
-     */
-    public final int getNumberOfExceptions() {
-        return exception_index_table == null ? 0 : exception_index_table.length;
-    }
-
-
-    /**
-     * @return class names of thrown exceptions
-     */
-    public final String[] getExceptionNames() {
-        String[] names = new String[exception_index_table.length];
-        for (int i = 0; i < exception_index_table.length; i++) {
-            names[i] = constant_pool.getConstantString(exception_index_table[i], 
-                    Constants.CONSTANT_Class).replace('/', '.');
-        }
-        return names;
-    }
-
-
-    /**
-     * @param exception_index_table the list of exception indexes
-     * Also redefines number_of_exceptions according to table length.
-     */
-    public final void setExceptionIndexTable( int[] exception_index_table ) {
-        this.exception_index_table = exception_index_table != null ? exception_index_table : new int[0];
-    }
-
-
-    /**
-     * @return String representation, i.e., a list of thrown exceptions.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder();
-        String str;
-        for (int i = 0; i < exception_index_table.length; i++) {
-            str = constant_pool.getConstantString(exception_index_table[i], Constants.CONSTANT_Class);
-            buf.append(Utility.compactClassName(str, false));
-            if (i < exception_index_table.length - 1) {
-                buf.append(", ");
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        ExceptionTable c = (ExceptionTable) clone();
-        if (exception_index_table != null) {
-            c.exception_index_table = new int[exception_index_table.length];
-            System.arraycopy(exception_index_table, 0, c.exception_index_table, 0,
-                    exception_index_table.length);
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Field.java b/src/main/java/org/apache/bcel/classfile/Field.java
deleted file mode 100644
index 9219349..0000000
--- a/src/main/java/org/apache/bcel/classfile/Field.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.util.BCELComparator;
-
-/**
- * This class represents the field info structure, i.e., the representation 
- * for a variable in the class. See JVM specification for details.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class Field extends FieldOrMethod {
-
-    private static final long serialVersionUID = -4604082205545049134L;
-    private static BCELComparator _cmp = new BCELComparator() {
-
-        public boolean equals( Object o1, Object o2 ) {
-            Field THIS = (Field) o1;
-            Field THAT = (Field) o2;
-            return THIS.getName().equals(THAT.getName())
-                    && THIS.getSignature().equals(THAT.getSignature());
-        }
-
-
-        public int hashCode( Object o ) {
-            Field THIS = (Field) o;
-            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
-        }
-    };
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Field(Field c) {
-        super(c);
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * @param file Input stream
-     */
-    Field(DataInput file, ConstantPool constant_pool) throws IOException,
-            ClassFormatException {
-        super(file, constant_pool);
-    }
-
-
-    /**
-     * @param access_flags Access rights of field
-     * @param name_index Points to field name in constant pool
-     * @param signature_index Points to encoded signature
-     * @param attributes Collection of attributes
-     * @param constant_pool Array of constants
-     */
-    public Field(int access_flags, int name_index, int signature_index, Attribute[] attributes,
-            ConstantPool constant_pool) {
-        super(access_flags, name_index, signature_index, attributes, constant_pool);
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitField(this);
-    }
-
-
-    /**
-     * @return constant value associated with this field (may be null)
-     */
-    public final ConstantValue getConstantValue() {
-        for (Attribute attribute : attributes) {
-            if (attribute.getTag() == Constants.ATTR_CONSTANT_VALUE) {
-                return (ConstantValue) attribute;
-            }
-        }
-        return null;
-    }
-
-
-    /**
-     * Return string representation close to declaration format,
-     * `public static final short MAX = 100', e.g..
-     *
-     * @return String representation of field, including the signature.
-     */
-    @Override
-    public final String toString() {
-        String name, signature, access; // Short cuts to constant pool
-        // Get names from constant pool
-        access = Utility.accessToString(access_flags);
-        access = access.equals("") ? "" : (access + " ");
-        signature = Utility.signatureToString(getSignature());
-        name = getName();
-        StringBuilder buf = new StringBuilder(64);
-        buf.append(access).append(signature).append(" ").append(name);
-        ConstantValue cv = getConstantValue();
-        if (cv != null) {
-            buf.append(" = ").append(cv);
-        }
-        for (Attribute attribute : attributes) {
-            if (!(attribute instanceof ConstantValue)) {
-                buf.append(" [").append(attribute.toString()).append("]");
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this field
-     */
-    public final Field copy( ConstantPool _constant_pool ) {
-        return (Field) copy_(_constant_pool);
-    }
-
-
-    /**
-     * @return type of field
-     */
-    public Type getType() {
-        return Type.getReturnType(getSignature());
-    }
-
-
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
-
-
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default two Field objects are said to be equal when
-     * their names and signatures are equal.
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        return _cmp.equals(this, obj);
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default return the hashcode of the field's name XOR signature.
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return _cmp.hashCode(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java b/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java
deleted file mode 100644
index efbacd1..0000000
--- a/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/** 
- * Abstract super class for fields and methods.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class FieldOrMethod extends AccessFlags implements Cloneable, Node {
-
-    private static final long serialVersionUID = -1833306330869469714L;
-    protected int name_index; // Points to field name in constant pool 
-    protected int signature_index; // Points to encoded signature
-    protected Attribute[] attributes; // Collection of attributes
-    protected AnnotationEntry[] annotationEntries; // annotations defined on the field or method 
-    protected ConstantPool constant_pool;
-
-    private String signatureAttributeString = null;
-    private boolean searchedForSignatureAttribute = false;
-
-    FieldOrMethod() {
-    }
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    protected FieldOrMethod(FieldOrMethod c) {
-        this(c.getAccessFlags(), c.getNameIndex(), c.getSignatureIndex(), c.getAttributes(), c
-                .getConstantPool());
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * @param file Input stream
-     * @throws IOException
-     * @throws ClassFormatException
-     * @deprecated Use {@link #FieldOrMethod(java.io.DataInput, ConstantPool)} instead.
-     */
-    protected FieldOrMethod(DataInputStream file, ConstantPool constant_pool) throws IOException,
-            ClassFormatException {
-        this((DataInput) file, constant_pool);
-    }
-
-    /**
-     * Construct object from file stream.
-     * @param file Input stream
-     * @throws IOException
-     * @throws ClassFormatException
-     */
-    protected FieldOrMethod(DataInput file, ConstantPool constant_pool) throws IOException, ClassFormatException {
-        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), null,
-                constant_pool);
-        int attributes_count = file.readUnsignedShort();
-        attributes = new Attribute[attributes_count];
-        for (int i = 0; i < attributes_count; i++) {
-            attributes[i] = Attribute.readAttribute(file, constant_pool);
-        }
-    }
-
-
-    /**
-     * @param access_flags Access rights of method
-     * @param name_index Points to field name in constant pool
-     * @param signature_index Points to encoded signature
-     * @param attributes Collection of attributes
-     * @param constant_pool Array of constants
-     */
-    protected FieldOrMethod(int access_flags, int name_index, int signature_index,
-            Attribute[] attributes, ConstantPool constant_pool) {
-        this.access_flags = access_flags;
-        this.name_index = name_index;
-        this.signature_index = signature_index;
-        this.constant_pool = constant_pool;
-        setAttributes(attributes);
-    }
-
-
-    /**
-     * Dump object to file stream on binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(access_flags);
-        file.writeShort(name_index);
-        file.writeShort(signature_index);
-        file.writeShort(attributes.length);
-        for (Attribute attribute : attributes) {
-            attribute.dump(file);
-        }
-    }
-
-
-    /**
-     * @return Collection of object attributes.
-     */
-    public final Attribute[] getAttributes() {
-        return attributes;
-    }
-
-
-    /**
-     * @param attributes Collection of object attributes.
-     */
-    public final void setAttributes( Attribute[] attributes ) {
-        this.attributes = attributes;
-    }
-
-
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
-
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * @return Index in constant pool of object's name.
-     */
-    public final int getNameIndex() {
-        return name_index;
-    }
-
-
-    /**
-     * @param name_index Index in constant pool of object's name.
-     */
-    public final void setNameIndex( int name_index ) {
-        this.name_index = name_index;
-    }
-
-
-    /**
-     * @return Index in constant pool of field signature.
-     */
-    public final int getSignatureIndex() {
-        return signature_index;
-    }
-
-
-    /**
-     * @param signature_index Index in constant pool of field signature.
-     */
-    public final void setSignatureIndex( int signature_index ) {
-        this.signature_index = signature_index;
-    }
-
-
-    /**
-     * @return Name of object, i.e., method name or field name
-     */
-    public final String getName() {
-        ConstantUtf8 c;
-        c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-
-    /**
-     * @return String representation of object's type signature (java style)
-     */
-    public final String getSignature() {
-        ConstantUtf8 c;
-        c = (ConstantUtf8) constant_pool.getConstant(signature_index, Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-
-    /**
-     * @return deep copy of this field
-     */
-    protected FieldOrMethod copy_( ConstantPool _constant_pool ) {
-        FieldOrMethod c = null;
-
-        try {
-          c = (FieldOrMethod)clone();
-        } catch(CloneNotSupportedException e) {}
-
-        c.constant_pool    = constant_pool;
-        c.attributes       = new Attribute[attributes.length];
-
-        for (int i = 0; i < attributes.length; i++) {
-            c.attributes[i] = attributes[i].copy(constant_pool);
-        }
-
-        return c;
-    }
-
-    /**
-     * @return Annotations on the field or method
-     */
-    public AnnotationEntry[] getAnnotationEntries() {
-        if (annotationEntries == null) {
-            annotationEntries = AnnotationEntry.createAnnotationEntries(getAttributes());
-        }
-        
-        return annotationEntries;
-    }
-
-    /**
-     * Hunts for a signature attribute on the member and returns its contents.  So where the 'regular' signature
-     * may be (Ljava/util/Vector;)V the signature attribute may in fact say 'Ljava/lang/Vector&lt;Ljava/lang/String&gt;;'
-     * Coded for performance - searches for the attribute only when requested - only searches for it once.
-     */
-    public final String getGenericSignature()
-    {
-        if (!searchedForSignatureAttribute)
-        {
-            boolean found = false;
-            for (int i = 0; !found && i < attributes.length; i++)
-            {
-                if (attributes[i] instanceof Signature)
-                {
-                    signatureAttributeString = ((Signature) attributes[i])
-                            .getSignature();
-                    found = true;
-                }
-            }
-            searchedForSignatureAttribute = true;
-        }
-        return signatureAttributeString;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/InnerClass.java b/src/main/java/org/apache/bcel/classfile/InnerClass.java
deleted file mode 100644
index 47687f3..0000000
--- a/src/main/java/org/apache/bcel/classfile/InnerClass.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This class represents a inner class attribute, i.e., the class
- * indices of the inner and outer classes, the name and the attributes
- * of the inner class.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see InnerClasses
- */
-public final class InnerClass implements Cloneable, Node, Serializable {
-
-    private static final long serialVersionUID = -7200195918166127614L;
-    private int inner_class_index;
-    private int outer_class_index;
-    private int inner_name_index;
-    private int inner_access_flags;
-
-
-    /**
-     * Initialize from another object.
-     */
-    public InnerClass(InnerClass c) {
-        this(c.getInnerClassIndex(), c.getOuterClassIndex(), c.getInnerNameIndex(), c
-                .getInnerAccessFlags());
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * @param file Input stream
-     * @throws IOException
-     */
-    InnerClass(DataInput file) throws IOException {
-        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
-                .readUnsignedShort());
-    }
-
-
-    /**
-     * @param inner_class_index Class index in constant pool of inner class
-     * @param outer_class_index Class index in constant pool of outer class
-     * @param inner_name_index  Name index in constant pool of inner class
-     * @param inner_access_flags Access flags of inner class
-     */
-    public InnerClass(int inner_class_index, int outer_class_index, int inner_name_index,
-            int inner_access_flags) {
-        this.inner_class_index = inner_class_index;
-        this.outer_class_index = outer_class_index;
-        this.inner_name_index = inner_name_index;
-        this.inner_access_flags = inner_access_flags;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitInnerClass(this);
-    }
-
-
-    /**
-     * Dump inner class attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(inner_class_index);
-        file.writeShort(outer_class_index);
-        file.writeShort(inner_name_index);
-        file.writeShort(inner_access_flags);
-    }
-
-
-    /**
-     * @return access flags of inner class.
-     */
-    public final int getInnerAccessFlags() {
-        return inner_access_flags;
-    }
-
-
-    /**
-     * @return class index of inner class.
-     */
-    public final int getInnerClassIndex() {
-        return inner_class_index;
-    }
-
-
-    /**
-     * @return name index of inner class.
-     */
-    public final int getInnerNameIndex() {
-        return inner_name_index;
-    }
-
-
-    /**
-     * @return class index of outer class.
-     */
-    public final int getOuterClassIndex() {
-        return outer_class_index;
-    }
-
-
-    /**
-     * @param inner_access_flags access flags for this inner class
-     */
-    public final void setInnerAccessFlags( int inner_access_flags ) {
-        this.inner_access_flags = inner_access_flags;
-    }
-
-
-    /**
-     * @param inner_class_index index into the constant pool for this class
-     */
-    public final void setInnerClassIndex( int inner_class_index ) {
-        this.inner_class_index = inner_class_index;
-    }
-
-
-    /**
-     * @param inner_name_index index into the constant pool for this class's name
-     */
-    public final void setInnerNameIndex( int inner_name_index ) {
-        this.inner_name_index = inner_name_index;
-    }
-
-
-    /**
-     * @param outer_class_index index into the constant pool for the owning class
-     */
-    public final void setOuterClassIndex( int outer_class_index ) {
-        this.outer_class_index = outer_class_index;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        return "InnerClass(" + inner_class_index + ", " + outer_class_index + ", "
-                + inner_name_index + ", " + inner_access_flags + ")";
-    }
-
-
-    /**
-     * @return Resolved string representation
-     */
-    public final String toString( ConstantPool constant_pool ) {
-        String inner_class_name, outer_class_name, inner_name, access;
-        inner_class_name = constant_pool.getConstantString(inner_class_index,
-                Constants.CONSTANT_Class);
-        inner_class_name = Utility.compactClassName(inner_class_name);
-        if (outer_class_index != 0) {
-            outer_class_name = constant_pool.getConstantString(outer_class_index,
-                    Constants.CONSTANT_Class);
-            outer_class_name = Utility.compactClassName(outer_class_name);
-        } else {
-            outer_class_name = "<not a member>";
-        }
-        if (inner_name_index != 0) {
-            inner_name = ((ConstantUtf8) constant_pool.getConstant(inner_name_index,
-                    Constants.CONSTANT_Utf8)).getBytes();
-        } else {
-            inner_name = "<anonymous>";
-        }
-        access = Utility.accessToString(inner_access_flags, true);
-        access = access.equals("") ? "" : (access + " ");
-        return "InnerClass:" + access + inner_class_name + "(\"" + outer_class_name + "\", \""
-                + inner_name + "\")";
-    }
-
-
-    /**
-     * @return deep copy of this object
-     */
-    public InnerClass copy() {
-        try {
-            return (InnerClass) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/InnerClasses.java b/src/main/java/org/apache/bcel/classfile/InnerClasses.java
deleted file mode 100644
index 076d939..0000000
--- a/src/main/java/org/apache/bcel/classfile/InnerClasses.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * This class is derived from <em>Attribute</em> and denotes that this class
- * is an Inner class of another.
- * to the source file of this class.
- * It is instantiated from the <em>Attribute.readAttribute()</em> method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Attribute
- */
-public final class InnerClasses extends Attribute {
-
-    private static final long serialVersionUID = 4570147726361753700L;
-    private InnerClass[] inner_classes;
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public InnerClasses(InnerClasses c) {
-        this(c.getNameIndex(), c.getLength(), c.getInnerClasses(), c.getConstantPool());
-    }
-
-
-    /**
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param inner_classes array of inner classes attributes
-     * @param constant_pool Array of constants
-     */
-    public InnerClasses(int name_index, int length, InnerClass[] inner_classes,
-            ConstantPool constant_pool) {
-        super(Constants.ATTR_INNER_CLASSES, name_index, length, constant_pool);
-        setInnerClasses(inner_classes);
-    }
-
-
-    /**
-     * Construct object from input stream.
-     *
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    InnerClasses(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, (InnerClass[]) null, constant_pool);
-        int number_of_classes = input.readUnsignedShort();
-        inner_classes = new InnerClass[number_of_classes];
-        for (int i = 0; i < number_of_classes; i++) {
-            inner_classes[i] = new InnerClass(input);
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitInnerClasses(this);
-    }
-
-
-    /**
-     * Dump source file attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(inner_classes.length);
-        for (InnerClass inner_class : inner_classes) {
-            inner_class.dump(file);
-        }
-    }
-
-
-    /**
-     * @return array of inner class "records"
-     */
-    public final InnerClass[] getInnerClasses() {
-        return inner_classes;
-    }
-
-
-    /**
-     * @param inner_classes the array of inner classes
-     */
-    public final void setInnerClasses( InnerClass[] inner_classes ) {
-        this.inner_classes = inner_classes != null ? inner_classes : new InnerClass[0];
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder();
-        for (InnerClass inner_class : inner_classes) {
-            buf.append(inner_class.toString(constant_pool)).append("\n");
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        InnerClasses c = (InnerClasses) clone();
-        c.inner_classes = new InnerClass[inner_classes.length];
-        for (int i = 0; i < inner_classes.length; i++) {
-            c.inner_classes[i] = inner_classes[i].copy();
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/JavaClass.java b/src/main/java/org/apache/bcel/classfile/JavaClass.java
deleted file mode 100644
index df8b170..0000000
--- a/src/main/java/org/apache/bcel/classfile/JavaClass.java
+++ /dev/null
@@ -1,925 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.util.BCELComparator;
-import org.apache.bcel.util.ClassQueue;
-import org.apache.bcel.util.SyntheticRepository;
-
-/**
- * Represents a Java class, i.e., the data structures, constant pool,
- * fields, methods and commands contained in a Java .class file.
- * See <a href="http://docs.oracle.com/javase/specs/">JVM specification</a> for details.
- * The intent of this class is to represent a parsed or otherwise existing
- * class file.  Those interested in programatically generating classes
- * should see the <a href="../generic/ClassGen.html">ClassGen</a> class.
-
- * @version $Id$
- * @see org.apache.bcel.generic.ClassGen
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class JavaClass extends AccessFlags implements Cloneable, Node, Comparable<JavaClass> {
-
-    private static final long serialVersionUID = 2179314813560563755L;
-    private String file_name;
-    private String package_name;
-    private String source_file_name = "<Unknown>";
-    private int class_name_index;
-    private int superclass_name_index;
-    private String class_name;
-    private String superclass_name;
-    private int major, minor; // Compiler version
-    private ConstantPool constant_pool; // Constant pool
-    private int[] interfaces; // implemented interfaces
-    private String[] interface_names;
-    private Field[] fields; // Fields, i.e., variables of class
-    private Method[] methods; // methods defined in the class
-    private Attribute[] attributes; // attributes defined in the class
-    private AnnotationEntry[] annotations;   // annotations defined on the class
-    private byte source = HEAP; // Generated in memory
-    private boolean isAnonymous = false;
-    private boolean isNested = false;
-    private boolean computedNestedTypeStatus = false;
-    public static final byte HEAP = 1;
-    public static final byte FILE = 2;
-    public static final byte ZIP = 3;
-    static boolean debug = false; // Debugging on/off
-    final static char sep = File.separatorChar; // directory separator
-    
-    private static BCELComparator _cmp = new BCELComparator() {
-
-        public boolean equals( Object o1, Object o2 ) {
-            JavaClass THIS = (JavaClass) o1;
-            JavaClass THAT = (JavaClass) o2;
-            return THIS.getClassName().equals(THAT.getClassName());
-        }
-
-
-        public int hashCode( Object o ) {
-            JavaClass THIS = (JavaClass) o;
-            return THIS.getClassName().hashCode();
-        }
-    };
-    /**
-     * In cases where we go ahead and create something,
-     * use the default SyntheticRepository, because we
-     * don't know any better.
-     */
-    private transient org.apache.bcel.util.Repository repository = SyntheticRepository
-            .getInstance();
-
-
-    /**
-     * Constructor gets all contents as arguments.
-     *
-     * @param class_name_index Index into constant pool referencing a
-     * ConstantClass that represents this class.
-     * @param superclass_name_index Index into constant pool referencing a
-     * ConstantClass that represents this class's superclass.
-     * @param file_name File name
-     * @param major Major compiler version
-     * @param minor Minor compiler version
-     * @param access_flags Access rights defined by bit flags
-     * @param constant_pool Array of constants
-     * @param interfaces Implemented interfaces
-     * @param fields Class fields
-     * @param methods Class methods
-     * @param attributes Class attributes
-     * @param source Read from file or generated in memory?
-     */
-    public JavaClass(int class_name_index, int superclass_name_index, String file_name, int major,
-            int minor, int access_flags, ConstantPool constant_pool, int[] interfaces,
-            Field[] fields, Method[] methods, Attribute[] attributes, byte source) {
-        if (interfaces == null) {
-            interfaces = new int[0];
-        }
-        if (attributes == null) {
-            attributes = new Attribute[0];
-        }
-        if (fields == null) {
-            fields = new Field[0];
-        }
-        if (methods == null) {
-            methods = new Method[0];
-        }
-        this.class_name_index = class_name_index;
-        this.superclass_name_index = superclass_name_index;
-        this.file_name = file_name;
-        this.major = major;
-        this.minor = minor;
-        this.access_flags = access_flags;
-        this.constant_pool = constant_pool;
-        this.interfaces = interfaces;
-        this.fields = fields;
-        this.methods = methods;
-        this.attributes = attributes;
-        this.source = source;
-        // Get source file name if available
-        for (Attribute attribute : attributes) {
-            if (attribute instanceof SourceFile) {
-                source_file_name = ((SourceFile) attribute).getSourceFileName();
-                break;
-            }
-        }
-        /* According to the specification the following entries must be of type
-         * `ConstantClass' but we check that anyway via the 
-         * `ConstPool.getConstant' method.
-         */
-        class_name = constant_pool.getConstantString(class_name_index, Constants.CONSTANT_Class);
-        class_name = Utility.compactClassName(class_name, false);
-        int index = class_name.lastIndexOf('.');
-        if (index < 0) {
-            package_name = "";
-        } else {
-            package_name = class_name.substring(0, index);
-        }
-        if (superclass_name_index > 0) {
-            // May be zero -> class is java.lang.Object
-            superclass_name = constant_pool.getConstantString(superclass_name_index,
-                    Constants.CONSTANT_Class);
-            superclass_name = Utility.compactClassName(superclass_name, false);
-        } else {
-            superclass_name = "java.lang.Object";
-        }
-        interface_names = new String[interfaces.length];
-        for (int i = 0; i < interfaces.length; i++) {
-            String str = constant_pool.getConstantString(interfaces[i], Constants.CONSTANT_Class);
-            interface_names[i] = Utility.compactClassName(str, false);
-        }
-    }
-
-
-    /**
-     * Constructor gets all contents as arguments.
-     *
-     * @param class_name_index Class name
-     * @param superclass_name_index Superclass name
-     * @param file_name File name
-     * @param major Major compiler version
-     * @param minor Minor compiler version
-     * @param access_flags Access rights defined by bit flags
-     * @param constant_pool Array of constants
-     * @param interfaces Implemented interfaces
-     * @param fields Class fields
-     * @param methods Class methods
-     * @param attributes Class attributes
-     */
-    public JavaClass(int class_name_index, int superclass_name_index, String file_name, int major,
-            int minor, int access_flags, ConstantPool constant_pool, int[] interfaces,
-            Field[] fields, Method[] methods, Attribute[] attributes) {
-        this(class_name_index, superclass_name_index, file_name, major, minor, access_flags,
-                constant_pool, interfaces, fields, methods, attributes, HEAP);
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitJavaClass(this);
-    }
-
-
-    /* Print debug information depending on `JavaClass.debug'
-     */
-    static void Debug( String str ) {
-        if (debug) {
-            System.out.println(str);
-        }
-    }
-
-
-    /** 
-     * Dump class to a file.
-     *
-     * @param file Output file
-     * @throws IOException
-     */
-    public void dump( File file ) throws IOException {
-        String parent = file.getParent();
-        if (parent != null) {
-            File dir = new File(parent);
-            dir.mkdirs();
-        }
-        DataOutputStream dos = null;
-        try {
-            dos = new DataOutputStream(new FileOutputStream(file));
-            dump(dos);
-        } finally {
-            if (dos != null) {
-                dos.close();
-            }
-        }
-    }
-
-
-    /** 
-     * Dump class to a file named file_name.
-     *
-     * @param _file_name Output file name
-     * @exception IOException
-     */
-    public void dump( String _file_name ) throws IOException {
-        dump(new File(_file_name));
-    }
-
-
-    /**
-     * @return class in binary format
-     */
-    public byte[] getBytes() {
-        ByteArrayOutputStream s = new ByteArrayOutputStream();
-        DataOutputStream ds = new DataOutputStream(s);
-        try {
-            dump(ds);
-        } catch (IOException e) {
-            e.printStackTrace();
-        } finally {
-            try {
-                ds.close();
-            } catch (IOException e2) {
-                e2.printStackTrace();
-            }
-        }
-        return s.toByteArray();
-    }
-
-
-    /**
-     * Dump Java class to output stream in binary format.
-     *
-     * @param file Output stream
-     * @exception IOException
-     */
-    public void dump( OutputStream file ) throws IOException {
-        dump(new DataOutputStream(file));
-    }
-
-
-    /**
-     * Dump Java class to output stream in binary format.
-     *
-     * @param file Output stream
-     * @exception IOException
-     */
-    public void dump( DataOutputStream file ) throws IOException {
-        file.writeInt(0xcafebabe);
-        file.writeShort(minor);
-        file.writeShort(major);
-        constant_pool.dump(file);
-        file.writeShort(access_flags);
-        file.writeShort(class_name_index);
-        file.writeShort(superclass_name_index);
-        file.writeShort(interfaces.length);
-        for (int interface1 : interfaces) {
-            file.writeShort(interface1);
-        }
-        file.writeShort(fields.length);
-        for (Field field : fields) {
-            field.dump(file);
-        }
-        file.writeShort(methods.length);
-        for (Method method : methods) {
-            method.dump(file);
-        }
-        if (attributes != null) {
-            file.writeShort(attributes.length);
-            for (Attribute attribute : attributes) {
-                attribute.dump(file);
-            }
-        } else {
-            file.writeShort(0);
-        }
-        file.flush();
-    }
-
-
-    /**
-     * @return Attributes of the class.
-     */
-    public Attribute[] getAttributes() {
-        return attributes;
-    }
-
-    /**
-     * @return Annotations on the class
-     */
-    public AnnotationEntry[] getAnnotationEntries() {
-        if (annotations == null) {
-            annotations = AnnotationEntry.createAnnotationEntries(getAttributes());
-        }
-        
-        return annotations;
-    }
-
-    /**
-     * @return Class name.
-     */
-    public String getClassName() {
-        return class_name;
-    }
-
-
-    /**
-     * @return Package name.
-     */
-    public String getPackageName() {
-        return package_name;
-    }
-
-
-    /**
-     * @return Class name index.
-     */
-    public int getClassNameIndex() {
-        return class_name_index;
-    }
-
-
-    /**
-     * @return Constant pool.
-     */
-    public ConstantPool getConstantPool() {
-        return constant_pool;
-    }
-
-
-    /**
-     * @return Fields, i.e., variables of the class. Like the JVM spec
-     * mandates for the classfile format, these fields are those specific to
-     * this class, and not those of the superclass or superinterfaces.
-     */
-    public Field[] getFields() {
-        return fields;
-    }
-
-
-    /**
-     * @return File name of class, aka SourceFile attribute value
-     */
-    public String getFileName() {
-        return file_name;
-    }
-
-
-    /**
-     * @return Names of implemented interfaces.
-     */
-    public String[] getInterfaceNames() {
-        return interface_names;
-    }
-
-
-    /**
-     * @return Indices in constant pool of implemented interfaces.
-     */
-    public int[] getInterfaceIndices() {
-        return interfaces;
-    }
-
-
-    /**
-     * @return Major number of class file version.
-     */
-    public int getMajor() {
-        return major;
-    }
-
-
-    /**
-     * @return Methods of the class.
-     */
-    public Method[] getMethods() {
-        return methods;
-    }
-
-
-    /**
-     * @return A org.apache.bcel.classfile.Method corresponding to
-     * java.lang.reflect.Method if any
-     */
-    public Method getMethod( java.lang.reflect.Method m ) {
-        for (Method method : methods) {
-            if (m.getName().equals(method.getName()) && (m.getModifiers() == method.getModifiers())
-                    && Type.getSignature(m).equals(method.getSignature())) {
-                return method;
-            }
-        }
-        return null;
-    }
-
-
-    /**
-     * @return Minor number of class file version.
-     */
-    public int getMinor() {
-        return minor;
-    }
-
-
-    /**
-     * @return sbsolute path to file where this class was read from
-     */
-    public String getSourceFileName() {
-        return source_file_name;
-    }
-
-
-    /**
-     * returns the super class name of this class. In the case that this class is
-     * java.lang.Object, it will return itself (java.lang.Object). This is probably incorrect
-     * but isn't fixed at this time to not break existing clients.
-     *
-     * @return Superclass name.
-     */
-    public String getSuperclassName() {
-        return superclass_name;
-    }
-
-
-    /**
-     * @return Class name index.
-     */
-    public int getSuperclassNameIndex() {
-        return superclass_name_index;
-    }
-
-    static {
-        // Debugging ... on/off
-        debug = Boolean.getBoolean("JavaClass.debug");
-    }
-
-
-    /**
-     * @param attributes .
-     */
-    public void setAttributes( Attribute[] attributes ) {
-        this.attributes = attributes;
-    }
-
-
-    /**
-     * @param class_name .
-     */
-    public void setClassName( String class_name ) {
-        this.class_name = class_name;
-    }
-
-
-    /**
-     * @param class_name_index .
-     */
-    public void setClassNameIndex( int class_name_index ) {
-        this.class_name_index = class_name_index;
-    }
-
-
-    /**
-     * @param constant_pool .
-     */
-    public void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * @param fields .
-     */
-    public void setFields( Field[] fields ) {
-        this.fields = fields;
-    }
-
-
-    /**
-     * Set File name of class, aka SourceFile attribute value
-     */
-    public void setFileName( String file_name ) {
-        this.file_name = file_name;
-    }
-
-
-    /**
-     * @param interface_names .
-     */
-    public void setInterfaceNames( String[] interface_names ) {
-        this.interface_names = interface_names;
-    }
-
-
-    /**
-     * @param interfaces .
-     */
-    public void setInterfaces( int[] interfaces ) {
-        this.interfaces = interfaces;
-    }
-
-
-    /**
-     * @param major .
-     */
-    public void setMajor( int major ) {
-        this.major = major;
-    }
-
-
-    /**
-     * @param methods .
-     */
-    public void setMethods( Method[] methods ) {
-        this.methods = methods;
-    }
-
-
-    /**
-     * @param minor .
-     */
-    public void setMinor( int minor ) {
-        this.minor = minor;
-    }
-
-
-    /**
-     * Set absolute path to file this class was read from.
-     */
-    public void setSourceFileName( String source_file_name ) {
-        this.source_file_name = source_file_name;
-    }
-
-
-    /**
-     * @param superclass_name .
-     */
-    public void setSuperclassName( String superclass_name ) {
-        this.superclass_name = superclass_name;
-    }
-
-
-    /**
-     * @param superclass_name_index .
-     */
-    public void setSuperclassNameIndex( int superclass_name_index ) {
-        this.superclass_name_index = superclass_name_index;
-    }
-
-
-    /**
-     * @return String representing class contents.
-     */
-    @Override
-    public String toString() {
-        String access = Utility.accessToString(access_flags, true);
-        access = access.equals("") ? "" : (access + " ");
-        StringBuilder buf = new StringBuilder(128);
-        buf.append(access).append(Utility.classOrInterface(access_flags)).append(" ").append(
-                class_name).append(" extends ").append(
-                Utility.compactClassName(superclass_name, false)).append('\n');
-        int size = interfaces.length;
-        if (size > 0) {
-            buf.append("implements\t\t");
-            for (int i = 0; i < size; i++) {
-                buf.append(interface_names[i]);
-                if (i < size - 1) {
-                    buf.append(", ");
-                }
-            }
-            buf.append('\n');
-        }
-        buf.append("filename\t\t").append(file_name).append('\n');
-        buf.append("compiled from\t\t").append(source_file_name).append('\n');
-        buf.append("compiler version\t").append(major).append(".").append(minor).append('\n');
-        buf.append("access flags\t\t").append(access_flags).append('\n');
-        buf.append("constant pool\t\t").append(constant_pool.getLength()).append(" entries\n");
-        buf.append("ACC_SUPER flag\t\t").append(isSuper()).append("\n");
-        if (attributes.length > 0) {
-            buf.append("\nAttribute(s):\n");
-            for (Attribute attribute : attributes) {
-                buf.append(indent(attribute));
-            }
-        }
-        AnnotationEntry[] annotations = getAnnotationEntries();
-        if (annotations!=null && annotations.length>0) {
-            buf.append("\nAnnotation(s):\n");
-            for (AnnotationEntry annotation : annotations) {
-                buf.append(indent(annotation));
-            }
-        }
-        if (fields.length > 0) {
-            buf.append("\n").append(fields.length).append(" fields:\n");
-            for (Field field : fields) {
-                buf.append("\t").append(field).append('\n');
-            }
-        }
-        if (methods.length > 0) {
-            buf.append("\n").append(methods.length).append(" methods:\n");
-            for (Method method : methods) {
-                buf.append("\t").append(method).append('\n');
-            }
-        }
-        return buf.toString();
-    }
-
-
-    private static String indent( Object obj ) {
-        StringTokenizer tok = new StringTokenizer(obj.toString(), "\n");
-        StringBuilder buf = new StringBuilder();
-        while (tok.hasMoreTokens()) {
-            buf.append("\t").append(tok.nextToken()).append("\n");
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this class
-     */
-    public JavaClass copy() {
-        JavaClass c = null;
-        try {
-            c = (JavaClass) clone();
-            c.constant_pool = constant_pool.copy();
-            c.interfaces = interfaces.clone();
-            c.interface_names = interface_names.clone();
-            c.fields = new Field[fields.length];
-            for (int i = 0; i < fields.length; i++) {
-                c.fields[i] = fields[i].copy(c.constant_pool);
-            }
-            c.methods = new Method[methods.length];
-            for (int i = 0; i < methods.length; i++) {
-                c.methods[i] = methods[i].copy(c.constant_pool);
-            }
-            c.attributes = new Attribute[attributes.length];
-            for (int i = 0; i < attributes.length; i++) {
-                c.attributes[i] = attributes[i].copy(c.constant_pool);
-            }
-        } catch (CloneNotSupportedException e) {
-        }
-        return c;
-    }
-
-
-    public final boolean isSuper() {
-        return (access_flags & Constants.ACC_SUPER) != 0;
-    }
-
-
-    public final boolean isClass() {
-        return (access_flags & Constants.ACC_INTERFACE) == 0;
-    }
-
-    public final boolean isAnonymous() {
-        computeNestedTypeStatus();
-        return this.isAnonymous;
-    }
-
-    public final boolean isNested() {
-        computeNestedTypeStatus();
-        return this.isNested;
-    }
-
-    private void computeNestedTypeStatus() {
-        if (computedNestedTypeStatus) {
-        return;
-    }
-        for (Attribute attribute : this.attributes) {
-              if (attribute instanceof InnerClasses) {
-                  InnerClass[] innerClasses = ((InnerClasses) attribute).getInnerClasses();
-                  for (InnerClass innerClasse : innerClasses) {
-                      boolean innerClassAttributeRefersToMe = false;
-                      String inner_class_name = constant_pool.getConstantString(innerClasse.getInnerClassIndex(),
-                                 Constants.CONSTANT_Class);
-                      inner_class_name = Utility.compactClassName(inner_class_name);
-                      if (inner_class_name.equals(getClassName())) {
-                          innerClassAttributeRefersToMe = true;
-                      }
-                      if (innerClassAttributeRefersToMe) {
-                          this.isNested = true;
-                          if (innerClasse.getInnerNameIndex() == 0) {
-                              this.isAnonymous = true;
-                          }
-                      }
-                  }
-              }
-        }
-        this.computedNestedTypeStatus = true;
-    }
-
-
-    /** @return returns either HEAP (generated), FILE, or ZIP
-     */
-    public final byte getSource() {
-        return source;
-    }
-
-
-    /********************* New repository functionality *********************/
-    /**
-     * Gets the ClassRepository which holds its definition. By default
-     * this is the same as SyntheticRepository.getInstance();
-     */
-    public org.apache.bcel.util.Repository getRepository() {
-        return repository;
-    }
-
-
-    /**
-     * Sets the ClassRepository which loaded the JavaClass.
-     * Should be called immediately after parsing is done.
-     */
-    public void setRepository( org.apache.bcel.util.Repository repository ) {
-        this.repository = repository;
-    }
-
-
-    /** Equivalent to runtime "instanceof" operator.
-     *
-     * @return true if this JavaClass is derived from the super class
-     * @throws ClassNotFoundException if superclasses or superinterfaces
-     *   of this object can't be found
-     */
-    public final boolean instanceOf( JavaClass super_class ) throws ClassNotFoundException {
-        if (this.equals(super_class)) {
-            return true;
-        }
-        JavaClass[] super_classes = getSuperClasses();
-        for (JavaClass super_classe : super_classes) {
-            if (super_classe.equals(super_class)) {
-                return true;
-            }
-        }
-        if (super_class.isInterface()) {
-            return implementationOf(super_class);
-        }
-        return false;
-    }
-
-
-    /**
-     * @return true, if this class is an implementation of interface inter
-     * @throws ClassNotFoundException if superclasses or superinterfaces
-     *   of this class can't be found
-     */
-    public boolean implementationOf( JavaClass inter ) throws ClassNotFoundException {
-        if (!inter.isInterface()) {
-            throw new IllegalArgumentException(inter.getClassName() + " is no interface");
-        }
-        if (this.equals(inter)) {
-            return true;
-        }
-        JavaClass[] super_interfaces = getAllInterfaces();
-        for (JavaClass super_interface : super_interfaces) {
-            if (super_interface.equals(inter)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-
-    /**
-     * @return the superclass for this JavaClass object, or null if this
-     * is java.lang.Object
-     * @throws ClassNotFoundException if the superclass can't be found
-     */
-    public JavaClass getSuperClass() throws ClassNotFoundException {
-        if ("java.lang.Object".equals(getClassName())) {
-            return null;
-        }
-        return repository.loadClass(getSuperclassName());
-    }
-
-
-    /**
-     * @return list of super classes of this class in ascending order, i.e.,
-     * java.lang.Object is always the last element
-     * @throws ClassNotFoundException if any of the superclasses can't be found
-     */
-    public JavaClass[] getSuperClasses() throws ClassNotFoundException {
-        JavaClass clazz = this;
-        List<JavaClass> allSuperClasses = new ArrayList<JavaClass>();
-        for (clazz = clazz.getSuperClass(); clazz != null; clazz = clazz.getSuperClass()) {
-            allSuperClasses.add(clazz);
-        }
-        return allSuperClasses.toArray(new JavaClass[allSuperClasses.size()]);
-    }
-
-
-    /**
-     * Get interfaces directly implemented by this JavaClass.
-     */
-    public JavaClass[] getInterfaces() throws ClassNotFoundException {
-        String[] _interfaces = getInterfaceNames();
-        JavaClass[] classes = new JavaClass[_interfaces.length];
-        for (int i = 0; i < _interfaces.length; i++) {
-            classes[i] = repository.loadClass(_interfaces[i]);
-        }
-        return classes;
-    }
-
-
-    /**
-     * Get all interfaces implemented by this JavaClass (transitively).
-     */
-    public JavaClass[] getAllInterfaces() throws ClassNotFoundException {
-        ClassQueue queue = new ClassQueue();
-        Set<JavaClass> allInterfaces = new TreeSet<JavaClass>();
-        queue.enqueue(this);
-        while (!queue.empty()) {
-            JavaClass clazz = queue.dequeue();
-            JavaClass souper = clazz.getSuperClass();
-            JavaClass[] _interfaces = clazz.getInterfaces();
-            if (clazz.isInterface()) {
-                allInterfaces.add(clazz);
-            } else {
-                if (souper != null) {
-                    queue.enqueue(souper);
-                }
-            }
-            for (JavaClass _interface : _interfaces) {
-                queue.enqueue(_interface);
-            }
-        }
-        return allInterfaces.toArray(new JavaClass[allInterfaces.size()]);
-    }
-
-
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
-
-
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default two JavaClass objects are said to be equal when
-     * their class names are equal.
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        return _cmp.equals(this, obj);
-    }
-
-
-    /**
-     * Return the natural ordering of two JavaClasses.
-     * This ordering is based on the class name
-     */
-    public int compareTo( JavaClass obj ) {
-        return getClassName().compareTo(obj.getClassName());
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default return the hashcode of the class name.
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return _cmp.hashCode(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/LineNumber.java b/src/main/java/org/apache/bcel/classfile/LineNumber.java
deleted file mode 100644
index 85dd27c..0000000
--- a/src/main/java/org/apache/bcel/classfile/LineNumber.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-/**
- * This class represents a (PC offset, line number) pair, i.e., a line number in
- * the source that corresponds to a relative address in the byte code. This
- * is used for debugging purposes.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     LineNumberTable
- */
-public final class LineNumber implements Cloneable, Node, Serializable {
-
-    private static final long serialVersionUID = 169537400672820016L;
-    
-    /** Program Counter (PC) corresponds to line */
-    private short start_pc;
-    
-    /** number in source file */
-    private short line_number;
-
-    /**
-     * Initialize from another object.
-     * 
-     * @param c the object to copy
-     */
-    public LineNumber(LineNumber c) {
-        this(c.getStartPC(), c.getLineNumber());
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * 
-     * @param file Input stream
-     */
-    LineNumber(DataInput file) throws IOException {
-        this(file.readUnsignedShort(), file.readUnsignedShort());
-    }
-
-
-    /**
-     * @param start_pc Program Counter (PC) corresponds to
-     * @param line_number line number in source file
-     */
-    public LineNumber(int start_pc, int line_number) {
-        this.start_pc = (short) start_pc;
-        this.line_number = (short)line_number;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitLineNumber(this);
-    }
-
-
-    /**
-     * Dump line number/pc pair to file stream in binary format.
-     *
-     * @param file Output file stream
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(start_pc);
-        file.writeShort(line_number);
-    }
-
-
-    /**
-     * @return Corresponding source line
-     */
-    public final int getLineNumber() {
-        return 0xffff & line_number;
-    }
-
-
-    /**
-     * @return PC in code
-     */
-    public final int getStartPC() {
-        return  0xffff & start_pc;
-    }
-
-
-    /**
-     * @param line_number the source line number
-     */
-    public final void setLineNumber( int line_number ) {
-        this.line_number = (short) line_number;
-    }
-
-
-    /**
-     * @param start_pc the pc for this line number
-     */
-    public final void setStartPC( int start_pc ) {
-        this.start_pc = (short) start_pc;
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        return "LineNumber(" + start_pc + ", " + line_number + ")";
-    }
-
-
-    /**
-     * @return deep copy of this object
-     */
-    public LineNumber copy() {
-        try {
-            return (LineNumber) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/LineNumberTable.java b/src/main/java/org/apache/bcel/classfile/LineNumberTable.java
deleted file mode 100644
index cc6b7f5..0000000
--- a/src/main/java/org/apache/bcel/classfile/LineNumberTable.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a table of line numbers for debugging
- * purposes. This attribute is used by the <em>Code</em> attribute. It
- * contains pairs of PCs and line numbers.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Code
- * @see LineNumber
- */
-public final class LineNumberTable extends Attribute {
-
-    private static final long serialVersionUID = -6967221519632128904L;
-
-    private LineNumber[] line_number_table; // Table of line/numbers pairs
-
-
-    /*
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public LineNumberTable(LineNumberTable c) {
-        this(c.getNameIndex(), c.getLength(), c.getLineNumberTable(), c.getConstantPool());
-    }
-
-
-    /*
-     * @param name_index Index of name
-     * @param length Content length in bytes
-     * @param line_number_table Table of line/numbers pairs
-     * @param constant_pool Array of constants
-     */
-    public LineNumberTable(int name_index, int length, LineNumber[] line_number_table,
-            ConstantPool constant_pool) {
-        super(Constants.ATTR_LINE_NUMBER_TABLE, name_index, length, constant_pool);
-        setLineNumberTable(line_number_table);
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * @param name_index Index of name
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    LineNumberTable(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, (LineNumber[]) null, constant_pool);
-        int line_number_table_length = (input.readUnsignedShort());
-        line_number_table = new LineNumber[line_number_table_length];
-        for (int i = 0; i < line_number_table_length; i++) {
-            line_number_table[i] = new LineNumber(input);
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitLineNumberTable(this);
-    }
-
-
-    /**
-     * Dump line number table attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(line_number_table.length);
-        for (LineNumber lineNumber : line_number_table) {
-            lineNumber.dump(file);
-        }
-    }
-
-
-    /**
-     * @return Array of (pc offset, line number) pairs.
-     */
-    public final LineNumber[] getLineNumberTable() {
-        return line_number_table;
-    }
-
-
-    /**
-     * @param line_number_table the line number entries for this table
-     */
-    public final void setLineNumberTable( LineNumber[] line_number_table ) {
-        this.line_number_table = line_number_table;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder();
-        StringBuilder line = new StringBuilder();
-        String newLine = System.getProperty("line.separator", "\n");
-        for (int i = 0; i < line_number_table.length; i++) {
-            line.append(line_number_table[i].toString());
-            if (i < line_number_table.length - 1) {
-                line.append(", ");
-            }
-            if (line.length() > 72) {
-                line.append(newLine);
-                buf.append(line.toString());
-                line.setLength(0);
-            }
-        }
-        buf.append(line);
-        return buf.toString();
-    }
-
-
-    /**
-     * Map byte code positions to source code lines.
-     *
-     * @param pos byte code offset
-     * @return corresponding line in source code
-     */
-    public int getSourceLine( int pos ) {
-        int l = 0, r = line_number_table.length - 1;
-        if (r < 0) {
-            return -1;
-        }
-        int min_index = -1, min = -1;
-        /* Do a binary search since the array is ordered.
-         */
-        do {
-            int i = (l + r) / 2;
-            int j = line_number_table[i].getStartPC();
-            if (j == pos) {
-                return line_number_table[i].getLineNumber();
-            } else if (pos < j) {
-                r = i - 1;
-            } else {
-                l = i + 1;
-            }
-            /* If exact match can't be found (which is the most common case)
-             * return the line number that corresponds to the greatest index less
-             * than pos.
-             */
-            if (j < pos && j > min) {
-                min = j;
-                min_index = i;
-            }
-        } while (l <= r);
-        /* It's possible that we did not find any valid entry for the bytecode
-         * offset we were looking for.
-         */
-        if (min_index < 0) {
-            return -1;
-        }
-        return line_number_table[min_index].getLineNumber();
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        LineNumberTable c = (LineNumberTable) clone();
-        c.line_number_table = new LineNumber[line_number_table.length];
-        for (int i = 0; i < line_number_table.length; i++) {
-            c.line_number_table[i] = line_number_table[i].copy();
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-
-
-    public final int getTableLength() {
-        return line_number_table == null ? 0 : line_number_table.length;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/LocalVariable.java b/src/main/java/org/apache/bcel/classfile/LocalVariable.java
deleted file mode 100644
index 629295e..0000000
--- a/src/main/java/org/apache/bcel/classfile/LocalVariable.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a local variable within a method. It contains its
- * scope, name, signature and index on the method's frame.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     LocalVariableTable
- */
-public final class LocalVariable implements Constants, Cloneable, Node, Serializable {
-
-    private static final long serialVersionUID = -51081099265972179L;
-    private int start_pc; // Range in which the variable is valid
-    private int length;
-    private int name_index; // Index in constant pool of variable name
-    private int signature_index; // Index of variable signature
-    private int index; /* Variable is `index'th local variable on
-     * this method's frame.
-     */
-    private ConstantPool constant_pool;
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public LocalVariable(LocalVariable c) {
-        this(c.getStartPC(), c.getLength(), c.getNameIndex(), c.getSignatureIndex(), c.getIndex(),
-                c.getConstantPool());
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * @param file Input stream
-     * @throws IOException
-     */
-    LocalVariable(DataInput file, ConstantPool constant_pool) throws IOException {
-        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
-                .readUnsignedShort(), file.readUnsignedShort(), constant_pool);
-    }
-
-
-    /**
-     * @param start_pc Range in which the variable
-     * @param length ... is valid
-     * @param name_index Index in constant pool of variable name
-     * @param signature_index Index of variable's signature
-     * @param index Variable is `index'th local variable on the method's frame
-     * @param constant_pool Array of constants
-     */
-    public LocalVariable(int start_pc, int length, int name_index, int signature_index, int index,
-            ConstantPool constant_pool) {
-        this.start_pc = start_pc;
-        this.length = length;
-        this.name_index = name_index;
-        this.signature_index = signature_index;
-        this.index = index;
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitLocalVariable(this);
-    }
-
-
-    /**
-     * Dump local variable to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(start_pc);
-        file.writeShort(length);
-        file.writeShort(name_index);
-        file.writeShort(signature_index);
-        file.writeShort(index);
-    }
-
-
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
-
-
-    /**
-     * @return Variable is valid within getStartPC() .. getStartPC()+getLength()
-     */
-    public final int getLength() {
-        return length;
-    }
-
-
-    /**
-     * @return Variable name.
-     */
-    public final String getName() {
-        ConstantUtf8 c;
-        c = (ConstantUtf8) constant_pool.getConstant(name_index, CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-
-    /**
-     * @return Index in constant pool of variable name.
-     */
-    public final int getNameIndex() {
-        return name_index;
-    }
-
-
-    /**
-     * @return Signature.
-     */
-    public final String getSignature() {
-        ConstantUtf8 c;
-        c = (ConstantUtf8) constant_pool.getConstant(signature_index, CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-
-    /**
-     * @return Index in constant pool of variable signature.
-     */
-    public final int getSignatureIndex() {
-        return signature_index;
-    }
-
-
-    /**
-     * @return index of register where variable is stored
-     */
-    public final int getIndex() {
-        return index;
-    }
-
-
-    /**
-     * @return Start of range where he variable is valid
-     */
-    public final int getStartPC() {
-        return start_pc;
-    }
-
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * @param length the length of this local variable
-     */
-    public final void setLength( int length ) {
-        this.length = length;
-    }
-
-
-    /**
-     * @param name_index the index into the constant pool for the name of this variable
-     */
-    public final void setNameIndex( int name_index ) {
-        this.name_index = name_index;
-    }
-
-
-    /**
-     * @param signature_index the index into the constant pool for the signature of this variable
-     */
-    public final void setSignatureIndex( int signature_index ) {
-        this.signature_index = signature_index;
-    }
-
-
-    /**
-     * @param index the index in the local variable table of this variable
-     */
-    public final void setIndex( int index ) {
-        this.index = index;
-    }
-
-
-    /**
-     * @param start_pc Specify range where the local variable is valid.
-     */
-    public final void setStartPC( int start_pc ) {
-        this.start_pc = start_pc;
-    }
-
-
-    /**
-     * @return string representation.
-     */
-    @Override
-    public final String toString() {
-        String name = getName(), signature = Utility.signatureToString(getSignature());
-        return "LocalVariable(start_pc = " + start_pc + ", length = " + length + ", index = "
-                + index + ":" + signature + " " + name + ")";
-    }
-
-
-    /**
-     * @return deep copy of this object
-     */
-    public LocalVariable copy() {
-        try {
-            return (LocalVariable) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java b/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java
deleted file mode 100644
index 249b617..0000000
--- a/src/main/java/org/apache/bcel/classfile/LocalVariableTable.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * This class represents colection of local variables in a
- * method. This attribute is contained in the <em>Code</em> attribute.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Code
- * @see LocalVariable
- */
-public class LocalVariableTable extends Attribute {
-
-    private static final long serialVersionUID = 6780929007774637689L;
-    private LocalVariable[] local_variable_table; // variables
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public LocalVariableTable(LocalVariableTable c) {
-        this(c.getNameIndex(), c.getLength(), c.getLocalVariableTable(), c.getConstantPool());
-    }
-
-
-    /**
-     * @param name_index Index in constant pool to `LocalVariableTable'
-     * @param length Content length in bytes
-     * @param local_variable_table Table of local variables
-     * @param constant_pool Array of constants
-     */
-    public LocalVariableTable(int name_index, int length, LocalVariable[] local_variable_table,
-            ConstantPool constant_pool) {
-        super(Constants.ATTR_LOCAL_VARIABLE_TABLE, name_index, length, constant_pool);
-        setLocalVariableTable(local_variable_table);
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * @param name_index Index in constant pool
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    LocalVariableTable(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, (LocalVariable[]) null, constant_pool);
-        int local_variable_table_length = (input.readUnsignedShort());
-        local_variable_table = new LocalVariable[local_variable_table_length];
-        for (int i = 0; i < local_variable_table_length; i++) {
-            local_variable_table[i] = new LocalVariable(input, constant_pool);
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitLocalVariableTable(this);
-    }
-
-
-    /**
-     * Dump local variable table attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(local_variable_table.length);
-        for (LocalVariable variable : local_variable_table) {
-            variable.dump(file);
-        }
-    }
-
-
-    /**
-     * @return Array of local variables of method.
-     */
-    public final LocalVariable[] getLocalVariableTable() {
-        return local_variable_table;
-    }
-
-
-    /** 
-     * 
-     * @param index the variable slot
-     * 
-     * @return the first LocalVariable that matches the slot or null if not found
-     * 
-     * @deprecated since 5.2 because multiple variables can share the
-     *             same slot, use getLocalVariable(int index, int pc) instead.
-     */
-    @java.lang.Deprecated
-    public final LocalVariable getLocalVariable( int index ) {
-        for (LocalVariable variable : local_variable_table) {
-            if (variable.getIndex() == index) {
-                return variable;
-            }
-        }
-        return null;
-    }
-
-
-    /** 
-     * 
-     * @param index the variable slot
-     * @param pc the current pc that this variable is alive
-     * 
-     * @return the LocalVariable that matches or null if not found
-     */
-    public final LocalVariable getLocalVariable( int index, int pc ) {
-        for (LocalVariable variable : local_variable_table) {
-            if (variable.getIndex() == index) {
-                int start_pc = variable.getStartPC();
-                int end_pc = start_pc + variable.getLength();
-                if ((pc >= start_pc) && (pc <= end_pc)) {
-                    return variable;
-                }
-            }
-        }
-        return null;
-    }
-
-
-    public final void setLocalVariableTable( LocalVariable[] local_variable_table ) {
-        this.local_variable_table = local_variable_table;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder();
-        for (int i = 0; i < local_variable_table.length; i++) {
-            buf.append(local_variable_table[i].toString());
-            if (i < local_variable_table.length - 1) {
-                buf.append('\n');
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        LocalVariableTable c = (LocalVariableTable) clone();
-        c.local_variable_table = new LocalVariable[local_variable_table.length];
-        for (int i = 0; i < local_variable_table.length; i++) {
-            c.local_variable_table[i] = local_variable_table[i].copy();
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-
-
-    public final int getTableLength() {
-        return local_variable_table == null ? 0 : local_variable_table.length;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java b/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java
deleted file mode 100644
index 9a4ee1a..0000000
--- a/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-// The new table is used when generic types are about...
-
-//LocalVariableTable_attribute {
-//       u2 attribute_name_index;
-//       u4 attribute_length;
-//       u2 local_variable_table_length;
-//       {  u2 start_pc;
-//          u2 length;
-//          u2 name_index;
-//          u2 descriptor_index;
-//          u2 index;
-//       } local_variable_table[local_variable_table_length];
-//     }
-
-//LocalVariableTypeTable_attribute {
-//    u2 attribute_name_index;
-//    u4 attribute_length;
-//    u2 local_variable_type_table_length;
-//    { 
-//      u2 start_pc;
-//      u2 length;
-//      u2 name_index;
-//      u2 signature_index;
-//      u2 index;
-//    } local_variable_type_table[local_variable_type_table_length];
-//  }
-// J5TODO: Needs some testing !
-
-/**
- * since 6.0
- */
-public class LocalVariableTypeTable extends Attribute {
-
-    private static final long serialVersionUID = -1082157891095177114L;
-
-    private LocalVariable[] local_variable_type_table;        // variables
-
-    public LocalVariableTypeTable(LocalVariableTypeTable c) {
-        this(c.getNameIndex(), c.getLength(), c.getLocalVariableTypeTable(), c.getConstantPool());
-    }
-
-    public LocalVariableTypeTable(int name_index, int length, LocalVariable[] local_variable_table, ConstantPool constant_pool) {
-        super(Constants.ATTR_LOCAL_VARIABLE_TYPE_TABLE, name_index, length, constant_pool);
-        setLocalVariableTable(local_variable_table);
-    }
-
-    LocalVariableTypeTable(int nameIdx, int len, DataInput input, ConstantPool cpool) throws IOException {
-        this(nameIdx, len, (LocalVariable[]) null, cpool);
-
-        int local_variable_type_table_length = (input.readUnsignedShort());
-        local_variable_type_table = new LocalVariable[local_variable_type_table_length];
-
-        for (int i = 0; i < local_variable_type_table_length; i++) {
-            local_variable_type_table[i] = new LocalVariable(input, cpool);
-        }
-    }
-
-    @Override
-    public void accept(Visitor v) {
-        v.visitLocalVariableTypeTable(this);
-    }
-
-    @Override
-    public final void dump(DataOutputStream file) throws IOException {
-        super.dump(file);
-        file.writeShort(local_variable_type_table.length);
-        for (LocalVariable variable : local_variable_type_table) {
-            variable.dump(file);
-        }
-    }
-
-    public final LocalVariable[] getLocalVariableTypeTable() {
-        return local_variable_type_table;
-    }
-
-    public final LocalVariable getLocalVariable(int index) {
-        for (LocalVariable variable : local_variable_type_table) {
-            if (variable.getIndex() == index) {
-                return variable;
-            }
-        }
-
-        return null;
-    }
-
-    public final void setLocalVariableTable(LocalVariable[] local_variable_table) {
-        this.local_variable_type_table = local_variable_table;
-    }
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder();
-
-        for (int i = 0; i < local_variable_type_table.length; i++) {
-            buf.append(local_variable_type_table[i].toString());
-
-            if (i < local_variable_type_table.length - 1) {
-                buf.append('\n');
-            }
-        }
-
-        return buf.toString();
-    }
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy(ConstantPool constant_pool) {
-        LocalVariableTypeTable c = (LocalVariableTypeTable) clone();
-
-        c.local_variable_type_table = new LocalVariable[local_variable_type_table.length];
-        for (int i = 0; i < local_variable_type_table.length; i++) {
-            c.local_variable_type_table[i] = local_variable_type_table[i].copy();
-        }
-
-        c.constant_pool = constant_pool;
-        return c;
-    }
-
-    public final int getTableLength() {
-        return local_variable_type_table == null ? 0 : local_variable_type_table.length;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Method.java b/src/main/java/org/apache/bcel/classfile/Method.java
deleted file mode 100644
index bcb2ece..0000000
--- a/src/main/java/org/apache/bcel/classfile/Method.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.util.BCELComparator;
-
-/**
- * This class represents the method info structure, i.e., the representation 
- * for a method in the class. See JVM specification for details.
- * A method has access flags, a name, a signature and a number of attributes.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class Method extends FieldOrMethod {
-
-    private static final long serialVersionUID = -2013983967283787941L;
-    private static BCELComparator _cmp = new BCELComparator() {
-
-        public boolean equals( Object o1, Object o2 ) {
-            Method THIS = (Method) o1;
-            Method THAT = (Method) o2;
-            return THIS.getName().equals(THAT.getName())
-                    && THIS.getSignature().equals(THAT.getSignature());
-        }
-
-
-        public int hashCode( Object o ) {
-            Method THIS = (Method) o;
-            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
-        }
-    };
-
-    // annotations defined on the parameters of a method
-    private ParameterAnnotationEntry[] parameterAnnotationEntries;
-
-    /**
-     * Empty constructor, all attributes have to be defined via `setXXX'
-     * methods. Use at your own risk.
-     */
-    public Method() {
-    }
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Method(Method c) {
-        super(c);
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * @param file Input stream
-     * @throws IOException
-     * @throws ClassFormatException
-     */
-    Method(DataInput file, ConstantPool constant_pool) throws IOException,
-            ClassFormatException {
-        super(file, constant_pool);
-    }
-
-
-    /**
-     * @param access_flags Access rights of method
-     * @param name_index Points to field name in constant pool
-     * @param signature_index Points to encoded signature
-     * @param attributes Collection of attributes
-     * @param constant_pool Array of constants
-     */
-    public Method(int access_flags, int name_index, int signature_index, Attribute[] attributes,
-            ConstantPool constant_pool) {
-        super(access_flags, name_index, signature_index, attributes, constant_pool);
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitMethod(this);
-    }
-
-
-    /**
-     * @return Code attribute of method, if any
-     */
-    public final Code getCode() {
-        for (Attribute attribute : attributes) {
-            if (attribute instanceof Code) {
-                return (Code) attribute;
-            }
-        }
-        return null;
-    }
-
-
-    /**
-     * @return ExceptionTable attribute of method, if any, i.e., list all
-     * exceptions the method may throw not exception handlers!
-     */
-    public final ExceptionTable getExceptionTable() {
-        for (Attribute attribute : attributes) {
-            if (attribute instanceof ExceptionTable) {
-                return (ExceptionTable) attribute;
-            }
-        }
-        return null;
-    }
-
-
-    /** @return LocalVariableTable of code attribute if any, i.e. the call is forwarded
-     * to the Code atribute.
-     */
-    public final LocalVariableTable getLocalVariableTable() {
-        Code code = getCode();
-        if (code == null) {
-            return null;
-        }
-        return code.getLocalVariableTable();
-    }
-
-
-    /** @return LineNumberTable of code attribute if any, i.e. the call is forwarded
-     * to the Code atribute.
-     */
-    public final LineNumberTable getLineNumberTable() {
-        Code code = getCode();
-        if (code == null) {
-            return null;
-        }
-        return code.getLineNumberTable();
-    }
-
-
-    /**
-     * Return string representation close to declaration format,
-     * `public static void main(String[] args) throws IOException', e.g.
-     *
-     * @return String representation of the method.
-     */
-    @Override
-    public final String toString() {
-        ConstantUtf8 c;
-        String name, signature, access; // Short cuts to constant pool
-        StringBuilder buf;
-        access = Utility.accessToString(access_flags);
-        // Get name and signature from constant pool
-        c = (ConstantUtf8) constant_pool.getConstant(signature_index, Constants.CONSTANT_Utf8);
-        signature = c.getBytes();
-        c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8);
-        name = c.getBytes();
-        signature = Utility.methodSignatureToString(signature, name, access, true,
-                getLocalVariableTable());
-        buf = new StringBuilder(signature);
-        for (Attribute attribute : attributes) {
-            if (!((attribute instanceof Code) || (attribute instanceof ExceptionTable))) {
-                buf.append(" [").append(attribute.toString()).append("]");
-            }
-        }
-        ExceptionTable e = getExceptionTable();
-        if (e != null) {
-            String str = e.toString();
-            if (!str.equals("")) {
-                buf.append("\n\t\tthrows ").append(str);
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this method
-     */
-    public final Method copy( ConstantPool _constant_pool ) {
-        return (Method) copy_(_constant_pool);
-    }
-
-
-    /**
-     * @return return type of method
-     */
-    public Type getReturnType() {
-        return Type.getReturnType(getSignature());
-    }
-
-
-    /**
-     * @return array of method argument types
-     */
-    public Type[] getArgumentTypes() {
-        return Type.getArgumentTypes(getSignature());
-    }
-
-
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
-
-
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default two method objects are said to be equal when
-     * their names and signatures are equal.
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        return _cmp.equals(this, obj);
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default return the hashcode of the method's name XOR signature.
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return _cmp.hashCode(this);
-    }
-
-    /**
-     * @return Annotations on the parameters of a method
-     */
-    public ParameterAnnotationEntry[] getParameterAnnotationEntries() {
-        if (parameterAnnotationEntries == null) {
-            parameterAnnotationEntries = ParameterAnnotationEntry.createParameterAnnotationEntries(getAttributes());
-        }
-        return parameterAnnotationEntries;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/MethodParameter.java b/src/main/java/org/apache/bcel/classfile/MethodParameter.java
deleted file mode 100644
index b47e8b7..0000000
--- a/src/main/java/org/apache/bcel/classfile/MethodParameter.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-
-/**
- * Entry of the parameters table.
- * 
- * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24">The class File Format : The MethodParameters Attribute</a>
- * @since 6.0
- */
-public class MethodParameter implements Serializable, Cloneable {
-
-    private static final long serialVersionUID = 6014494029439440326L;
-
-    /** Index of the CONSTANT_Utf8_info structure in the constant_pool table representing the name of the parameter */
-    private int name_index;
-
-    /** The access flags */
-    private int access_flags;
-
-    public MethodParameter() {
-    }
-
-    /**
-     * Construct object from input stream.
-     * 
-     * @param input Input stream
-     * @throws java.io.IOException
-     * @throws ClassFormatException
-     */
-    MethodParameter(DataInput input) throws IOException {
-        name_index = input.readUnsignedShort();
-        access_flags = input.readUnsignedShort();
-    }
-
-    public int getNameIndex() {
-        return name_index;
-    }
-
-    public void setNameIndex(int name_index) {
-        this.name_index = name_index;
-    }
-
-    /**
-     * Returns the name of the parameter.
-     */
-    public String getParameterName(ConstantPool constant_pool) {
-        if (name_index == 0) {
-            return null;
-        }
-        return ((ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8)).getBytes();
-       }
-
-    public int getAccessFlags() {
-        return access_flags;
-    }
-
-    public void setAccessFlags(int access_flags) {
-        this.access_flags = access_flags;
-    }
-
-    public boolean isFinal() {
-        return (access_flags & Constants.ACC_FINAL) != 0;
-    }
-
-    public boolean isSynthetic() {
-        return (access_flags & Constants.ACC_SYNTHETIC) != 0;
-    }
-
-    public boolean isMandated() {
-        return (access_flags & Constants.ACC_MANDATED) != 0;
-    }
-
-    /**
-     * Dump object to file stream on binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump(DataOutputStream file) throws IOException {
-        file.writeShort(name_index);
-        file.writeShort(access_flags);
-    }
-
-    /**
-     * @return deep copy of this object
-     */
-    public MethodParameter copy() {
-        try {
-            return (MethodParameter) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/MethodParameters.java b/src/main/java/org/apache/bcel/classfile/MethodParameters.java
deleted file mode 100644
index f9ce7eb..0000000
--- a/src/main/java/org/apache/bcel/classfile/MethodParameters.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a MethodParameters attribute.
- *
- * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24">The class File Format : The MethodParameters Attribute</a>
- * @since 6.0
- */
-public class MethodParameters extends Attribute {
-
-    private static final long serialVersionUID = 2500272580422360140L;
-
-    private MethodParameter[] parameters = new MethodParameter[0];
-
-    MethodParameters(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
-        super(Constants.ATTR_METHOD_PARAMETERS, name_index, length, constant_pool);
-        System.out.println("new MethodParameters");
-
-        int parameters_count = input.readUnsignedByte();
-        parameters = new MethodParameter[parameters_count];
-        for (int i = 0; i < parameters_count; i++) {
-            parameters[i] = new MethodParameter(input);
-        }
-    }
-
-    public MethodParameter[] getParameters() {
-        return parameters;
-    }
-
-    public void setParameters(MethodParameter[] parameters) {
-        this.parameters = parameters;
-    }
-
-    @Override
-    public void accept(Visitor v) {
-        v.visitMethodParameters(this);
-    }
-
-    @Override
-    public Attribute copy(ConstantPool _constant_pool) {
-        MethodParameters c = (MethodParameters) clone();
-        c.parameters = new MethodParameter[parameters.length];
-
-        for (int i = 0; i < parameters.length; i++) {
-            c.parameters[i] = parameters[i].copy();
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-
-    /**
-     * Dump method parameters attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-       public void dump(DataOutputStream file) throws IOException {
-           super.dump(file);
-           file.writeByte(parameters.length);
-        for (MethodParameter parameter : parameters) {
-            parameter.dump(file);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Node.java b/src/main/java/org/apache/bcel/classfile/Node.java
deleted file mode 100644
index 6cae380..0000000
--- a/src/main/java/org/apache/bcel/classfile/Node.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-/**
- * Denote class to have an accept method();
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface Node {
-
-    void accept( Visitor obj );
-}
diff --git a/src/main/java/org/apache/bcel/classfile/PMGClass.java b/src/main/java/org/apache/bcel/classfile/PMGClass.java
deleted file mode 100644
index e7be6ae..0000000
--- a/src/main/java/org/apache/bcel/classfile/PMGClass.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class is derived from <em>Attribute</em> and represents a reference
- * to a PMG attribute.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Attribute
- */
-public final class PMGClass extends Attribute {
-
-    private static final long serialVersionUID = -7075964153234211509L;
-    private int pmg_class_index, pmg_index;
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public PMGClass(PMGClass c) {
-        this(c.getNameIndex(), c.getLength(), c.getPMGIndex(), c.getPMGClassIndex(), c
-                .getConstantPool());
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    PMGClass(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, input.readUnsignedShort(), input.readUnsignedShort(), constant_pool);
-    }
-
-
-    /**
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param pmg_index index in constant pool for source file name
-     * @param pmg_class_index Index in constant pool to CONSTANT_Utf8
-     * @param constant_pool Array of constants
-     */
-    public PMGClass(int name_index, int length, int pmg_index, int pmg_class_index,
-            ConstantPool constant_pool) {
-        super(Constants.ATTR_PMG, name_index, length, constant_pool);
-        this.pmg_index = pmg_index;
-        this.pmg_class_index = pmg_class_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        System.err.println("Visiting non-standard PMGClass object");
-    }
-
-
-    /**
-     * Dump source file attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(pmg_index);
-        file.writeShort(pmg_class_index);
-    }
-
-
-    /**
-     * @return Index in constant pool of source file name.
-     */
-    public final int getPMGClassIndex() {
-        return pmg_class_index;
-    }
-
-
-    /**
-     * @param pmg_class_index
-     */
-    public final void setPMGClassIndex( int pmg_class_index ) {
-        this.pmg_class_index = pmg_class_index;
-    }
-
-
-    /**
-     * @return Index in constant pool of source file name.
-     */
-    public final int getPMGIndex() {
-        return pmg_index;
-    }
-
-
-    /**
-     * @param pmg_index
-     */
-    public final void setPMGIndex( int pmg_index ) {
-        this.pmg_index = pmg_index;
-    }
-
-
-    /**
-     * @return PMG name.
-     */
-    public final String getPMGName() {
-        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(pmg_index,
-                Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-
-    /**
-     * @return PMG class name.
-     */
-    public final String getPMGClassName() {
-        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(pmg_class_index,
-                Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        return "PMGClass(" + getPMGName() + ", " + getPMGClassName() + ")";
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        return (Attribute) clone();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java b/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java
deleted file mode 100644
index ac427e9..0000000
--- a/src/main/java/org/apache/bcel/classfile/ParameterAnnotationEntry.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.bcel.Constants;
-
-/**
- * represents one parameter annotation in the parameter annotation table
- *
- * @version $Id: ParameterAnnotationEntry
- * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public class ParameterAnnotationEntry implements Node, Constants {
-
-    private final AnnotationEntry[] annotation_table;
-
-
-    /**
-     * Construct object from input stream.
-     * 
-     * @param input Input stream
-     * @throws IOException
-     */
-    ParameterAnnotationEntry(DataInput input, ConstantPool constant_pool) throws IOException {
-        int annotation_table_length = (input.readUnsignedShort());
-        annotation_table = new AnnotationEntry[annotation_table_length];
-        for (int i = 0; i < annotation_table_length; i++) {
-            // TODO isRuntimeVisible
-            annotation_table[i] = AnnotationEntry.read(input, constant_pool, false);
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        // v.visitParameterAnnotationEntry(this);
-    }
-
-    /**
-     * returns the array of annotation entries in this annotation
-     */
-    public AnnotationEntry[] getAnnotationEntries() {
-        return annotation_table;
-    }
-
-    public void dump(DataOutputStream dos) throws IOException {
-        dos.writeShort(annotation_table.length);
-        for (AnnotationEntry entry : annotation_table) {
-            entry.dump(dos);
-        }
-    }
-
-  public static ParameterAnnotationEntry[] createParameterAnnotationEntries(Attribute[] attrs) {
-      // Find attributes that contain parameter annotation data
-      List<ParameterAnnotationEntry> accumulatedAnnotations = new ArrayList<ParameterAnnotationEntry>(attrs.length);
-      for (Attribute attribute : attrs) {
-          if (attribute instanceof ParameterAnnotations) {
-              ParameterAnnotations runtimeAnnotations = (ParameterAnnotations)attribute;
-              Collections.addAll(accumulatedAnnotations, runtimeAnnotations.getParameterAnnotationEntries());
-          }
-      }
-      return accumulatedAnnotations.toArray(new ParameterAnnotationEntry[accumulatedAnnotations.size()]);
-  }
-}
-
diff --git a/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java b/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java
deleted file mode 100644
index bca5ea7..0000000
--- a/src/main/java/org/apache/bcel/classfile/ParameterAnnotations.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/**
- * base class for parameter annotations
- * 
- * @version $Id: ParameterAnnotations
- * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public abstract class ParameterAnnotations extends Attribute {
-
-    private static final long serialVersionUID = 5234607357644462705L;
-    
-    /** Table of parameter annotations */
-    private ParameterAnnotationEntry[] parameter_annotation_table;
-
-    /**
-     * @param parameter_annotation_type the subclass type of the parameter annotation
-     * @param name_index Index pointing to the name <em>Code</em>
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     */
-    ParameterAnnotations(byte parameter_annotation_type, int name_index, int length,
-            DataInput input, ConstantPool constant_pool) throws IOException {
-        this(parameter_annotation_type, name_index, length, (ParameterAnnotationEntry[]) null,
-                constant_pool);
-        int num_parameters = (input.readUnsignedByte());
-        parameter_annotation_table = new ParameterAnnotationEntry[num_parameters];
-        for (int i = 0; i < num_parameters; i++) {
-            parameter_annotation_table[i] = new ParameterAnnotationEntry(input, constant_pool);
-        }
-    }
-
-
-    /**
-     * @param parameter_annotation_type the subclass type of the parameter annotation
-     * @param name_index Index pointing to the name <em>Code</em>
-     * @param length Content length in bytes
-     * @param parameter_annotation_table the actual parameter annotations
-     * @param constant_pool Array of constants
-     */
-    public ParameterAnnotations(byte parameter_annotation_type, int name_index, int length,
-            ParameterAnnotationEntry[] parameter_annotation_table, ConstantPool constant_pool) {
-        super(parameter_annotation_type, name_index, length, constant_pool);
-        setParameterAnnotationTable(parameter_annotation_table);
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitParameterAnnotation(this);
-    }
-
-
-    /**
-     * @param parameter_annotation_table the entries to set in this parameter annotation
-     */
-    public final void setParameterAnnotationTable(ParameterAnnotationEntry[] parameter_annotation_table ) {
-        this.parameter_annotation_table = parameter_annotation_table;
-    }
-
-
-    /**
-     * @return the parameter annotation entry table
-     */
-    public final ParameterAnnotationEntry[] getParameterAnnotationTable() {
-        return parameter_annotation_table;
-    }
-
-
-    /**
-     * returns the array of parameter annotation entries in this parameter annotation
-     */
-    public ParameterAnnotationEntry[] getParameterAnnotationEntries() {
-        return parameter_annotation_table;
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        super.dump(dos);
-        dos.writeByte(parameter_annotation_table.length);
-
-        for (ParameterAnnotationEntry element : parameter_annotation_table) {
-            element.dump(dos);
-        }
-
-    }
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool constant_pool ) {
-        ParameterAnnotations c = (ParameterAnnotations) clone();
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java b/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java
deleted file mode 100644
index 89dc838..0000000
--- a/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleAnnotations.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * represents an annotation that is represented in the class file but is not
- * provided to the JVM.
- * 
- * @version $Id: RuntimeInvisibleAnnotations
- * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public class RuntimeInvisibleAnnotations extends Annotations
-{
-    private static final long serialVersionUID = 5274986004117955967L;
-
-    /**
-     * @param name_index
-     *            Index pointing to the name <em>Code</em>
-     * @param length
-     *            Content length in bytes
-     * @param input
-     *            Input stream
-     * @param constant_pool
-     *            Array of constants
-     */
-    public RuntimeInvisibleAnnotations(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException
-    {
-        super(Constants.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS, name_index, length, input, constant_pool, false);
-    }
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy(ConstantPool constant_pool)
-    {
-        Annotations c = (Annotations) clone();
-        return c;
-    }
-
-    @Override
-    public final void dump(DataOutputStream dos) throws IOException
-    {
-        super.dump(dos);
-        writeAnnotations(dos);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java b/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
deleted file mode 100644
index 9e7fbe4..0000000
--- a/src/main/java/org/apache/bcel/classfile/RuntimeInvisibleParameterAnnotations.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * Represents a parameter annotation that is represented in the class file
- * but is not provided to the JVM.
- * 
- * @version $Id: RuntimeInvisibleParameterAnnotations
- * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public class RuntimeInvisibleParameterAnnotations extends ParameterAnnotations {
-
-    private static final long serialVersionUID = 270153155050617200L;
-    
-    /**
-     * @param name_index Index pointing to the name <em>Code</em>
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     */
-    public RuntimeInvisibleParameterAnnotations(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        super(Constants.ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS, name_index, length, input, constant_pool);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java b/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java
deleted file mode 100644
index 2951df8..0000000
--- a/src/main/java/org/apache/bcel/classfile/RuntimeVisibleAnnotations.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * represents an annotation that is represented in the class file and is
- * provided to the JVM.
- * 
- * @version $Id: RuntimeVisibleAnnotations
- * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public class RuntimeVisibleAnnotations extends Annotations
-{
-    private static final long serialVersionUID = 8992333017010665281L;
-
-    /**
-     * @param name_index
-     *            Index pointing to the name <em>Code</em>
-     * @param length
-     *            Content length in bytes
-     * @param input
-     *            Input stream
-     * @param constant_pool
-     *            Array of constants
-     */
-    public RuntimeVisibleAnnotations(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException
-    {
-        super(Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS, name_index, length, input, constant_pool, true);
-    }
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy(ConstantPool constant_pool)
-    {
-        return (Annotations) clone();
-    }
-
-    @Override
-    public final void dump(DataOutputStream dos) throws IOException
-    {
-        super.dump(dos);
-        writeAnnotations(dos);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java b/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java
deleted file mode 100644
index ae54cd1..0000000
--- a/src/main/java/org/apache/bcel/classfile/RuntimeVisibleParameterAnnotations.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * Represents a parameter annotation that is represented in the class file
- * and is provided to the JVM.
- * 
- * @version $Id: RuntimeVisibleParameterAnnotations
- * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
- * @since 6.0
- */
-public class RuntimeVisibleParameterAnnotations extends ParameterAnnotations {
-
-    private static final long serialVersionUID = -4266572854750267070L;
-    
-    /**
-     * @param name_index Index pointing to the name <em>Code</em>
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     */
-    public RuntimeVisibleParameterAnnotations(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        super(Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS, name_index, length, input, constant_pool);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Signature.java b/src/main/java/org/apache/bcel/classfile/Signature.java
deleted file mode 100644
index 4d95918..0000000
--- a/src/main/java/org/apache/bcel/classfile/Signature.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class is derived from <em>Attribute</em> and represents a reference
- * to a GJ attribute.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Attribute
- */
-public final class Signature extends Attribute {
-
-    private static final long serialVersionUID = 5808807822688827177L;
-    private int signature_index;
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Signature(Signature c) {
-        this(c.getNameIndex(), c.getLength(), c.getSignatureIndex(), c.getConstantPool());
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    Signature(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, input.readUnsignedShort(), constant_pool);
-    }
-
-
-    /**
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param signature_index Index in constant pool to CONSTANT_Utf8
-     * @param constant_pool Array of constants
-     */
-    public Signature(int name_index, int length, int signature_index, ConstantPool constant_pool) {
-        super(Constants.ATTR_SIGNATURE, name_index, length, constant_pool);
-        this.signature_index = signature_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        //System.err.println("Visiting non-standard Signature object");
-        v.visitSignature(this);
-    }
-
-
-    /**
-     * Dump source file attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(signature_index);
-    }
-
-
-    /**
-     * @return Index in constant pool of source file name.
-     */
-    public final int getSignatureIndex() {
-        return signature_index;
-    }
-
-
-    /**
-     * @param signature_index the index info the constant pool of this signature
-     */
-    public final void setSignatureIndex( int signature_index ) {
-        this.signature_index = signature_index;
-    }
-
-
-    /**
-     * @return GJ signature.
-     */
-    public final String getSignature() {
-        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(signature_index,
-                Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-    /**
-     * Extends ByteArrayInputStream to make 'unreading' chars possible.
-     */
-    private static final class MyByteArrayInputStream extends ByteArrayInputStream {
-
-        MyByteArrayInputStream(String data) {
-            super(data.getBytes());
-        }
-
-
-        final String getData() {
-            return new String(buf);
-        }
-
-
-        final void unread() {
-            if (pos > 0) {
-                pos--;
-            }
-        }
-    }
-
-
-    private static boolean identStart( int ch ) {
-        return ch == 'T' || ch == 'L';
-    }
-
-
-    private static void matchIdent( MyByteArrayInputStream in, StringBuilder buf ) {
-        int ch;
-        if ((ch = in.read()) == -1) {
-            throw new RuntimeException("Illegal signature: " + in.getData()
-                    + " no ident, reaching EOF");
-        }
-        //System.out.println("return from ident:" + (char)ch);
-        if (!identStart(ch)) {
-            StringBuilder buf2 = new StringBuilder();
-            int count = 1;
-            while (Character.isJavaIdentifierPart((char) ch)) {
-                buf2.append((char) ch);
-                count++;
-                ch = in.read();
-            }
-            if (ch == ':') { // Ok, formal parameter
-                in.skip("Ljava/lang/Object".length());
-                buf.append(buf2);
-                ch = in.read();
-                in.unread();
-                //System.out.println("so far:" + buf2 + ":next:" +(char)ch);
-            } else {
-                for (int i = 0; i < count; i++) {
-                    in.unread();
-                }
-            }
-            return;
-        }
-        StringBuilder buf2 = new StringBuilder();
-        ch = in.read();
-        do {
-            buf2.append((char) ch);
-            ch = in.read();
-            //System.out.println("within ident:"+ (char)ch);
-        } while ((ch != -1) && (Character.isJavaIdentifierPart((char) ch) || (ch == '/')));
-        buf.append(buf2.toString().replace('/', '.'));
-        //System.out.println("regular return ident:"+ (char)ch + ":" + buf2);
-        if (ch != -1) {
-            in.unread();
-        }
-    }
-
-
-    private static void matchGJIdent( MyByteArrayInputStream in, StringBuilder buf ) {
-        int ch;
-        matchIdent(in, buf);
-        ch = in.read();
-        if ((ch == '<') || ch == '(') { // Parameterized or method
-            //System.out.println("Enter <");
-            buf.append((char) ch);
-            matchGJIdent(in, buf);
-            while (((ch = in.read()) != '>') && (ch != ')')) { // List of parameters
-                if (ch == -1) {
-                    throw new RuntimeException("Illegal signature: " + in.getData()
-                            + " reaching EOF");
-                }
-                //System.out.println("Still no >");
-                buf.append(", ");
-                in.unread();
-                matchGJIdent(in, buf); // Recursive call
-            }
-            //System.out.println("Exit >");
-            buf.append((char) ch);
-        } else {
-            in.unread();
-        }
-        ch = in.read();
-        if (identStart(ch)) {
-            in.unread();
-            matchGJIdent(in, buf);
-        } else if (ch == ')') {
-            in.unread();
-            return;
-        } else if (ch != ';') {
-            throw new RuntimeException("Illegal signature: " + in.getData() + " read " + (char) ch);
-        }
-    }
-
-
-    public static String translate( String s ) {
-        //System.out.println("Sig:" + s);
-        StringBuilder buf = new StringBuilder();
-        matchGJIdent(new MyByteArrayInputStream(s), buf);
-        return buf.toString();
-    }
-
-
-    public static boolean isFormalParameterList( String s ) {
-        return s.startsWith("<") && (s.indexOf(':') > 0);
-    }
-
-
-    public static boolean isActualParameterList( String s ) {
-        return s.startsWith("L") && s.endsWith(">;");
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        String s = getSignature();
-        return "Signature(" + s + ")";
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        return (Attribute) clone();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/SimpleElementValue.java b/src/main/java/org/apache/bcel/classfile/SimpleElementValue.java
deleted file mode 100644
index 9a9712e..0000000
--- a/src/main/java/org/apache/bcel/classfile/SimpleElementValue.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * @since 6.0
- */
-public class SimpleElementValue extends ElementValue
-{
-    private int index;
-
-    public SimpleElementValue(int type, int index, ConstantPool cpool)
-    {
-        super(type, cpool);
-        this.index = index;
-    }
-
-    /**
-     * @return Value entry index in the cpool
-     */
-    public int getIndex()
-    {
-        return index;
-    }
-
-    public void setIndex(int index)
-    {
-        this.index = index;
-    }
-
-    public String getValueString()
-    {
-        if (type != STRING) {
-            throw new RuntimeException(
-                    "Dont call getValueString() on a non STRING ElementValue");
-        }
-        ConstantUtf8 c = (ConstantUtf8) cpool.getConstant(getIndex(),
-                Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-    public int getValueInt()
-    {
-        if (type != PRIMITIVE_INT) {
-            throw new RuntimeException(
-                    "Dont call getValueString() on a non STRING ElementValue");
-        }
-        ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
-                Constants.CONSTANT_Integer);
-        return c.getBytes();
-    }
-
-    public byte getValueByte()
-    {
-        if (type != PRIMITIVE_BYTE) {
-            throw new RuntimeException(
-                    "Dont call getValueByte() on a non BYTE ElementValue");
-        }
-        ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
-                Constants.CONSTANT_Integer);
-        return (byte) c.getBytes();
-    }
-
-    public char getValueChar()
-    {
-        if (type != PRIMITIVE_CHAR) {
-            throw new RuntimeException(
-                    "Dont call getValueChar() on a non CHAR ElementValue");
-        }
-        ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
-                Constants.CONSTANT_Integer);
-        return (char) c.getBytes();
-    }
-
-    public long getValueLong()
-    {
-        if (type != PRIMITIVE_LONG) {
-            throw new RuntimeException(
-                    "Dont call getValueLong() on a non LONG ElementValue");
-        }
-        ConstantLong j = (ConstantLong) cpool.getConstant(getIndex());
-        return j.getBytes();
-    }
-
-    public float getValueFloat()
-    {
-        if (type != PRIMITIVE_FLOAT) {
-            throw new RuntimeException(
-                    "Dont call getValueFloat() on a non FLOAT ElementValue");
-        }
-        ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex());
-        return f.getBytes();
-    }
-
-    public double getValueDouble()
-    {
-        if (type != PRIMITIVE_DOUBLE) {
-            throw new RuntimeException(
-                    "Dont call getValueDouble() on a non DOUBLE ElementValue");
-        }
-        ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex());
-        return d.getBytes();
-    }
-
-    public boolean getValueBoolean()
-    {
-        if (type != PRIMITIVE_BOOLEAN) {
-            throw new RuntimeException(
-                    "Dont call getValueBoolean() on a non BOOLEAN ElementValue");
-        }
-        ConstantInteger bo = (ConstantInteger) cpool.getConstant(getIndex());
-        return (bo.getBytes() != 0);
-    }
-
-    public short getValueShort()
-    {
-        if (type != PRIMITIVE_SHORT) {
-            throw new RuntimeException(
-                    "Dont call getValueShort() on a non SHORT ElementValue");
-        }
-        ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex());
-        return (short) s.getBytes();
-    }
-
-    @Override
-    public String toString()
-    {
-        return stringifyValue();
-    }
-
-    // Whatever kind of value it is, return it as a string
-    @Override
-    public String stringifyValue()
-    {
-        switch (type)
-        {
-        case PRIMITIVE_INT:
-            ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
-                    Constants.CONSTANT_Integer);
-            return Integer.toString(c.getBytes());
-        case PRIMITIVE_LONG:
-            ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(),
-                    Constants.CONSTANT_Long);
-            return Long.toString(j.getBytes());
-        case PRIMITIVE_DOUBLE:
-            ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(),
-                    Constants.CONSTANT_Double);
-            return Double.toString(d.getBytes());
-        case PRIMITIVE_FLOAT:
-            ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(),
-                    Constants.CONSTANT_Float);
-            return Float.toString(f.getBytes());
-        case PRIMITIVE_SHORT:
-            ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(),
-                    Constants.CONSTANT_Integer);
-            return Integer.toString(s.getBytes());
-        case PRIMITIVE_BYTE:
-            ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(),
-                    Constants.CONSTANT_Integer);
-            return Integer.toString(b.getBytes());
-        case PRIMITIVE_CHAR:
-            ConstantInteger ch = (ConstantInteger) cpool.getConstant(
-                    getIndex(), Constants.CONSTANT_Integer);
-            return String.valueOf((char)ch.getBytes());
-        case PRIMITIVE_BOOLEAN:
-            ConstantInteger bo = (ConstantInteger) cpool.getConstant(
-                    getIndex(), Constants.CONSTANT_Integer);
-            if (bo.getBytes() == 0) {
-                return "false";
-            }
-            return "true";
-        case STRING:
-            ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(getIndex(),
-                    Constants.CONSTANT_Utf8);
-            return cu8.getBytes();
-        default:
-            throw new RuntimeException(
-                    "SimpleElementValue class does not know how to stringify type "
-                            + type);
-        }
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 kind of value
-        switch (type)
-        {
-        case PRIMITIVE_INT:
-        case PRIMITIVE_BYTE:
-        case PRIMITIVE_CHAR:
-        case PRIMITIVE_FLOAT:
-        case PRIMITIVE_LONG:
-        case PRIMITIVE_BOOLEAN:
-        case PRIMITIVE_SHORT:
-        case PRIMITIVE_DOUBLE:
-        case STRING:
-            dos.writeShort(getIndex());
-            break;
-        default:
-            throw new RuntimeException(
-                    "SimpleElementValue doesnt know how to write out type "
-                            + type);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/SourceFile.java b/src/main/java/org/apache/bcel/classfile/SourceFile.java
deleted file mode 100644
index ba550c4..0000000
--- a/src/main/java/org/apache/bcel/classfile/SourceFile.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class is derived from <em>Attribute</em> and represents a reference
- * to the source file of this class.  At most one SourceFile attribute
- * should appear per classfile.  The intention of this class is that it is
- * instantiated from the <em>Attribute.readAttribute()</em> method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Attribute
- */
-public final class SourceFile extends Attribute {
-
-    private static final long serialVersionUID = -804226255663222912L;
-    private int sourcefile_index;
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public SourceFile(SourceFile c) {
-        this(c.getNameIndex(), c.getLength(), c.getSourceFileIndex(), c.getConstantPool());
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    SourceFile(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, input.readUnsignedShort(), constant_pool);
-    }
-
-
-    /**
-     * @param name_index Index in constant pool to CONSTANT_Utf8, which
-     * should represent the string "SourceFile".
-     * @param length Content length in bytes, the value should be 2.
-     * @param constant_pool The constant pool that this attribute is
-     * associated with.
-     * @param sourcefile_index Index in constant pool to CONSTANT_Utf8.  This
-     * string will be interpreted as the name of the file from which this
-     * class was compiled.  It will not be interpreted as indicating the name
-     * of the directory contqining the file or an absolute path; this
-     * information has to be supplied the consumer of this attribute - in
-     * many cases, the JVM.
-     */
-    public SourceFile(int name_index, int length, int sourcefile_index, ConstantPool constant_pool) {
-        super(Constants.ATTR_SOURCE_FILE, name_index, length, constant_pool);
-        this.sourcefile_index = sourcefile_index;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitSourceFile(this);
-    }
-
-
-    /**
-     * Dump source file attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(sourcefile_index);
-    }
-
-
-    /**
-     * @return Index in constant pool of source file name.
-     */
-    public final int getSourceFileIndex() {
-        return sourcefile_index;
-    }
-
-
-    /**
-     * @param sourcefile_index
-     */
-    public final void setSourceFileIndex( int sourcefile_index ) {
-        this.sourcefile_index = sourcefile_index;
-    }
-
-
-    /**
-     * @return Source file name.
-     */
-    public final String getSourceFileName() {
-        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(sourcefile_index,
-                Constants.CONSTANT_Utf8);
-        return c.getBytes();
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        return "SourceFile(" + getSourceFileName() + ")";
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        return (Attribute) clone();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/StackMap.java b/src/main/java/org/apache/bcel/classfile/StackMap.java
deleted file mode 100644
index 5791753..0000000
--- a/src/main/java/org/apache/bcel/classfile/StackMap.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a stack map attribute used for
- * preverification of Java classes for the <a
- * href="http://java.sun.com/j2me/"> Java 2 Micro Edition</a>
- * (J2ME). This attribute is used by the <a
- * href="http://java.sun.com/products/cldc/">KVM</a> and contained
- * within the Code attribute of a method. See CLDC specification
- * �5.3.1.2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Code
- * @see     StackMapEntry
- * @see     StackMapType
- */
-public final class StackMap extends Attribute {
-
-    private static final long serialVersionUID = -6238662431726968495L;
-    private StackMapEntry[] map; // Table of stack map entries
-
-
-    /*
-     * @param name_index Index of name
-     * @param length Content length in bytes
-     * @param map Table of stack map entries
-     * @param constant_pool Array of constants
-     */
-    public StackMap(int name_index, int length, StackMapEntry[] map, ConstantPool constant_pool) {
-        super(Constants.ATTR_STACK_MAP, name_index, length, constant_pool);
-        setStackMap(map);
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * 
-     * @param name_index Index of name
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    StackMap(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
-        this(name_index, length, (StackMapEntry[]) null, constant_pool);
-        int map_length = input.readUnsignedShort();
-        map = new StackMapEntry[map_length];
-        for (int i = 0; i < map_length; i++) {
-            map[i] = new StackMapEntry(input, constant_pool);
-        }
-    }
-
-
-    /**
-     * Dump line number table attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(map.length);
-        for (StackMapEntry entry : map) {
-            entry.dump(file);
-        }
-    }
-
-
-    /**
-     * @return Array of stack map entries
-     */
-    public final StackMapEntry[] getStackMap() {
-        return map;
-    }
-
-
-    /**
-     * @param map Array of stack map entries
-     */
-    public final void setStackMap( StackMapEntry[] map ) {
-        this.map = map;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder("StackMap(");
-        for (int i = 0; i < map.length; i++) {
-            buf.append(map[i].toString());
-            if (i < map.length - 1) {
-                buf.append(", ");
-            }
-        }
-        buf.append(')');
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        StackMap c = (StackMap) clone();
-        c.map = new StackMapEntry[map.length];
-        for (int i = 0; i < map.length; i++) {
-            c.map[i] = map[i].copy();
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackMap(this);
-    }
-
-
-    public final int getMapLength() {
-        return map == null ? 0 : map.length;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/StackMapEntry.java b/src/main/java/org/apache/bcel/classfile/StackMapEntry.java
deleted file mode 100644
index 26ffba2..0000000
--- a/src/main/java/org/apache/bcel/classfile/StackMapEntry.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-/**
- * This class represents a stack map entry recording the types of
- * local variables and the the of stack items at a given byte code offset.
- * See CLDC specification �5.3.1.2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     StackMap
- * @see     StackMapType
- */
-public final class StackMapEntry implements Cloneable, Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private int byte_code_offset;
-    private StackMapType[] types_of_locals;
-    private StackMapType[] types_of_stack_items;
-    private ConstantPool constant_pool;
-
-
-    /**
-     * Construct object from input stream.
-     * 
-     * @param input Input stream
-     * @throws IOException
-     */
-    StackMapEntry(DataInput input, ConstantPool constant_pool) throws IOException {
-        this.constant_pool = constant_pool;
-        this.byte_code_offset = input.readShort();
-
-        int number_of_locals = input.readShort();
-        types_of_locals = new StackMapType[number_of_locals];
-        for (int i = 0; i < number_of_locals; i++) {
-            types_of_locals[i] = new StackMapType(input, constant_pool);
-        }
-
-        int number_of_stack_items = input.readShort();
-        types_of_stack_items = new StackMapType[number_of_stack_items];
-        for (int i = 0; i < number_of_stack_items; i++) {
-            types_of_stack_items[i] = new StackMapType(input, constant_pool);
-        }
-    }
-
-
-    public StackMapEntry(int byte_code_offset, int number_of_locals,
-            StackMapType[] types_of_locals, int number_of_stack_items,
-            StackMapType[] types_of_stack_items, ConstantPool constant_pool) {
-        this.byte_code_offset = byte_code_offset;
-        setTypesOfLocals(types_of_locals);
-        setTypesOfStackItems(types_of_stack_items);
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * Dump stack map entry
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeShort(byte_code_offset);
-        file.writeShort(types_of_locals.length);
-        for (StackMapType type : types_of_locals) {
-            type.dump(file);
-        }
-        file.writeShort(types_of_stack_items.length);
-        for (StackMapType type : types_of_stack_items) {
-            type.dump(file);
-        }
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder(64);
-        buf.append("(offset=").append(byte_code_offset);
-        if (types_of_locals.length > 0) {
-            buf.append(", locals={");
-            for (int i = 0; i < types_of_locals.length; i++) {
-                buf.append(types_of_locals[i]);
-                if (i < types_of_locals.length - 1) {
-                    buf.append(", ");
-                }
-            }
-            buf.append("}");
-        }
-        if (types_of_stack_items.length > 0) {
-            buf.append(", stack items={");
-            for (int i = 0; i < types_of_stack_items.length; i++) {
-                buf.append(types_of_stack_items[i]);
-                if (i < types_of_stack_items.length - 1) {
-                    buf.append(", ");
-                }
-            }
-            buf.append("}");
-        }
-        buf.append(")");
-        return buf.toString();
-    }
-
-
-    public void setByteCodeOffset( int b ) {
-        byte_code_offset = b;
-    }
-
-
-    public int getByteCodeOffset() {
-        return byte_code_offset;
-    }
-
-
-    @java.lang.Deprecated
-    public void setNumberOfLocals( int n ) {
-    }
-
-
-    public int getNumberOfLocals() {
-        return types_of_locals == null ? 0 : types_of_locals.length;
-    }
-
-
-    public void setTypesOfLocals( StackMapType[] types ) {
-        types_of_locals = types != null ? types : new StackMapType[0];
-    }
-
-
-    public StackMapType[] getTypesOfLocals() {
-        return types_of_locals;
-    }
-
-
-    @java.lang.Deprecated
-    public void setNumberOfStackItems( int n ) {
-    }
-
-
-    public int getNumberOfStackItems() {
-        return types_of_stack_items == null ? 0 : types_of_stack_items.length;
-    }
-
-
-    public void setTypesOfStackItems( StackMapType[] types ) {
-        types_of_stack_items = types != null ? types : new StackMapType[0];
-    }
-
-
-    public StackMapType[] getTypesOfStackItems() {
-        return types_of_stack_items;
-    }
-
-
-    /**
-     * @return deep copy of this object
-     */
-    public StackMapEntry copy() {
-        try {
-            return (StackMapEntry) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitStackMapEntry(this);
-    }
-
-
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
-
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/StackMapTable.java b/src/main/java/org/apache/bcel/classfile/StackMapTable.java
deleted file mode 100644
index 7263e47..0000000
--- a/src/main/java/org/apache/bcel/classfile/StackMapTable.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a stack map attribute used for
- * preverification of Java classes for the <a
- * href="http://java.sun.com/j2me/"> Java 2 Micro Edition</a>
- * (J2ME). This attribute is used by the <a
- * href="http://java.sun.com/products/cldc/">KVM</a> and contained
- * within the Code attribute of a method. See CLDC specification
- * ��?5.3.1.2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Code
- * @see     StackMapEntry
- * @see     StackMapType
- * @since 6.0
- */
-public final class StackMapTable extends Attribute {
-
-    private static final long serialVersionUID = -5802191977296683162L;
-    private StackMapTableEntry[] map; // Table of stack map entries
-
-
-    /*
-     * @param name_index Index of name
-     * @param length Content length in bytes
-     * @param map Table of stack map entries
-     * @param constant_pool Array of constants
-     */
-    public StackMapTable(int name_index, int length, StackMapTableEntry[] map, ConstantPool constant_pool) {
-        super(Constants.ATTR_STACK_MAP_TABLE, name_index, length, constant_pool);
-        setStackMapTable(map);
-    }
-
-
-    /**
-     * Construct object from file stream.
-     * @param name_index Index of name
-     * @param length Content length in bytes
-     * @param file Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    StackMapTable(int name_index, int length, DataInput file, ConstantPool constant_pool) throws IOException {
-        this(name_index, length, (StackMapTableEntry[]) null, constant_pool);
-        int map_length = file.readUnsignedShort();
-        map = new StackMapTableEntry[map_length];
-        for (int i = 0; i < map_length; i++) {
-            map[i] = new StackMapTableEntry(file, constant_pool);
-        }
-    }
-
-
-    /**
-     * Dump line number table attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        file.writeShort(map.length);
-        for (StackMapTableEntry entry : map) {
-            entry.dump(file);
-        }
-    }
-
-
-    /**
-     * @return Array of stack map entries
-     */
-    public final StackMapTableEntry[] getStackMapTable() {
-        return map;
-    }
-
-
-    /**
-     * @param map Array of stack map entries
-     */
-    public final void setStackMapTable( StackMapTableEntry[] map ) {
-        this.map = map;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder("StackMapTable(");
-        for (int i = 0; i < map.length; i++) {
-            buf.append(map[i].toString());
-            if (i < map.length - 1) {
-                buf.append(", ");
-            }
-        }
-        buf.append(')');
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        StackMapTable c = (StackMapTable) clone();
-        c.map = new StackMapTableEntry[map.length];
-        for (int i = 0; i < map.length; i++) {
-            c.map[i] = map[i].copy();
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackMapTable(this);
-    }
-
-
-    public final int getMapLength() {
-        return map == null ? 0 : map.length;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java b/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java
deleted file mode 100644
index 06ae204..0000000
--- a/src/main/java/org/apache/bcel/classfile/StackMapTableEntry.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a stack map entry recording the types of
- * local variables and the the of stack items at a given byte code offset.
- * See CLDC specification ��?5.3.1.2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     StackMap
- * @see     StackMapType
- * @since 6.0
- */
-public final class StackMapTableEntry implements Cloneable, Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private final int frame_type;
-    private int byte_code_offset_delta;
-    private StackMapType[] types_of_locals;
-    private StackMapType[] types_of_stack_items;
-    private ConstantPool constant_pool;
-
-
-    /**
-     * Construct object from file stream.
-     * * 
-     * @param file Input stream
-     * @throws IOException
-     */
-    StackMapTableEntry(DataInput file, ConstantPool constant_pool) throws IOException {
-        this(file.readByte() & 0xFF, -1, null, null, constant_pool);
-
-        if (frame_type >= Constants.SAME_FRAME && frame_type <= Constants.SAME_FRAME_MAX) {
-            byte_code_offset_delta = frame_type - Constants.SAME_FRAME;
-        } else if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type <= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
-            byte_code_offset_delta = frame_type - Constants.SAME_LOCALS_1_STACK_ITEM_FRAME;
-            types_of_stack_items = new StackMapType[1];
-            types_of_stack_items[0] = new StackMapType(file, constant_pool);
-        } else if (frame_type == Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
-            byte_code_offset_delta = file.readShort();
-            types_of_stack_items = new StackMapType[1];
-            types_of_stack_items[0] = new StackMapType(file, constant_pool);
-        } else if (frame_type >= Constants.CHOP_FRAME && frame_type <= Constants.CHOP_FRAME_MAX) {
-            byte_code_offset_delta = file.readShort();
-        } else if (frame_type == Constants.SAME_FRAME_EXTENDED) {
-            byte_code_offset_delta = file.readShort();
-        } else if (frame_type >= Constants.APPEND_FRAME && frame_type <= Constants.APPEND_FRAME_MAX) {
-            byte_code_offset_delta = file.readShort();
-            int number_of_locals = frame_type - 251;
-            types_of_locals = new StackMapType[number_of_locals];
-            for (int i = 0; i < number_of_locals; i++) {
-                types_of_locals[i] = new StackMapType(file, constant_pool);
-            }            
-        } else if (frame_type == Constants.FULL_FRAME) {        
-            byte_code_offset_delta = file.readShort();
-            int number_of_locals = file.readShort();
-            types_of_locals = new StackMapType[number_of_locals];
-            for (int i = 0; i < number_of_locals; i++) {
-                types_of_locals[i] = new StackMapType(file, constant_pool);
-            }
-            int number_of_stack_items = file.readShort();
-            types_of_stack_items = new StackMapType[number_of_stack_items];
-            for (int i = 0; i < number_of_stack_items; i++) {
-                types_of_stack_items[i] = new StackMapType(file, constant_pool);
-            }
-        } else {
-            /* Can't happen */
-            throw new ClassFormatException ("Invalid frame type found while parsing stack map table: " + frame_type);
-        }
-    }
-
-
-    public StackMapTableEntry(int tag, int byte_code_offset_delta,
-            StackMapType[] types_of_locals,
-            StackMapType[] types_of_stack_items, ConstantPool constant_pool) {
-        this.frame_type = tag;
-        this.byte_code_offset_delta = byte_code_offset_delta;
-        setTypesOfLocals(types_of_locals);
-        setTypesOfStackItems(types_of_stack_items);
-        this.constant_pool = constant_pool;
-    }
-
-
-    /**
-     * Dump stack map entry
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.write(frame_type);
-        if (frame_type >= Constants.SAME_FRAME && frame_type <= Constants.SAME_FRAME_MAX) {
-            // nothing to be done
-        } else if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type <= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
-            types_of_stack_items[0].dump(file);
-        } else if (frame_type == Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
-            file.writeShort(byte_code_offset_delta);
-            types_of_stack_items[0].dump(file);
-        } else if (frame_type >= Constants.CHOP_FRAME && frame_type <= Constants.CHOP_FRAME_MAX) {
-            file.writeShort(byte_code_offset_delta);
-        } else if (frame_type == Constants.SAME_FRAME_EXTENDED) {
-            file.writeShort(byte_code_offset_delta);
-        } else if (frame_type >= Constants.APPEND_FRAME && frame_type <= Constants.APPEND_FRAME_MAX) {
-            file.writeShort(byte_code_offset_delta);
-            for (StackMapType type : types_of_locals) {
-                type.dump(file);
-            }            
-        } else if (frame_type == Constants.FULL_FRAME) {        
-            file.writeShort(byte_code_offset_delta);
-            file.writeShort(types_of_locals.length);
-            for (StackMapType type : types_of_locals) {
-                type.dump(file);
-            }
-            file.writeShort(types_of_stack_items.length);
-            for (StackMapType type : types_of_stack_items) {
-                type.dump(file);
-            }
-        } else {
-            /* Can't happen */
-            throw new ClassFormatException ("Invalid Stack map table tag: " + frame_type);
-        }
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder(64);
-        buf.append("(");
-        if (frame_type >= Constants.SAME_FRAME && frame_type <= Constants.SAME_FRAME_MAX) {
-            buf.append("SAME");
-        } else if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type <= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
-            buf.append("SAME_LOCALS_1_STACK");
-        } else if (frame_type == Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
-            buf.append("SAME_LOCALS_1_STACK_EXTENDED");
-        } else if (frame_type >= Constants.CHOP_FRAME && frame_type <= Constants.CHOP_FRAME_MAX) {
-            buf.append("CHOP "+(251-frame_type));
-        } else if (frame_type == Constants.SAME_FRAME_EXTENDED) {
-            buf.append("SAME_EXTENDED");
-        } else if (frame_type >= Constants.APPEND_FRAME && frame_type <= Constants.APPEND_FRAME_MAX) {
-            buf.append("APPEND "+(frame_type-251));
-        } else if (frame_type == Constants.FULL_FRAME) {        
-            buf.append("FULL");
-        } else {
-            buf.append("UNKNOWN");
-        }
-        buf.append(", offset delta=").append(byte_code_offset_delta);
-        if (types_of_locals.length > 0) {
-            buf.append(", locals={");
-            for (int i = 0; i < types_of_locals.length; i++) {
-                buf.append(types_of_locals[i]);
-                if (i < types_of_locals.length - 1) {
-                    buf.append(", ");
-                }
-            }
-            buf.append("}");
-        }
-        if (types_of_stack_items.length > 0) {
-            buf.append(", stack items={");
-            for (int i = 0; i < types_of_stack_items.length; i++) {
-                buf.append(types_of_stack_items[i]);
-                if (i < types_of_stack_items.length - 1) {
-                    buf.append(", ");
-                }
-            }
-            buf.append("}");
-        }
-        buf.append(")");
-        return buf.toString();
-    }
-
-
-    public void setByteCodeOffsetDelta( int b ) {
-        byte_code_offset_delta = b;
-    }
-
-
-    public int getByteCodeOffsetDelta() {
-        return byte_code_offset_delta;
-    }
-
-    
-    public int getNumberOfLocals() {
-        return types_of_locals.length;
-    }
-
-
-    public void setTypesOfLocals( StackMapType[] types ) {
-        types_of_locals = types != null ? types : new StackMapType[0];
-    }
-
-
-    public StackMapType[] getTypesOfLocals() {
-        return types_of_locals;
-    }
-
-
-    public int getNumberOfStackItems() {
-        return types_of_stack_items.length;
-    }
-
-
-    public void setTypesOfStackItems( StackMapType[] types ) {
-        types_of_stack_items = types != null ? types : new StackMapType[0];
-    }
-
-
-    public StackMapType[] getTypesOfStackItems() {
-        return types_of_stack_items;
-    }
-
-
-    /**
-     * @return deep copy of this object
-     */
-    public StackMapTableEntry copy() {
-        try {
-            return (StackMapTableEntry) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        v.visitStackMapTableEntry(this);
-    }
-
-
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
-
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/StackMapType.java b/src/main/java/org/apache/bcel/classfile/StackMapType.java
deleted file mode 100644
index 640a047..0000000
--- a/src/main/java/org/apache/bcel/classfile/StackMapType.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-
-/**
- * This class represents the type of a local variable or item on stack
- * used in the StackMap entries.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     StackMapEntry
- * @see     StackMap
- * @see     Constants
- */
-public final class StackMapType implements Cloneable, Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    private byte type;
-    private int index = -1; // Index to CONSTANT_Class or offset
-    private ConstantPool constant_pool;
-
-
-    /**
-     * Construct object from file stream.
-     * @param file Input stream
-     * @throws IOException
-     */
-    StackMapType(DataInput file, ConstantPool constant_pool) throws IOException {
-        this(file.readByte(), -1, constant_pool);
-        if (hasIndex()) {
-            setIndex(file.readShort());
-        }
-        setConstantPool(constant_pool);
-    }
-
-
-    /**
-     * @param type type tag as defined in the Constants interface
-     * @param index index to constant pool, or byte code offset
-     */
-    public StackMapType(byte type, int index, ConstantPool constant_pool) {
-        setType(type);
-        setIndex(index);
-        setConstantPool(constant_pool);
-    }
-
-
-    public void setType( byte t ) {
-        if ((t < Constants.ITEM_Bogus) || (t > Constants.ITEM_NewObject)) {
-            throw new RuntimeException("Illegal type for StackMapType: " + t);
-        }
-        type = t;
-    }
-
-
-    public byte getType() {
-        return type;
-    }
-
-
-    public void setIndex( int t ) {
-        index = t;
-    }
-
-
-    /** @return index to constant pool if type == ITEM_Object, or offset
-     * in byte code, if type == ITEM_NewObject, and -1 otherwise
-     */
-    public int getIndex() {
-        return index;
-    }
-
-
-    /**
-     * Dump type entries to file.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    public final void dump( DataOutputStream file ) throws IOException {
-        file.writeByte(type);
-        if (hasIndex()) {
-            file.writeShort(getIndex());
-        }
-    }
-
-
-    /** @return true, if type is either ITEM_Object or ITEM_NewObject
-     */
-    public final boolean hasIndex() {
-        return ((type == Constants.ITEM_Object) || (type == Constants.ITEM_NewObject));
-    }
-
-
-    private String printIndex() {
-        if (type == Constants.ITEM_Object) {
-            if (index < 0) {
-                return ", class=<unknown>";
-            }
-            return ", class=" + constant_pool.constantToString(index, Constants.CONSTANT_Class);
-        } else if (type == Constants.ITEM_NewObject) {
-            return ", offset=" + index;
-        } else {
-            return "";
-        }
-    }
-
-
-    /**
-     * @return String representation
-     */
-    @Override
-    public final String toString() {
-        return "(type=" + Constants.ITEM_NAMES[type] + printIndex() + ")";
-    }
-
-
-    /**
-     * @return deep copy of this object
-     */
-    public StackMapType copy() {
-        try {
-            return (StackMapType) clone();
-        } catch (CloneNotSupportedException e) {
-        }
-        return null;
-    }
-
-
-    /**
-     * @return Constant pool used by this object.
-     */
-    public final ConstantPool getConstantPool() {
-        return constant_pool;
-    }
-
-
-    /**
-     * @param constant_pool Constant pool to be used for this object.
-     */
-    public final void setConstantPool( ConstantPool constant_pool ) {
-        this.constant_pool = constant_pool;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Synthetic.java b/src/main/java/org/apache/bcel/classfile/Synthetic.java
deleted file mode 100644
index 346473a..0000000
--- a/src/main/java/org/apache/bcel/classfile/Synthetic.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-
-/**
- * This class is derived from <em>Attribute</em> and declares this class as
- * `synthetic', i.e., it needs special handling.  The JVM specification
- * states "A class member that does not appear in the source code must be
- * marked using a Synthetic attribute."  It may appear in the ClassFile
- * attribute table, a field_info table or a method_info table.  This class
- * is intended to be instantiated from the
- * <em>Attribute.readAttribute()</em> method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Attribute
- */
-public final class Synthetic extends Attribute {
-
-    private static final long serialVersionUID = -123334426995458366L;
-    private byte[] bytes;
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use copy() for a physical copy.
-     */
-    public Synthetic(Synthetic c) {
-        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
-    }
-
-
-    /**
-     * @param name_index Index in constant pool to CONSTANT_Utf8, which
-     * should represent the string "Synthetic".
-     * @param length Content length in bytes - should be zero.
-     * @param bytes Attribute contents
-     * @param constant_pool The constant pool this attribute is associated
-     * with.
-     */
-    public Synthetic(int name_index, int length, byte[] bytes, ConstantPool constant_pool) {
-        super(Constants.ATTR_SYNTHETIC, name_index, length, constant_pool);
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * 
-     * @param name_index Index in constant pool to CONSTANT_Utf8
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    Synthetic(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, (byte[]) null, constant_pool);
-        if (length > 0) {
-            bytes = new byte[length];
-            input.readFully(bytes);
-            System.err.println("Synthetic attribute with length > 0");
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitSynthetic(this);
-    }
-
-
-    /**
-     * Dump source file attribute to file stream in binary format.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        if (length > 0) {
-            file.write(bytes, 0, length);
-        }
-    }
-
-
-    /**
-     * @return data bytes.
-     */
-    public final byte[] getBytes() {
-        return bytes;
-    }
-
-
-    /**
-     * @param bytes
-     */
-    public final void setBytes( byte[] bytes ) {
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        StringBuilder buf = new StringBuilder("Synthetic");
-        if (length > 0) {
-            buf.append(" ").append(Utility.toHexString(bytes));
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        Synthetic c = (Synthetic) clone();
-        if (bytes != null) {
-            c.bytes = new byte[bytes.length];
-            System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Unknown.java b/src/main/java/org/apache/bcel/classfile/Unknown.java
deleted file mode 100644
index ebc7ffd..0000000
--- a/src/main/java/org/apache/bcel/classfile/Unknown.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.bcel.Constants;
-
-/**
- * This class represents a reference to an unknown (i.e.,
- * application-specific) attribute of a class.  It is instantiated from the
- * {@link Attribute#readAttribute(java.io.DataInput, ConstantPool)} method.
- * Applications that need to read in application-specific attributes should create an
- * {@link UnknownAttributeReader} implementation and attach it via
- * {@link Attribute#addAttributeReader(String, UnknownAttributeReader)}.
-
- *
- * @version $Id$
- * @see org.apache.bcel.classfile.Attribute
- * @see org.apache.bcel.classfile.UnknownAttributeReader
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class Unknown extends Attribute {
-
-    private static final long serialVersionUID = -4099655108069755015L;
-    private byte[] bytes;
-    private final String name;
-    private static final Map<String, Unknown> unknown_attributes = new HashMap<String, Unknown>();
-
-
-    /** @return array of unknown attributes, but just one for each kind.
-     */
-    static Unknown[] getUnknownAttributes() {
-        Unknown[] unknowns = new Unknown[unknown_attributes.size()];
-        unknown_attributes.values().toArray(unknowns);
-        unknown_attributes.clear();
-        return unknowns;
-    }
-
-
-    /**
-     * Initialize from another object. Note that both objects use the same
-     * references (shallow copy). Use clone() for a physical copy.
-     */
-    public Unknown(Unknown c) {
-        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
-    }
-
-
-    /**
-     * Create a non-standard attribute.
-     *
-     * @param name_index Index in constant pool
-     * @param length Content length in bytes
-     * @param bytes Attribute contents
-     * @param constant_pool Array of constants
-     */
-    public Unknown(int name_index, int length, byte[] bytes, ConstantPool constant_pool) {
-        super(Constants.ATTR_UNKNOWN, name_index, length, constant_pool);
-        this.bytes = bytes;
-        name = ((ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8))
-                .getBytes();
-        unknown_attributes.put(name, this);
-    }
-
-
-    /**
-     * Construct object from input stream.
-     * 
-     * @param name_index Index in constant pool
-     * @param length Content length in bytes
-     * @param input Input stream
-     * @param constant_pool Array of constants
-     * @throws IOException
-     */
-    Unknown(int name_index, int length, DataInput input, ConstantPool constant_pool)
-            throws IOException {
-        this(name_index, length, (byte[]) null, constant_pool);
-        if (length > 0) {
-            bytes = new byte[length];
-            input.readFully(bytes);
-        }
-    }
-
-
-    /**
-     * Called by objects that are traversing the nodes of the tree implicitely
-     * defined by the contents of a Java class. I.e., the hierarchy of methods,
-     * fields, attributes, etc. spawns a tree of objects.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitUnknown(this);
-    }
-
-
-    /**
-     * Dump unknown bytes to file stream.
-     *
-     * @param file Output file stream
-     * @throws IOException
-     */
-    @Override
-    public final void dump( DataOutputStream file ) throws IOException {
-        super.dump(file);
-        if (length > 0) {
-            file.write(bytes, 0, length);
-        }
-    }
-
-
-    /**
-     * @return data bytes.
-     */
-    public final byte[] getBytes() {
-        return bytes;
-    }
-
-
-    /**
-     * @return name of attribute.
-     */
-    @Override
-    public final String getName() {
-        return name;
-    }
-
-
-    /**
-     * @param bytes the bytes to set
-     */
-    public final void setBytes( byte[] bytes ) {
-        this.bytes = bytes;
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public final String toString() {
-        if (length == 0 || bytes == null) {
-            return "(Unknown attribute " + name + ")";
-        }
-        String hex;
-        if (length > 10) {
-            byte[] tmp = new byte[10];
-            System.arraycopy(bytes, 0, tmp, 0, 10);
-            hex = Utility.toHexString(tmp) + "... (truncated)";
-        } else {
-            hex = Utility.toHexString(bytes);
-        }
-        return "(Unknown attribute " + name + ": " + hex + ")";
-    }
-
-
-    /**
-     * @return deep copy of this attribute
-     */
-    @Override
-    public Attribute copy( ConstantPool _constant_pool ) {
-        Unknown c = (Unknown) clone();
-        if (bytes != null) {
-            c.bytes = new byte[bytes.length];
-            System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
-        }
-        c.constant_pool = _constant_pool;
-        return c;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/classfile/UnknownAttributeReader.java b/src/main/java/org/apache/bcel/classfile/UnknownAttributeReader.java
deleted file mode 100644
index 0975e64..0000000
--- a/src/main/java/org/apache/bcel/classfile/UnknownAttributeReader.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-/**
- * Unknown (non-standard) attributes may be read via user-defined factory
- * objects that can be registered with the Attribute.addAttributeReader
- * method. These factory objects should implement this interface.
- * 
- * @see Attribute
- * @version $Id$
- */
-public interface UnknownAttributeReader {
-
-    /**
-     * When this attribute reader is added via the static method Attribute.addAttributeReader,
-     * an attribute name is associated with it. As the class file parser parses attributes,
-     * it will call various AttributeReaders based on the name of the attributes it is constructing.
-     * 
-     * @param name_index    An index into the constant pool, indexing a ConstantUtf8
-     *                      that represents the name of the attribute.
-     * @param length        The length of the data contained in the attribute. This is written
-     *                      into the constant pool and should agree with what the factory expects the length to be.
-     * @param input         This is the data input that the factory needs to read its data from.
-     * @param constant_pool This is the constant pool associated with the Attribute that we are constructing.
-     *                      
-     * @return The user-defined AttributeReader should take this data and use
-     * it to construct an attribute.  In the case of errors, a null can be
-     * returned which will cause the parsing of the class file to fail.
-     * 
-     * @see Attribute#addAttributeReader(String, UnknownAttributeReader)
-     */
-    Attribute createAttribute( int name_index, int length, java.io.DataInput file, ConstantPool constant_pool );
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Utility.java b/src/main/java/org/apache/bcel/classfile/Utility.java
deleted file mode 100644
index 816c533..0000000
--- a/src/main/java/org/apache/bcel/classfile/Utility.java
+++ /dev/null
@@ -1,1467 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.CharArrayReader;
-import java.io.CharArrayWriter;
-import java.io.FilterReader;
-import java.io.FilterWriter;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.util.ByteSequence;
-
-/**
- * Utility functions that do not really belong to any class in particular.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class Utility {
-
-    private static int unwrap( ThreadLocal<Integer> tl ) {
-        return tl.get().intValue();
-    }
-
-
-    private static void wrap( ThreadLocal<Integer> tl, int value ) {
-        tl.set(Integer.valueOf(value));
-    }
-
-    private static ThreadLocal<Integer> consumed_chars = new ThreadLocal<Integer>() {
-
-        @Override
-        protected Integer initialValue() {
-            return Integer.valueOf(0);
-        }
-    };/* How many chars have been consumed
-     * during parsing in signatureToString().
-     * Read by methodSignatureToString().
-     * Set by side effect,but only internally.
-     */
-    private static boolean wide = false; /* The `WIDE' instruction is used in the
-     * byte code to allow 16-bit wide indices
-     * for local variables. This opcode
-     * precedes an `ILOAD', e.g.. The opcode
-     * immediately following takes an extra
-     * byte which is combined with the
-     * following byte to form a
-     * 16-bit value.
-     */
-
-
-    /**
-     * Convert bit field of flags into string such as `static final'.
-     *
-     * @param  access_flags Access flags
-     * @return String representation of flags
-     */
-    public static String accessToString( int access_flags ) {
-        return accessToString(access_flags, false);
-    }
-
-
-    /**
-     * Convert bit field of flags into string such as `static final'.
-     *
-     * Special case: Classes compiled with new compilers and with the
-     * `ACC_SUPER' flag would be said to be "synchronized". This is
-     * because SUN used the same value for the flags `ACC_SUPER' and
-     * `ACC_SYNCHRONIZED'. 
-     *
-     * @param  access_flags Access flags
-     * @param  for_class access flags are for class qualifiers ?
-     * @return String representation of flags
-     */
-    public static String accessToString( int access_flags, boolean for_class ) {
-        StringBuilder buf = new StringBuilder();
-        int p = 0;
-        for (int i = 0; p < Constants.MAX_ACC_FLAG; i++) { // Loop through known flags
-            p = pow2(i);
-            if ((access_flags & p) != 0) {
-                /* Special case: Classes compiled with new compilers and with the
-                 * `ACC_SUPER' flag would be said to be "synchronized". This is
-                 * because SUN used the same value for the flags `ACC_SUPER' and
-                 * `ACC_SYNCHRONIZED'.
-                 */
-                if (for_class && ((p == Constants.ACC_SUPER) || (p == Constants.ACC_INTERFACE))) {
-                    continue;
-                }
-                buf.append(Constants.ACCESS_NAMES[i]).append(" ");
-            }
-        }
-        return buf.toString().trim();
-    }
-
-
-    /**
-     * @param access_flags the class flags
-     * 
-     * @return "class" or "interface", depending on the ACC_INTERFACE flag
-     */
-    public static String classOrInterface( int access_flags ) {
-        return ((access_flags & Constants.ACC_INTERFACE) != 0) ? "interface" : "class";
-    }
-
-
-    /**
-     * Disassemble a byte array of JVM byte codes starting from code line 
-     * `index' and return the disassembled string representation. Decode only
-     * `num' opcodes (including their operands), use -1 if you want to
-     * decompile everything.
-     *
-     * @param  code byte code array
-     * @param  constant_pool Array of constants
-     * @param  index offset in `code' array
-     * <EM>(number of opcodes, not bytes!)</EM>
-     * @param  length number of opcodes to decompile, -1 for all
-     * @param  verbose be verbose, e.g. print constant pool index
-     * @return String representation of byte codes
-     */
-    public static String codeToString( byte[] code, ConstantPool constant_pool, int index,
-            int length, boolean verbose ) {
-        StringBuilder buf = new StringBuilder(code.length * 20); // Should be sufficient
-        ByteSequence stream = new ByteSequence(code);
-        try {
-            for (int i = 0; i < index; i++) {
-                codeToString(stream, constant_pool, verbose);
-            }
-            for (int i = 0; stream.available() > 0; i++) {
-                if ((length < 0) || (i < length)) {
-                    String indices = fillup(stream.getIndex() + ":", 6, true, ' ');
-                    buf.append(indices).append(codeToString(stream, constant_pool, verbose))
-                            .append('\n');
-                }
-            }
-        } catch (IOException e) {
-            System.out.println(buf.toString());
-            e.printStackTrace();
-            throw new ClassFormatException("Byte code error: " + e, e);
-        }
-        return buf.toString();
-    }
-
-
-    public static String codeToString( byte[] code, ConstantPool constant_pool, int index, int length ) {
-        return codeToString(code, constant_pool, index, length, true);
-    }
-
-
-    /**
-     * Disassemble a stream of byte codes and return the
-     * string representation.
-     *
-     * @param  bytes stream of bytes
-     * @param  constant_pool Array of constants
-     * @param  verbose be verbose, e.g. print constant pool index
-     * @return String representation of byte code
-     * 
-     * @throws IOException if a failure from reading from the bytes argument occurs
-     */
-    public static String codeToString( ByteSequence bytes, ConstantPool constant_pool,
-            boolean verbose ) throws IOException {
-        short opcode = (short) bytes.readUnsignedByte();
-        int default_offset = 0, low, high, npairs;
-        int index, vindex, constant;
-        int[] match, jump_table;
-        int no_pad_bytes = 0, offset;
-        StringBuilder buf = new StringBuilder(Constants.OPCODE_NAMES[opcode]);
-        /* Special case: Skip (0-3) padding bytes, i.e., the
-         * following bytes are 4-byte-aligned
-         */
-        if ((opcode == Constants.TABLESWITCH) || (opcode == Constants.LOOKUPSWITCH)) {
-            int remainder = bytes.getIndex() % 4;
-            no_pad_bytes = (remainder == 0) ? 0 : 4 - remainder;
-            for (int i = 0; i < no_pad_bytes; i++) {
-                byte b;
-                if ((b = bytes.readByte()) != 0) {
-                    System.err.println("Warning: Padding byte != 0 in "
-                            + Constants.OPCODE_NAMES[opcode] + ":" + b);
-                }
-            }
-            // Both cases have a field default_offset in common
-            default_offset = bytes.readInt();
-        }
-        switch (opcode) {
-            /* Table switch has variable length arguments.
-             */
-            case Constants.TABLESWITCH:
-                low = bytes.readInt();
-                high = bytes.readInt();
-                offset = bytes.getIndex() - 12 - no_pad_bytes - 1;
-                default_offset += offset;
-                buf.append("\tdefault = ").append(default_offset).append(", low = ").append(low)
-                        .append(", high = ").append(high).append("(");
-                jump_table = new int[high - low + 1];
-                for (int i = 0; i < jump_table.length; i++) {
-                    jump_table[i] = offset + bytes.readInt();
-                    buf.append(jump_table[i]);
-                    if (i < jump_table.length - 1) {
-                        buf.append(", ");
-                    }
-                }
-                buf.append(")");
-                break;
-            /* Lookup switch has variable length arguments.
-             */
-            case Constants.LOOKUPSWITCH: {
-                npairs = bytes.readInt();
-                offset = bytes.getIndex() - 8 - no_pad_bytes - 1;
-                match = new int[npairs];
-                jump_table = new int[npairs];
-                default_offset += offset;
-                buf.append("\tdefault = ").append(default_offset).append(", npairs = ").append(
-                        npairs).append(" (");
-                for (int i = 0; i < npairs; i++) {
-                    match[i] = bytes.readInt();
-                    jump_table[i] = offset + bytes.readInt();
-                    buf.append("(").append(match[i]).append(", ").append(jump_table[i]).append(")");
-                    if (i < npairs - 1) {
-                        buf.append(", ");
-                    }
-                }
-                buf.append(")");
-            }
-                break;
-            /* Two address bytes + offset from start of byte stream form the
-             * jump target
-             */
-            case Constants.GOTO:
-            case Constants.IFEQ:
-            case Constants.IFGE:
-            case Constants.IFGT:
-            case Constants.IFLE:
-            case Constants.IFLT:
-            case Constants.JSR:
-            case Constants.IFNE:
-            case Constants.IFNONNULL:
-            case Constants.IFNULL:
-            case Constants.IF_ACMPEQ:
-            case Constants.IF_ACMPNE:
-            case Constants.IF_ICMPEQ:
-            case Constants.IF_ICMPGE:
-            case Constants.IF_ICMPGT:
-            case Constants.IF_ICMPLE:
-            case Constants.IF_ICMPLT:
-            case Constants.IF_ICMPNE:
-                buf.append("\t\t#").append((bytes.getIndex() - 1) + bytes.readShort());
-                break;
-            /* 32-bit wide jumps
-             */
-            case Constants.GOTO_W:
-            case Constants.JSR_W:
-                buf.append("\t\t#").append(((bytes.getIndex() - 1) + bytes.readInt()));
-                break;
-            /* Index byte references local variable (register)
-             */
-            case Constants.ALOAD:
-            case Constants.ASTORE:
-            case Constants.DLOAD:
-            case Constants.DSTORE:
-            case Constants.FLOAD:
-            case Constants.FSTORE:
-            case Constants.ILOAD:
-            case Constants.ISTORE:
-            case Constants.LLOAD:
-            case Constants.LSTORE:
-            case Constants.RET:
-                if (wide) {
-                    vindex = bytes.readUnsignedShort();
-                    wide = false; // Clear flag
-                } else {
-                    vindex = bytes.readUnsignedByte();
-                }
-                buf.append("\t\t%").append(vindex);
-                break;
-            /*
-             * Remember wide byte which is used to form a 16-bit address in the
-             * following instruction. Relies on that the method is called again with
-             * the following opcode.
-             */
-            case Constants.WIDE:
-                wide = true;
-                buf.append("\t(wide)");
-                break;
-            /* Array of basic type.
-             */
-            case Constants.NEWARRAY:
-                buf.append("\t\t<").append(Constants.TYPE_NAMES[bytes.readByte()]).append(">");
-                break;
-            /* Access object/class fields.
-             */
-            case Constants.GETFIELD:
-            case Constants.GETSTATIC:
-            case Constants.PUTFIELD:
-            case Constants.PUTSTATIC:
-                index = bytes.readUnsignedShort();
-                buf.append("\t\t").append(
-                        constant_pool.constantToString(index, Constants.CONSTANT_Fieldref)).append(
-                        (verbose ? " (" + index + ")" : ""));
-                break;
-            /* Operands are references to classes in constant pool
-             */
-            case Constants.NEW:
-            case Constants.CHECKCAST:
-                buf.append("\t");
-                //$FALL-THROUGH$
-            case Constants.INSTANCEOF:
-                index = bytes.readUnsignedShort();
-                buf.append("\t<").append(
-                        constant_pool.constantToString(index, Constants.CONSTANT_Class))
-                        .append(">").append((verbose ? " (" + index + ")" : ""));
-                break;
-            /* Operands are references to methods in constant pool
-             */
-            case Constants.INVOKESPECIAL:
-            case Constants.INVOKESTATIC:
-                index = bytes.readUnsignedShort();
-                Constant c = constant_pool.getConstant(index);
-                // With Java8 operand may be either a CONSTANT_Methodref
-                // or a CONSTANT_InterfaceMethodref.   (markro)
-                buf.append("\t").append(
-                        constant_pool.constantToString(index, c.getTag()))
-                        .append((verbose ? " (" + index + ")" : ""));
-                break;
-            case Constants.INVOKEVIRTUAL:
-                index = bytes.readUnsignedShort();
-                buf.append("\t").append(
-                        constant_pool.constantToString(index, Constants.CONSTANT_Methodref))
-                        .append((verbose ? " (" + index + ")" : ""));
-                break;
-            case Constants.INVOKEINTERFACE:
-                index = bytes.readUnsignedShort();
-                int nargs = bytes.readUnsignedByte(); // historical, redundant
-                buf.append("\t").append(
-                        constant_pool
-                                .constantToString(index, Constants.CONSTANT_InterfaceMethodref))
-                        .append(verbose ? " (" + index + ")\t" : "").append(nargs).append("\t")
-                        .append(bytes.readUnsignedByte()); // Last byte is a reserved space
-                break;
-            case Constants.INVOKEDYNAMIC:
-                index = bytes.readUnsignedShort();
-                buf.append("\t").append(
-                        constant_pool
-                                .constantToString(index, Constants.CONSTANT_InvokeDynamic))
-                        .append(verbose ? " (" + index + ")\t" : "")
-                        .append(bytes.readUnsignedByte())  // Thrid byte is a reserved space
-                        .append(bytes.readUnsignedByte()); // Last byte is a reserved space
-                break;
-            /* Operands are references to items in constant pool
-             */
-            case Constants.LDC_W:
-            case Constants.LDC2_W:
-                index = bytes.readUnsignedShort();
-                buf.append("\t\t").append(
-                        constant_pool.constantToString(index, constant_pool.getConstant(index)
-                                .getTag())).append((verbose ? " (" + index + ")" : ""));
-                break;
-            case Constants.LDC:
-                index = bytes.readUnsignedByte();
-                buf.append("\t\t").append(
-                        constant_pool.constantToString(index, constant_pool.getConstant(index)
-                                .getTag())).append((verbose ? " (" + index + ")" : ""));
-                break;
-            /* Array of references.
-             */
-            case Constants.ANEWARRAY:
-                index = bytes.readUnsignedShort();
-                buf.append("\t\t<").append(
-                        compactClassName(constant_pool.getConstantString(index,
-                                Constants.CONSTANT_Class), false)).append(">").append(
-                        (verbose ? " (" + index + ")" : ""));
-                break;
-            /* Multidimensional array of references.
-             */
-            case Constants.MULTIANEWARRAY: {
-                index = bytes.readUnsignedShort();
-                int dimensions = bytes.readUnsignedByte();
-                buf.append("\t<").append(
-                        compactClassName(constant_pool.getConstantString(index,
-                                Constants.CONSTANT_Class), false)).append(">\t").append(dimensions)
-                        .append((verbose ? " (" + index + ")" : ""));
-            }
-                break;
-            /* Increment local variable.
-             */
-            case Constants.IINC:
-                if (wide) {
-                    vindex = bytes.readUnsignedShort();
-                    constant = bytes.readShort();
-                    wide = false;
-                } else {
-                    vindex = bytes.readUnsignedByte();
-                    constant = bytes.readByte();
-                }
-                buf.append("\t\t%").append(vindex).append("\t").append(constant);
-                break;
-            default:
-                if (Constants.NO_OF_OPERANDS[opcode] > 0) {
-                    for (int i = 0; i < Constants.TYPE_OF_OPERANDS[opcode].length; i++) {
-                        buf.append("\t\t");
-                        switch (Constants.TYPE_OF_OPERANDS[opcode][i]) {
-                            case Constants.T_BYTE:
-                                buf.append(bytes.readByte());
-                                break;
-                            case Constants.T_SHORT:
-                                buf.append(bytes.readShort());
-                                break;
-                            case Constants.T_INT:
-                                buf.append(bytes.readInt());
-                                break;
-                            default: // Never reached
-                                System.err.println("Unreachable default case reached!");
-                                System.exit(-1);
-                        }
-                    }
-                }
-        }
-        return buf.toString();
-    }
-
-
-    public static String codeToString( ByteSequence bytes, ConstantPool constant_pool )
-            throws IOException {
-        return codeToString(bytes, constant_pool, true);
-    }
-
-
-    /**
-     * Shorten long class names, <em>java/lang/String</em> becomes 
-     * <em>String</em>.
-     *
-     * @param str The long class name
-     * @return Compacted class name
-     */
-    public static String compactClassName( String str ) {
-        return compactClassName(str, true);
-    }
-
-
-    /**
-     * Shorten long class name <em>str</em>, i.e., chop off the <em>prefix</em>,
-     * if the
-     * class name starts with this string and the flag <em>chopit</em> is true.
-     * Slashes <em>/</em> are converted to dots <em>.</em>.
-     *
-     * @param str The long class name
-     * @param prefix The prefix the get rid off
-     * @param chopit Flag that determines whether chopping is executed or not
-     * @return Compacted class name
-     */
-    public static String compactClassName( String str, String prefix, boolean chopit ) {
-        int len = prefix.length();
-        str = str.replace('/', '.'); // Is `/' on all systems, even DOS
-        if (chopit) {
-            // If string starts with `prefix' and contains no further dots
-            if (str.startsWith(prefix) && (str.substring(len).indexOf('.') == -1)) {
-                str = str.substring(len);
-            }
-        }
-        return str;
-    }
-
-
-    /**
-     * Shorten long class names, <em>java/lang/String</em> becomes 
-     * <em>java.lang.String</em>,
-     * e.g.. If <em>chopit</em> is <em>true</em> the prefix <em>java.lang</em>
-     * is also removed.
-     *
-     * @param str The long class name
-     * @param chopit Flag that determines whether chopping is executed or not
-     * @return Compacted class name
-     */
-    public static String compactClassName( String str, boolean chopit ) {
-        return compactClassName(str, "java.lang.", chopit);
-    }
-
-
-    /**
-     * @return `flag' with bit `i' set to 1
-     */
-    public static int setBit( int flag, int i ) {
-        return flag | pow2(i);
-    }
-
-
-    /**
-     * @return `flag' with bit `i' set to 0
-     */
-    public static int clearBit( int flag, int i ) {
-        int bit = pow2(i);
-        return (flag & bit) == 0 ? flag : flag ^ bit;
-    }
-
-
-    /**
-     * @return true, if bit `i' in `flag' is set
-     */
-    public static boolean isSet( int flag, int i ) {
-        return (flag & pow2(i)) != 0;
-    }
-
-
-    /**
-     * Converts string containing the method return and argument types 
-     * to a byte code method signature.
-     *
-     * @param  ret Return type of method
-     * @param  argv Types of method arguments
-     * @return Byte code representation of method signature
-     * 
-     * @throws ClassFormatException if the signature is for Void
-     */
-    public static String methodTypeToSignature( String ret, String[] argv )
-            throws ClassFormatException {
-        StringBuilder buf = new StringBuilder("(");
-        String str;
-        if (argv != null) {
-            for (String element : argv) {
-                str = getSignature(element);
-                if (str.endsWith("V")) {
-                    throw new ClassFormatException("Invalid type: " + element);
-                }
-                buf.append(str);
-            }
-        }
-        str = getSignature(ret);
-        buf.append(")").append(str);
-        return buf.toString();
-    }
-
-
-    /**
-     * @param  signature    Method signature
-     * @return Array of argument types
-     * @throws  ClassFormatException  
-     */
-    public static String[] methodSignatureArgumentTypes( String signature )
-            throws ClassFormatException {
-        return methodSignatureArgumentTypes(signature, true);
-    }
-
-
-    /**
-     * @param  signature    Method signature
-     * @param chopit Shorten class names ?
-     * @return Array of argument types
-     * @throws  ClassFormatException  
-     */
-    public static String[] methodSignatureArgumentTypes( String signature, boolean chopit ) 
-            throws ClassFormatException {
-        List<String> vec = new ArrayList<String>();
-        int index;
-        try { // Read all declarations between for `(' and `)'
-            if (signature.charAt(0) != '(') {
-                throw new ClassFormatException("Invalid method signature: " + signature);
-            }
-            index = 1; // current string position
-            while (signature.charAt(index) != ')') {
-                vec.add(signatureToString(signature.substring(index), chopit));
-                //corrected concurrent private static field acess
-                index += unwrap(consumed_chars); // update position
-            }
-        } catch (StringIndexOutOfBoundsException e) { // Should never occur
-            throw new ClassFormatException("Invalid method signature: " + signature, e);
-        }
-        return vec.toArray(new String[vec.size()]);
-    }
-
-
-    /**
-     * @param  signature    Method signature
-     * @return return type of method
-     * @throws  ClassFormatException  
-     */
-    public static String methodSignatureReturnType( String signature ) throws ClassFormatException {
-        return methodSignatureReturnType(signature, true);
-    }
-
-
-    /**
-     * @param  signature    Method signature
-     * @param chopit Shorten class names ?
-     * @return return type of method
-     * @throws  ClassFormatException  
-     */
-    public static String methodSignatureReturnType( String signature, boolean chopit ) throws ClassFormatException {
-        int index;
-        String type;
-        try {
-            // Read return type after `)'
-            index = signature.lastIndexOf(')') + 1;
-            type = signatureToString(signature.substring(index), chopit);
-        } catch (StringIndexOutOfBoundsException e) { // Should never occur
-            throw new ClassFormatException("Invalid method signature: " + signature, e);
-        }
-        return type;
-    }
-
-
-    /**
-     * Converts method signature to string with all class names compacted.
-     *
-     * @param signature to convert
-     * @param name of method
-     * @param access flags of method
-     * @return Human readable signature
-     */
-    public static String methodSignatureToString( String signature, String name, String access ) {
-        return methodSignatureToString(signature, name, access, true);
-    }
-
-
-    public static String methodSignatureToString( String signature, String name, String access, boolean chopit ) {
-        return methodSignatureToString(signature, name, access, chopit, null);
-    }
-
-
-    /**
-     * A returntype signature represents the return value from a method.
-     * It is a series of bytes in the following grammar:
-     *
-     * <pre>
-     * &lt;return_signature&gt; ::= &lt;field_type&gt; | V
-     * </pre>
-     *
-     * The character V indicates that the method returns no value. Otherwise, the
-     * signature indicates the type of the return value.
-     * An argument signature represents an argument passed to a method:
-     *
-     * <pre>
-     * &lt;argument_signature&gt; ::= &lt;field_type&gt;
-     * </pre>
-     *
-     * A method signature represents the arguments that the method expects, and
-     * the value that it returns.
-     * <pre>
-     * &lt;method_signature&gt; ::= (&lt;arguments_signature&gt;) &lt;return_signature&gt;
-     * &lt;arguments_signature&gt;::= &lt;argument_signature&gt;*
-     * </pre>
-     *
-     * This method converts such a string into a Java type declaration like
-     * `void main(String[])' and throws a `ClassFormatException' when the parsed 
-     * type is invalid.
-     *
-     * @param  signature    Method signature
-     * @param  name         Method name
-     * @param  access       Method access rights
-     * @param chopit
-     * @param vars
-     * @return Java type declaration
-     * @throws  ClassFormatException  
-     */
-    public static String methodSignatureToString( String signature, String name,
-            String access, boolean chopit, LocalVariableTable vars ) throws ClassFormatException {
-        StringBuilder buf = new StringBuilder("(");
-        String type;
-        int index;
-        int var_index = access.contains("static") ? 0 : 1;
-        try { // Read all declarations between for `(' and `)'
-            if (signature.charAt(0) != '(') {
-                throw new ClassFormatException("Invalid method signature: " + signature);
-            }
-            index = 1; // current string position
-            while (signature.charAt(index) != ')') {
-                String param_type = signatureToString(signature.substring(index), chopit);
-                buf.append(param_type);
-                if (vars != null) {
-                    LocalVariable l = vars.getLocalVariable(var_index);
-                    if (l != null) {
-                        buf.append(" ").append(l.getName());
-                    }
-                } else {
-                    buf.append(" arg").append(var_index);
-                }
-                if ("double".equals(param_type) || "long".equals(param_type)) {
-                    var_index += 2;
-                } else {
-                    var_index++;
-                }
-                buf.append(", ");
-                //corrected concurrent private static field acess
-                index += unwrap(consumed_chars); // update position
-            }
-            index++; // update position
-            // Read return type after `)'
-            type = signatureToString(signature.substring(index), chopit);
-        } catch (StringIndexOutOfBoundsException e) { // Should never occur
-            throw new ClassFormatException("Invalid method signature: " + signature, e);
-        }
-        if (buf.length() > 1) {
-            buf.setLength(buf.length() - 2);
-        }
-        buf.append(")");
-        return access + ((access.length() > 0) ? " " : "") + // May be an empty string
-                type + " " + name + buf.toString();
-    }
-
-
-    // Guess what this does
-    private static int pow2( int n ) {
-        return 1 << n;
-    }
-
-
-    /**
-     * Replace all occurrences of <em>old</em> in <em>str</em> with <em>new</em>.
-     *
-     * @param str String to permute
-     * @param old String to be replaced
-     * @param new_ Replacement string
-     * @return new String object
-     */
-    public static String replace( String str, String old, String new_ ) {
-        int index, old_index;
-        try {
-            if (str.contains(old)) { // `old' found in str
-                StringBuilder buf = new StringBuilder();
-                old_index = 0; // String start offset
-                // While we have something to replace
-                while ((index = str.indexOf(old, old_index)) != -1) {
-                    buf.append(str.substring(old_index, index)); // append prefix
-                    buf.append(new_); // append replacement
-                    old_index = index + old.length(); // Skip `old'.length chars
-                }
-                buf.append(str.substring(old_index)); // append rest of string
-                str = buf.toString();
-            }
-        } catch (StringIndexOutOfBoundsException e) { // Should not occur
-            System.err.println(e);
-        }
-        return str;
-    }
-
-
-    /**
-     * Converts signature to string with all class names compacted.
-     *
-     * @param signature to convert
-     * @return Human readable signature
-     */
-    public static String signatureToString( String signature ) {
-        return signatureToString(signature, true);
-    }
-
-
-    /**
-     * The field signature represents the value of an argument to a function or 
-     * the value of a variable. It is a series of bytes generated by the 
-     * following grammar:
-     *
-     * <PRE>
-     * &lt;field_signature&gt; ::= &lt;field_type&gt;
-     * &lt;field_type&gt;      ::= &lt;base_type&gt;|&lt;object_type&gt;|&lt;array_type&gt;
-     * &lt;base_type&gt;       ::= B|C|D|F|I|J|S|Z
-     * &lt;object_type&gt;     ::= L&lt;fullclassname&gt;;
-     * &lt;array_type&gt;      ::= [&lt;field_type&gt;
-     *
-     * The meaning of the base types is as follows:
-     * B byte signed byte
-     * C char character
-     * D double double precision IEEE float
-     * F float single precision IEEE float
-     * I int integer
-     * J long long integer
-     * L&lt;fullclassname&gt;; ... an object of the given class
-     * S short signed short
-     * Z boolean true or false
-     * [&lt;field sig&gt; ... array
-     * </PRE>
-     *
-     * This method converts this string into a Java type declaration such as
-     * `String[]' and throws a `ClassFormatException' when the parsed type is 
-     * invalid.
-     *
-     * @param  signature  Class signature
-     * @param chopit Flag that determines whether chopping is executed or not
-     * @return Java type declaration
-     * @throws ClassFormatException
-     */
-    public static String signatureToString( String signature, boolean chopit ) {
-        //corrected concurrent private static field acess
-        wrap(consumed_chars, 1); // This is the default, read just one char like `B'
-        try {
-            switch (signature.charAt(0)) {
-                case 'B':
-                    return "byte";
-                case 'C':
-                    return "char";
-                case 'D':
-                    return "double";
-                case 'F':
-                    return "float";
-                case 'I':
-                    return "int";
-                case 'J':
-                    return "long";
-                case 'T': { // TypeVariableSignature
-                    int index = signature.indexOf(';'); // Look for closing `;'
-                    if (index < 0) {
-                        throw new ClassFormatException("Invalid signature: " + signature);
-                    }
-                    //corrected concurrent private static field acess
-                    wrap(consumed_chars, index + 1); // "Tblabla;" `T' and `;' are removed
-                    return compactClassName(signature.substring(1, index), chopit);
-                }
-                case 'L': { // Full class name
-                    // should this be a while loop? can there be more than
-                    // one generic clause?  (markro)
-                    int fromIndex = signature.indexOf('<'); // generic type?
-                    if (fromIndex < 0) {
-                        fromIndex = 0;
-                    } else {
-                        fromIndex = signature.indexOf('>', fromIndex);
-                        if (fromIndex < 0) {
-                            throw new ClassFormatException("Invalid signature: " + signature);
-                        }
-                    }
-                    int index = signature.indexOf(';', fromIndex); // Look for closing `;'
-                    if (index < 0) {
-                        throw new ClassFormatException("Invalid signature: " + signature);
-                    }
-                    // check to see if there are any TypeArguments
-                    int bracketIndex = signature.substring(0, index).indexOf('<');
-                    if (bracketIndex < 0) {
-                        // just a class identifier
-                        wrap(consumed_chars, index + 1); // "Lblabla;" `L' and `;' are removed
-                        return compactClassName(signature.substring(1, index), chopit);
-                    }
-
-                    // we have TypeArguments; build up partial result
-                    // as we recurse for each TypeArgument
-                    String type = compactClassName(signature.substring(1, bracketIndex), chopit) + "<";
-                    int consumed_chars = bracketIndex + 1; // Shadows global var
-
-                    // check for wildcards
-                    if (signature.charAt(consumed_chars) == '+') {
-                        type = type + "? extends ";
-                        consumed_chars = ++consumed_chars;
-                    } else if (signature.charAt(consumed_chars) == '-') {
-                        type = type + "? super ";
-                        consumed_chars = ++consumed_chars;
-                    } else if (signature.charAt(consumed_chars) == '*') {
-                        // must be at end of signature
-                        if (signature.charAt(consumed_chars + 1) != '>') {
-                            throw new ClassFormatException("Invalid signature: " + signature);
-                        }
-                        if (signature.charAt(consumed_chars + 2) != ';') {
-                            throw new ClassFormatException("Invalid signature: " + signature);
-                        }
-                        wrap(Utility.consumed_chars, consumed_chars + 3); // remove final "*>;"
-                        return type + "?>...";
-                    }
-
-                    // get the first TypeArgument
-                    type = type + signatureToString(signature.substring(consumed_chars), chopit);
-                    // update our consumed count by the number of characters the for type argument
-                    consumed_chars = unwrap(Utility.consumed_chars) + consumed_chars;
-                    wrap(Utility.consumed_chars, consumed_chars);
-
-                    // are there more TypeArguments?
-                    while (signature.charAt(consumed_chars) != '>') {
-                        type = type + ", " + signatureToString(signature.substring(consumed_chars), chopit);
-                        // update our consumed count by the number of characters the for type argument
-                        consumed_chars = unwrap(Utility.consumed_chars) + consumed_chars;
-                        wrap(Utility.consumed_chars, consumed_chars);
-                    }
-
-                    if (signature.charAt(consumed_chars + 1) != ';') {
-                        throw new ClassFormatException("Invalid signature: " + signature);
-                    }
-                    wrap(Utility.consumed_chars, consumed_chars + 2); // remove final ">;"
-                    return type + ">";
-                }
-                case 'S':
-                    return "short";
-                case 'Z':
-                    return "boolean";
-                case '[': { // Array declaration
-                    int n;
-                    StringBuilder brackets;
-                    String type;
-                    int consumed_chars; // Shadows global var
-                    brackets = new StringBuilder(); // Accumulate []'s
-                    // Count opening brackets and look for optional size argument
-                    for (n = 0; signature.charAt(n) == '['; n++) {
-                        brackets.append("[]");
-                    }
-                    consumed_chars = n; // Remember value
-                    // The rest of the string denotes a `<field_type>'
-                    type = signatureToString(signature.substring(n), chopit);
-                    //corrected concurrent private static field acess
-                    //Utility.consumed_chars += consumed_chars; is replaced by:
-                    int _temp = unwrap(Utility.consumed_chars) + consumed_chars;
-                    wrap(Utility.consumed_chars, _temp);
-                    return type + brackets.toString();
-                }
-                case 'V':
-                    return "void";
-                default:
-                    throw new ClassFormatException("Invalid signature: `" + signature + "'");
-            }
-        } catch (StringIndexOutOfBoundsException e) { // Should never occur
-            throw new ClassFormatException("Invalid signature: " + signature, e);
-        }
-    }
-
-
-    /** Parse Java type such as "char", or "java.lang.String[]" and return the
-     * signature in byte code format, e.g. "C" or "[Ljava/lang/String;" respectively.
-     *
-     * @param  type Java type
-     * @return byte code signature
-     */
-    public static String getSignature( String type ) {
-        StringBuilder buf = new StringBuilder();
-        char[] chars = type.toCharArray();
-        boolean char_found = false, delim = false;
-        int index = -1;
-        loop: for (int i = 0; i < chars.length; i++) {
-            switch (chars[i]) {
-                case ' ':
-                case '\t':
-                case '\n':
-                case '\r':
-                case '\f':
-                    if (char_found) {
-                        delim = true;
-                    }
-                    break;
-                case '[':
-                    if (!char_found) {
-                        throw new RuntimeException("Illegal type: " + type);
-                    }
-                    index = i;
-                    break loop;
-                default:
-                    char_found = true;
-                    if (!delim) {
-                        buf.append(chars[i]);
-                    }
-            }
-        }
-        int brackets = 0;
-        if (index > 0) {
-            brackets = countBrackets(type.substring(index));
-        }
-        type = buf.toString();
-        buf.setLength(0);
-        for (int i = 0; i < brackets; i++) {
-            buf.append('[');
-        }
-        boolean found = false;
-        for (int i = Constants.T_BOOLEAN; (i <= Constants.T_VOID) && !found; i++) {
-            if (Constants.TYPE_NAMES[i].equals(type)) {
-                found = true;
-                buf.append(Constants.SHORT_TYPE_NAMES[i]);
-            }
-        }
-        if (!found) {
-            buf.append('L').append(type.replace('.', '/')).append(';');
-        }
-        return buf.toString();
-    }
-
-
-    private static int countBrackets( String brackets ) {
-        char[] chars = brackets.toCharArray();
-        int count = 0;
-        boolean open = false;
-        for (char c : chars) {
-            switch (c) {
-                case '[':
-                    if (open) {
-                        throw new RuntimeException("Illegally nested brackets:" + brackets);
-                    }
-                    open = true;
-                    break;
-                case ']':
-                    if (!open) {
-                        throw new RuntimeException("Illegally nested brackets:" + brackets);
-                    }
-                    open = false;
-                    count++;
-                    break;
-                default:
-                    // Don't care
-            }
-        }
-        if (open) {
-            throw new RuntimeException("Illegally nested brackets:" + brackets);
-        }
-        return count;
-    }
-
-
-    /**
-     * Return type of method signature as a byte value as defined in <em>Constants</em>
-     *
-     * @param  signature in format described above
-     * @return type of method signature
-     * @see    Constants
-     * 
-     * @throws ClassFormatException if signature is not a method signature
-     */
-    public static byte typeOfMethodSignature( String signature ) throws ClassFormatException {
-        int index;
-        try {
-            if (signature.charAt(0) != '(') {
-                throw new ClassFormatException("Invalid method signature: " + signature);
-            }
-            index = signature.lastIndexOf(')') + 1;
-            return typeOfSignature(signature.substring(index));
-        } catch (StringIndexOutOfBoundsException e) {
-            throw new ClassFormatException("Invalid method signature: " + signature, e);
-        }
-    }
-
-
-    /**
-     * Return type of signature as a byte value as defined in <em>Constants</em>
-     *
-     * @param  signature in format described above
-     * @return type of signature
-     * @see    Constants
-     * 
-     * @throws ClassFormatException if signature isn't a known type
-     */
-    public static byte typeOfSignature( String signature ) throws ClassFormatException {
-        try {
-            switch (signature.charAt(0)) {
-                case 'B':
-                    return Constants.T_BYTE;
-                case 'C':
-                    return Constants.T_CHAR;
-                case 'D':
-                    return Constants.T_DOUBLE;
-                case 'F':
-                    return Constants.T_FLOAT;
-                case 'I':
-                    return Constants.T_INT;
-                case 'J':
-                    return Constants.T_LONG;
-                case 'L':
-                case 'T':
-                    return Constants.T_REFERENCE;
-                case '[':
-                    return Constants.T_ARRAY;
-                case 'V':
-                    return Constants.T_VOID;
-                case 'Z':
-                    return Constants.T_BOOLEAN;
-                case 'S':
-                    return Constants.T_SHORT;
-                default:
-                    throw new ClassFormatException("Invalid method signature: " + signature);
-            }
-        } catch (StringIndexOutOfBoundsException e) {
-            throw new ClassFormatException("Invalid method signature: " + signature, e);
-        }
-    }
-
-
-    /** Map opcode names to opcode numbers. E.g., return Constants.ALOAD for "aload"
-     */
-    public static short searchOpcode( String name ) {
-        name = name.toLowerCase(Locale.ENGLISH);
-        for (short i = 0; i < Constants.OPCODE_NAMES.length; i++) {
-            if (Constants.OPCODE_NAMES[i].equals(name)) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
-
-    /**
-     * Convert (signed) byte to (unsigned) short value, i.e., all negative
-     * values become positive.
-     */
-    private static short byteToShort( byte b ) {
-        return (b < 0) ? (short) (256 + b) : (short) b;
-    }
-
-
-    /** Convert bytes into hexadecimal string
-     *
-     * @param bytes an array of bytes to convert to hexadecimal
-     * 
-     * @return bytes as hexadecimal string, e.g. 00 FA 12 ...
-     */
-    public static String toHexString( byte[] bytes ) {
-        StringBuilder buf = new StringBuilder();
-        for (int i = 0; i < bytes.length; i++) {
-            short b = byteToShort(bytes[i]);
-            String hex = Integer.toString(b, 0x10);
-            if (b < 0x10) {
-                buf.append('0');
-            }
-            buf.append(hex);
-            if (i < bytes.length - 1) {
-                buf.append(' ');
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * Return a string for an integer justified left or right and filled up with
-     * `fill' characters if necessary.
-     *
-     * @param i integer to format
-     * @param length length of desired string
-     * @param left_justify format left or right
-     * @param fill fill character
-     * @return formatted int
-     */
-    public static String format( int i, int length, boolean left_justify, char fill ) {
-        return fillup(Integer.toString(i), length, left_justify, fill);
-    }
-
-
-    /**
-     * Fillup char with up to length characters with char `fill' and justify it left or right.
-     *
-     * @param str string to format
-     * @param length length of desired string
-     * @param left_justify format left or right
-     * @param fill fill character
-     * @return formatted string
-     */
-    public static String fillup( String str, int length, boolean left_justify, char fill ) {
-        int len = length - str.length();
-        char[] buf = new char[(len < 0) ? 0 : len];
-        for (int j = 0; j < buf.length; j++) {
-            buf[j] = fill;
-        }
-        if (left_justify) {
-            return str + new String(buf);
-        }
-        return new String(buf) + str;
-    }
-
-
-    static boolean equals( byte[] a, byte[] b ) {
-        int size;
-        if ((size = a.length) != b.length) {
-            return false;
-        }
-        for (int i = 0; i < size; i++) {
-            if (a[i] != b[i]) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    public static void printArray( PrintStream out, Object[] obj ) {
-        out.println(printArray(obj, true));
-    }
-
-
-    public static void printArray( PrintWriter out, Object[] obj ) {
-        out.println(printArray(obj, true));
-    }
-
-
-    public static String printArray( Object[] obj ) {
-        return printArray(obj, true);
-    }
-
-
-    public static String printArray( Object[] obj, boolean braces ) {
-        return printArray(obj, braces, false);
-    }
-
-
-    public static String printArray( Object[] obj, boolean braces, boolean quote ) {
-        if (obj == null) {
-            return null;
-        }
-        StringBuilder buf = new StringBuilder();
-        if (braces) {
-            buf.append('{');
-        }
-        for (int i = 0; i < obj.length; i++) {
-            if (obj[i] != null) {
-                buf.append((quote ? "\"" : "")).append(obj[i].toString()).append(
-                        (quote ? "\"" : ""));
-            } else {
-                buf.append("null");
-            }
-            if (i < obj.length - 1) {
-                buf.append(", ");
-            }
-        }
-        if (braces) {
-            buf.append('}');
-        }
-        return buf.toString();
-    }
-
-
-    /** 
-     * @param ch the character to test if it's part of an identifier
-     * 
-     * @return true, if character is one of (a, ... z, A, ... Z, 0, ... 9, _)
-     */
-    public static boolean isJavaIdentifierPart( char ch ) {
-        return ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))
-                || ((ch >= '0') && (ch <= '9')) || (ch == '_');
-    }
-
-
-    /**
-     * Encode byte array it into Java identifier string, i.e., a string
-     * that only contains the following characters: (a, ... z, A, ... Z,
-     * 0, ... 9, _, $).  The encoding algorithm itself is not too
-     * clever: if the current byte's ASCII value already is a valid Java
-     * identifier part, leave it as it is. Otherwise it writes the
-     * escape character($) followed by:
-     * 
-     * <ul>
-     *   <li> the ASCII value as a hexadecimal string, if the value is not in the range 200..247</li>
-     *   <li>a Java identifier char not used in a lowercase hexadecimal string, if the value is in the range 200..247</li>
-     * </ul>
-     *
-     * <p>This operation inflates the original byte array by roughly 40-50%</p>
-     *
-     * @param bytes the byte array to convert
-     * @param compress use gzip to minimize string
-     * 
-     * @throws IOException if there's a gzip exception
-     */
-    public static String encode( byte[] bytes, boolean compress ) throws IOException {
-        if (compress) {
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            GZIPOutputStream gos = new GZIPOutputStream(baos);
-            gos.write(bytes, 0, bytes.length);
-            gos.close();
-            baos.close();
-            bytes = baos.toByteArray();
-        }
-        CharArrayWriter caw = new CharArrayWriter();
-        JavaWriter jw = new JavaWriter(caw);
-        for (byte b : bytes) {
-            int in = b & 0x000000ff; // Normalize to unsigned
-            jw.write(in);
-        }
-        jw.close();
-        return caw.toString();
-    }
-
-
-    /**
-     * Decode a string back to a byte array.
-     *
-     * @param s the string to convert
-     * @param uncompress use gzip to uncompress the stream of bytes
-     * 
-     * @throws IOException if there's a gzip exception
-     */
-    public static byte[] decode( String s, boolean uncompress ) throws IOException {
-        char[] chars = s.toCharArray();
-        CharArrayReader car = new CharArrayReader(chars);
-        JavaReader jr = new JavaReader(car);
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        int ch;
-        while ((ch = jr.read()) >= 0) {
-            bos.write(ch);
-        }
-        bos.close();
-        car.close();
-        jr.close();
-        byte[] bytes = bos.toByteArray();
-        if (uncompress) {
-            GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(bytes));
-            byte[] tmp = new byte[bytes.length * 3]; // Rough estimate
-            int count = 0;
-            int b;
-            while ((b = gis.read()) >= 0) {
-                tmp[count++] = (byte) b;
-            }
-            bytes = new byte[count];
-            System.arraycopy(tmp, 0, bytes, 0, count);
-        }
-        return bytes;
-    }
-
-    // A-Z, g-z, _, $
-    private static final int FREE_CHARS = 48;
-    static int[] CHAR_MAP = new int[FREE_CHARS];
-    static int[] MAP_CHAR = new int[256]; // Reverse map
-    private static final char ESCAPE_CHAR = '$';
-    static {
-        int j = 0;
-        for (int i = 'A'; i <= 'Z'; i++) {
-            CHAR_MAP[j] = i;
-            MAP_CHAR[i] = j;
-            j++;
-        }
-        for (int i = 'g'; i <= 'z'; i++) {
-            CHAR_MAP[j] = i;
-            MAP_CHAR[i] = j;
-            j++;
-        }
-        CHAR_MAP[j] = '$';
-        MAP_CHAR['$'] = j;
-        j++;
-        CHAR_MAP[j] = '_';
-        MAP_CHAR['_'] = j;
-    }
-
-    /**
-     * Decode characters into bytes.
-     * Used by <a href="Utility.html#decode(java.lang.String, boolean)">decode()</a>
-     */
-    private static class JavaReader extends FilterReader {
-
-        public JavaReader(Reader in) {
-            super(in);
-        }
-
-
-        @Override
-        public int read() throws IOException {
-            int b = in.read();
-            if (b != ESCAPE_CHAR) {
-                return b;
-            }
-            int i = in.read();
-            if (i < 0) {
-                return -1;
-            }
-            if (((i >= '0') && (i <= '9')) || ((i >= 'a') && (i <= 'f'))) { // Normal escape
-                int j = in.read();
-                if (j < 0) {
-                    return -1;
-                }
-                char[] tmp = {
-                        (char) i, (char) j
-                };
-                int s = Integer.parseInt(new String(tmp), 16);
-                return s;
-            }
-            return MAP_CHAR[i];
-        }
-
-
-        @Override
-        public int read( char[] cbuf, int off, int len ) throws IOException {
-            for (int i = 0; i < len; i++) {
-                cbuf[off + i] = (char) read();
-            }
-            return len;
-        }
-    }
-
-    /**
-     * Encode bytes into valid java identifier characters.
-     * Used by <a href="Utility.html#encode(byte[], boolean)">encode()</a>
-     */
-    private static class JavaWriter extends FilterWriter {
-
-        public JavaWriter(Writer out) {
-            super(out);
-        }
-
-
-        @Override
-        public void write( int b ) throws IOException {
-            if (isJavaIdentifierPart((char) b) && (b != ESCAPE_CHAR)) {
-                out.write(b);
-            } else {
-                out.write(ESCAPE_CHAR); // Escape character
-                // Special escape
-                if (b >= 0 && b < FREE_CHARS) {
-                    out.write(CHAR_MAP[b]);
-                } else { // Normal escape
-                    char[] tmp = Integer.toHexString(b).toCharArray();
-                    if (tmp.length == 1) {
-                        out.write('0');
-                        out.write(tmp[0]);
-                    } else {
-                        out.write(tmp[0]);
-                        out.write(tmp[1]);
-                    }
-                }
-            }
-        }
-
-
-        @Override
-        public void write( char[] cbuf, int off, int len ) throws IOException {
-            for (int i = 0; i < len; i++) {
-                write(cbuf[off + i]);
-            }
-        }
-
-
-        @Override
-        public void write( String str, int off, int len ) throws IOException {
-            write(str.toCharArray(), off, len);
-        }
-    }
-
-
-    /**
-     * Escape all occurences of newline chars '\n', quotes \", etc.
-     */
-    public static String convertString( String label ) {
-        char[] ch = label.toCharArray();
-        StringBuilder buf = new StringBuilder();
-        for (char element : ch) {
-            switch (element) {
-                case '\n':
-                    buf.append("\\n");
-                    break;
-                case '\r':
-                    buf.append("\\r");
-                    break;
-                case '\"':
-                    buf.append("\\\"");
-                    break;
-                case '\'':
-                    buf.append("\\'");
-                    break;
-                case '\\':
-                    buf.append("\\\\");
-                    break;
-                default:
-                    buf.append(element);
-                    break;
-            }
-        }
-        return buf.toString();
-    }
-
-}
diff --git a/src/main/java/org/apache/bcel/classfile/Visitor.java b/src/main/java/org/apache/bcel/classfile/Visitor.java
deleted file mode 100644
index 58c1f1b..0000000
--- a/src/main/java/org/apache/bcel/classfile/Visitor.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.classfile;
-
-/**
- * Interface to make use of the Visitor pattern programming style. I.e. a class
- * that implements this interface can traverse the contents of a Java class just
- * by calling the `accept' method which all classes have.
- * 
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface Visitor
-{
-    void visitCode(Code obj);
-
-    void visitCodeException(CodeException obj);
-
-    void visitConstantClass(ConstantClass obj);
-
-    void visitConstantDouble(ConstantDouble obj);
-
-    void visitConstantFieldref(ConstantFieldref obj);
-
-    void visitConstantFloat(ConstantFloat obj);
-
-    void visitConstantInteger(ConstantInteger obj);
-
-    void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj);
-
-    void visitConstantInvokeDynamic(ConstantInvokeDynamic obj);
-
-    void visitConstantLong(ConstantLong obj);
-
-    void visitConstantMethodref(ConstantMethodref obj);
-
-    void visitConstantNameAndType(ConstantNameAndType obj);
-
-    void visitConstantPool(ConstantPool obj);
-
-    void visitConstantString(ConstantString obj);
-
-    void visitConstantUtf8(ConstantUtf8 obj);
-
-    void visitConstantValue(ConstantValue obj);
-
-    void visitDeprecated(Deprecated obj);
-
-    void visitExceptionTable(ExceptionTable obj);
-
-    void visitField(Field obj);
-
-    void visitInnerClass(InnerClass obj);
-
-    void visitInnerClasses(InnerClasses obj);
-
-    void visitJavaClass(JavaClass obj);
-
-    void visitLineNumber(LineNumber obj);
-
-    void visitLineNumberTable(LineNumberTable obj);
-
-    void visitLocalVariable(LocalVariable obj);
-
-    void visitLocalVariableTable(LocalVariableTable obj);
-
-    void visitMethod(Method obj);
-
-    void visitSignature(Signature obj);
-
-    void visitSourceFile(SourceFile obj);
-
-    void visitSynthetic(Synthetic obj);
-
-    void visitUnknown(Unknown obj);
-
-    void visitStackMap(StackMap obj);
-
-    void visitStackMapEntry(StackMapEntry obj);
-
-    void visitStackMapTable(StackMapTable obj);
-
-    void visitStackMapTableEntry(StackMapTableEntry obj);
-
-    void visitAnnotation(Annotations obj);
-
-    void visitParameterAnnotation(ParameterAnnotations obj);
-
-    void visitAnnotationEntry(AnnotationEntry obj);
-
-    void visitAnnotationDefault(AnnotationDefault obj);
-
-    void visitLocalVariableTypeTable(LocalVariableTypeTable obj);
-
-    void visitEnclosingMethod(EnclosingMethod obj);
-
-    void visitBootstrapMethods(BootstrapMethods obj);
-
-    void visitMethodParameters(MethodParameters obj);
-}
diff --git a/src/main/java/org/apache/bcel/generic/AALOAD.java b/src/main/java/org/apache/bcel/generic/AALOAD.java
deleted file mode 100644
index 3e3c6c9..0000000
--- a/src/main/java/org/apache/bcel/generic/AALOAD.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * AALOAD - Load reference from array
- * <PRE>Stack: ..., arrayref, index -&gt; value</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class AALOAD extends ArrayInstruction implements StackProducer {
-
-    private static final long serialVersionUID = -8606835203239531080L;
-
-
-    /** Load reference from array
-     */
-    public AALOAD() {
-        super(org.apache.bcel.Constants.AALOAD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitAALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/AASTORE.java b/src/main/java/org/apache/bcel/generic/AASTORE.java
deleted file mode 100644
index 8027f41..0000000
--- a/src/main/java/org/apache/bcel/generic/AASTORE.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * AASTORE -  Store into reference array
- * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class AASTORE extends ArrayInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = -6440799431970565816L;
-
-
-    /** Store into reference array
-     */
-    public AASTORE() {
-        super(org.apache.bcel.Constants.AASTORE);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitAASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ACONST_NULL.java b/src/main/java/org/apache/bcel/generic/ACONST_NULL.java
deleted file mode 100644
index f3abfb7..0000000
--- a/src/main/java/org/apache/bcel/generic/ACONST_NULL.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ACONST_NULL - Push null reference
- * <PRE>Stack: ... -&gt; ..., null</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ACONST_NULL extends Instruction implements PushInstruction, TypedInstruction {
-
-    private static final long serialVersionUID = -4127036801984829715L;
-
-
-    /** 
-     * Push null reference
-     */
-    public ACONST_NULL() {
-        super(org.apache.bcel.Constants.ACONST_NULL, (short) 1);
-    }
-
-
-    /** @return Type.NULL
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.NULL;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitPushInstruction(this);
-        v.visitTypedInstruction(this);
-        v.visitACONST_NULL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ALOAD.java b/src/main/java/org/apache/bcel/generic/ALOAD.java
deleted file mode 100644
index 9b9f05a..0000000
--- a/src/main/java/org/apache/bcel/generic/ALOAD.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ALOAD - Load reference from local variable
- * <PRE>Stack: ... -&gt; ..., objectref</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ALOAD extends LoadInstruction {
-
-    private static final long serialVersionUID = 6993893925210913542L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ALOAD() {
-        super(org.apache.bcel.Constants.ALOAD, org.apache.bcel.Constants.ALOAD_0);
-    }
-
-
-    /** Load reference from local variable
-     * @param n index of local variable
-     */
-    public ALOAD(int n) {
-        super(org.apache.bcel.Constants.ALOAD, org.apache.bcel.Constants.ALOAD_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ANEWARRAY.java b/src/main/java/org/apache/bcel/generic/ANEWARRAY.java
deleted file mode 100644
index 64888b3..0000000
--- a/src/main/java/org/apache/bcel/generic/ANEWARRAY.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * ANEWARRAY -  Create new array of references
- * <PRE>Stack: ..., count -&gt; ..., arrayref</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ANEWARRAY extends CPInstruction implements LoadClass, AllocationInstruction,
-        ExceptionThrower, StackConsumer, StackProducer {
-
-    private static final long serialVersionUID = -3720173810934984310L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ANEWARRAY() {
-    }
-
-
-    public ANEWARRAY(int index) {
-        super(org.apache.bcel.Constants.ANEWARRAY, index);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitLoadClass(this);
-        v.visitAllocationInstruction(this);
-        v.visitExceptionThrower(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitCPInstruction(this);
-        v.visitANEWARRAY(this);
-    }
-
-
-    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
-        Type t = getType(cpg);
-        if (t instanceof ArrayType) {
-            t = ((ArrayType) t).getBasicType();
-        }
-        return (t instanceof ObjectType) ? (ObjectType) t : null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ARETURN.java b/src/main/java/org/apache/bcel/generic/ARETURN.java
deleted file mode 100644
index 9db295e..0000000
--- a/src/main/java/org/apache/bcel/generic/ARETURN.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ARETURN -  Return reference from method
- * <PRE>Stack: ..., objectref -&gt; &lt;empty&gt;</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ARETURN extends ReturnInstruction {
-
-    private static final long serialVersionUID = -3497286197421151311L;
-
-
-    /** 
-     * Return reference from method
-     */
-    public ARETURN() {
-        super(org.apache.bcel.Constants.ARETURN);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitReturnInstruction(this);
-        v.visitARETURN(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ARRAYLENGTH.java b/src/main/java/org/apache/bcel/generic/ARRAYLENGTH.java
deleted file mode 100644
index 86f401e..0000000
--- a/src/main/java/org/apache/bcel/generic/ARRAYLENGTH.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ARRAYLENGTH -  Get length of array
- * <PRE>Stack: ..., arrayref -&gt; ..., length</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ARRAYLENGTH extends Instruction implements ExceptionThrower, StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = 3038891629544391578L;
-
-
-    /** Get length of array
-     */
-    public ARRAYLENGTH() {
-        super(org.apache.bcel.Constants.ARRAYLENGTH, (short) 1);
-    }
-
-
-    /** @return exceptions this instruction may cause
-     */
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitStackProducer(this);
-        v.visitARRAYLENGTH(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ASTORE.java b/src/main/java/org/apache/bcel/generic/ASTORE.java
deleted file mode 100644
index 14a0714..0000000
--- a/src/main/java/org/apache/bcel/generic/ASTORE.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ASTORE - Store reference into local variable
- * <PRE>Stack ..., objectref -&gt; ... </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ASTORE extends StoreInstruction {
-
-    private static final long serialVersionUID = 3598929416636143200L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ASTORE() {
-        super(org.apache.bcel.Constants.ASTORE, org.apache.bcel.Constants.ASTORE_0);
-    }
-
-
-    /** Store reference into local variable
-     * @param n index of local variable
-     */
-    public ASTORE(int n) {
-        super(org.apache.bcel.Constants.ASTORE, org.apache.bcel.Constants.ASTORE_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ATHROW.java b/src/main/java/org/apache/bcel/generic/ATHROW.java
deleted file mode 100644
index d3795e1..0000000
--- a/src/main/java/org/apache/bcel/generic/ATHROW.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ATHROW -  Throw exception
- * <PRE>Stack: ..., objectref -&gt; objectref</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ATHROW extends Instruction implements UnconditionalBranch, ExceptionThrower {
-
-    private static final long serialVersionUID = -5072509566909688739L;
-
-
-    /** 
-     *  Throw exception
-     */
-    public ATHROW() {
-        super(org.apache.bcel.Constants.ATHROW, (short) 1);
-    }
-
-
-    /** @return exceptions this instruction may cause
-     */
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.THROWABLE
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitUnconditionalBranch(this);
-        v.visitExceptionThrower(this);
-        v.visitATHROW(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/AllocationInstruction.java b/src/main/java/org/apache/bcel/generic/AllocationInstruction.java
deleted file mode 100644
index cb755fd..0000000
--- a/src/main/java/org/apache/bcel/generic/AllocationInstruction.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denote family of instructions that allocates space in the heap.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface AllocationInstruction {
-}
diff --git a/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java b/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java
deleted file mode 100644
index 7f0113c..0000000
--- a/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.classfile.AnnotationElementValue;
-import org.apache.bcel.classfile.ElementValue;
-
-/**
- * @since 6.0
- */
-public class AnnotationElementValueGen extends ElementValueGen
-{
-    // For annotation element values, this is the annotation
-    private final AnnotationEntryGen a;
-
-    public AnnotationElementValueGen(AnnotationEntryGen a, ConstantPoolGen cpool)
-    {
-        super(ANNOTATION, cpool);
-        this.a = a;
-    }
-
-    public AnnotationElementValueGen(int type, AnnotationEntryGen annotation,
-            ConstantPoolGen cpool)
-    {
-        super(type, cpool);
-        if (type != ANNOTATION) {
-            throw new RuntimeException(
-                    "Only element values of type annotation can be built with this ctor - type specified: " + type);
-        }
-        this.a = annotation;
-    }
-
-    public AnnotationElementValueGen(AnnotationElementValue value,
-            ConstantPoolGen cpool, boolean copyPoolEntries)
-    {
-        super(ANNOTATION, cpool);
-        a = new AnnotationEntryGen(value.getAnnotationEntry(), cpool, copyPoolEntries);
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 type of value (ANNOTATION == '@')
-        a.dump(dos);
-    }
-
-    @Override
-    public String stringifyValue()
-    {
-        throw new RuntimeException("Not implemented yet");
-    }
-
-    /**
-     * Return immutable variant of this AnnotationElementValueGen
-     */
-    @Override
-    public ElementValue getElementValue()
-    {
-        return new AnnotationElementValue(this.type, a.getAnnotation(), cpGen
-                .getConstantPool());
-    }
-
-    public AnnotationEntryGen getAnnotation()
-    {
-        return a;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java b/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
deleted file mode 100644
index 96fb40f..0000000
--- a/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ElementValuePair;
-import org.apache.bcel.classfile.RuntimeInvisibleAnnotations;
-import org.apache.bcel.classfile.RuntimeInvisibleParameterAnnotations;
-import org.apache.bcel.classfile.RuntimeVisibleAnnotations;
-import org.apache.bcel.classfile.RuntimeVisibleParameterAnnotations;
-
-/**
- * @since 6.0
- */
-public class AnnotationEntryGen {
-    private int typeIndex;
-
-    private List<ElementValuePairGen> evs;
-
-    private final ConstantPoolGen cpool;
-
-    private boolean isRuntimeVisible = false;
-
-    /**
-     * Here we are taking a fixed annotation of type Annotation and building a
-     * modifiable AnnotationGen object. If the pool passed in is for a different
-     * class file, then copyPoolEntries should have been passed as true as that
-     * will force us to do a deep copy of the annotation and move the cpool
-     * entries across. We need to copy the type and the element name value pairs
-     * and the visibility.
-     */
-    public AnnotationEntryGen(AnnotationEntry a, ConstantPoolGen cpool,
-                              boolean copyPoolEntries) {
-        this.cpool = cpool;
-        if (copyPoolEntries) {
-            typeIndex = cpool.addUtf8(a.getAnnotationType());
-        } else {
-            typeIndex = a.getAnnotationTypeIndex();
-        }
-        isRuntimeVisible = a.isRuntimeVisible();
-        evs = copyValues(a.getElementValuePairs(), cpool, copyPoolEntries);
-    }
-
-    private List<ElementValuePairGen> copyValues(ElementValuePair[] in, ConstantPoolGen cpool,
-                                                 boolean copyPoolEntries) {
-        List<ElementValuePairGen> out = new ArrayList<ElementValuePairGen>();
-        for (ElementValuePair nvp : in) {
-            out.add(new ElementValuePairGen(nvp, cpool, copyPoolEntries));
-        }
-        return out;
-    }
-
-    private AnnotationEntryGen(ConstantPoolGen cpool) {
-        this.cpool = cpool;
-    }
-
-    /**
-     * Retrieve an immutable version of this AnnotationGen
-     */
-    public AnnotationEntry getAnnotation() {
-        AnnotationEntry a = new AnnotationEntry(typeIndex, cpool.getConstantPool(),
-                isRuntimeVisible);
-        for (ElementValuePairGen element : evs) {
-            a.addElementNameValuePair(element.getElementNameValuePair());
-        }
-        return a;
-    }
-
-    public AnnotationEntryGen(ObjectType type,
-                              List<ElementValuePairGen> elements, boolean vis,
-                              ConstantPoolGen cpool) {
-        this.cpool = cpool;
-        this.typeIndex = cpool.addUtf8(type.getSignature());
-        evs = elements;
-        isRuntimeVisible = vis;
-    }
-
-    public static AnnotationEntryGen read(DataInput dis,
-                                          ConstantPoolGen cpool, boolean b) throws IOException {
-        AnnotationEntryGen a = new AnnotationEntryGen(cpool);
-        a.typeIndex = dis.readUnsignedShort();
-        int elemValuePairCount = dis.readUnsignedShort();
-        for (int i = 0; i < elemValuePairCount; i++) {
-            int nidx = dis.readUnsignedShort();
-            a.addElementNameValuePair(new ElementValuePairGen(nidx,
-                    ElementValueGen.readElementValue(dis, cpool), cpool));
-        }
-        a.isRuntimeVisible(b);
-        return a;
-    }
-
-    public void dump(DataOutputStream dos) throws IOException {
-        dos.writeShort(typeIndex); // u2 index of type name in cpool
-        dos.writeShort(evs.size()); // u2 element_value pair count
-        for (ElementValuePairGen envp : evs) {
-            envp.dump(dos);
-        }
-    }
-
-    public void addElementNameValuePair(ElementValuePairGen evp) {
-        if (evs == null) {
-            evs = new ArrayList<ElementValuePairGen>();
-        }
-        evs.add(evp);
-    }
-
-    public int getTypeIndex() {
-        return typeIndex;
-    }
-
-    public final String getTypeSignature() {
-        // ConstantClass c = (ConstantClass)cpool.getConstant(typeIndex);
-        ConstantUtf8 utf8 = (ConstantUtf8) cpool
-                .getConstant(typeIndex/* c.getNameIndex() */);
-        return utf8.getBytes();
-    }
-
-    public final String getTypeName() {
-        return getTypeSignature();// BCELBUG: Should I use this instead?
-        // Utility.signatureToString(getTypeSignature());
-    }
-
-    /**
-     * Returns list of ElementNameValuePair objects
-     */
-    public List<ElementValuePairGen> getValues() {
-        return evs;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder s = new StringBuilder(32);
-        s.append("AnnotationGen:[" + getTypeName() + " #" + evs.size() + " {");
-        for (int i = 0; i < evs.size(); i++) {
-            s.append(evs.get(i));
-            if (i + 1 < evs.size()) {
-                s.append(",");
-            }
-        }
-        s.append("}]");
-        return s.toString();
-    }
-
-    public String toShortString() {
-        StringBuilder s = new StringBuilder();
-        s.append("@" + getTypeName() + "(");
-        for (int i = 0; i < evs.size(); i++) {
-            s.append(evs.get(i));
-            if (i + 1 < evs.size()) {
-                s.append(",");
-            }
-        }
-        s.append(")");
-        return s.toString();
-    }
-
-    private void isRuntimeVisible(boolean b) {
-        isRuntimeVisible = b;
-    }
-
-    public boolean isRuntimeVisible() {
-        return isRuntimeVisible;
-    }
-
-
-    /**
-     * Converts a list of AnnotationGen objects into a set of attributes
-     * that can be attached to the class file.
-     *
-     * @param cp  The constant pool gen where we can create the necessary name refs
-     * @param vec A list of AnnotationGen objects
-     */
-    static Attribute[] getAnnotationAttributes(ConstantPoolGen cp, List<AnnotationEntryGen> vec) {
-        if (vec.isEmpty()) {
-            return new Attribute[0];
-        }
-
-        try {
-            int countVisible = 0;
-            int countInvisible = 0;
-
-            //  put the annotations in the right output stream
-            for (AnnotationEntryGen a : vec) {
-                if (a.isRuntimeVisible()) {
-                    countVisible++;
-                } else {
-                    countInvisible++;
-                }
-            }
-
-            ByteArrayOutputStream rvaBytes = new ByteArrayOutputStream();
-            ByteArrayOutputStream riaBytes = new ByteArrayOutputStream();
-            DataOutputStream rvaDos = new DataOutputStream(rvaBytes);
-            DataOutputStream riaDos = new DataOutputStream(riaBytes);
-
-            rvaDos.writeShort(countVisible);
-            riaDos.writeShort(countInvisible);
-
-            // put the annotations in the right output stream
-            for (AnnotationEntryGen a : vec) {
-                if (a.isRuntimeVisible()) {
-                    a.dump(rvaDos);
-                } else {
-                    a.dump(riaDos);
-                }
-            }
-
-            rvaDos.close();
-            riaDos.close();
-
-            byte[] rvaData = rvaBytes.toByteArray();
-            byte[] riaData = riaBytes.toByteArray();
-
-            int rvaIndex = -1;
-            int riaIndex = -1;
-
-            if (rvaData.length > 2) {
-                rvaIndex = cp.addUtf8("RuntimeVisibleAnnotations");
-            }
-            if (riaData.length > 2) {
-                riaIndex = cp.addUtf8("RuntimeInvisibleAnnotations");
-            }
-
-            List<Attribute> newAttributes = new ArrayList<Attribute>();
-            if (rvaData.length > 2) {
-                newAttributes.add(
-                        new RuntimeVisibleAnnotations(rvaIndex, rvaData.length, new DataInputStream(new ByteArrayInputStream(rvaData)), cp.getConstantPool()));
-            }
-            if (riaData.length > 2) {
-                newAttributes.add(
-                        new RuntimeInvisibleAnnotations(riaIndex, riaData.length, new DataInputStream(new ByteArrayInputStream(riaData)), cp.getConstantPool()));
-            }
-
-            return newAttributes.toArray(new Attribute[newAttributes.size()]);
-        } catch (IOException e) {
-            System.err.println("IOException whilst processing annotations");
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-
-    /**
-     * Annotations against a class are stored in one of four attribute kinds:
-     * - RuntimeVisibleParameterAnnotations
-     * - RuntimeInvisibleParameterAnnotations
-     */
-    static Attribute[] getParameterAnnotationAttributes(
-            ConstantPoolGen cp,
-            List<AnnotationEntryGen>[] /*Array of lists, array size depends on #params */vec) {
-        int visCount[] = new int[vec.length];
-        int totalVisCount = 0;
-        int invisCount[] = new int[vec.length];
-        int totalInvisCount = 0;
-        try {
-            for (int i = 0; i < vec.length; i++) {
-                if (vec[i] != null) {
-                    for (AnnotationEntryGen element : vec[i]) {
-                        if (element.isRuntimeVisible()) {
-                            visCount[i]++;
-                            totalVisCount++;
-                        } else {
-                            invisCount[i]++;
-                            totalInvisCount++;
-                        }
-                    }
-                }
-            }
-            // Lets do the visible ones
-            ByteArrayOutputStream rvaBytes = new ByteArrayOutputStream();
-            DataOutputStream rvaDos = new DataOutputStream(rvaBytes);
-            rvaDos.writeByte(vec.length); // First goes number of parameters
-            for (int i = 0; i < vec.length; i++) {
-                rvaDos.writeShort(visCount[i]);
-                if (visCount[i] > 0) {
-                    for (AnnotationEntryGen element : vec[i]) {
-                        if (element.isRuntimeVisible()) {
-                            element.dump(rvaDos);
-                        }
-                    }
-                }
-            }
-            rvaDos.close();
-            // Lets do the invisible ones
-            ByteArrayOutputStream riaBytes = new ByteArrayOutputStream();
-            DataOutputStream riaDos = new DataOutputStream(riaBytes);
-            riaDos.writeByte(vec.length); // First goes number of parameters
-            for (int i = 0; i < vec.length; i++) {
-                riaDos.writeShort(invisCount[i]);
-                if (invisCount[i] > 0) {
-                    for (AnnotationEntryGen element : vec[i]) {
-                        if (!element.isRuntimeVisible()) {
-                            element.dump(riaDos);
-                        }
-                    }
-                }
-            }
-            riaDos.close();
-            byte[] rvaData = rvaBytes.toByteArray();
-            byte[] riaData = riaBytes.toByteArray();
-            int rvaIndex = -1;
-            int riaIndex = -1;
-            if (totalVisCount > 0) {
-                rvaIndex = cp.addUtf8("RuntimeVisibleParameterAnnotations");
-            }
-            if (totalInvisCount > 0) {
-                riaIndex = cp.addUtf8("RuntimeInvisibleParameterAnnotations");
-            }
-            List<Attribute> newAttributes = new ArrayList<Attribute>();
-            if (totalVisCount > 0) {
-                newAttributes
-                        .add(new RuntimeVisibleParameterAnnotations(rvaIndex,
-                                rvaData.length, new DataInputStream(new ByteArrayInputStream(rvaData)), cp.getConstantPool()));
-            }
-            if (totalInvisCount > 0) {
-                newAttributes
-                        .add(new RuntimeInvisibleParameterAnnotations(riaIndex,
-                                riaData.length, new DataInputStream(new ByteArrayInputStream(riaData)), cp.getConstantPool()));
-            }
-            return newAttributes.toArray(new Attribute[newAttributes.size()]);
-        } catch (IOException e) {
-            System.err
-                    .println("IOException whilst processing parameter annotations");
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-}
diff --git a/src/main/java/org/apache/bcel/generic/ArithmeticInstruction.java b/src/main/java/org/apache/bcel/generic/ArithmeticInstruction.java
deleted file mode 100644
index caa7124..0000000
--- a/src/main/java/org/apache/bcel/generic/ArithmeticInstruction.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-
-/**
- * Super class for the family of arithmetic instructions.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class ArithmeticInstruction extends Instruction implements TypedInstruction,
-        StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = 5027221136148765144L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ArithmeticInstruction() {
-    }
-
-
-    /**
-     * @param opcode of instruction
-     */
-    protected ArithmeticInstruction(short opcode) {
-        super(opcode, (short) 1);
-    }
-
-
-    /** @return type associated with the instruction
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        switch (opcode) {
-            case Constants.DADD:
-            case Constants.DDIV:
-            case Constants.DMUL:
-            case Constants.DNEG:
-            case Constants.DREM:
-            case Constants.DSUB:
-                return Type.DOUBLE;
-            case Constants.FADD:
-            case Constants.FDIV:
-            case Constants.FMUL:
-            case Constants.FNEG:
-            case Constants.FREM:
-            case Constants.FSUB:
-                return Type.FLOAT;
-            case Constants.IADD:
-            case Constants.IAND:
-            case Constants.IDIV:
-            case Constants.IMUL:
-            case Constants.INEG:
-            case Constants.IOR:
-            case Constants.IREM:
-            case Constants.ISHL:
-            case Constants.ISHR:
-            case Constants.ISUB:
-            case Constants.IUSHR:
-            case Constants.IXOR:
-                return Type.INT;
-            case Constants.LADD:
-            case Constants.LAND:
-            case Constants.LDIV:
-            case Constants.LMUL:
-            case Constants.LNEG:
-            case Constants.LOR:
-            case Constants.LREM:
-            case Constants.LSHL:
-            case Constants.LSHR:
-            case Constants.LSUB:
-            case Constants.LUSHR:
-            case Constants.LXOR:
-                return Type.LONG;
-            default: // Never reached
-                throw new ClassGenException("Unknown type " + opcode);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java b/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
deleted file mode 100644
index cc361be..0000000
--- a/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.bcel.classfile.ArrayElementValue;
-import org.apache.bcel.classfile.ElementValue;
-
-/**
- * @since 6.0
- */
-public class ArrayElementValueGen extends ElementValueGen
-{
-    // J5TODO: Should we make this an array or a list? A list would be easier to
-    // modify ...
-    private final List<ElementValueGen> evalues;
-
-    public ArrayElementValueGen(ConstantPoolGen cp)
-    {
-        super(ARRAY, cp);
-        evalues = new ArrayList<ElementValueGen>();
-    }
-
-    public ArrayElementValueGen(int type, ElementValue[] datums,
-            ConstantPoolGen cpool)
-    {
-        super(type, cpool);
-        if (type != ARRAY) {
-            throw new RuntimeException(
-                    "Only element values of type array can be built with this ctor - type specified: " + type);
-        }
-        this.evalues = new ArrayList<ElementValueGen>();
-        for (ElementValue datum : datums) {
-            evalues.add(ElementValueGen.copy(datum, cpool, true));
-        }
-    }
-
-    /**
-     * Return immutable variant of this ArrayElementValueGen
-     */
-    @Override
-    public ElementValue getElementValue()
-    {
-        ElementValue[] immutableData = new ElementValue[evalues.size()];
-        int i = 0;
-        for (ElementValueGen element : evalues) {
-            immutableData[i++] = element.getElementValue();
-        }
-        return new ArrayElementValue(type, immutableData, cpGen
-                .getConstantPool());
-    }
-
-    /**
-     * @param value
-     * @param cpool
-     */
-    public ArrayElementValueGen(ArrayElementValue value, ConstantPoolGen cpool,
-            boolean copyPoolEntries)
-    {
-        super(ARRAY, cpool);
-        evalues = new ArrayList<ElementValueGen>();
-        ElementValue[] in = value.getElementValuesArray();
-        for (ElementValue element : in) {
-            evalues.add(ElementValueGen.copy(element, cpool, copyPoolEntries));
-        }
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 type of value (ARRAY == '[')
-        dos.writeShort(evalues.size());
-        for (ElementValueGen element : evalues) {
-            element.dump(dos);
-        }
-    }
-
-    @Override
-    public String stringifyValue()
-    {
-        StringBuilder sb = new StringBuilder();
-        sb.append("[");
-        String comma = "";
-        for (ElementValueGen element : evalues) {
-            sb.append(comma);
-            comma = ",";
-            sb.append(element.stringifyValue());
-        }
-        sb.append("]");
-        return sb.toString();
-    }
-
-    public List<ElementValueGen> getElementValues()
-    {
-        return evalues;
-    }
-
-    public int getElementValuesSize()
-    {
-        return evalues.size();
-    }
-
-    public void addElement(ElementValueGen gen)
-    {
-        evalues.add(gen);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ArrayInstruction.java b/src/main/java/org/apache/bcel/generic/ArrayInstruction.java
deleted file mode 100644
index 053fd33..0000000
--- a/src/main/java/org/apache/bcel/generic/ArrayInstruction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Super class for instructions dealing with array access such as IALOAD.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class ArrayInstruction extends Instruction implements ExceptionThrower,
-        TypedInstruction {
-
-    private static final long serialVersionUID = 1355074014869910296L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ArrayInstruction() {
-    }
-
-
-    /**
-     * @param opcode of instruction
-     */
-    protected ArrayInstruction(short opcode) {
-        super(opcode, (short) 1);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return org.apache.bcel.ExceptionConstants.EXCS_ARRAY_EXCEPTION;
-    }
-
-
-    /** @return type associated with the instruction
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        switch (opcode) {
-            case org.apache.bcel.Constants.IALOAD:
-            case org.apache.bcel.Constants.IASTORE:
-                return Type.INT;
-            case org.apache.bcel.Constants.CALOAD:
-            case org.apache.bcel.Constants.CASTORE:
-                return Type.CHAR;
-            case org.apache.bcel.Constants.BALOAD:
-            case org.apache.bcel.Constants.BASTORE:
-                return Type.BYTE;
-            case org.apache.bcel.Constants.SALOAD:
-            case org.apache.bcel.Constants.SASTORE:
-                return Type.SHORT;
-            case org.apache.bcel.Constants.LALOAD:
-            case org.apache.bcel.Constants.LASTORE:
-                return Type.LONG;
-            case org.apache.bcel.Constants.DALOAD:
-            case org.apache.bcel.Constants.DASTORE:
-                return Type.DOUBLE;
-            case org.apache.bcel.Constants.FALOAD:
-            case org.apache.bcel.Constants.FASTORE:
-                return Type.FLOAT;
-            case org.apache.bcel.Constants.AALOAD:
-            case org.apache.bcel.Constants.AASTORE:
-                return Type.OBJECT;
-            default:
-                throw new ClassGenException("Oops: unknown case in switch" + opcode);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ArrayType.java b/src/main/java/org/apache/bcel/generic/ArrayType.java
deleted file mode 100644
index 79fef4d..0000000
--- a/src/main/java/org/apache/bcel/generic/ArrayType.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-
-/** 
- * Denotes array type, such as int[][]
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class ArrayType extends ReferenceType {
-
-    private static final long serialVersionUID = 7587687059797903734L;
-    private int dimensions;
-    private Type basic_type;
-
-
-    /**
-     * Convenience constructor for array type, e.g. int[]
-     *
-     * @param type array type, e.g. T_INT
-     */
-    public ArrayType(byte type, int dimensions) {
-        this(BasicType.getType(type), dimensions);
-    }
-
-
-    /**
-     * Convenience constructor for reference array type, e.g. Object[]
-     *
-     * @param class_name complete name of class (java.lang.String, e.g.)
-     */
-    public ArrayType(String class_name, int dimensions) {
-        this(ObjectType.getInstance(class_name), dimensions);
-    }
-
-
-    /**
-     * Constructor for array of given type
-     *
-     * @param type type of array (may be an array itself)
-     */
-    public ArrayType(Type type, int dimensions) {
-        super(Constants.T_ARRAY, "<dummy>");
-        if ((dimensions < 1) || (dimensions > Constants.MAX_BYTE)) {
-            throw new ClassGenException("Invalid number of dimensions: " + dimensions);
-        }
-        switch (type.getType()) {
-            case Constants.T_ARRAY:
-                ArrayType array = (ArrayType) type;
-                this.dimensions = dimensions + array.dimensions;
-                basic_type = array.basic_type;
-                break;
-            case Constants.T_VOID:
-                throw new ClassGenException("Invalid type: void[]");
-            default: // Basic type or reference
-                this.dimensions = dimensions;
-                basic_type = type;
-                break;
-        }
-        StringBuilder buf = new StringBuilder();
-        for (int i = 0; i < this.dimensions; i++) {
-            buf.append('[');
-        }
-        buf.append(basic_type.getSignature());
-        signature = buf.toString();
-    }
-
-
-    /**
-     * @return basic type of array, i.e., for int[][][] the basic type is int
-     */
-    public Type getBasicType() {
-        return basic_type;
-    }
-
-
-    /**
-     * @return element type of array, i.e., for int[][][] the element type is int[][]
-     */
-    public Type getElementType() {
-        if (dimensions == 1) {
-            return basic_type;
-        }
-        return new ArrayType(basic_type, dimensions - 1);
-    }
-
-
-    /** @return number of dimensions of array
-     */
-    public int getDimensions() {
-        return dimensions;
-    }
-
-
-    /** @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() {
-        return basic_type.hashCode() ^ dimensions;
-    }
-
-
-    /** @return true if both type objects refer to the same array type.
-     */
-    @Override
-    public boolean equals( Object _type ) {
-        if (_type instanceof ArrayType) {
-            ArrayType array = (ArrayType) _type;
-            return (array.dimensions == dimensions) && array.basic_type.equals(basic_type);
-        }
-        return false;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/BALOAD.java b/src/main/java/org/apache/bcel/generic/BALOAD.java
deleted file mode 100644
index 1586d51..0000000
--- a/src/main/java/org/apache/bcel/generic/BALOAD.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * BALOAD - Load byte or boolean from array
- * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class BALOAD extends ArrayInstruction implements StackProducer {
-
-    private static final long serialVersionUID = -849061295095748102L;
-
-
-    /** Load byte or boolean from array
-     */
-    public BALOAD() {
-        super(org.apache.bcel.Constants.BALOAD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitBALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/BASTORE.java b/src/main/java/org/apache/bcel/generic/BASTORE.java
deleted file mode 100644
index b1c7570..0000000
--- a/src/main/java/org/apache/bcel/generic/BASTORE.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * BASTORE -  Store into byte or boolean array
- * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class BASTORE extends ArrayInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = 1127770065463906050L;
-
-
-    /** Store byte or boolean into array
-     */
-    public BASTORE() {
-        super(org.apache.bcel.Constants.BASTORE);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitBASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/BIPUSH.java b/src/main/java/org/apache/bcel/generic/BIPUSH.java
deleted file mode 100644
index b9bf205..0000000
--- a/src/main/java/org/apache/bcel/generic/BIPUSH.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * BIPUSH - Push byte on stack
- *
- * <PRE>Stack: ... -&gt; ..., value</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class BIPUSH extends Instruction implements ConstantPushInstruction {
-
-    private static final long serialVersionUID = -6859389515217572656L;
-    private byte b;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    BIPUSH() {
-    }
-
-
-    /** Push byte on stack
-     */
-    public BIPUSH(byte b) {
-        super(org.apache.bcel.Constants.BIPUSH, (short) 2);
-        this.b = b;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        super.dump(out);
-        out.writeByte(b);
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + b;
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        length = 2;
-        b = bytes.readByte();
-    }
-
-
-    public Number getValue() {
-        return Integer.valueOf(b);
-    }
-
-
-    /** @return Type.BYTE
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.BYTE;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitPushInstruction(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitConstantPushInstruction(this);
-        v.visitBIPUSH(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/BREAKPOINT.java b/src/main/java/org/apache/bcel/generic/BREAKPOINT.java
deleted file mode 100644
index fc1c49d..0000000
--- a/src/main/java/org/apache/bcel/generic/BREAKPOINT.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * BREAKPOINT, JVM dependent, ignored by default
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class BREAKPOINT extends Instruction {
-
-    private static final long serialVersionUID = -4186956277760244254L;
-
-
-    public BREAKPOINT() {
-        super(org.apache.bcel.Constants.BREAKPOINT, (short) 1);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitBREAKPOINT(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/BasicType.java b/src/main/java/org/apache/bcel/generic/BasicType.java
deleted file mode 100644
index 93b7a3b..0000000
--- a/src/main/java/org/apache/bcel/generic/BasicType.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-
-/** 
- * Denotes basic type such as int.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class BasicType extends Type {
-
-    private static final long serialVersionUID = -6546010740455512176L;
-
-
-    /**
-     * Constructor for basic types such as int, long, `void'
-     *
-     * @param type one of T_INT, T_BOOLEAN, ..., T_VOID
-     * @see org.apache.bcel.Constants
-     */
-    BasicType(byte type) {
-        super(type, Constants.SHORT_TYPE_NAMES[type]);
-        if ((type < Constants.T_BOOLEAN) || (type > Constants.T_VOID)) {
-            throw new ClassGenException("Invalid type: " + type);
-        }
-    }
-
-
-    public static BasicType getType( byte type ) {
-        switch (type) {
-            case Constants.T_VOID:
-                return VOID;
-            case Constants.T_BOOLEAN:
-                return BOOLEAN;
-            case Constants.T_BYTE:
-                return BYTE;
-            case Constants.T_SHORT:
-                return SHORT;
-            case Constants.T_CHAR:
-                return CHAR;
-            case Constants.T_INT:
-                return INT;
-            case Constants.T_LONG:
-                return LONG;
-            case Constants.T_DOUBLE:
-                return DOUBLE;
-            case Constants.T_FLOAT:
-                return FLOAT;
-            default:
-                throw new ClassGenException("Invalid type: " + type);
-        }
-    }
-
-
-    /** @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() {
-        return type;
-    }
-
-
-    /** @return true if both type objects refer to the same type
-     */
-    @Override
-    public boolean equals( Object _type ) {
-        return (_type instanceof BasicType) ? ((BasicType) _type).type == this.type : false;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/BranchHandle.java b/src/main/java/org/apache/bcel/generic/BranchHandle.java
deleted file mode 100644
index 1b70164..0000000
--- a/src/main/java/org/apache/bcel/generic/BranchHandle.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * BranchHandle is returned by specialized InstructionList.append() whenever a
- * BranchInstruction is appended. This is useful when the target of this
- * instruction is not known at time of creation and must be set later
- * via setTarget().
- *
- * @see InstructionHandle
- * @see Instruction
- * @see InstructionList
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class BranchHandle extends InstructionHandle {
-
-    private static final long serialVersionUID = -2520878285698255956L;
-    private BranchInstruction bi; // An alias in fact, but saves lots of casts
-
-
-    private BranchHandle(BranchInstruction i) {
-        super(i);
-        bi = i;
-    }
-
-    /** Factory methods.
-     */
-    private static BranchHandle bh_list = null; // List of reusable handles
-
-
-    static BranchHandle getBranchHandle( BranchInstruction i ) {
-        if (bh_list == null) {
-            return new BranchHandle(i);
-        }
-        BranchHandle bh = bh_list;
-        bh_list = (BranchHandle) bh.next;
-        bh.setInstruction(i);
-        return bh;
-    }
-
-
-    /** Handle adds itself to the list of resuable handles.
-     */
-    @Override
-    protected void addHandle() {
-        next = bh_list;
-        bh_list = this;
-    }
-
-
-    /* Override InstructionHandle methods: delegate to branch instruction.
-     * Through this overriding all access to the private i_position field should
-     * be prevented.
-     */
-    @Override
-    public int getPosition() {
-        return bi.position;
-    }
-
-
-    @Override
-    void setPosition( int pos ) {
-        i_position = bi.position = pos;
-    }
-
-
-    @Override
-    protected int updatePosition( int offset, int max_offset ) {
-        int x = bi.updatePosition(offset, max_offset);
-        i_position = bi.position;
-        return x;
-    }
-
-
-    /**
-     * Pass new target to instruction.
-     */
-    public void setTarget( InstructionHandle ih ) {
-        bi.setTarget(ih);
-    }
-
-
-    /**
-     * Update target of instruction.
-     */
-    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
-        bi.updateTarget(old_ih, new_ih);
-    }
-
-
-    /**
-     * @return target of instruction.
-     */
-    public InstructionHandle getTarget() {
-        return bi.getTarget();
-    }
-
-
-    /** 
-     * Set new contents. Old instruction is disposed and may not be used anymore.
-     */
-    @Override
-    public void setInstruction( Instruction i ) {
-        super.setInstruction(i);
-        if (!(i instanceof BranchInstruction)) {
-            throw new ClassGenException("Assigning " + i
-                    + " to branch handle which is not a branch instruction");
-        }
-        bi = (BranchInstruction) i;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/BranchInstruction.java b/src/main/java/org/apache/bcel/generic/BranchInstruction.java
deleted file mode 100644
index d8f0eaf..0000000
--- a/src/main/java/org/apache/bcel/generic/BranchInstruction.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * Abstract super class for branching instructions like GOTO, IFEQ, etc..
- * Branch instructions may have a variable length, namely GOTO, JSR, 
- * LOOKUPSWITCH and TABLESWITCH.
- *
- * @see InstructionList
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class BranchInstruction extends Instruction implements InstructionTargeter {
-
-    private static final long serialVersionUID = 3225905281842405051L;
-    protected int index; // Branch target relative to this instruction
-    protected InstructionHandle target; // Target object in instruction list
-    protected int position; // Byte code offset
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    BranchInstruction() {
-    }
-
-
-    /** Common super constructor
-     * @param opcode Instruction opcode
-     * @param target instruction to branch to
-     */
-    protected BranchInstruction(short opcode, InstructionHandle target) {
-        super(opcode, (short) 3);
-        setTarget(target);
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        index = getTargetOffset();
-        if (Math.abs(index) >= 32767) {
-            throw new ClassGenException("Branch target offset too large for short: " + index);
-        }
-        out.writeShort(index); // May be negative, i.e., point backwards
-    }
-
-
-    /**
-     * @param _target branch target
-     * @return the offset to  `target' relative to this instruction
-     */
-    protected int getTargetOffset( InstructionHandle _target ) {
-        if (_target == null) {
-            throw new ClassGenException("Target of " + super.toString(true)
-                    + " is invalid null handle");
-        }
-        int t = _target.getPosition();
-        if (t < 0) {
-            throw new ClassGenException("Invalid branch target position offset for "
-                    + super.toString(true) + ":" + t + ":" + _target);
-        }
-        return t - position;
-    }
-
-
-    /**
-     * @return the offset to this instruction's target
-     */
-    protected int getTargetOffset() {
-        return getTargetOffset(target);
-    }
-
-
-    /**
-     * Called by InstructionList.setPositions when setting the position for every
-     * instruction. In the presence of variable length instructions `setPositions'
-     * performs multiple passes over the instruction list to calculate the
-     * correct (byte) positions and offsets by calling this function.
-     *
-     * @param offset additional offset caused by preceding (variable length) instructions
-     * @param max_offset the maximum offset that may be caused by these instructions
-     * @return additional offset caused by possible change of this instruction's length
-     */
-    protected int updatePosition( int offset, int max_offset ) {
-        position += offset;
-        return 0;
-    }
-
-
-    /**
-     * Long output format:
-     *
-     * &lt;position in byte code&gt;
-     * &lt;name of opcode&gt; "["&lt;opcode number&gt;"]" 
-     * "("&lt;length of instruction&gt;")"
-     * "&lt;"&lt;target instruction&gt;"&gt;" "@"&lt;branch target offset&gt;
-     *
-     * @param verbose long/short format switch
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        String s = super.toString(verbose);
-        String t = "null";
-        if (verbose) {
-            if (target != null) {
-                if (target.getInstruction() == this) {
-                    t = "<points to itself>";
-                } else if (target.getInstruction() == null) {
-                    t = "<null instruction!!!?>";
-                } else {
-                    t = target.getInstruction().toString(false); // Avoid circles
-                }
-            }
-        } else {
-            if (target != null) {
-                index = getTargetOffset();
-                t = "" + (index + position);
-            }
-        }
-        return s + " -> " + t;
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file. Conversion to a InstructionHandle
-     * is done in InstructionList(byte[]).
-     *
-     * @param bytes input stream
-     * @param wide wide prefix?
-     * @see InstructionList
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        length = 3;
-        index = bytes.readShort();
-    }
-
-
-    /**
-     * @return target offset in byte code
-     */
-    public final int getIndex() {
-        return index;
-    }
-
-
-    /**
-     * @return target of branch instruction
-     */
-    public InstructionHandle getTarget() {
-        return target;
-    }
-
-
-    /**
-     * Set branch target
-     * @param target branch target
-     */
-    public void setTarget( InstructionHandle target ) {
-        notifyTarget(this.target, target, this);
-        this.target = target;
-    }
-
-
-    /**
-     * Used by BranchInstruction, LocalVariableGen, CodeExceptionGen
-     */
-    static void notifyTarget( InstructionHandle old_ih, InstructionHandle new_ih,
-            InstructionTargeter t ) {
-        if (old_ih != null) {
-            old_ih.removeTargeter(t);
-        }
-        if (new_ih != null) {
-            new_ih.addTargeter(t);
-        }
-    }
-
-
-    /**
-     * @param old_ih old target
-     * @param new_ih new target
-     */
-    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
-        if (target == old_ih) {
-            setTarget(new_ih);
-        } else {
-            throw new ClassGenException("Not targeting " + old_ih + ", but " + target);
-        }
-    }
-
-
-    /**
-     * @return true, if ih is target of this instruction
-     */
-    public boolean containsTarget( InstructionHandle ih ) {
-        return (target == ih);
-    }
-
-
-    /**
-     * Inform target that it's not targeted anymore.
-     */
-    @Override
-    void dispose() {
-        setTarget(null);
-        index = -1;
-        position = -1;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/CALOAD.java b/src/main/java/org/apache/bcel/generic/CALOAD.java
deleted file mode 100644
index d64de8f..0000000
--- a/src/main/java/org/apache/bcel/generic/CALOAD.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * CALOAD - Load char from array
- * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class CALOAD extends ArrayInstruction implements StackProducer {
-
-    private static final long serialVersionUID = -2085721349377637959L;
-
-
-    /** Load char from array
-     */
-    public CALOAD() {
-        super(org.apache.bcel.Constants.CALOAD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitCALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/CASTORE.java b/src/main/java/org/apache/bcel/generic/CASTORE.java
deleted file mode 100644
index 76043b5..0000000
--- a/src/main/java/org/apache/bcel/generic/CASTORE.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * CASTORE -  Store into char array
- * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class CASTORE extends ArrayInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = -4021755905444053495L;
-
-
-    /** Store char into array
-     */
-    public CASTORE() {
-        super(org.apache.bcel.Constants.CASTORE);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitCASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/CHECKCAST.java b/src/main/java/org/apache/bcel/generic/CHECKCAST.java
deleted file mode 100644
index b280f2e..0000000
--- a/src/main/java/org/apache/bcel/generic/CHECKCAST.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * CHECKCAST - Check whether object is of given type
- * <PRE>Stack: ..., objectref -&gt; ..., objectref</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class CHECKCAST extends CPInstruction implements LoadClass, ExceptionThrower, StackProducer,
-        StackConsumer {
-
-    private static final long serialVersionUID = 1227128733786393518L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    CHECKCAST() {
-    }
-
-
-    /** Check whether object is of given type
-     * @param index index to class in constant pool
-     */
-    public CHECKCAST(int index) {
-        super(org.apache.bcel.Constants.CHECKCAST, index);
-    }
-
-
-    /** @return exceptions this instruction may cause
-     */
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.CLASS_CAST_EXCEPTION;
-        return cs;
-    }
-
-
-    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
-        Type t = getType(cpg);
-        if (t instanceof ArrayType) {
-            t = ((ArrayType) t).getBasicType();
-        }
-        return (t instanceof ObjectType) ? (ObjectType) t : null;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitLoadClass(this);
-        v.visitExceptionThrower(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitTypedInstruction(this);
-        v.visitCPInstruction(this);
-        v.visitCHECKCAST(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/CPInstruction.java b/src/main/java/org/apache/bcel/generic/CPInstruction.java
deleted file mode 100644
index 74e51df..0000000
--- a/src/main/java/org/apache/bcel/generic/CPInstruction.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * Abstract super class for instructions that use an index into the 
- * constant pool such as LDC, INVOKEVIRTUAL, etc.
- *
- * @see ConstantPoolGen
- * @see LDC
- * @see INVOKEVIRTUAL
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class CPInstruction extends Instruction implements TypedInstruction,
-        IndexedInstruction {
-
-    private static final long serialVersionUID = 2968547649792233082L;
-    protected int index; // index to constant pool
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    CPInstruction() {
-    }
-
-
-    /**
-     * @param index to constant pool
-     */
-    protected CPInstruction(short opcode, int index) {
-        super(opcode, (short) 3);
-        setIndex(index);
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        out.writeShort(index);
-    }
-
-
-    /**
-     * Long output format:
-     *
-     * &lt;name of opcode&gt; "["&lt;opcode number&gt;"]" 
-     * "("&lt;length of instruction&gt;")" "&lt;"&lt; constant pool index&gt;"&gt;"
-     *
-     * @param verbose long/short format switch
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + index;
-    }
-
-
-    /**
-     * @return mnemonic for instruction with symbolic references resolved
-     */
-    @Override
-    public String toString( ConstantPool cp ) {
-        Constant c = cp.getConstant(index);
-        String str = cp.constantToString(c);
-        if (c instanceof ConstantClass) {
-            str = str.replace('.', '/');
-        }
-        return org.apache.bcel.Constants.OPCODE_NAMES[opcode] + " " + str;
-    }
-
-
-    /**
-     * Read needed data (i.e., index) from file.
-     * @param bytes input stream
-     * @param wide wide prefix?
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        setIndex(bytes.readUnsignedShort());
-        length = 3;
-    }
-
-
-    /**
-     * @return index in constant pool referred by this instruction.
-     */
-    public final int getIndex() {
-        return index;
-    }
-
-
-    /**
-     * Set the index to constant pool.
-     * @param index in  constant pool.
-     */
-    public void setIndex( int index ) {
-        if (index < 0) {
-            throw new ClassGenException("Negative index value: " + index);
-        }
-        this.index = index;
-    }
-
-
-    /** @return type related with this instruction.
-     */
-    public Type getType( ConstantPoolGen cpg ) {
-        ConstantPool cp = cpg.getConstantPool();
-        String name = cp.getConstantString(index, org.apache.bcel.Constants.CONSTANT_Class);
-        if (!name.startsWith("[")) {
-            name = "L" + name + ";";
-        }
-        return Type.getType(name);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ClassElementValueGen.java b/src/main/java/org/apache/bcel/generic/ClassElementValueGen.java
deleted file mode 100644
index 9349383..0000000
--- a/src/main/java/org/apache/bcel/generic/ClassElementValueGen.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.classfile.ElementValue;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ClassElementValue;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.ElementValueGen;
-
-/**
- * @since 6.0
- */
-public class ClassElementValueGen extends ElementValueGen
-{
-    // For primitive types and string type, this points to the value entry in
-    // the cpool
-    // For 'class' this points to the class entry in the cpool
-    private int idx;
-
-    protected ClassElementValueGen(int typeIdx, ConstantPoolGen cpool)
-    {
-        super(ElementValueGen.CLASS, cpool);
-        this.idx = typeIdx;
-    }
-
-    public ClassElementValueGen(ObjectType t, ConstantPoolGen cpool)
-    {
-        super(ElementValueGen.CLASS, cpool);
-        // this.idx = cpool.addClass(t);
-        idx = cpool.addUtf8(t.getSignature());
-    }
-
-    /**
-     * Return immutable variant of this ClassElementValueGen
-     */
-    @Override
-    public ElementValue getElementValue()
-    {
-        return new ClassElementValue(type, idx, cpGen.getConstantPool());
-    }
-
-    public ClassElementValueGen(ClassElementValue value, ConstantPoolGen cpool,
-            boolean copyPoolEntries)
-    {
-        super(CLASS, cpool);
-        if (copyPoolEntries)
-        {
-            // idx = cpool.addClass(value.getClassString());
-            idx = cpool.addUtf8(value.getClassString());
-        }
-        else
-        {
-            idx = value.getIndex();
-        }
-    }
-
-    public int getIndex()
-    {
-        return idx;
-    }
-
-    public String getClassString()
-    {
-        ConstantUtf8 cu8 = (ConstantUtf8) getConstantPool().getConstant(idx);
-        return cu8.getBytes();
-        // ConstantClass c = (ConstantClass)getConstantPool().getConstant(idx);
-        // ConstantUtf8 utf8 =
-        // (ConstantUtf8)getConstantPool().getConstant(c.getNameIndex());
-        // return utf8.getBytes();
-    }
-
-    @Override
-    public String stringifyValue()
-    {
-        return getClassString();
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 kind of value
-        dos.writeShort(idx);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ClassGen.java b/src/main/java/org/apache/bcel/generic/ClassGen.java
deleted file mode 100644
index 8b939eb..0000000
--- a/src/main/java/org/apache/bcel/generic/ClassGen.java
+++ /dev/null
@@ -1,606 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.AccessFlags;
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.Annotations;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.RuntimeInvisibleAnnotations;
-import org.apache.bcel.classfile.RuntimeVisibleAnnotations;
-import org.apache.bcel.classfile.SourceFile;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.util.BCELComparator;
-
-/** 
- * Template class for building up a java class. May be initialized with an
- * existing java class (file).
- *
- * @see JavaClass
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ClassGen extends AccessFlags implements Cloneable {
-
-    private static final long serialVersionUID = 6880879387392827211L;
-    /* Corresponds to the fields found in a JavaClass object.
-     */
-    private String class_name, super_class_name;
-    private final String file_name;
-    private int class_name_index = -1, superclass_name_index = -1;
-    private int major = Constants.MAJOR_1_1, minor = Constants.MINOR_1_1;
-    private ConstantPoolGen cp; // Template for building up constant pool
-    // ArrayLists instead of arrays to gather fields, methods, etc.
-    private final List<Field> field_vec = new ArrayList<Field>();
-    private final List<Method> method_vec = new ArrayList<Method>();
-    private final List<Attribute> attribute_vec = new ArrayList<Attribute>();
-    private final List<String> interface_vec = new ArrayList<String>();
-    private final List<AnnotationEntryGen> annotation_vec = new ArrayList<AnnotationEntryGen>();
-
-    private static BCELComparator _cmp = new BCELComparator() {
-
-        public boolean equals( Object o1, Object o2 ) {
-            ClassGen THIS = (ClassGen) o1;
-            ClassGen THAT = (ClassGen) o2;
-            return THIS.getClassName().equals(THAT.getClassName());
-        }
-
-
-        public int hashCode( Object o ) {
-            ClassGen THIS = (ClassGen) o;
-            return THIS.getClassName().hashCode();
-        }
-    };
-
-
-    /** Convenience constructor to set up some important values initially.
-     *
-     * @param class_name fully qualified class name
-     * @param super_class_name fully qualified superclass name
-     * @param file_name source file name
-     * @param access_flags access qualifiers
-     * @param interfaces implemented interfaces
-     * @param cp constant pool to use
-     */
-    public ClassGen(String class_name, String super_class_name, String file_name, int access_flags,
-            String[] interfaces, ConstantPoolGen cp) {
-        this.class_name = class_name;
-        this.super_class_name = super_class_name;
-        this.file_name = file_name;
-        this.access_flags = access_flags;
-        this.cp = cp;
-        // Put everything needed by default into the constant pool and the vectors
-        if (file_name != null) {
-            addAttribute(new SourceFile(cp.addUtf8("SourceFile"), 2, cp.addUtf8(file_name), cp
-                    .getConstantPool()));
-        }
-        class_name_index = cp.addClass(class_name);
-        superclass_name_index = cp.addClass(super_class_name);
-        if (interfaces != null) {
-            for (String interface1 : interfaces) {
-                addInterface(interface1);
-            }
-        }
-    }
-
-
-    /** Convenience constructor to set up some important values initially.
-     *
-     * @param class_name fully qualified class name
-     * @param super_class_name fully qualified superclass name
-     * @param file_name source file name
-     * @param access_flags access qualifiers
-     * @param interfaces implemented interfaces
-     */
-    public ClassGen(String class_name, String super_class_name, String file_name, int access_flags,
-            String[] interfaces) {
-        this(class_name, super_class_name, file_name, access_flags, interfaces,
-                new ConstantPoolGen());
-    }
-
-
-    /**
-     * Initialize with existing class.
-     * @param clazz JavaClass object (e.g. read from file)
-     */
-    public ClassGen(JavaClass clazz) {
-        class_name_index = clazz.getClassNameIndex();
-        superclass_name_index = clazz.getSuperclassNameIndex();
-        class_name = clazz.getClassName();
-        super_class_name = clazz.getSuperclassName();
-        file_name = clazz.getSourceFileName();
-        access_flags = clazz.getAccessFlags();
-        cp = new ConstantPoolGen(clazz.getConstantPool());
-        major = clazz.getMajor();
-        minor = clazz.getMinor();
-        Attribute[] attributes = clazz.getAttributes();
-        // J5TODO: Could make unpacking lazy, done on first reference
-        AnnotationEntryGen[] annotations = unpackAnnotations(attributes);
-        Method[] methods = clazz.getMethods();
-        Field[] fields = clazz.getFields();
-        String[] interfaces = clazz.getInterfaceNames();
-        for (String interface1 : interfaces) {
-            addInterface(interface1);
-        }
-        for (Attribute attribute : attributes) {
-            if (!(attribute instanceof Annotations)) {
-                addAttribute(attribute);
-            }
-        }
-        for (AnnotationEntryGen annotation : annotations) {
-            addAnnotationEntry(annotation);
-        }
-        for (Method method : methods) {
-            addMethod(method);
-        }
-        for (Field field : fields) {
-            addField(field);
-        }
-    }
-
-    /**
-     * Look for attributes representing annotations and unpack them.
-     */
-    private AnnotationEntryGen[] unpackAnnotations(Attribute[] attrs)
-    {
-        List<AnnotationEntryGen> annotationGenObjs = new ArrayList<AnnotationEntryGen>();
-        for (Attribute attr : attrs) {
-            if (attr instanceof RuntimeVisibleAnnotations)
-            {
-                RuntimeVisibleAnnotations rva = (RuntimeVisibleAnnotations) attr;
-                AnnotationEntry[] annos = rva.getAnnotationEntries();
-                for (AnnotationEntry a : annos) {
-                    annotationGenObjs.add(new AnnotationEntryGen(a,
-                            getConstantPool(), false));
-                }
-            }
-            else
-                if (attr instanceof RuntimeInvisibleAnnotations)
-                {
-                    RuntimeInvisibleAnnotations ria = (RuntimeInvisibleAnnotations) attr;
-                    AnnotationEntry[] annos = ria.getAnnotationEntries();
-                    for (AnnotationEntry a : annos) {
-                        annotationGenObjs.add(new AnnotationEntryGen(a,
-                                getConstantPool(), false));
-                    }
-                }
-        }
-        return annotationGenObjs.toArray(new AnnotationEntryGen[annotationGenObjs.size()]);
-    }
-
-
-    /**
-     * @return the (finally) built up Java class object.
-     */
-    public JavaClass getJavaClass() {
-        int[] interfaces = getInterfaces();
-        Field[] fields = getFields();
-        Method[] methods = getMethods();
-        Attribute[] attributes = null;
-        if (annotation_vec.isEmpty()) {
-            attributes = getAttributes();
-        } else {
-            // TODO: Sometime later, trash any attributes called 'RuntimeVisibleAnnotations' or 'RuntimeInvisibleAnnotations'
-            Attribute[] annAttributes  = AnnotationEntryGen.getAnnotationAttributes(cp,annotation_vec);
-            attributes = new Attribute[attribute_vec.size()+annAttributes.length];
-            attribute_vec.toArray(attributes);
-            System.arraycopy(annAttributes,0,attributes,attribute_vec.size(),annAttributes.length);       
-        }
-        // Must be last since the above calls may still add something to it
-        ConstantPool _cp = this.cp.getFinalConstantPool();
-        return new JavaClass(class_name_index, superclass_name_index, file_name, major, minor,
-                access_flags, _cp, interfaces, fields, methods, attributes);
-    }
-
-
-    /**
-     * Add an interface to this class, i.e., this class has to implement it.
-     * @param name interface to implement (fully qualified class name)
-     */
-    public void addInterface( String name ) {
-        interface_vec.add(name);
-    }
-
-
-    /**
-     * Remove an interface from this class.
-     * @param name interface to remove (fully qualified name)
-     */
-    public void removeInterface( String name ) {
-        interface_vec.remove(name);
-    }
-
-
-    /**
-     * @return major version number of class file
-     */
-    public int getMajor() {
-        return major;
-    }
-
-
-    /** Set major version number of class file, default value is 45 (JDK 1.1)
-     * @param major major version number
-     */
-    public void setMajor( int major ) {
-        this.major = major;
-    }
-
-
-    /** Set minor version number of class file, default value is 3 (JDK 1.1)
-     * @param minor minor version number
-     */
-    public void setMinor( int minor ) {
-        this.minor = minor;
-    }
-
-
-    /**
-     * @return minor version number of class file
-     */
-    public int getMinor() {
-        return minor;
-    }
-
-
-    /**
-     * Add an attribute to this class.
-     * @param a attribute to add
-     */
-    public void addAttribute( Attribute a ) {
-        attribute_vec.add(a);
-    }
-
-    public void addAnnotationEntry(AnnotationEntryGen a) { 
-        annotation_vec.add(a); 
-    }
-
-
-    /**
-     * Add a method to this class.
-     * @param m method to add
-     */
-    public void addMethod( Method m ) {
-        method_vec.add(m);
-    }
-
-
-    /**
-     * Convenience method.
-     *
-     * Add an empty constructor to this class that does nothing but calling super().
-     * @param access_flags rights for constructor
-     */
-    public void addEmptyConstructor( int access_flags ) {
-        InstructionList il = new InstructionList();
-        il.append(InstructionConstants.THIS); // Push `this'
-        il.append(new INVOKESPECIAL(cp.addMethodref(super_class_name, "<init>", "()V")));
-        il.append(InstructionConstants.RETURN);
-        MethodGen mg = new MethodGen(access_flags, Type.VOID, Type.NO_ARGS, null, "<init>",
-                class_name, il, cp);
-        mg.setMaxStack(1);
-        addMethod(mg.getMethod());
-    }
-
-
-    /**
-     * Add a field to this class.
-     * @param f field to add
-     */
-    public void addField( Field f ) {
-        field_vec.add(f);
-    }
-
-
-    public boolean containsField( Field f ) {
-        return field_vec.contains(f);
-    }
-
-
-    /** @return field object with given name, or null
-     */
-    public Field containsField( String name ) {
-        for (Field f : field_vec) {
-            if (f.getName().equals(name)) {
-                return f;
-            }
-        }
-        return null;
-    }
-
-
-    /** @return method object with given name and signature, or null
-     */
-    public Method containsMethod( String name, String signature ) {
-        for (Method m : method_vec) {
-            if (m.getName().equals(name) && m.getSignature().equals(signature)) {
-                return m;
-            }
-        }
-        return null;
-    }
-
-
-    /**
-     * Remove an attribute from this class.
-     * @param a attribute to remove
-     */
-    public void removeAttribute( Attribute a ) {
-        attribute_vec.remove(a);
-    }
-
-
-    /**
-     * Remove a method from this class.
-     * @param m method to remove
-     */
-    public void removeMethod( Method m ) {
-        method_vec.remove(m);
-    }
-
-
-    /** Replace given method with new one. If the old one does not exist
-     * add the new_ method to the class anyway.
-     */
-    public void replaceMethod( Method old, Method new_ ) {
-        if (new_ == null) {
-            throw new ClassGenException("Replacement method must not be null");
-        }
-        int i = method_vec.indexOf(old);
-        if (i < 0) {
-            method_vec.add(new_);
-        } else {
-            method_vec.set(i, new_);
-        }
-    }
-
-
-    /** Replace given field with new one. If the old one does not exist
-     * add the new_ field to the class anyway.
-     */
-    public void replaceField( Field old, Field new_ ) {
-        if (new_ == null) {
-            throw new ClassGenException("Replacement method must not be null");
-        }
-        int i = field_vec.indexOf(old);
-        if (i < 0) {
-            field_vec.add(new_);
-        } else {
-            field_vec.set(i, new_);
-        }
-    }
-
-
-    /**
-     * Remove a field to this class.
-     * @param f field to remove
-     */
-    public void removeField( Field f ) {
-        field_vec.remove(f);
-    }
-
-
-    public String getClassName() {
-        return class_name;
-    }
-
-
-    public String getSuperclassName() {
-        return super_class_name;
-    }
-
-
-    public String getFileName() {
-        return file_name;
-    }
-
-
-    public void setClassName( String name ) {
-        class_name = name.replace('/', '.');
-        class_name_index = cp.addClass(name);
-    }
-
-
-    public void setSuperclassName( String name ) {
-        super_class_name = name.replace('/', '.');
-        superclass_name_index = cp.addClass(name);
-    }
-
-
-    public Method[] getMethods() {
-        return method_vec.toArray(new Method[method_vec.size()]);
-    }
-
-
-    public void setMethods( Method[] methods ) {
-        method_vec.clear();
-        for (Method method : methods) {
-            addMethod(method);
-        }
-    }
-
-
-    public void setMethodAt( Method method, int pos ) {
-        method_vec.set(pos, method);
-    }
-
-
-    public Method getMethodAt( int pos ) {
-        return method_vec.get(pos);
-    }
-
-
-    public String[] getInterfaceNames() {
-        int size = interface_vec.size();
-        String[] interfaces = new String[size];
-        interface_vec.toArray(interfaces);
-        return interfaces;
-    }
-
-
-    public int[] getInterfaces() {
-        int size = interface_vec.size();
-        int[] interfaces = new int[size];
-        for (int i = 0; i < size; i++) {
-            interfaces[i] = cp.addClass(interface_vec.get(i));
-        }
-        return interfaces;
-    }
-
-
-    public Field[] getFields() {
-        return field_vec.toArray(new Field[field_vec.size()]);
-    }
-
-
-    public Attribute[] getAttributes() {
-        return attribute_vec.toArray(new Attribute[attribute_vec.size()]);
-    }
-
-    //  J5TODO: Should we make calling unpackAnnotations() lazy and put it in here?
-    public AnnotationEntryGen[] getAnnotationEntries() {
-        return annotation_vec.toArray(new AnnotationEntryGen[annotation_vec.size()]);
-    }
-
-
-    public ConstantPoolGen getConstantPool() {
-        return cp;
-    }
-
-
-    public void setConstantPool( ConstantPoolGen constant_pool ) {
-        cp = constant_pool;
-    }
-
-
-    public void setClassNameIndex( int class_name_index ) {
-        this.class_name_index = class_name_index;
-        class_name = cp.getConstantPool().getConstantString(class_name_index,
-                Constants.CONSTANT_Class).replace('/', '.');
-    }
-
-
-    public void setSuperclassNameIndex( int superclass_name_index ) {
-        this.superclass_name_index = superclass_name_index;
-        super_class_name = cp.getConstantPool().getConstantString(superclass_name_index,
-                Constants.CONSTANT_Class).replace('/', '.');
-    }
-
-
-    public int getSuperclassNameIndex() {
-        return superclass_name_index;
-    }
-
-
-    public int getClassNameIndex() {
-        return class_name_index;
-    }
-
-    private List<ClassObserver> observers;
-
-
-    /** Add observer for this object.
-     */
-    public void addObserver( ClassObserver o ) {
-        if (observers == null) {
-            observers = new ArrayList<ClassObserver>();
-        }
-        observers.add(o);
-    }
-
-
-    /** Remove observer for this object.
-     */
-    public void removeObserver( ClassObserver o ) {
-        if (observers != null) {
-            observers.remove(o);
-        }
-    }
-
-
-    /** Call notify() method on all observers. This method is not called
-     * automatically whenever the state has changed, but has to be
-     * called by the user after he has finished editing the object.
-     */
-    public void update() {
-        if (observers != null) {
-            for (ClassObserver observer : observers) {
-                observer.notify(this);
-            }
-        }
-    }
-
-
-    @Override
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new Error("Clone Not Supported"); // never happens
-        }
-    }
-
-
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
-
-
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default two ClassGen objects are said to be equal when
-     * their class names are equal.
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        return _cmp.equals(this, obj);
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default return the hashcode of the class name.
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return _cmp.hashCode(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ClassGenException.java b/src/main/java/org/apache/bcel/generic/ClassGenException.java
deleted file mode 100644
index e76cf0d..0000000
--- a/src/main/java/org/apache/bcel/generic/ClassGenException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * Thrown on internal errors. Extends RuntimeException so it hasn't to be declared
- * in the throws clause every time.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ClassGenException extends RuntimeException {
-
-    private static final long serialVersionUID = 7247369755051242791L;
-
-    public ClassGenException() {
-        super();
-    }
-
-
-    public ClassGenException(String s) {
-        super(s);
-    }
-
-    public ClassGenException(String s, Throwable initCause) {
-        super(s, initCause);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ClassObserver.java b/src/main/java/org/apache/bcel/generic/ClassObserver.java
deleted file mode 100644
index 789210e..0000000
--- a/src/main/java/org/apache/bcel/generic/ClassObserver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Implement this interface if you're interested in changes to a ClassGen object
- * and register yourself with addObserver().
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface ClassObserver {
-
-    void notify( ClassGen clazz );
-}
diff --git a/src/main/java/org/apache/bcel/generic/CodeExceptionGen.java b/src/main/java/org/apache/bcel/generic/CodeExceptionGen.java
deleted file mode 100644
index 0ee9b0d..0000000
--- a/src/main/java/org/apache/bcel/generic/CodeExceptionGen.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.classfile.CodeException;
-
-/** 
- * This class represents an exception handler, i.e., specifies the  region where
- * a handler is active and an instruction where the actual handling is done.
- * pool as parameters. Opposed to the JVM specification the end of the handled
- * region is set to be inclusive, i.e. all instructions between start and end
- * are protected including the start and end instructions (handles) themselves.
- * The end of the region is automatically mapped to be exclusive when calling
- * getCodeException(), i.e., there is no difference semantically.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     MethodGen
- * @see     CodeException
- * @see     InstructionHandle
- */
-public final class CodeExceptionGen implements InstructionTargeter, Cloneable, java.io.Serializable {
-
-    private static final long serialVersionUID = 6548901422158960190L;
-    private InstructionHandle start_pc;
-    private InstructionHandle end_pc;
-    private InstructionHandle handler_pc;
-    private ObjectType catch_type;
-
-
-    /**
-     * Add an exception handler, i.e., specify region where a handler is active and an
-     * instruction where the actual handling is done.
-     *
-     * @param start_pc Start of handled region (inclusive)
-     * @param end_pc End of handled region (inclusive)
-     * @param handler_pc Where handling is done
-     * @param catch_type which exception is handled, null for ANY
-     */
-    public CodeExceptionGen(InstructionHandle start_pc, InstructionHandle end_pc,
-            InstructionHandle handler_pc, ObjectType catch_type) {
-        setStartPC(start_pc);
-        setEndPC(end_pc);
-        setHandlerPC(handler_pc);
-        this.catch_type = catch_type;
-    }
-
-
-    /**
-     * Get CodeException object.<BR>
-     *
-     * This relies on that the instruction list has already been dumped
-     * to byte code or or that the `setPositions' methods has been
-     * called for the instruction list.
-     *
-     * @param cp constant pool
-     */
-    public CodeException getCodeException( ConstantPoolGen cp ) {
-        return new CodeException(start_pc.getPosition(), end_pc.getPosition()
-                + end_pc.getInstruction().getLength(), handler_pc.getPosition(),
-                (catch_type == null) ? 0 : cp.addClass(catch_type));
-    }
-
-
-    /* Set start of handler 
-     * @param start_pc Start of handled region (inclusive)
-     */
-    public void setStartPC( InstructionHandle start_pc ) {
-        BranchInstruction.notifyTarget(this.start_pc, start_pc, this);
-        this.start_pc = start_pc;
-    }
-
-
-    /* Set end of handler 
-     * @param end_pc End of handled region (inclusive)
-     */
-    public void setEndPC( InstructionHandle end_pc ) {
-        BranchInstruction.notifyTarget(this.end_pc, end_pc, this);
-        this.end_pc = end_pc;
-    }
-
-
-    /* Set handler code
-     * @param handler_pc Start of handler
-     */
-    public void setHandlerPC( InstructionHandle handler_pc ) {
-        BranchInstruction.notifyTarget(this.handler_pc, handler_pc, this);
-        this.handler_pc = handler_pc;
-    }
-
-
-    /**
-     * @param old_ih old target, either start or end
-     * @param new_ih new target
-     */
-    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
-        boolean targeted = false;
-        if (start_pc == old_ih) {
-            targeted = true;
-            setStartPC(new_ih);
-        }
-        if (end_pc == old_ih) {
-            targeted = true;
-            setEndPC(new_ih);
-        }
-        if (handler_pc == old_ih) {
-            targeted = true;
-            setHandlerPC(new_ih);
-        }
-        if (!targeted) {
-            throw new ClassGenException("Not targeting " + old_ih + ", but {" + start_pc + ", "
-                    + end_pc + ", " + handler_pc + "}");
-        }
-    }
-
-
-    /**
-     * @return true, if ih is target of this handler
-     */
-    public boolean containsTarget( InstructionHandle ih ) {
-        return (start_pc == ih) || (end_pc == ih) || (handler_pc == ih);
-    }
-
-
-    /** Sets the type of the Exception to catch. Set 'null' for ANY. */
-    public void setCatchType( ObjectType catch_type ) {
-        this.catch_type = catch_type;
-    }
-
-
-    /** Gets the type of the Exception to catch, 'null' for ANY. */
-    public ObjectType getCatchType() {
-        return catch_type;
-    }
-
-
-    /** @return start of handled region (inclusive)
-     */
-    public InstructionHandle getStartPC() {
-        return start_pc;
-    }
-
-
-    /** @return end of handled region (inclusive)
-     */
-    public InstructionHandle getEndPC() {
-        return end_pc;
-    }
-
-
-    /** @return start of handler
-     */
-    public InstructionHandle getHandlerPC() {
-        return handler_pc;
-    }
-
-
-    @Override
-    public String toString() {
-        return "CodeExceptionGen(" + start_pc + ", " + end_pc + ", " + handler_pc + ")";
-    }
-
-
-    @Override
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new Error("Clone Not Supported"); // never happens
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/CompoundInstruction.java b/src/main/java/org/apache/bcel/generic/CompoundInstruction.java
deleted file mode 100644
index 388c77e..0000000
--- a/src/main/java/org/apache/bcel/generic/CompoundInstruction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Wrapper class for `compound' operations, virtual instructions that
- * don't exist as byte code, but give a useful meaning. For example,
- * the (virtual) PUSH instruction takes an arbitray argument and produces the
- * appropiate code at dump time (ICONST, LDC, BIPUSH, ...). Also you can use the
- * SWITCH instruction as a useful template for either LOOKUPSWITCH or
- * TABLESWITCH.
- *
- * The interface provides the possibilty for the user to write
- * `templates' or `macros' for such reuseable code patterns.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see PUSH
- * @see SWITCH
- */
-public interface CompoundInstruction {
-
-    InstructionList getInstructionList();
-}
diff --git a/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java b/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java
deleted file mode 100644
index 94480d9..0000000
--- a/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java
+++ /dev/null
@@ -1,799 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantCP;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantDouble;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantFloat;
-import org.apache.bcel.classfile.ConstantInteger;
-import org.apache.bcel.classfile.ConstantInterfaceMethodref;
-import org.apache.bcel.classfile.ConstantInvokeDynamic;
-import org.apache.bcel.classfile.ConstantLong;
-import org.apache.bcel.classfile.ConstantMethodref;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantString;
-import org.apache.bcel.classfile.ConstantUtf8;
-
-/** 
- * This class is used to build up a constant pool. The user adds
- * constants via `addXXX' methods, `addString', `addClass',
- * etc.. These methods return an index into the constant
- * pool. Finally, `getFinalConstantPool()' returns the constant pool
- * built up. Intermediate versions of the constant pool can be
- * obtained with `getConstantPool()'. A constant pool has capacity for
- * Constants.MAX_SHORT entries. Note that the first (0) is used by the
- * JVM and that Double and Long constants need two slots.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see Constant
- */
-public class ConstantPoolGen implements java.io.Serializable {
-
-    private static final long serialVersionUID = 6664071417323174824L;
-    protected int size; 
-    protected Constant[] constants;
-    protected int index = 1; // First entry (0) used by JVM
-    private static final String METHODREF_DELIM = ":";
-    private static final String IMETHODREF_DELIM = "#";
-    private static final String FIELDREF_DELIM = "&";
-    private static final String NAT_DELIM = "%";
-
-    private static class Index implements java.io.Serializable {
-
-        private static final long serialVersionUID = -9187078620578535161L;
-        int index;
-
-
-        Index(int i) {
-            index = i;
-        }
-    }
-
-
-    /**
-     * Initialize with given array of constants.
-     *
-     * @param cs array of given constants, new ones will be appended
-     */
-    public ConstantPoolGen(Constant[] cs) {
-        StringBuilder sb = new StringBuilder(256);
-
-        size = Math.max(256, cs.length + 64);
-        constants = new Constant[size];
-
-        System.arraycopy(cs, 0, constants, 0, cs.length);
-        if (cs.length > 0) {
-            index = cs.length;
-        }
-
-
-        for (int i = 1; i < index; i++) {
-            Constant c = constants[i];
-            if (c instanceof ConstantString) {
-                ConstantString s = (ConstantString) c;
-                ConstantUtf8 u8 = (ConstantUtf8) constants[s.getStringIndex()];
-                String key = u8.getBytes();
-                if (!string_table.containsKey(key)) {
-                    string_table.put(key, new Index(i));
-                }
-            } else if (c instanceof ConstantClass) {
-                ConstantClass s = (ConstantClass) c;
-                ConstantUtf8 u8 = (ConstantUtf8) constants[s.getNameIndex()];
-                String key = u8.getBytes();
-                if (!class_table.containsKey(key)) {
-                    class_table.put(key, new Index(i));
-                }
-            } else if (c instanceof ConstantNameAndType) {
-                ConstantNameAndType n = (ConstantNameAndType) c;
-                ConstantUtf8 u8 = (ConstantUtf8) constants[n.getNameIndex()];
-                ConstantUtf8 u8_2 = (ConstantUtf8) constants[n.getSignatureIndex()];
-
-                sb.append(u8.getBytes());
-                sb.append(NAT_DELIM);
-                sb.append(u8_2.getBytes());
-                String key = sb.toString();
-                sb.delete(0, sb.length());
-
-                if (!n_a_t_table.containsKey(key)) {
-                    n_a_t_table.put(key, new Index(i));
-                }
-            } else if (c instanceof ConstantUtf8) {
-                ConstantUtf8 u = (ConstantUtf8) c;
-                String key = u.getBytes();
-                if (!utf8_table.containsKey(key)) {
-                    utf8_table.put(key, new Index(i));
-                }
-            } else if (c instanceof ConstantCP) {
-                ConstantCP m = (ConstantCP) c;
-                String class_name;
-                ConstantUtf8 u8;
-
-                if (c instanceof ConstantInvokeDynamic) {
-                    class_name = Integer.toString(m.getBootstrapMethodAttrIndex());
-                    // since name can't begin with digit, can  use
-                    // METHODREF_DELIM with out fear of duplicates.
-                } else {
-                ConstantClass clazz = (ConstantClass) constants[m.getClassIndex()];
-                    u8 = (ConstantUtf8) constants[clazz.getNameIndex()];
-                    class_name = u8.getBytes().replace('/', '.');
-                }
-
-                ConstantNameAndType n = (ConstantNameAndType) constants[m.getNameAndTypeIndex()];
-                u8 = (ConstantUtf8) constants[n.getNameIndex()];
-                String method_name = u8.getBytes();
-                u8 = (ConstantUtf8) constants[n.getSignatureIndex()];
-                String signature = u8.getBytes();
-
-                String delim = METHODREF_DELIM;
-                if (c instanceof ConstantInterfaceMethodref) {
-                    delim = IMETHODREF_DELIM;
-                } else if (c instanceof ConstantFieldref) {
-                    delim = FIELDREF_DELIM;
-                }
-
-                sb.append(class_name);
-                sb.append(delim);
-                sb.append(method_name);
-                sb.append(delim);
-                sb.append(signature);
-                String key = sb.toString();
-                sb.delete(0, sb.length());
-
-                if (!cp_table.containsKey(key)) {
-                    cp_table.put(key, new Index(i));
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Initialize with given constant pool.
-     */
-    public ConstantPoolGen(ConstantPool cp) {
-        this(cp.getConstantPool());
-    }
-
-
-    /**
-     * Create empty constant pool.
-     */
-    public ConstantPoolGen() {
-        size = 256;
-        constants = new Constant[size];
-    }
-
-
-    /** Resize internal array of constants.
-     */
-    protected void adjustSize() {
-        if (index + 3 >= size) {
-            Constant[] cs = constants;
-            size *= 2;
-            constants = new Constant[size];
-            System.arraycopy(cs, 0, constants, 0, index);
-        }
-    }
-
-    private final Map<String, Index> string_table = new HashMap<String, Index>();
-
-
-    /** 
-     * Look for ConstantString in ConstantPool containing String `str'.
-     *
-     * @param str String to search for
-     * @return index on success, -1 otherwise
-     */
-    public int lookupString( String str ) {
-        Index index = string_table.get(str);
-        return (index != null) ? index.index : -1;
-    }
-
-
-    /**
-     * Add a new String constant to the ConstantPool, if it is not already in there.
-     *
-     * @param str String to add
-     * @return index of entry
-     */
-    public int addString( String str ) {
-        int ret;
-        if ((ret = lookupString(str)) != -1) {
-            return ret; // Already in CP
-        }
-        int utf8 = addUtf8(str);
-        adjustSize();
-        ConstantString s = new ConstantString(utf8);
-        ret = index;
-        constants[index++] = s;
-        if (!string_table.containsKey(str)) {
-            string_table.put(str, new Index(ret));
-        }
-        return ret;
-    }
-
-    private final Map<String, Index> class_table = new HashMap<String, Index>();
-
-
-    /**
-     * Look for ConstantClass in ConstantPool named `str'.
-     *
-     * @param str String to search for
-     * @return index on success, -1 otherwise
-     */
-    public int lookupClass( String str ) {
-        Index index = class_table.get(str.replace('.', '/'));
-        return (index != null) ? index.index : -1;
-    }
-
-
-    private int addClass_( String clazz ) {
-        int ret;
-        if ((ret = lookupClass(clazz)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        ConstantClass c = new ConstantClass(addUtf8(clazz));
-        ret = index;
-        constants[index++] = c;
-        if (!class_table.containsKey(clazz)) {
-            class_table.put(clazz, new Index(ret));
-        }
-        return ret;
-    }
-
-
-    /**
-     * Add a new Class reference to the ConstantPool, if it is not already in there.
-     *
-     * @param str Class to add
-     * @return index of entry
-     */
-    public int addClass( String str ) {
-        return addClass_(str.replace('.', '/'));
-    }
-
-
-    /**
-     * Add a new Class reference to the ConstantPool for a given type.
-     *
-     * @param type Class to add
-     * @return index of entry
-     */
-    public int addClass( ObjectType type ) {
-        return addClass(type.getClassName());
-    }
-
-
-    /**
-     * Add a reference to an array class (e.g. String[][]) as needed by MULTIANEWARRAY
-     * instruction, e.g. to the ConstantPool.
-     *
-     * @param type type of array class
-     * @return index of entry
-     */
-    public int addArrayClass( ArrayType type ) {
-        return addClass_(type.getSignature());
-    }
-
-
-    /** 
-     * Look for ConstantInteger in ConstantPool.
-     *
-     * @param n integer number to look for
-     * @return index on success, -1 otherwise
-     */
-    public int lookupInteger( int n ) {
-        for (int i = 1; i < index; i++) {
-            if (constants[i] instanceof ConstantInteger) {
-                ConstantInteger c = (ConstantInteger) constants[i];
-                if (c.getBytes() == n) {
-                    return i;
-                }
-            }
-        }
-        return -1;
-    }
-
-
-    /**
-     * Add a new Integer constant to the ConstantPool, if it is not already in there.
-     *
-     * @param n integer number to add
-     * @return index of entry
-     */
-    public int addInteger( int n ) {
-        int ret;
-        if ((ret = lookupInteger(n)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        ret = index;
-        constants[index++] = new ConstantInteger(n);
-        return ret;
-    }
-
-
-    /** 
-     * Look for ConstantFloat in ConstantPool.
-     *
-     * @param n Float number to look for
-     * @return index on success, -1 otherwise
-     */
-    public int lookupFloat( float n ) {
-        int bits = Float.floatToIntBits(n);
-        for (int i = 1; i < index; i++) {
-            if (constants[i] instanceof ConstantFloat) {
-                ConstantFloat c = (ConstantFloat) constants[i];
-                if (Float.floatToIntBits(c.getBytes()) == bits) {
-                    return i;
-                }
-            }
-        }
-        return -1;
-    }
-
-
-    /**
-     * Add a new Float constant to the ConstantPool, if it is not already in there.
-     *
-     * @param n Float number to add
-     * @return index of entry
-     */
-    public int addFloat( float n ) {
-        int ret;
-        if ((ret = lookupFloat(n)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        ret = index;
-        constants[index++] = new ConstantFloat(n);
-        return ret;
-    }
-
-    private final Map<String, Index> utf8_table = new HashMap<String, Index>();
-
-
-    /** 
-     * Look for ConstantUtf8 in ConstantPool.
-     *
-     * @param n Utf8 string to look for
-     * @return index on success, -1 otherwise
-     */
-    public int lookupUtf8( String n ) {
-        Index index = utf8_table.get(n);
-        return (index != null) ? index.index : -1;
-    }
-
-
-    /**
-     * Add a new Utf8 constant to the ConstantPool, if it is not already in there.
-     *
-     * @param n Utf8 string to add
-     * @return index of entry
-     */
-    public int addUtf8( String n ) {
-        int ret;
-        if ((ret = lookupUtf8(n)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        ret = index;
-        constants[index++] = new ConstantUtf8(n);
-        if (!utf8_table.containsKey(n)) {
-            utf8_table.put(n, new Index(ret));
-        }
-        return ret;
-    }
-
-
-    /** 
-     * Look for ConstantLong in ConstantPool.
-     *
-     * @param n Long number to look for
-     * @return index on success, -1 otherwise
-     */
-    public int lookupLong( long n ) {
-        for (int i = 1; i < index; i++) {
-            if (constants[i] instanceof ConstantLong) {
-                ConstantLong c = (ConstantLong) constants[i];
-                if (c.getBytes() == n) {
-                    return i;
-                }
-            }
-        }
-        return -1;
-    }
-
-
-    /**
-     * Add a new long constant to the ConstantPool, if it is not already in there.
-     *
-     * @param n Long number to add
-     * @return index of entry
-     */
-    public int addLong( long n ) {
-        int ret;
-        if ((ret = lookupLong(n)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        ret = index;
-        constants[index] = new ConstantLong(n);
-        index += 2; // Wastes one entry according to spec
-        return ret;
-    }
-
-
-    /** 
-     * Look for ConstantDouble in ConstantPool.
-     *
-     * @param n Double number to look for
-     * @return index on success, -1 otherwise
-     */
-    public int lookupDouble( double n ) {
-        long bits = Double.doubleToLongBits(n);
-        for (int i = 1; i < index; i++) {
-            if (constants[i] instanceof ConstantDouble) {
-                ConstantDouble c = (ConstantDouble) constants[i];
-                if (Double.doubleToLongBits(c.getBytes()) == bits) {
-                    return i;
-                }
-            }
-        }
-        return -1;
-    }
-
-
-    /**
-     * Add a new double constant to the ConstantPool, if it is not already in there.
-     *
-     * @param n Double number to add
-     * @return index of entry
-     */
-    public int addDouble( double n ) {
-        int ret;
-        if ((ret = lookupDouble(n)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        ret = index;
-        constants[index] = new ConstantDouble(n);
-        index += 2; // Wastes one entry according to spec
-        return ret;
-    }
-
-    private final Map<String, Index> n_a_t_table = new HashMap<String, Index>();
-
-
-    /** 
-     * Look for ConstantNameAndType in ConstantPool.
-     *
-     * @param name of variable/method
-     * @param signature of variable/method
-     * @return index on success, -1 otherwise
-     */
-    public int lookupNameAndType( String name, String signature ) {
-        Index _index = n_a_t_table.get(name + NAT_DELIM + signature);
-        return (_index != null) ? _index.index : -1;
-    }
-
-
-    /**
-     * Add a new NameAndType constant to the ConstantPool if it is not already 
-     * in there.
-     *
-     * @param name Name string to add
-     * @param signature signature string to add
-     * @return index of entry
-     */
-    public int addNameAndType( String name, String signature ) {
-        int ret;
-        int name_index, signature_index;
-        if ((ret = lookupNameAndType(name, signature)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        name_index = addUtf8(name);
-        signature_index = addUtf8(signature);
-        ret = index;
-        constants[index++] = new ConstantNameAndType(name_index, signature_index);
-        String key = name + NAT_DELIM + signature;
-        if (!n_a_t_table.containsKey(key)) {
-            n_a_t_table.put(key, new Index(ret));
-        }
-        return ret;
-    }
-
-    private final Map<String, Index> cp_table = new HashMap<String, Index>();
-
-
-    /** 
-     * Look for ConstantMethodref in ConstantPool.
-     *
-     * @param class_name Where to find method
-     * @param method_name Guess what
-     * @param signature return and argument types
-     * @return index on success, -1 otherwise
-     */
-    public int lookupMethodref( String class_name, String method_name, String signature ) {
-        Index index = cp_table.get(class_name + METHODREF_DELIM + method_name
-                + METHODREF_DELIM + signature);
-        return (index != null) ? index.index : -1;
-    }
-
-
-    public int lookupMethodref( MethodGen method ) {
-        return lookupMethodref(method.getClassName(), method.getName(), method.getSignature());
-    }
-
-
-    /**
-     * Add a new Methodref constant to the ConstantPool, if it is not already 
-     * in there.
-     *
-     * @param class_name class name string to add
-     * @param method_name method name string to add
-     * @param signature method signature string to add
-     * @return index of entry
-     */
-    public int addMethodref( String class_name, String method_name, String signature ) {
-        int ret, class_index, name_and_type_index;
-        if ((ret = lookupMethodref(class_name, method_name, signature)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        name_and_type_index = addNameAndType(method_name, signature);
-        class_index = addClass(class_name);
-        ret = index;
-        constants[index++] = new ConstantMethodref(class_index, name_and_type_index);
-        String key = class_name + METHODREF_DELIM + method_name + METHODREF_DELIM + signature;
-        if (!cp_table.containsKey(key)) {
-            cp_table.put(key, new Index(ret));
-        }
-        return ret;
-    }
-
-
-    public int addMethodref( MethodGen method ) {
-        return addMethodref(method.getClassName(), method.getName(), method.getSignature());
-    }
-
-
-    /** 
-     * Look for ConstantInterfaceMethodref in ConstantPool.
-     *
-     * @param class_name Where to find method
-     * @param method_name Guess what
-     * @param signature return and argument types
-     * @return index on success, -1 otherwise
-     */
-    public int lookupInterfaceMethodref( String class_name, String method_name, String signature ) {
-        Index index = cp_table.get(class_name + IMETHODREF_DELIM + method_name
-                + IMETHODREF_DELIM + signature);
-        return (index != null) ? index.index : -1;
-    }
-
-
-    public int lookupInterfaceMethodref( MethodGen method ) {
-        return lookupInterfaceMethodref(method.getClassName(), method.getName(), method
-                .getSignature());
-    }
-
-
-    /**
-     * Add a new InterfaceMethodref constant to the ConstantPool, if it is not already 
-     * in there.
-     *
-     * @param class_name class name string to add
-     * @param method_name method name string to add
-     * @param signature signature string to add
-     * @return index of entry
-     */
-    public int addInterfaceMethodref( String class_name, String method_name, String signature ) {
-        int ret, class_index, name_and_type_index;
-        if ((ret = lookupInterfaceMethodref(class_name, method_name, signature)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        class_index = addClass(class_name);
-        name_and_type_index = addNameAndType(method_name, signature);
-        ret = index;
-        constants[index++] = new ConstantInterfaceMethodref(class_index, name_and_type_index);
-        String key = class_name + IMETHODREF_DELIM + method_name + IMETHODREF_DELIM + signature;
-        if (!cp_table.containsKey(key)) {
-            cp_table.put(key, new Index(ret));
-        }
-        return ret;
-    }
-
-
-    public int addInterfaceMethodref( MethodGen method ) {
-        return addInterfaceMethodref(method.getClassName(), method.getName(), method.getSignature());
-    }
-
-
-    /** 
-     * Look for ConstantFieldref in ConstantPool.
-     *
-     * @param class_name Where to find method
-     * @param field_name Guess what
-     * @param signature return and argument types
-     * @return index on success, -1 otherwise
-     */
-    public int lookupFieldref( String class_name, String field_name, String signature ) {
-        Index index = cp_table.get(class_name + FIELDREF_DELIM + field_name
-                + FIELDREF_DELIM + signature);
-        return (index != null) ? index.index : -1;
-    }
-
-
-    /**
-     * Add a new Fieldref constant to the ConstantPool, if it is not already 
-     * in there.
-     *
-     * @param class_name class name string to add
-     * @param field_name field name string to add
-     * @param signature signature string to add
-     * @return index of entry
-     */
-    public int addFieldref( String class_name, String field_name, String signature ) {
-        int ret;
-        int class_index, name_and_type_index;
-        if ((ret = lookupFieldref(class_name, field_name, signature)) != -1) {
-            return ret; // Already in CP
-        }
-        adjustSize();
-        class_index = addClass(class_name);
-        name_and_type_index = addNameAndType(field_name, signature);
-        ret = index;
-        constants[index++] = new ConstantFieldref(class_index, name_and_type_index);
-        String key = class_name + FIELDREF_DELIM + field_name + FIELDREF_DELIM + signature;
-        if (!cp_table.containsKey(key)) {
-            cp_table.put(key, new Index(ret));
-        }
-        return ret;
-    }
-
-
-    /**
-     * @param i index in constant pool
-     * @return constant pool entry at index i
-     */
-    public Constant getConstant( int i ) {
-        return constants[i];
-    }
-
-
-    /**
-     * Use with care!
-     *
-     * @param i index in constant pool
-     * @param c new constant pool entry at index i
-     */
-    public void setConstant( int i, Constant c ) {
-        constants[i] = c;
-    }
-
-
-    /**
-     * @return intermediate constant pool
-     */
-    public ConstantPool getConstantPool() {
-        return new ConstantPool(constants);
-    }
-
-
-    /**
-     * @return current size of constant pool
-     */
-    public int getSize() {
-        return index;
-    }
-
-
-    /**
-     * @return constant pool with proper length
-     */
-    public ConstantPool getFinalConstantPool() {
-        Constant[] cs = new Constant[index];
-        System.arraycopy(constants, 0, cs, 0, index);
-        return new ConstantPool(cs);
-    }
-
-
-    /**
-     * @return String representation.
-     */
-    @Override
-    public String toString() {
-        StringBuilder buf = new StringBuilder();
-        for (int i = 1; i < index; i++) {
-            buf.append(i).append(")").append(constants[i]).append("\n");
-        }
-        return buf.toString();
-    }
-
-
-    /** Import constant from another ConstantPool and return new index.
-     */
-    public int addConstant( Constant c, ConstantPoolGen cp ) {
-        Constant[] constants = cp.getConstantPool().getConstantPool();
-        switch (c.getTag()) {
-            case Constants.CONSTANT_String: {
-                ConstantString s = (ConstantString) c;
-                ConstantUtf8 u8 = (ConstantUtf8) constants[s.getStringIndex()];
-                return addString(u8.getBytes());
-            }
-            case Constants.CONSTANT_Class: {
-                ConstantClass s = (ConstantClass) c;
-                ConstantUtf8 u8 = (ConstantUtf8) constants[s.getNameIndex()];
-                return addClass(u8.getBytes());
-            }
-            case Constants.CONSTANT_NameAndType: {
-                ConstantNameAndType n = (ConstantNameAndType) c;
-                ConstantUtf8 u8 = (ConstantUtf8) constants[n.getNameIndex()];
-                ConstantUtf8 u8_2 = (ConstantUtf8) constants[n.getSignatureIndex()];
-                return addNameAndType(u8.getBytes(), u8_2.getBytes());
-            }
-            case Constants.CONSTANT_Utf8:
-                return addUtf8(((ConstantUtf8) c).getBytes());
-            case Constants.CONSTANT_Double:
-                return addDouble(((ConstantDouble) c).getBytes());
-            case Constants.CONSTANT_Float:
-                return addFloat(((ConstantFloat) c).getBytes());
-            case Constants.CONSTANT_Long:
-                return addLong(((ConstantLong) c).getBytes());
-            case Constants.CONSTANT_Integer:
-                return addInteger(((ConstantInteger) c).getBytes());
-            case Constants.CONSTANT_InterfaceMethodref:
-            case Constants.CONSTANT_Methodref:
-            case Constants.CONSTANT_Fieldref: {
-                ConstantCP m = (ConstantCP) c;
-                ConstantClass clazz = (ConstantClass) constants[m.getClassIndex()];
-                ConstantNameAndType n = (ConstantNameAndType) constants[m.getNameAndTypeIndex()];
-                ConstantUtf8 u8 = (ConstantUtf8) constants[clazz.getNameIndex()];
-                String class_name = u8.getBytes().replace('/', '.');
-                u8 = (ConstantUtf8) constants[n.getNameIndex()];
-                String name = u8.getBytes();
-                u8 = (ConstantUtf8) constants[n.getSignatureIndex()];
-                String signature = u8.getBytes();
-                switch (c.getTag()) {
-                    case Constants.CONSTANT_InterfaceMethodref:
-                        return addInterfaceMethodref(class_name, name, signature);
-                    case Constants.CONSTANT_Methodref:
-                        return addMethodref(class_name, name, signature);
-                    case Constants.CONSTANT_Fieldref:
-                        return addFieldref(class_name, name, signature);
-                    default: // Never reached
-                        throw new RuntimeException("Unknown constant type " + c);
-                }
-            }
-            default: // Never reached
-                throw new RuntimeException("Unknown constant type " + c);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ConstantPushInstruction.java b/src/main/java/org/apache/bcel/generic/ConstantPushInstruction.java
deleted file mode 100644
index 1539949..0000000
--- a/src/main/java/org/apache/bcel/generic/ConstantPushInstruction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denotes a push instruction that produces a literal on the stack
- * such as  SIPUSH, BIPUSH, ICONST, etc.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
-
- * @see ICONST
- * @see SIPUSH
- */
-public interface ConstantPushInstruction extends PushInstruction, TypedInstruction {
-
-    Number getValue();
-}
diff --git a/src/main/java/org/apache/bcel/generic/ConversionInstruction.java b/src/main/java/org/apache/bcel/generic/ConversionInstruction.java
deleted file mode 100644
index 746bbe8..0000000
--- a/src/main/java/org/apache/bcel/generic/ConversionInstruction.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-
-/**
- * Super class for the x2y family of instructions.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class ConversionInstruction extends Instruction implements TypedInstruction,
-        StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = -4283015897133699172L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ConversionInstruction() {
-    }
-
-
-    /**
-     * @param opcode opcode of instruction
-     */
-    protected ConversionInstruction(short opcode) {
-        super(opcode, (short) 1);
-    }
-
-
-    /** @return type associated with the instruction
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        switch (opcode) {
-            case Constants.D2I:
-            case Constants.F2I:
-            case Constants.L2I:
-                return Type.INT;
-            case Constants.D2F:
-            case Constants.I2F:
-            case Constants.L2F:
-                return Type.FLOAT;
-            case Constants.D2L:
-            case Constants.F2L:
-            case Constants.I2L:
-                return Type.LONG;
-            case Constants.F2D:
-            case Constants.I2D:
-            case Constants.L2D:
-                return Type.DOUBLE;
-            case Constants.I2B:
-                return Type.BYTE;
-            case Constants.I2C:
-                return Type.CHAR;
-            case Constants.I2S:
-                return Type.SHORT;
-            default: // Never reached
-                throw new ClassGenException("Unknown type " + opcode);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/D2F.java b/src/main/java/org/apache/bcel/generic/D2F.java
deleted file mode 100644
index 1555873..0000000
--- a/src/main/java/org/apache/bcel/generic/D2F.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * D2F - Convert double to float
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class D2F extends ConversionInstruction {
-
-    private static final long serialVersionUID = -448595874334076240L;
-
-
-    /** Convert double to float
-     */
-    public D2F() {
-        super(org.apache.bcel.Constants.D2F);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitD2F(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/D2I.java b/src/main/java/org/apache/bcel/generic/D2I.java
deleted file mode 100644
index 4a06f11..0000000
--- a/src/main/java/org/apache/bcel/generic/D2I.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * D2I - Convert double to int
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class D2I extends ConversionInstruction {
-
-    private static final long serialVersionUID = -1226710355146064416L;
-
-
-    /** Convert double to int
-     */
-    public D2I() {
-        super(org.apache.bcel.Constants.D2I);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitD2I(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/D2L.java b/src/main/java/org/apache/bcel/generic/D2L.java
deleted file mode 100644
index 1bbc3c1..0000000
--- a/src/main/java/org/apache/bcel/generic/D2L.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * D2L - Convert double to long
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class D2L extends ConversionInstruction {
-
-    private static final long serialVersionUID = -1985923584192796706L;
-
-
-    /** Convert double to long
-     */
-    public D2L() {
-        super(org.apache.bcel.Constants.D2L);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitD2L(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DADD.java b/src/main/java/org/apache/bcel/generic/DADD.java
deleted file mode 100644
index c9a2eb4..0000000
--- a/src/main/java/org/apache/bcel/generic/DADD.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DADD - Add doubles
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result1.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DADD extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 241485501977646418L;
-
-
-    /** Add doubles
-     */
-    public DADD() {
-        super(org.apache.bcel.Constants.DADD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitDADD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DALOAD.java b/src/main/java/org/apache/bcel/generic/DALOAD.java
deleted file mode 100644
index 3ad7b69..0000000
--- a/src/main/java/org/apache/bcel/generic/DALOAD.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DALOAD - Load double from array
- * <PRE>Stack: ..., arrayref, index -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DALOAD extends ArrayInstruction implements StackProducer {
-
-    private static final long serialVersionUID = -8493938101832015094L;
-
-
-    /** Load double from array
-     */
-    public DALOAD() {
-        super(org.apache.bcel.Constants.DALOAD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitDALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DASTORE.java b/src/main/java/org/apache/bcel/generic/DASTORE.java
deleted file mode 100644
index 31f2f1a..0000000
--- a/src/main/java/org/apache/bcel/generic/DASTORE.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DASTORE -  Store into double array
- * <PRE>Stack: ..., arrayref, index, value.word1, value.word2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DASTORE extends ArrayInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = 5236493427411303394L;
-
-
-    /** Store double into array
-     */
-    public DASTORE() {
-        super(org.apache.bcel.Constants.DASTORE);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitDASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DCMPG.java b/src/main/java/org/apache/bcel/generic/DCMPG.java
deleted file mode 100644
index 2ed3a35..0000000
--- a/src/main/java/org/apache/bcel/generic/DCMPG.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DCMPG - Compare doubles: value1 &gt; value2
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DCMPG extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = 1929664840821745262L;
-
-    public DCMPG() {
-        super(org.apache.bcel.Constants.DCMPG, (short) 1);
-    }
-
-    /** @return Type.DOUBLE
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.DOUBLE;
-    }
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitDCMPG(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DCMPL.java b/src/main/java/org/apache/bcel/generic/DCMPL.java
deleted file mode 100644
index e334572..0000000
--- a/src/main/java/org/apache/bcel/generic/DCMPL.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DCMPL - Compare doubles: value1 &lt; value2
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DCMPL extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = 2514357528484232014L;
-
-    public DCMPL() {
-        super(org.apache.bcel.Constants.DCMPL, (short) 1);
-    }
-
-    /** @return Type.DOUBLE
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.DOUBLE;
-    }
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitDCMPL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DCONST.java b/src/main/java/org/apache/bcel/generic/DCONST.java
deleted file mode 100644
index 8f79dbe..0000000
--- a/src/main/java/org/apache/bcel/generic/DCONST.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DCONST - Push 0.0 or 1.0, other values cause an exception
- *
- * <PRE>Stack: ... -&gt; ..., </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DCONST extends Instruction implements ConstantPushInstruction {
-
-    private static final long serialVersionUID = 4421839896759165218L;
-    private double value;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    DCONST() {
-    }
-
-
-    public DCONST(double f) {
-        super(org.apache.bcel.Constants.DCONST_0, (short) 1);
-        if (f == 0.0) {
-            opcode = org.apache.bcel.Constants.DCONST_0;
-        } else if (f == 1.0) {
-            opcode = org.apache.bcel.Constants.DCONST_1;
-        } else {
-            throw new ClassGenException("DCONST can be used only for 0.0 and 1.0: " + f);
-        }
-        value = f;
-    }
-
-
-    public Number getValue() {
-        return new Double(value);
-    }
-
-
-    /** @return Type.DOUBLE
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.DOUBLE;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitPushInstruction(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitConstantPushInstruction(this);
-        v.visitDCONST(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DDIV.java b/src/main/java/org/apache/bcel/generic/DDIV.java
deleted file mode 100644
index 807acee..0000000
--- a/src/main/java/org/apache/bcel/generic/DDIV.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DDIV -  Divide doubles
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DDIV extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -2241740228269641540L;
-
-
-    /** Divide doubles
-     */
-    public DDIV() {
-        super(org.apache.bcel.Constants.DDIV);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitDDIV(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DLOAD.java b/src/main/java/org/apache/bcel/generic/DLOAD.java
deleted file mode 100644
index 70148db..0000000
--- a/src/main/java/org/apache/bcel/generic/DLOAD.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DLOAD - Load double from local variable
- * <PRE>Stack ... -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DLOAD extends LoadInstruction {
-
-    private static final long serialVersionUID = -197027701448834250L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    DLOAD() {
-        super(org.apache.bcel.Constants.DLOAD, org.apache.bcel.Constants.DLOAD_0);
-    }
-
-
-    /** Load double from local variable
-     * @param n index of local variable
-     */
-    public DLOAD(int n) {
-        super(org.apache.bcel.Constants.DLOAD, org.apache.bcel.Constants.DLOAD_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitDLOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DMUL.java b/src/main/java/org/apache/bcel/generic/DMUL.java
deleted file mode 100644
index d8221b3..0000000
--- a/src/main/java/org/apache/bcel/generic/DMUL.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DMUL - Multiply doubles
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DMUL extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 7491480641611951432L;
-
-
-    /** Multiply doubles
-     */
-    public DMUL() {
-        super(org.apache.bcel.Constants.DMUL);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitDMUL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DNEG.java b/src/main/java/org/apache/bcel/generic/DNEG.java
deleted file mode 100644
index 98f511f..0000000
--- a/src/main/java/org/apache/bcel/generic/DNEG.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DNEG - Negate double
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DNEG extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -8860107731099493429L;
-
-
-    public DNEG() {
-        super(org.apache.bcel.Constants.DNEG);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitDNEG(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DREM.java b/src/main/java/org/apache/bcel/generic/DREM.java
deleted file mode 100644
index 8fad733..0000000
--- a/src/main/java/org/apache/bcel/generic/DREM.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DREM - Remainder of doubles
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DREM extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -3984082114153729887L;
-
-
-    /** Remainder of doubles
-     */
-    public DREM() {
-        super(org.apache.bcel.Constants.DREM);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitDREM(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DRETURN.java b/src/main/java/org/apache/bcel/generic/DRETURN.java
deleted file mode 100644
index de0b872..0000000
--- a/src/main/java/org/apache/bcel/generic/DRETURN.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DRETURN -  Return double from method
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; &lt;empty&gt;</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DRETURN extends ReturnInstruction {
-
-    private static final long serialVersionUID = 7442064109402271402L;
-
-
-    /** Return double from method
-     */
-    public DRETURN() {
-        super(org.apache.bcel.Constants.DRETURN);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitReturnInstruction(this);
-        v.visitDRETURN(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DSTORE.java b/src/main/java/org/apache/bcel/generic/DSTORE.java
deleted file mode 100644
index 6404f78..0000000
--- a/src/main/java/org/apache/bcel/generic/DSTORE.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DSTORE - Store double into local variable
- * <pre>Stack: ..., value.word1, value.word2 -&gt; ... </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DSTORE extends StoreInstruction {
-
-    private static final long serialVersionUID = 2593414593903082469L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    DSTORE() {
-        super(org.apache.bcel.Constants.DSTORE, org.apache.bcel.Constants.DSTORE_0);
-    }
-
-
-    /** Store double into local variable
-     * @param n index of local variable
-     */
-    public DSTORE(int n) {
-        super(org.apache.bcel.Constants.DSTORE, org.apache.bcel.Constants.DSTORE_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitDSTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DSUB.java b/src/main/java/org/apache/bcel/generic/DSUB.java
deleted file mode 100644
index ffea532..0000000
--- a/src/main/java/org/apache/bcel/generic/DSUB.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DSUB - Substract doubles
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DSUB extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -5398969227995149466L;
-
-
-    /** Substract doubles
-     */
-    public DSUB() {
-        super(org.apache.bcel.Constants.DSUB);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitDSUB(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DUP.java b/src/main/java/org/apache/bcel/generic/DUP.java
deleted file mode 100644
index 4ce0163..0000000
--- a/src/main/java/org/apache/bcel/generic/DUP.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DUP - Duplicate top operand stack word
- * <PRE>Stack: ..., word -&gt; ..., word, word</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DUP extends StackInstruction implements PushInstruction {
-
-    private static final long serialVersionUID = 2297553463589366154L;
-
-
-    public DUP() {
-        super(org.apache.bcel.Constants.DUP);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitPushInstruction(this);
-        v.visitStackInstruction(this);
-        v.visitDUP(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DUP2.java b/src/main/java/org/apache/bcel/generic/DUP2.java
deleted file mode 100644
index 13238b4..0000000
--- a/src/main/java/org/apache/bcel/generic/DUP2.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DUP2 - Duplicate two top operand stack words
- * <PRE>Stack: ..., word2, word1 -&gt; ..., word2, word1, word2, word1</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DUP2 extends StackInstruction implements PushInstruction {
-
-    private static final long serialVersionUID = -7098411152822612791L;
-
-
-    public DUP2() {
-        super(org.apache.bcel.Constants.DUP2);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitPushInstruction(this);
-        v.visitStackInstruction(this);
-        v.visitDUP2(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DUP2_X1.java b/src/main/java/org/apache/bcel/generic/DUP2_X1.java
deleted file mode 100644
index 3131264..0000000
--- a/src/main/java/org/apache/bcel/generic/DUP2_X1.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DUP2_X1 - Duplicate two top operand stack words and put three down
- * <PRE>Stack: ..., word3, word2, word1 -&gt; ..., word2, word1, word3, word2, word1</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DUP2_X1 extends StackInstruction {
-
-    private static final long serialVersionUID = 4940667268525283202L;
-
-
-    public DUP2_X1() {
-        super(org.apache.bcel.Constants.DUP2_X1);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackInstruction(this);
-        v.visitDUP2_X1(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DUP2_X2.java b/src/main/java/org/apache/bcel/generic/DUP2_X2.java
deleted file mode 100644
index 8e508eb..0000000
--- a/src/main/java/org/apache/bcel/generic/DUP2_X2.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DUP2_X2 - Duplicate two top operand stack words and put four down
- * <PRE>Stack: ..., word4, word3, word2, word1 -&gt; ..., word2, word1, word4, word3, word2, word1</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DUP2_X2 extends StackInstruction {
-
-    private static final long serialVersionUID = 1182584253776211326L;
-
-
-    public DUP2_X2() {
-        super(org.apache.bcel.Constants.DUP2_X2);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackInstruction(this);
-        v.visitDUP2_X2(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DUP_X1.java b/src/main/java/org/apache/bcel/generic/DUP_X1.java
deleted file mode 100644
index 0f44598..0000000
--- a/src/main/java/org/apache/bcel/generic/DUP_X1.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DUP_X1 - Duplicate top operand stack word and put two down
- * <PRE>Stack: ..., word2, word1 -&gt; ..., word1, word2, word1</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DUP_X1 extends StackInstruction {
-
-    private static final long serialVersionUID = 2059042937326757526L;
-
-
-    public DUP_X1() {
-        super(org.apache.bcel.Constants.DUP_X1);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackInstruction(this);
-        v.visitDUP_X1(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/DUP_X2.java b/src/main/java/org/apache/bcel/generic/DUP_X2.java
deleted file mode 100644
index cf1cba5..0000000
--- a/src/main/java/org/apache/bcel/generic/DUP_X2.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * DUP_X2 - Duplicate top operand stack word and put three down
- * <PRE>Stack: ..., word3, word2, word1 -&gt; ..., word1, word3, word2, word1</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class DUP_X2 extends StackInstruction {
-
-    private static final long serialVersionUID = -8851562833314313571L;
-
-
-    public DUP_X2() {
-        super(org.apache.bcel.Constants.DUP_X2);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackInstruction(this);
-        v.visitDUP_X2(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ElementValueGen.java b/src/main/java/org/apache/bcel/generic/ElementValueGen.java
deleted file mode 100644
index 5e8cf00..0000000
--- a/src/main/java/org/apache/bcel/generic/ElementValueGen.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataInput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.classfile.AnnotationElementValue;
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.ArrayElementValue;
-import org.apache.bcel.classfile.ClassElementValue;
-import org.apache.bcel.classfile.ElementValue;
-import org.apache.bcel.classfile.EnumElementValue;
-import org.apache.bcel.classfile.SimpleElementValue;
-
-/**
- * @since 6.0
- */
-public abstract class ElementValueGen
-{
-    protected int type;
-
-    protected ConstantPoolGen cpGen;
-
-    protected ElementValueGen(int type, ConstantPoolGen cpGen)
-    {
-        this.type = type;
-        this.cpGen = cpGen;
-    }
-
-    /**
-     * Subtypes return an immutable variant of the ElementValueGen
-     */
-    public abstract ElementValue getElementValue();
-
-    public int getElementValueType()
-    {
-        return type;
-    }
-
-    public abstract String stringifyValue();
-
-    public abstract void dump(DataOutputStream dos) throws IOException;
-
-    public static final int STRING = 's';
-
-    public static final int ENUM_CONSTANT = 'e';
-
-    public static final int CLASS = 'c';
-
-    public static final int ANNOTATION = '@';
-
-    public static final int ARRAY = '[';
-
-    public static final int PRIMITIVE_INT = 'I';
-
-    public static final int PRIMITIVE_BYTE = 'B';
-
-    public static final int PRIMITIVE_CHAR = 'C';
-
-    public static final int PRIMITIVE_DOUBLE = 'D';
-
-    public static final int PRIMITIVE_FLOAT = 'F';
-
-    public static final int PRIMITIVE_LONG = 'J';
-
-    public static final int PRIMITIVE_SHORT = 'S';
-
-    public static final int PRIMITIVE_BOOLEAN = 'Z';
-
-    public static ElementValueGen readElementValue(DataInput dis,
-            ConstantPoolGen cpGen) throws IOException
-    {
-        int type = dis.readUnsignedByte();
-        switch (type)
-        {
-        case 'B': // byte
-            return new SimpleElementValueGen(PRIMITIVE_BYTE, dis
-                    .readUnsignedShort(), cpGen);
-        case 'C': // char
-            return new SimpleElementValueGen(PRIMITIVE_CHAR, dis
-                    .readUnsignedShort(), cpGen);
-        case 'D': // double
-            return new SimpleElementValueGen(PRIMITIVE_DOUBLE, dis
-                    .readUnsignedShort(), cpGen);
-        case 'F': // float
-            return new SimpleElementValueGen(PRIMITIVE_FLOAT, dis
-                    .readUnsignedShort(), cpGen);
-        case 'I': // int
-            return new SimpleElementValueGen(PRIMITIVE_INT, dis
-                    .readUnsignedShort(), cpGen);
-        case 'J': // long
-            return new SimpleElementValueGen(PRIMITIVE_LONG, dis
-                    .readUnsignedShort(), cpGen);
-        case 'S': // short
-            return new SimpleElementValueGen(PRIMITIVE_SHORT, dis
-                    .readUnsignedShort(), cpGen);
-        case 'Z': // boolean
-            return new SimpleElementValueGen(PRIMITIVE_BOOLEAN, dis
-                    .readUnsignedShort(), cpGen);
-        case 's': // String
-            return new SimpleElementValueGen(STRING, dis.readUnsignedShort(),
-                    cpGen);
-        case 'e': // Enum constant
-            return new EnumElementValueGen(dis.readUnsignedShort(), dis
-                    .readUnsignedShort(), cpGen);
-        case 'c': // Class
-            return new ClassElementValueGen(dis.readUnsignedShort(), cpGen);
-        case '@': // Annotation
-            // TODO: isRuntimeVisible ??????????
-            // FIXME
-            return new AnnotationElementValueGen(ANNOTATION,
-                    new AnnotationEntryGen(AnnotationEntry.read(dis, cpGen
-                            .getConstantPool(), true), cpGen, false), cpGen);
-        case '[': // Array
-            int numArrayVals = dis.readUnsignedShort();
-            ElementValue[] evalues = new ElementValue[numArrayVals];
-            for (int j = 0; j < numArrayVals; j++)
-            {
-                evalues[j] = ElementValue.readElementValue(dis, cpGen
-                        .getConstantPool());
-            }
-            return new ArrayElementValueGen(ARRAY, evalues, cpGen);
-        default:
-            throw new RuntimeException(
-                    "Unexpected element value kind in annotation: " + type);
-        }
-    }
-
-    protected ConstantPoolGen getConstantPool()
-    {
-        return cpGen;
-    }
-
-    /**
-     * Creates an (modifiable) ElementValueGen copy of an (immutable)
-     * ElementValue - constant pool is assumed correct.
-     */
-    public static ElementValueGen copy(ElementValue value,
-            ConstantPoolGen cpool, boolean copyPoolEntries)
-    {
-        switch (value.getElementValueType())
-        {
-        case 'B': // byte
-        case 'C': // char
-        case 'D': // double
-        case 'F': // float
-        case 'I': // int
-        case 'J': // long
-        case 'S': // short
-        case 'Z': // boolean
-        case 's': // String
-            return new SimpleElementValueGen((SimpleElementValue) value, cpool,
-                    copyPoolEntries);
-        case 'e': // Enum constant
-            return new EnumElementValueGen((EnumElementValue) value, cpool,
-                    copyPoolEntries);
-        case '@': // Annotation
-            return new AnnotationElementValueGen(
-                    (AnnotationElementValue) value, cpool, copyPoolEntries);
-        case '[': // Array
-            return new ArrayElementValueGen((ArrayElementValue) value, cpool,
-                    copyPoolEntries);
-        case 'c': // Class
-            return new ClassElementValueGen((ClassElementValue) value, cpool,
-                    copyPoolEntries);
-        default:
-            throw new RuntimeException("Not implemented yet! ("
-                    + value.getElementValueType() + ")");
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ElementValuePairGen.java b/src/main/java/org/apache/bcel/generic/ElementValuePairGen.java
deleted file mode 100644
index 4c74a8c..0000000
--- a/src/main/java/org/apache/bcel/generic/ElementValuePairGen.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ElementValue;
-import org.apache.bcel.classfile.ElementValuePair;
-
-/**
- * @since 6.0
- */
-public class ElementValuePairGen
-{
-    private int nameIdx;
-
-    private final ElementValueGen value;
-
-    private final ConstantPoolGen cpool;
-
-    public ElementValuePairGen(ElementValuePair nvp, ConstantPoolGen cpool,
-            boolean copyPoolEntries)
-    {
-        this.cpool = cpool;
-        // J5ASSERT:
-        // Could assert nvp.getNameString() points to the same thing as
-        // cpool.getConstant(nvp.getNameIndex())
-        // if
-        // (!nvp.getNameString().equals(((ConstantUtf8)cpool.getConstant(nvp.getNameIndex())).getBytes()))
-        // {
-        // throw new RuntimeException("envp buggered");
-        // }
-        if (copyPoolEntries)
-        {
-            nameIdx = cpool.addUtf8(nvp.getNameString());
-        }
-        else
-        {
-            nameIdx = nvp.getNameIndex();
-        }
-        value = ElementValueGen.copy(nvp.getValue(), cpool, copyPoolEntries);
-    }
-
-    /**
-     * Retrieve an immutable version of this ElementNameValuePairGen
-     */
-    public ElementValuePair getElementNameValuePair()
-    {
-        ElementValue immutableValue = value.getElementValue();
-        return new ElementValuePair(nameIdx, immutableValue, cpool
-                .getConstantPool());
-    }
-
-    protected ElementValuePairGen(int idx, ElementValueGen value,
-            ConstantPoolGen cpool)
-    {
-        this.nameIdx = idx;
-        this.value = value;
-        this.cpool = cpool;
-    }
-
-    public ElementValuePairGen(String name, ElementValueGen value,
-            ConstantPoolGen cpool)
-    {
-        this.nameIdx = cpool.addUtf8(name);
-        this.value = value;
-        this.cpool = cpool;
-    }
-
-    protected void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeShort(nameIdx); // u2 name of the element
-        value.dump(dos);
-    }
-
-    public int getNameIndex()
-    {
-        return nameIdx;
-    }
-
-    public final String getNameString()
-    {
-        // ConstantString cu8 = (ConstantString)cpool.getConstant(nameIdx);
-        return ((ConstantUtf8) cpool.getConstant(nameIdx)).getBytes();
-    }
-
-    public final ElementValueGen getValue()
-    {
-        return value;
-    }
-
-    @Override
-    public String toString()
-    {
-        return "ElementValuePair:[" + getNameString() + "="
-                + value.stringifyValue() + "]";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/EmptyVisitor.java b/src/main/java/org/apache/bcel/generic/EmptyVisitor.java
deleted file mode 100644
index 6af8f93..0000000
--- a/src/main/java/org/apache/bcel/generic/EmptyVisitor.java
+++ /dev/null
@@ -1,749 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Supplies empty method bodies to be overridden by subclasses.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class EmptyVisitor implements Visitor {
-
-    public void visitStackInstruction( StackInstruction obj ) {
-    }
-
-
-    public void visitLocalVariableInstruction( LocalVariableInstruction obj ) {
-    }
-
-
-    public void visitBranchInstruction( BranchInstruction obj ) {
-    }
-
-
-    public void visitLoadClass( LoadClass obj ) {
-    }
-
-
-    public void visitFieldInstruction( FieldInstruction obj ) {
-    }
-
-
-    public void visitIfInstruction( IfInstruction obj ) {
-    }
-
-
-    public void visitConversionInstruction( ConversionInstruction obj ) {
-    }
-
-
-    public void visitPopInstruction( PopInstruction obj ) {
-    }
-
-
-    public void visitJsrInstruction( JsrInstruction obj ) {
-    }
-
-
-    public void visitGotoInstruction( GotoInstruction obj ) {
-    }
-
-
-    public void visitStoreInstruction( StoreInstruction obj ) {
-    }
-
-
-    public void visitTypedInstruction( TypedInstruction obj ) {
-    }
-
-
-    public void visitSelect( Select obj ) {
-    }
-
-
-    public void visitUnconditionalBranch( UnconditionalBranch obj ) {
-    }
-
-
-    public void visitPushInstruction( PushInstruction obj ) {
-    }
-
-
-    public void visitArithmeticInstruction( ArithmeticInstruction obj ) {
-    }
-
-
-    public void visitCPInstruction( CPInstruction obj ) {
-    }
-
-
-    public void visitInvokeInstruction( InvokeInstruction obj ) {
-    }
-
-
-    public void visitArrayInstruction( ArrayInstruction obj ) {
-    }
-
-
-    public void visitAllocationInstruction( AllocationInstruction obj ) {
-    }
-
-
-    public void visitReturnInstruction( ReturnInstruction obj ) {
-    }
-
-
-    public void visitFieldOrMethod( FieldOrMethod obj ) {
-    }
-
-
-    public void visitConstantPushInstruction( ConstantPushInstruction obj ) {
-    }
-
-
-    public void visitExceptionThrower( ExceptionThrower obj ) {
-    }
-
-
-    public void visitLoadInstruction( LoadInstruction obj ) {
-    }
-
-
-    public void visitVariableLengthInstruction( VariableLengthInstruction obj ) {
-    }
-
-
-    public void visitStackProducer( StackProducer obj ) {
-    }
-
-
-    public void visitStackConsumer( StackConsumer obj ) {
-    }
-
-
-    public void visitACONST_NULL( ACONST_NULL obj ) {
-    }
-
-
-    public void visitGETSTATIC( GETSTATIC obj ) {
-    }
-
-
-    public void visitIF_ICMPLT( IF_ICMPLT obj ) {
-    }
-
-
-    public void visitMONITOREXIT( MONITOREXIT obj ) {
-    }
-
-
-    public void visitIFLT( IFLT obj ) {
-    }
-
-
-    public void visitLSTORE( LSTORE obj ) {
-    }
-
-
-    public void visitPOP2( POP2 obj ) {
-    }
-
-
-    public void visitBASTORE( BASTORE obj ) {
-    }
-
-
-    public void visitISTORE( ISTORE obj ) {
-    }
-
-
-    public void visitCHECKCAST( CHECKCAST obj ) {
-    }
-
-
-    public void visitFCMPG( FCMPG obj ) {
-    }
-
-
-    public void visitI2F( I2F obj ) {
-    }
-
-
-    public void visitATHROW( ATHROW obj ) {
-    }
-
-
-    public void visitDCMPL( DCMPL obj ) {
-    }
-
-
-    public void visitARRAYLENGTH( ARRAYLENGTH obj ) {
-    }
-
-
-    public void visitDUP( DUP obj ) {
-    }
-
-
-    public void visitINVOKESTATIC( INVOKESTATIC obj ) {
-    }
-
-
-    public void visitLCONST( LCONST obj ) {
-    }
-
-
-    public void visitDREM( DREM obj ) {
-    }
-
-
-    public void visitIFGE( IFGE obj ) {
-    }
-
-
-    public void visitCALOAD( CALOAD obj ) {
-    }
-
-
-    public void visitLASTORE( LASTORE obj ) {
-    }
-
-
-    public void visitI2D( I2D obj ) {
-    }
-
-
-    public void visitDADD( DADD obj ) {
-    }
-
-
-    public void visitINVOKESPECIAL( INVOKESPECIAL obj ) {
-    }
-
-
-    public void visitIAND( IAND obj ) {
-    }
-
-
-    public void visitPUTFIELD( PUTFIELD obj ) {
-    }
-
-
-    public void visitILOAD( ILOAD obj ) {
-    }
-
-
-    public void visitDLOAD( DLOAD obj ) {
-    }
-
-
-    public void visitDCONST( DCONST obj ) {
-    }
-
-
-    public void visitNEW( NEW obj ) {
-    }
-
-
-    public void visitIFNULL( IFNULL obj ) {
-    }
-
-
-    public void visitLSUB( LSUB obj ) {
-    }
-
-
-    public void visitL2I( L2I obj ) {
-    }
-
-
-    public void visitISHR( ISHR obj ) {
-    }
-
-
-    public void visitTABLESWITCH( TABLESWITCH obj ) {
-    }
-
-
-    public void visitIINC( IINC obj ) {
-    }
-
-
-    public void visitDRETURN( DRETURN obj ) {
-    }
-
-
-    public void visitFSTORE( FSTORE obj ) {
-    }
-
-
-    public void visitDASTORE( DASTORE obj ) {
-    }
-
-
-    public void visitIALOAD( IALOAD obj ) {
-    }
-
-
-    public void visitDDIV( DDIV obj ) {
-    }
-
-
-    public void visitIF_ICMPGE( IF_ICMPGE obj ) {
-    }
-
-
-    public void visitLAND( LAND obj ) {
-    }
-
-
-    public void visitIDIV( IDIV obj ) {
-    }
-
-
-    public void visitLOR( LOR obj ) {
-    }
-
-
-    public void visitCASTORE( CASTORE obj ) {
-    }
-
-
-    public void visitFREM( FREM obj ) {
-    }
-
-
-    public void visitLDC( LDC obj ) {
-    }
-
-
-    public void visitBIPUSH( BIPUSH obj ) {
-    }
-
-
-    public void visitDSTORE( DSTORE obj ) {
-    }
-
-
-    public void visitF2L( F2L obj ) {
-    }
-
-
-    public void visitFMUL( FMUL obj ) {
-    }
-
-
-    public void visitLLOAD( LLOAD obj ) {
-    }
-
-
-    public void visitJSR( JSR obj ) {
-    }
-
-
-    public void visitFSUB( FSUB obj ) {
-    }
-
-
-    public void visitSASTORE( SASTORE obj ) {
-    }
-
-
-    public void visitALOAD( ALOAD obj ) {
-    }
-
-
-    public void visitDUP2_X2( DUP2_X2 obj ) {
-    }
-
-
-    public void visitRETURN( RETURN obj ) {
-    }
-
-
-    public void visitDALOAD( DALOAD obj ) {
-    }
-
-
-    public void visitSIPUSH( SIPUSH obj ) {
-    }
-
-
-    public void visitDSUB( DSUB obj ) {
-    }
-
-
-    public void visitL2F( L2F obj ) {
-    }
-
-
-    public void visitIF_ICMPGT( IF_ICMPGT obj ) {
-    }
-
-
-    public void visitF2D( F2D obj ) {
-    }
-
-
-    public void visitI2L( I2L obj ) {
-    }
-
-
-    public void visitIF_ACMPNE( IF_ACMPNE obj ) {
-    }
-
-
-    public void visitPOP( POP obj ) {
-    }
-
-
-    public void visitI2S( I2S obj ) {
-    }
-
-
-    public void visitIFEQ( IFEQ obj ) {
-    }
-
-
-    public void visitSWAP( SWAP obj ) {
-    }
-
-
-    public void visitIOR( IOR obj ) {
-    }
-
-
-    public void visitIREM( IREM obj ) {
-    }
-
-
-    public void visitIASTORE( IASTORE obj ) {
-    }
-
-
-    public void visitNEWARRAY( NEWARRAY obj ) {
-    }
-
-
-    public void visitINVOKEINTERFACE( INVOKEINTERFACE obj ) {
-    }
-
-
-    public void visitINEG( INEG obj ) {
-    }
-
-
-    public void visitLCMP( LCMP obj ) {
-    }
-
-
-    public void visitJSR_W( JSR_W obj ) {
-    }
-
-
-    public void visitMULTIANEWARRAY( MULTIANEWARRAY obj ) {
-    }
-
-
-    public void visitDUP_X2( DUP_X2 obj ) {
-    }
-
-
-    public void visitSALOAD( SALOAD obj ) {
-    }
-
-
-    public void visitIFNONNULL( IFNONNULL obj ) {
-    }
-
-
-    public void visitDMUL( DMUL obj ) {
-    }
-
-
-    public void visitIFNE( IFNE obj ) {
-    }
-
-
-    public void visitIF_ICMPLE( IF_ICMPLE obj ) {
-    }
-
-
-    public void visitLDC2_W( LDC2_W obj ) {
-    }
-
-
-    public void visitGETFIELD( GETFIELD obj ) {
-    }
-
-
-    public void visitLADD( LADD obj ) {
-    }
-
-
-    public void visitNOP( NOP obj ) {
-    }
-
-
-    public void visitFALOAD( FALOAD obj ) {
-    }
-
-
-    public void visitINSTANCEOF( INSTANCEOF obj ) {
-    }
-
-
-    public void visitIFLE( IFLE obj ) {
-    }
-
-
-    public void visitLXOR( LXOR obj ) {
-    }
-
-
-    public void visitLRETURN( LRETURN obj ) {
-    }
-
-
-    public void visitFCONST( FCONST obj ) {
-    }
-
-
-    public void visitIUSHR( IUSHR obj ) {
-    }
-
-
-    public void visitBALOAD( BALOAD obj ) {
-    }
-
-
-    public void visitDUP2( DUP2 obj ) {
-    }
-
-
-    public void visitIF_ACMPEQ( IF_ACMPEQ obj ) {
-    }
-
-
-    public void visitIMPDEP1( IMPDEP1 obj ) {
-    }
-
-
-    public void visitMONITORENTER( MONITORENTER obj ) {
-    }
-
-
-    public void visitLSHL( LSHL obj ) {
-    }
-
-
-    public void visitDCMPG( DCMPG obj ) {
-    }
-
-
-    public void visitD2L( D2L obj ) {
-    }
-
-
-    public void visitIMPDEP2( IMPDEP2 obj ) {
-    }
-
-
-    public void visitL2D( L2D obj ) {
-    }
-
-
-    public void visitRET( RET obj ) {
-    }
-
-
-    public void visitIFGT( IFGT obj ) {
-    }
-
-
-    public void visitIXOR( IXOR obj ) {
-    }
-
-
-    public void visitINVOKEVIRTUAL( INVOKEVIRTUAL obj ) {
-    }
-
-
-    public void visitFASTORE( FASTORE obj ) {
-    }
-
-
-    public void visitIRETURN( IRETURN obj ) {
-    }
-
-
-    public void visitIF_ICMPNE( IF_ICMPNE obj ) {
-    }
-
-
-    public void visitFLOAD( FLOAD obj ) {
-    }
-
-
-    public void visitLDIV( LDIV obj ) {
-    }
-
-
-    public void visitPUTSTATIC( PUTSTATIC obj ) {
-    }
-
-
-    public void visitAALOAD( AALOAD obj ) {
-    }
-
-
-    public void visitD2I( D2I obj ) {
-    }
-
-
-    public void visitIF_ICMPEQ( IF_ICMPEQ obj ) {
-    }
-
-
-    public void visitAASTORE( AASTORE obj ) {
-    }
-
-
-    public void visitARETURN( ARETURN obj ) {
-    }
-
-
-    public void visitDUP2_X1( DUP2_X1 obj ) {
-    }
-
-
-    public void visitFNEG( FNEG obj ) {
-    }
-
-
-    public void visitGOTO_W( GOTO_W obj ) {
-    }
-
-
-    public void visitD2F( D2F obj ) {
-    }
-
-
-    public void visitGOTO( GOTO obj ) {
-    }
-
-
-    public void visitISUB( ISUB obj ) {
-    }
-
-
-    public void visitF2I( F2I obj ) {
-    }
-
-
-    public void visitDNEG( DNEG obj ) {
-    }
-
-
-    public void visitICONST( ICONST obj ) {
-    }
-
-
-    public void visitFDIV( FDIV obj ) {
-    }
-
-
-    public void visitI2B( I2B obj ) {
-    }
-
-
-    public void visitLNEG( LNEG obj ) {
-    }
-
-
-    public void visitLREM( LREM obj ) {
-    }
-
-
-    public void visitIMUL( IMUL obj ) {
-    }
-
-
-    public void visitIADD( IADD obj ) {
-    }
-
-
-    public void visitLSHR( LSHR obj ) {
-    }
-
-
-    public void visitLOOKUPSWITCH( LOOKUPSWITCH obj ) {
-    }
-
-
-    public void visitDUP_X1( DUP_X1 obj ) {
-    }
-
-
-    public void visitFCMPL( FCMPL obj ) {
-    }
-
-
-    public void visitI2C( I2C obj ) {
-    }
-
-
-    public void visitLMUL( LMUL obj ) {
-    }
-
-
-    public void visitLUSHR( LUSHR obj ) {
-    }
-
-
-    public void visitISHL( ISHL obj ) {
-    }
-
-
-    public void visitLALOAD( LALOAD obj ) {
-    }
-
-
-    public void visitASTORE( ASTORE obj ) {
-    }
-
-
-    public void visitANEWARRAY( ANEWARRAY obj ) {
-    }
-
-
-    public void visitFRETURN( FRETURN obj ) {
-    }
-
-
-    public void visitFADD( FADD obj ) {
-    }
-
-
-    public void visitBREAKPOINT( BREAKPOINT obj ) {
-    }
-
-    public void visitINVOKEDYNAMIC(INVOKEDYNAMIC obj) {
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/EnumElementValueGen.java b/src/main/java/org/apache/bcel/generic/EnumElementValueGen.java
deleted file mode 100644
index 50b81e1..0000000
--- a/src/main/java/org/apache/bcel/generic/EnumElementValueGen.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ElementValue;
-import org.apache.bcel.classfile.EnumElementValue;
-
-/**
- * @since 6.0
- */
-public class EnumElementValueGen extends ElementValueGen
-{
-    // For enum types, these two indices point to the type and value
-    private int typeIdx;
-
-    private int valueIdx;
-
-    /**
-     * This ctor assumes the constant pool already contains the right type and
-     * value - as indicated by typeIdx and valueIdx. This ctor is used for
-     * deserialization
-     */
-    protected EnumElementValueGen(int typeIdx, int valueIdx,
-            ConstantPoolGen cpool)
-    {
-        super(ElementValueGen.ENUM_CONSTANT, cpool);
-        if (type != ENUM_CONSTANT) {
-            throw new RuntimeException(
-                    "Only element values of type enum can be built with this ctor - type specified: " + type);
-        }
-        this.typeIdx = typeIdx;
-        this.valueIdx = valueIdx;
-    }
-
-    /**
-     * Return immutable variant of this EnumElementValue
-     */
-    @Override
-    public ElementValue getElementValue()
-    {
-        System.err.println("Duplicating value: " + getEnumTypeString() + ":"
-                + getEnumValueString());
-        return new EnumElementValue(type, typeIdx, valueIdx, cpGen
-                .getConstantPool());
-    }
-
-    public EnumElementValueGen(ObjectType t, String value, ConstantPoolGen cpool)
-    {
-        super(ElementValueGen.ENUM_CONSTANT, cpool);
-        typeIdx = cpool.addUtf8(t.getSignature());// was addClass(t);
-        valueIdx = cpool.addUtf8(value);// was addString(value);
-    }
-
-    public EnumElementValueGen(EnumElementValue value, ConstantPoolGen cpool,
-            boolean copyPoolEntries)
-    {
-        super(ENUM_CONSTANT, cpool);
-        if (copyPoolEntries)
-        {
-            typeIdx = cpool.addUtf8(value.getEnumTypeString());// was
-                                                                // addClass(value.getEnumTypeString());
-            valueIdx = cpool.addUtf8(value.getEnumValueString()); // was
-                                                                    // addString(value.getEnumValueString());
-        }
-        else
-        {
-            typeIdx = value.getTypeIndex();
-            valueIdx = value.getValueIndex();
-        }
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 type of value (ENUM_CONSTANT == 'e')
-        dos.writeShort(typeIdx); // u2
-        dos.writeShort(valueIdx); // u2
-    }
-
-    @Override
-    public String stringifyValue()
-    {
-        ConstantUtf8 cu8 = (ConstantUtf8) getConstantPool().getConstant(
-                valueIdx);
-        return cu8.getBytes();
-        // ConstantString cu8 =
-        // (ConstantString)getConstantPool().getConstant(valueIdx);
-        // return
-        // ((ConstantUtf8)getConstantPool().getConstant(cu8.getStringIndex())).getBytes();
-    }
-
-    // BCELBUG: Should we need to call utility.signatureToString() on the output
-    // here?
-    public String getEnumTypeString()
-    {
-        // Constant cc = getConstantPool().getConstant(typeIdx);
-        // ConstantClass cu8 =
-        // (ConstantClass)getConstantPool().getConstant(typeIdx);
-        // return
-        // ((ConstantUtf8)getConstantPool().getConstant(cu8.getNameIndex())).getBytes();
-        return ((ConstantUtf8) getConstantPool().getConstant(typeIdx))
-                .getBytes();
-        // return Utility.signatureToString(cu8.getBytes());
-    }
-
-    public String getEnumValueString()
-    {
-        return ((ConstantUtf8) getConstantPool().getConstant(valueIdx))
-                .getBytes();
-        // ConstantString cu8 =
-        // (ConstantString)getConstantPool().getConstant(valueIdx);
-        // return
-        // ((ConstantUtf8)getConstantPool().getConstant(cu8.getStringIndex())).getBytes();
-    }
-
-    public int getValueIndex()
-    {
-        return valueIdx;
-    }
-
-    public int getTypeIndex()
-    {
-        return typeIdx;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ExceptionThrower.java b/src/main/java/org/apache/bcel/generic/ExceptionThrower.java
deleted file mode 100644
index 29cba19..0000000
--- a/src/main/java/org/apache/bcel/generic/ExceptionThrower.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denote an instruction that may throw a run-time or a linking
- * exception (or both) during execution.  This is not quite the truth
- * as such; because all instructions may throw an
- * java.lang.VirtualMachineError. These exceptions are omitted.
- * 
- * The Lava Language Specification specifies exactly which
- * <i>RUN-TIME</i> and which <i>LINKING</i> exceptions each
- * instruction may throw which is reflected by the implementers.  Due
- * to the structure of the JVM specification, it may be possible that
- * an Instruction implementing this interface returns a Class[] of
- * size 0.
- *
- * Please note that we speak of an "exception" here when we mean any
- * "Throwable" object; so this term is equally used for "Exception"
- * and "Error" objects.
- *
- * @version $Id$
- * @author  Enver Haase
- */
-public interface ExceptionThrower {
-
-    java.lang.Class<?>[] getExceptions();
-}
diff --git a/src/main/java/org/apache/bcel/generic/F2D.java b/src/main/java/org/apache/bcel/generic/F2D.java
deleted file mode 100644
index 80f6e39..0000000
--- a/src/main/java/org/apache/bcel/generic/F2D.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * F2D - Convert float to double
- * <PRE>Stack: ..., value -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class F2D extends ConversionInstruction {
-
-    private static final long serialVersionUID = -4668119344425861047L;
-
-
-    /** Convert float to double
-     */
-    public F2D() {
-        super(org.apache.bcel.Constants.F2D);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitF2D(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/F2I.java b/src/main/java/org/apache/bcel/generic/F2I.java
deleted file mode 100644
index 3d17a1d..0000000
--- a/src/main/java/org/apache/bcel/generic/F2I.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * F2I - Convert float to int
- * <PRE>Stack: ..., value -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class F2I extends ConversionInstruction {
-
-    private static final long serialVersionUID = 6142843856130131105L;
-
-
-    /** Convert float to int
-     */
-    public F2I() {
-        super(org.apache.bcel.Constants.F2I);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitF2I(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/F2L.java b/src/main/java/org/apache/bcel/generic/F2L.java
deleted file mode 100644
index 06883d7..0000000
--- a/src/main/java/org/apache/bcel/generic/F2L.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * F2L - Convert float to long
- * <PRE>Stack: ..., value -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class F2L extends ConversionInstruction {
-
-    private static final long serialVersionUID = -5583947322933513819L;
-
-
-    /** Convert float to long
-     */
-    public F2L() {
-        super(org.apache.bcel.Constants.F2L);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitF2L(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FADD.java b/src/main/java/org/apache/bcel/generic/FADD.java
deleted file mode 100644
index d24c5bf..0000000
--- a/src/main/java/org/apache/bcel/generic/FADD.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FADD - Add floats
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FADD extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 5654582990564566355L;
-
-
-    /** Add floats
-     */
-    public FADD() {
-        super(org.apache.bcel.Constants.FADD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitFADD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FALOAD.java b/src/main/java/org/apache/bcel/generic/FALOAD.java
deleted file mode 100644
index ffc8f6f..0000000
--- a/src/main/java/org/apache/bcel/generic/FALOAD.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FALOAD - Load float from array
- * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FALOAD extends ArrayInstruction implements StackProducer {
-
-    private static final long serialVersionUID = 3369925718821219472L;
-
-
-    /** Load float from array
-     */
-    public FALOAD() {
-        super(org.apache.bcel.Constants.FALOAD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitFALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FASTORE.java b/src/main/java/org/apache/bcel/generic/FASTORE.java
deleted file mode 100644
index fec19b2..0000000
--- a/src/main/java/org/apache/bcel/generic/FASTORE.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FASTORE -  Store into float array
- * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FASTORE extends ArrayInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = -1583134120388207470L;
-
-
-    /** Store float into array
-     */
-    public FASTORE() {
-        super(org.apache.bcel.Constants.FASTORE);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitFASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FCMPG.java b/src/main/java/org/apache/bcel/generic/FCMPG.java
deleted file mode 100644
index 7d70167..0000000
--- a/src/main/java/org/apache/bcel/generic/FCMPG.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FCMPG - Compare floats: value1 &gt; value2
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FCMPG extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = -715944337480121908L;
-
-
-    public FCMPG() {
-        super(org.apache.bcel.Constants.FCMPG, (short) 1);
-    }
-
-
-    /** @return Type.FLOAT
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.FLOAT;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitFCMPG(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FCMPL.java b/src/main/java/org/apache/bcel/generic/FCMPL.java
deleted file mode 100644
index 705c191..0000000
--- a/src/main/java/org/apache/bcel/generic/FCMPL.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FCMPL - Compare floats: value1 &lt; value2
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FCMPL extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = -5283096582947056142L;
-
-
-    public FCMPL() {
-        super(org.apache.bcel.Constants.FCMPL, (short) 1);
-    }
-
-
-    /** @return Type.FLOAT
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.FLOAT;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitFCMPL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FCONST.java b/src/main/java/org/apache/bcel/generic/FCONST.java
deleted file mode 100644
index e1900e3..0000000
--- a/src/main/java/org/apache/bcel/generic/FCONST.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FCONST - Push 0.0, 1.0 or 2.0, other values cause an exception
- *
- * <PRE>Stack: ... -&gt; ..., </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FCONST extends Instruction implements ConstantPushInstruction {
-
-    private static final long serialVersionUID = 3018815844848018054L;
-    private float value;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    FCONST() {
-    }
-
-
-    public FCONST(float f) {
-        super(org.apache.bcel.Constants.FCONST_0, (short) 1);
-        if (f == 0.0) {
-            opcode = org.apache.bcel.Constants.FCONST_0;
-        } else if (f == 1.0) {
-            opcode = org.apache.bcel.Constants.FCONST_1;
-        } else if (f == 2.0) {
-            opcode = org.apache.bcel.Constants.FCONST_2;
-        } else {
-            throw new ClassGenException("FCONST can be used only for 0.0, 1.0 and 2.0: " + f);
-        }
-        value = f;
-    }
-
-
-    public Number getValue() {
-        return new Float(value);
-    }
-
-
-    /** @return Type.FLOAT
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.FLOAT;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitPushInstruction(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitConstantPushInstruction(this);
-        v.visitFCONST(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FDIV.java b/src/main/java/org/apache/bcel/generic/FDIV.java
deleted file mode 100644
index fe886a2..0000000
--- a/src/main/java/org/apache/bcel/generic/FDIV.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * FDIV - Divide floats
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FDIV extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -8536341322669578097L;
-
-
-    /** Divide floats
-     */
-    public FDIV() {
-        super(org.apache.bcel.Constants.FDIV);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitFDIV(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FLOAD.java b/src/main/java/org/apache/bcel/generic/FLOAD.java
deleted file mode 100644
index 34267cf..0000000
--- a/src/main/java/org/apache/bcel/generic/FLOAD.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FLOAD - Load float from local variable
- * <PRE>Stack ... -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FLOAD extends LoadInstruction {
-
-    private static final long serialVersionUID = 7970650436462434345L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    FLOAD() {
-        super(org.apache.bcel.Constants.FLOAD, org.apache.bcel.Constants.FLOAD_0);
-    }
-
-
-    /** Load float from local variable
-     * @param n index of local variable
-     */
-    public FLOAD(int n) {
-        super(org.apache.bcel.Constants.FLOAD, org.apache.bcel.Constants.FLOAD_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitFLOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FMUL.java b/src/main/java/org/apache/bcel/generic/FMUL.java
deleted file mode 100644
index 3d5ca62..0000000
--- a/src/main/java/org/apache/bcel/generic/FMUL.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * FMUL - Multiply floats
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FMUL extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -1981818566663824251L;
-
-
-    /** Multiply floats
-     */
-    public FMUL() {
-        super(org.apache.bcel.Constants.FMUL);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitFMUL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FNEG.java b/src/main/java/org/apache/bcel/generic/FNEG.java
deleted file mode 100644
index dcc6a35..0000000
--- a/src/main/java/org/apache/bcel/generic/FNEG.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FNEG - Negate float
- * <PRE>Stack: ..., value -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FNEG extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 2963444954300367744L;
-
-
-    public FNEG() {
-        super(org.apache.bcel.Constants.FNEG);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitFNEG(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FREM.java b/src/main/java/org/apache/bcel/generic/FREM.java
deleted file mode 100644
index 68b32f8..0000000
--- a/src/main/java/org/apache/bcel/generic/FREM.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * FREM - Remainder of floats
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FREM extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -9122754212888086133L;
-
-
-    /** Remainder of floats
-     */
-    public FREM() {
-        super(org.apache.bcel.Constants.FREM);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitFREM(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FRETURN.java b/src/main/java/org/apache/bcel/generic/FRETURN.java
deleted file mode 100644
index 8c70b2d..0000000
--- a/src/main/java/org/apache/bcel/generic/FRETURN.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FRETURN -  Return float from method
- * <PRE>Stack: ..., value -&gt; &lt;empty&gt;</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FRETURN extends ReturnInstruction {
-
-    private static final long serialVersionUID = -3630453809574277966L;
-
-
-    /** Return float from method
-     */
-    public FRETURN() {
-        super(org.apache.bcel.Constants.FRETURN);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitReturnInstruction(this);
-        v.visitFRETURN(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FSTORE.java b/src/main/java/org/apache/bcel/generic/FSTORE.java
deleted file mode 100644
index e3786b5..0000000
--- a/src/main/java/org/apache/bcel/generic/FSTORE.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * FSTORE - Store float into local variable
- * <PRE>Stack: ..., value -&gt; ... </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FSTORE extends StoreInstruction {
-
-    private static final long serialVersionUID = 2587266679484598179L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    FSTORE() {
-        super(org.apache.bcel.Constants.FSTORE, org.apache.bcel.Constants.FSTORE_0);
-    }
-
-
-    /** Store float into local variable
-     * @param n index of local variable
-     */
-    public FSTORE(int n) {
-        super(org.apache.bcel.Constants.FSTORE, org.apache.bcel.Constants.FSTORE_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitFSTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FSUB.java b/src/main/java/org/apache/bcel/generic/FSUB.java
deleted file mode 100644
index ece434e..0000000
--- a/src/main/java/org/apache/bcel/generic/FSUB.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * FSUB - Substract floats
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class FSUB extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 8403880233375858501L;
-
-
-    /** Substract floats
-     */
-    public FSUB() {
-        super(org.apache.bcel.Constants.FSUB);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitFSUB(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FieldGen.java b/src/main/java/org/apache/bcel/generic/FieldGen.java
deleted file mode 100644
index d4fcc86..0000000
--- a/src/main/java/org/apache/bcel/generic/FieldGen.java
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.Annotations;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantObject;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantValue;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.util.BCELComparator;
-
-/** 
- * Template class for building up a field.  The only extraordinary thing
- * one can do is to add a constant value attribute to a field (which must of
- * course be compatible with to the declared type).
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see Field
- */
-public class FieldGen extends FieldGenOrMethodGen {
-
-    private static final long serialVersionUID = -6050448955000008261L;
-    private Object value = null;
-    private static BCELComparator _cmp = new BCELComparator() {
-
-        public boolean equals( Object o1, Object o2 ) {
-            FieldGen THIS = (FieldGen) o1;
-            FieldGen THAT = (FieldGen) o2;
-            return THIS.getName().equals(THAT.getName())
-                    && THIS.getSignature().equals(THAT.getSignature());
-        }
-
-
-        public int hashCode( Object o ) {
-            FieldGen THIS = (FieldGen) o;
-            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
-        }
-    };
-
-
-    /**
-     * Declare a field. If it is static (isStatic() == true) and has a
-     * basic type like int or String it may have an initial value
-     * associated with it as defined by setInitValue().
-     *
-     * @param access_flags access qualifiers
-     * @param type  field type
-     * @param name field name
-     * @param cp constant pool
-     */
-    public FieldGen(int access_flags, Type type, String name, ConstantPoolGen cp) {
-        setAccessFlags(access_flags);
-        setType(type);
-        setName(name);
-        setConstantPool(cp);
-    }
-
-
-    /**
-     * Instantiate from existing field.
-     *
-     * @param field Field object
-     * @param cp constant pool (must contain the same entries as the field's constant pool)
-     */
-    public FieldGen(Field field, ConstantPoolGen cp) {
-        this(field.getAccessFlags(), Type.getType(field.getSignature()), field.getName(), cp);
-        Attribute[] attrs = field.getAttributes();
-        for (Attribute attr : attrs) {
-            if (attr instanceof ConstantValue) {
-                setValue(((ConstantValue) attr).getConstantValueIndex());
-            } else if (attr instanceof Annotations) {
-                Annotations runtimeAnnotations = (Annotations)attr;
-                AnnotationEntry[] annotationEntries = runtimeAnnotations.getAnnotationEntries();
-                for (AnnotationEntry element : annotationEntries) {
-                    addAnnotationEntry(new AnnotationEntryGen(element,cp,false));
-                }
-            } else {
-                addAttribute(attr);
-            }
-        }
-    }
-
-
-    private void setValue( int index ) {
-        ConstantPool cp = this.cp.getConstantPool();
-        Constant c = cp.getConstant(index);
-        value = ((ConstantObject) c).getConstantValue(cp);
-    }
-
-
-    /**
-     * Set (optional) initial value of field, otherwise it will be set to null/0/false
-     * by the JVM automatically.
-     */
-    public void setInitValue( String str ) {
-        checkType(  ObjectType.getInstance("java.lang.String"));
-        if (str != null) {
-            value = str;
-        }
-    }
-
-
-    public void setInitValue( long l ) {
-        checkType(Type.LONG);
-        if (l != 0L) {
-            value = new Long(l);
-        }
-    }
-
-
-    public void setInitValue( int i ) {
-        checkType(Type.INT);
-        if (i != 0) {
-            value = Integer.valueOf(i);
-        }
-    }
-
-
-    public void setInitValue( short s ) {
-        checkType(Type.SHORT);
-        if (s != 0) {
-            value = Integer.valueOf(s);
-        }
-    }
-
-
-    public void setInitValue( char c ) {
-        checkType(Type.CHAR);
-        if (c != 0) {
-            value = Integer.valueOf(c);
-        }
-    }
-
-
-    public void setInitValue( byte b ) {
-        checkType(Type.BYTE);
-        if (b != 0) {
-            value = Integer.valueOf(b);
-        }
-    }
-
-
-    public void setInitValue( boolean b ) {
-        checkType(Type.BOOLEAN);
-        if (b) {
-            value = Integer.valueOf(1);
-        }
-    }
-
-
-    public void setInitValue( float f ) {
-        checkType(Type.FLOAT);
-        if (f != 0.0) {
-            value = new Float(f);
-        }
-    }
-
-
-    public void setInitValue( double d ) {
-        checkType(Type.DOUBLE);
-        if (d != 0.0) {
-            value = new Double(d);
-        }
-    }
-
-
-    /** Remove any initial value.
-     */
-    public void cancelInitValue() {
-        value = null;
-    }
-
-
-    private void checkType( Type atype ) {
-        if (type == null) {
-            throw new ClassGenException("You haven't defined the type of the field yet");
-        }
-        if (!isFinal()) {
-            throw new ClassGenException("Only final fields may have an initial value!");
-        }
-        if (!type.equals(atype)) {
-            throw new ClassGenException("Types are not compatible: " + type + " vs. " + atype);
-        }
-    }
-
-
-    /**
-     * Get field object after having set up all necessary values.
-     */
-    public Field getField() {
-        String signature = getSignature();
-        int name_index = cp.addUtf8(name);
-        int signature_index = cp.addUtf8(signature);
-        if (value != null) {
-            checkType(type);
-            int index = addConstant();
-            addAttribute(new ConstantValue(cp.addUtf8("ConstantValue"), 2, index, cp
-                    .getConstantPool()));
-        }
-        addAnnotationsAsAttribute(cp);
-        return new Field(access_flags, name_index, signature_index, getAttributes(), cp
-                .getConstantPool());
-    }
-
-    private void addAnnotationsAsAttribute(ConstantPoolGen cp) {
-          Attribute[] attrs = AnnotationEntryGen.getAnnotationAttributes(cp,annotation_vec);
-        for (Attribute attr : attrs) {
-            addAttribute(attr);
-        }
-      }
-
-
-    private int addConstant() {
-        switch (type.getType()) {
-            case Constants.T_INT:
-            case Constants.T_CHAR:
-            case Constants.T_BYTE:
-            case Constants.T_BOOLEAN:
-            case Constants.T_SHORT:
-                return cp.addInteger(((Integer) value).intValue());
-            case Constants.T_FLOAT:
-                return cp.addFloat(((Float) value).floatValue());
-            case Constants.T_DOUBLE:
-                return cp.addDouble(((Double) value).doubleValue());
-            case Constants.T_LONG:
-                return cp.addLong(((Long) value).longValue());
-            case Constants.T_REFERENCE:
-                return cp.addString(((String) value));
-            default:
-                throw new RuntimeException("Oops: Unhandled : " + type.getType());
-        }
-    }
-
-
-    @Override
-    public String getSignature() {
-        return type.getSignature();
-    }
-
-    private List<FieldObserver> observers;
-
-
-    /** Add observer for this object.
-     */
-    public void addObserver( FieldObserver o ) {
-        if (observers == null) {
-            observers = new ArrayList<FieldObserver>();
-        }
-        observers.add(o);
-    }
-
-
-    /** Remove observer for this object.
-     */
-    public void removeObserver( FieldObserver o ) {
-        if (observers != null) {
-            observers.remove(o);
-        }
-    }
-
-
-    /** Call notify() method on all observers. This method is not called
-     * automatically whenever the state has changed, but has to be
-     * called by the user after he has finished editing the object.
-     */
-    public void update() {
-        if (observers != null) {
-            for (FieldObserver observer : observers ) {
-                observer.notify(this);
-            }
-        }
-    }
-
-
-    public String getInitValue() {
-        if (value != null) {
-            return value.toString();
-        } else {
-            return null;
-        }
-    }
-
-
-    /**
-     * Return string representation close to declaration format,
-     * `public static final short MAX = 100', e.g..
-     *
-     * @return String representation of field
-     */
-    @Override
-    public final String toString() {
-        String name, signature, access; // Short cuts to constant pool
-        access = Utility.accessToString(access_flags);
-        access = access.equals("") ? "" : (access + " ");
-        signature = type.toString();
-        name = getName();
-        StringBuilder buf = new StringBuilder(32);
-        buf.append(access).append(signature).append(" ").append(name);
-        String value = getInitValue();
-        if (value != null) {
-            buf.append(" = ").append(value);
-        }
-        return buf.toString();
-    }
-
-
-    /** @return deep copy of this field
-     */
-    public FieldGen copy( ConstantPoolGen cp ) {
-        FieldGen fg = (FieldGen) clone();
-        fg.setConstantPool(cp);
-        return fg;
-    }
-
-
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
-
-
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default two FieldGen objects are said to be equal when
-     * their names and signatures are equal.
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        return _cmp.equals(this, obj);
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default return the hashcode of the field's name XOR signature.
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return _cmp.hashCode(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java b/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
deleted file mode 100644
index ca8dac3..0000000
--- a/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.AccessFlags;
-import org.apache.bcel.classfile.Attribute;
-
-/**
- * Super class for FieldGen and MethodGen objects, since they have
- * some methods in common!
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAndTyped, Cloneable {
-
-    private static final long serialVersionUID = -2549303846821589647L;
-    protected String name;
-    protected Type type;
-    protected ConstantPoolGen cp;
-    private final List<Attribute> attribute_vec = new ArrayList<Attribute>();
-    protected List<AnnotationEntryGen>       annotation_vec= new ArrayList<AnnotationEntryGen>();
-
-
-    protected FieldGenOrMethodGen() {
-    }
-
-
-    public void setType( Type type ) {
-        if (type.getType() == Constants.T_ADDRESS) {
-            throw new IllegalArgumentException("Type can not be " + type);
-        }
-        this.type = type;
-    }
-
-
-    public Type getType() {
-        return type;
-    }
-
-
-    /** @return name of method/field.
-     */
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    public ConstantPoolGen getConstantPool() {
-        return cp;
-    }
-
-
-    public void setConstantPool( ConstantPoolGen cp ) {
-        this.cp = cp;
-    }
-
-
-    /**
-     * Add an attribute to this method. Currently, the JVM knows about
-     * the `Code', `ConstantValue', `Synthetic' and `Exceptions'
-     * attributes. Other attributes will be ignored by the JVM but do no
-     * harm.
-     *
-     * @param a attribute to be added
-     */
-    public void addAttribute( Attribute a ) {
-        attribute_vec.add(a);
-    }
-
-    public void addAnnotationEntry(AnnotationEntryGen ag)
-    {
-        annotation_vec.add(ag);
-    }
-
-
-    /**
-     * Remove an attribute.
-     */
-    public void removeAttribute( Attribute a ) {
-        attribute_vec.remove(a);
-    }
-
-    public void removeAnnotationEntry(AnnotationEntryGen ag)
-    {
-        annotation_vec.remove(ag);
-    }
-
-
-    /**
-     * Remove all attributes.
-     */
-    public void removeAttributes() {
-        attribute_vec.clear();
-    }
-
-    public void removeAnnotationEntries()
-    {
-        annotation_vec.clear();
-    }
-
-
-    /**
-     * @return all attributes of this method.
-     */
-    public Attribute[] getAttributes() {
-        Attribute[] attributes = new Attribute[attribute_vec.size()];
-        attribute_vec.toArray(attributes);
-        return attributes;
-    }
-
-    public AnnotationEntryGen[] getAnnotationEntries() {
-        AnnotationEntryGen[] annotations = new AnnotationEntryGen[annotation_vec.size()];
-          annotation_vec.toArray(annotations);
-          return annotations;
-      }
-
-
-    /** @return signature of method/field.
-     */
-    public abstract String getSignature();
-
-
-    @Override
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new Error("Clone Not Supported"); // never happens
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FieldInstruction.java b/src/main/java/org/apache/bcel/generic/FieldInstruction.java
deleted file mode 100644
index f0df091..0000000
--- a/src/main/java/org/apache/bcel/generic/FieldInstruction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.classfile.ConstantPool;
-
-/**
- * Super class for the GET/PUTxxx family of instructions.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class FieldInstruction extends FieldOrMethod {
-
-    private static final long serialVersionUID = -7870956226459765817L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    FieldInstruction() {
-    }
-
-
-    /**
-     * @param index to constant pool
-     */
-    protected FieldInstruction(short opcode, int index) {
-        super(opcode, index);
-    }
-
-
-    /**
-     * @return mnemonic for instruction with symbolic references resolved
-     */
-    @Override
-    public String toString( ConstantPool cp ) {
-        return org.apache.bcel.Constants.OPCODE_NAMES[opcode] + " "
-                + cp.constantToString(index, org.apache.bcel.Constants.CONSTANT_Fieldref);
-    }
-
-
-    /** @return size of field (1 or 2)
-     */
-    protected int getFieldSize( ConstantPoolGen cpg ) {
-        return Type.size(Type.getTypeSize(getSignature(cpg)));
-    }
-
-
-    /** @return return type of referenced field
-     */
-    @Override
-    public Type getType( ConstantPoolGen cpg ) {
-        return getFieldType(cpg);
-    }
-
-
-    /** @return type of field
-     */
-    public Type getFieldType( ConstantPoolGen cpg ) {
-        return Type.getType(getSignature(cpg));
-    }
-
-
-    /** @return name of referenced field.
-     */
-    public String getFieldName( ConstantPoolGen cpg ) {
-        return getName(cpg);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/FieldObserver.java b/src/main/java/org/apache/bcel/generic/FieldObserver.java
deleted file mode 100644
index 0e68633..0000000
--- a/src/main/java/org/apache/bcel/generic/FieldObserver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Imnplement this interface if you're interested in changes to a FieldGen object
- * and register yourself with addObserver().
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface FieldObserver {
-
-    void notify( FieldGen field );
-}
diff --git a/src/main/java/org/apache/bcel/generic/FieldOrMethod.java b/src/main/java/org/apache/bcel/generic/FieldOrMethod.java
deleted file mode 100644
index f9a926a..0000000
--- a/src/main/java/org/apache/bcel/generic/FieldOrMethod.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.classfile.ConstantCP;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantUtf8;
-
-// We have removed Deprecated from getClassName() as we continue to use
-// it with our tools and want to remove warnings.  (markro)
-
-/**
- * Super class for InvokeInstruction and FieldInstruction, since they have
- * some methods in common!
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class FieldOrMethod extends CPInstruction implements LoadClass {
-
-    private static final long serialVersionUID = 2036985877748835708L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    FieldOrMethod() {
-    }
-
-
-    /**
-     * @param index to constant pool
-     */
-    protected FieldOrMethod(short opcode, int index) {
-        super(opcode, index);
-    }
-
-
-    /** @return signature of referenced method/field.
-     */
-    public String getSignature( ConstantPoolGen cpg ) {
-        ConstantPool cp = cpg.getConstantPool();
-        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
-        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
-        return ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
-    }
-
-
-    /** @return name of referenced method/field.
-     */
-    public String getName( ConstantPoolGen cpg ) {
-        ConstantPool cp = cpg.getConstantPool();
-        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
-        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
-        return ((ConstantUtf8) cp.getConstant(cnat.getNameIndex())).getBytes();
-    }
-
-
-    /** @return name of the referenced class/interface
-     *  deprecated If the instruction references an array class,
-     *    this method will return "java.lang.Object".
-     *    For code generated by Java 1.5, this answer is
-     *    sometimes wrong (e.g., if the "clone()" method is
-     *    called on an array).  A better idea is to use
-     *    the getReferenceType() method, which correctly distinguishes
-     *    between class types and array types.
-     */
-//  @Deprecated
-    public String getClassName( ConstantPoolGen cpg ) {
-        ConstantPool cp = cpg.getConstantPool();
-        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
-        String className = cp.getConstantString(cmr.getClassIndex(),
-                org.apache.bcel.Constants.CONSTANT_Class);
-        if (className.startsWith("[")) {
-            // Turn array classes into java.lang.Object.
-            return "java.lang.Object";
-        }
-        return className.replace('/', '.');
-    }
-
-
-    /** @return type of the referenced class/interface
-     * @deprecated If the instruction references an array class,
-     *    the ObjectType returned will be invalid.  Use
-     *    getReferenceType() instead.
-     */
-    @Deprecated
-    public ObjectType getClassType( ConstantPoolGen cpg ) {
-        return ObjectType.getInstance(getClassName(cpg));
-    }
-
-
-    /**
-     * Return the reference type representing the class, interface,
-     * or array class referenced by the instruction.
-     * @param cpg the ConstantPoolGen used to create the instruction
-     * @return an ObjectType (if the referenced class type is a class
-     *   or interface), or an ArrayType (if the referenced class
-     *   type is an array class)
-     */
-    public ReferenceType getReferenceType( ConstantPoolGen cpg ) {
-        ConstantPool cp = cpg.getConstantPool();
-        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
-        String className = cp.getConstantString(cmr.getClassIndex(),
-                org.apache.bcel.Constants.CONSTANT_Class);
-        if (className.startsWith("[")) {
-            return (ArrayType) Type.getType(className);
-        } else {
-            className = className.replace('/', '.');
-            return ObjectType.getInstance(className);
-        }
-    }
-
-
-    /** @return type of the referenced class/interface
-     */
-    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
-        return getClassType(cpg);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/GETFIELD.java b/src/main/java/org/apache/bcel/generic/GETFIELD.java
deleted file mode 100644
index 3d79728..0000000
--- a/src/main/java/org/apache/bcel/generic/GETFIELD.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * GETFIELD - Fetch field from object
- * <PRE>Stack: ..., objectref -&gt; ..., value</PRE>
- * OR
- * <PRE>Stack: ..., objectref -&gt; ..., value.word1, value.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class GETFIELD extends FieldInstruction implements ExceptionThrower, StackConsumer,
-        StackProducer {
-
-    private static final long serialVersionUID = -6510928743515082496L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GETFIELD() {
-    }
-
-
-    public GETFIELD(int index) {
-        super(Constants.GETFIELD, index);
-    }
-
-
-    @Override
-    public int produceStack( ConstantPoolGen cpg ) {
-        return getFieldSize(cpg);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitStackConsumer(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitFieldInstruction(this);
-        v.visitGETFIELD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/GETSTATIC.java b/src/main/java/org/apache/bcel/generic/GETSTATIC.java
deleted file mode 100644
index d145bc2..0000000
--- a/src/main/java/org/apache/bcel/generic/GETSTATIC.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * GETSTATIC - Fetch static field from class
- * <PRE>Stack: ..., -&gt; ..., value</PRE>
- * OR
- * <PRE>Stack: ..., -&gt; ..., value.word1, value.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class GETSTATIC extends FieldInstruction implements PushInstruction, ExceptionThrower {
-
-    private static final long serialVersionUID = -477185594622953478L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GETSTATIC() {
-    }
-
-
-    public GETSTATIC(int index) {
-        super(Constants.GETSTATIC, index);
-    }
-
-
-    @Override
-    public int produceStack( ConstantPoolGen cpg ) {
-        return getFieldSize(cpg);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitPushInstruction(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitFieldInstruction(this);
-        v.visitGETSTATIC(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/GOTO.java b/src/main/java/org/apache/bcel/generic/GOTO.java
deleted file mode 100644
index 2babadb..0000000
--- a/src/main/java/org/apache/bcel/generic/GOTO.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/** 
- * GOTO - Branch always (to relative offset, not absolute address)
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class GOTO extends GotoInstruction implements VariableLengthInstruction {
-
-    private static final long serialVersionUID = 6106731367505145625L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GOTO() {
-    }
-
-
-    public GOTO(InstructionHandle target) {
-        super(org.apache.bcel.Constants.GOTO, target);
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        index = getTargetOffset();
-        if (opcode == org.apache.bcel.Constants.GOTO) {
-            super.dump(out);
-        } else { // GOTO_W
-            index = getTargetOffset();
-            out.writeByte(opcode);
-            out.writeInt(index);
-        }
-    }
-
-
-    /** Called in pass 2 of InstructionList.setPositions() in order to update
-     * the branch target, that may shift due to variable length instructions.
-     */
-    @Override
-    protected int updatePosition( int offset, int max_offset ) {
-        int i = getTargetOffset(); // Depending on old position value
-        position += offset; // Position may be shifted by preceding expansions
-        if (Math.abs(i) >= (32767 - max_offset)) { // to large for short (estimate)
-            opcode = org.apache.bcel.Constants.GOTO_W;
-            short old_length = length;
-            length = 5;
-            return length - old_length;
-        }
-        return 0;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitVariableLengthInstruction(this);
-        v.visitUnconditionalBranch(this);
-        v.visitBranchInstruction(this);
-        v.visitGotoInstruction(this);
-        v.visitGOTO(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/GOTO_W.java b/src/main/java/org/apache/bcel/generic/GOTO_W.java
deleted file mode 100644
index 6760b43..0000000
--- a/src/main/java/org/apache/bcel/generic/GOTO_W.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * GOTO_W - Branch always (to relative offset, not absolute address)
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class GOTO_W extends GotoInstruction {
-
-    private static final long serialVersionUID = -344799540124265957L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GOTO_W() {
-    }
-
-
-    public GOTO_W(InstructionHandle target) {
-        super(org.apache.bcel.Constants.GOTO_W, target);
-        length = 5;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        index = getTargetOffset();
-        out.writeByte(opcode);
-        out.writeInt(index);
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        index = bytes.readInt();
-        length = 5;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitUnconditionalBranch(this);
-        v.visitBranchInstruction(this);
-        v.visitGotoInstruction(this);
-        v.visitGOTO_W(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/GotoInstruction.java b/src/main/java/org/apache/bcel/generic/GotoInstruction.java
deleted file mode 100644
index 3d9de03..0000000
--- a/src/main/java/org/apache/bcel/generic/GotoInstruction.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * Super class for GOTO
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class GotoInstruction extends BranchInstruction implements UnconditionalBranch {
-
-    private static final long serialVersionUID = -2882435228056875173L;
-
-
-    GotoInstruction(short opcode, InstructionHandle target) {
-        super(opcode, target);
-    }
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GotoInstruction() {
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/I2B.java b/src/main/java/org/apache/bcel/generic/I2B.java
deleted file mode 100644
index 3c84972..0000000
--- a/src/main/java/org/apache/bcel/generic/I2B.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * I2B - Convert int to byte
- * <PRE>Stack: ..., value -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class I2B extends ConversionInstruction {
-
-    private static final long serialVersionUID = -260969101469366410L;
-
-
-    /** Convert int to byte
-     */
-    public I2B() {
-        super(org.apache.bcel.Constants.I2B);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitI2B(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/I2C.java b/src/main/java/org/apache/bcel/generic/I2C.java
deleted file mode 100644
index 3bd218f..0000000
--- a/src/main/java/org/apache/bcel/generic/I2C.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * I2C - Convert int to char
- * <PRE>Stack: ..., value -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class I2C extends ConversionInstruction {
-
-    private static final long serialVersionUID = 7396507741159927455L;
-
-
-    /** Convert int to char
-     */
-    public I2C() {
-        super(org.apache.bcel.Constants.I2C);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitI2C(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/I2D.java b/src/main/java/org/apache/bcel/generic/I2D.java
deleted file mode 100644
index a13587c..0000000
--- a/src/main/java/org/apache/bcel/generic/I2D.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * I2D - Convert int to double
- * <PRE>Stack: ..., value -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class I2D extends ConversionInstruction {
-
-    private static final long serialVersionUID = 4267924152721121331L;
-
-
-    /** Convert int to double
-     */
-    public I2D() {
-        super(org.apache.bcel.Constants.I2D);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitI2D(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/I2F.java b/src/main/java/org/apache/bcel/generic/I2F.java
deleted file mode 100644
index a8cb4a1..0000000
--- a/src/main/java/org/apache/bcel/generic/I2F.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * I2F - Convert int to float
- * <PRE>Stack: ..., value -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class I2F extends ConversionInstruction {
-
-    private static final long serialVersionUID = -816875455957376859L;
-
-
-    /** Convert int to float
-     */
-    public I2F() {
-        super(org.apache.bcel.Constants.I2F);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitI2F(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/I2L.java b/src/main/java/org/apache/bcel/generic/I2L.java
deleted file mode 100644
index 0527568..0000000
--- a/src/main/java/org/apache/bcel/generic/I2L.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * I2L - Convert int to long
- * <PRE>Stack: ..., value -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class I2L extends ConversionInstruction {
-
-    private static final long serialVersionUID = 8923707875178789326L;
-
-
-    /** Convert int to long
-     */
-    public I2L() {
-        super(org.apache.bcel.Constants.I2L);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitI2L(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/I2S.java b/src/main/java/org/apache/bcel/generic/I2S.java
deleted file mode 100644
index 7a308de..0000000
--- a/src/main/java/org/apache/bcel/generic/I2S.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * I2S - Convert int to short
- * <PRE>Stack: ..., value -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class I2S extends ConversionInstruction {
-
-    private static final long serialVersionUID = -2414292630144687091L;
-
-
-    public I2S() {
-        super(org.apache.bcel.Constants.I2S);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitI2S(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IADD.java b/src/main/java/org/apache/bcel/generic/IADD.java
deleted file mode 100644
index 2232940..0000000
--- a/src/main/java/org/apache/bcel/generic/IADD.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IADD - Add ints
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IADD extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 8749750216946526117L;
-
-
-    /** Add ints
-     */
-    public IADD() {
-        super(org.apache.bcel.Constants.IADD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitIADD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IALOAD.java b/src/main/java/org/apache/bcel/generic/IALOAD.java
deleted file mode 100644
index aa53199..0000000
--- a/src/main/java/org/apache/bcel/generic/IALOAD.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IALOAD - Load int from array
- * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IALOAD extends ArrayInstruction implements StackProducer {
-
-    private static final long serialVersionUID = -3275094472217586613L;
-
-
-    /** 
-     * Load int from array
-     */
-    public IALOAD() {
-        super(org.apache.bcel.Constants.IALOAD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitIALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IAND.java b/src/main/java/org/apache/bcel/generic/IAND.java
deleted file mode 100644
index 17c4f73..0000000
--- a/src/main/java/org/apache/bcel/generic/IAND.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IAND - Bitwise AND int
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IAND extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -3190292062305201816L;
-
-
-    public IAND() {
-        super(org.apache.bcel.Constants.IAND);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitIAND(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IASTORE.java b/src/main/java/org/apache/bcel/generic/IASTORE.java
deleted file mode 100644
index e2b4e87..0000000
--- a/src/main/java/org/apache/bcel/generic/IASTORE.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IASTORE -  Store into int array
- * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IASTORE extends ArrayInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = -3570157505504012648L;
-
-
-    /** 
-     * Store into int array
-     */
-    public IASTORE() {
-        super(org.apache.bcel.Constants.IASTORE);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitIASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ICONST.java b/src/main/java/org/apache/bcel/generic/ICONST.java
deleted file mode 100644
index eb2a0fd..0000000
--- a/src/main/java/org/apache/bcel/generic/ICONST.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ICONST - Push value between -1, ..., 5, other values cause an exception
- *
- * <PRE>Stack: ... -&gt; ..., </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ICONST extends Instruction implements ConstantPushInstruction {
-
-    private static final long serialVersionUID = -174595933747784635L;
-    private int value;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ICONST() {
-    }
-
-
-    public ICONST(int i) {
-        super(org.apache.bcel.Constants.ICONST_0, (short) 1);
-        if ((i >= -1) && (i <= 5)) {
-            opcode = (short) (org.apache.bcel.Constants.ICONST_0 + i); // Even works for i == -1
-        } else {
-            throw new ClassGenException("ICONST can be used only for value between -1 and 5: " + i);
-        }
-        value = i;
-    }
-
-
-    public Number getValue() {
-        return Integer.valueOf(value);
-    }
-
-
-    /** @return Type.INT
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.INT;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitPushInstruction(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitConstantPushInstruction(this);
-        v.visitICONST(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IDIV.java b/src/main/java/org/apache/bcel/generic/IDIV.java
deleted file mode 100644
index 210e7af..0000000
--- a/src/main/java/org/apache/bcel/generic/IDIV.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * IDIV - Divide ints
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IDIV extends ArithmeticInstruction implements ExceptionThrower {
-
-    private static final long serialVersionUID = -7104037931993634172L;
-
-
-    /** Divide ints
-     */
-    public IDIV() {
-        super(org.apache.bcel.Constants.IDIV);
-    }
-
-
-    /** @return exceptions this instruction may cause
-     */
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitIDIV(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IFEQ.java b/src/main/java/org/apache/bcel/generic/IFEQ.java
deleted file mode 100644
index 9072eb5..0000000
--- a/src/main/java/org/apache/bcel/generic/IFEQ.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IFEQ - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFEQ extends IfInstruction {
-
-    private static final long serialVersionUID = -6140576561545855324L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFEQ() {
-    }
-
-
-    public IFEQ(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IFEQ, target);
-    }
-
-
-    /**
-     * @return negation of instruction, e.g. IFEQ.negate() == IFNE
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IFNE(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIFEQ(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IFGE.java b/src/main/java/org/apache/bcel/generic/IFGE.java
deleted file mode 100644
index 9d1e973..0000000
--- a/src/main/java/org/apache/bcel/generic/IFGE.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IFGE - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFGE extends IfInstruction {
-
-    private static final long serialVersionUID = 8975527282985945729L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFGE() {
-    }
-
-
-    public IFGE(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IFGE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IFLT(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIFGE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IFGT.java b/src/main/java/org/apache/bcel/generic/IFGT.java
deleted file mode 100644
index 82dc2dd..0000000
--- a/src/main/java/org/apache/bcel/generic/IFGT.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IFGT - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFGT extends IfInstruction {
-
-    private static final long serialVersionUID = -6271055211127179697L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFGT() {
-    }
-
-
-    public IFGT(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IFGT, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IFLE(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIFGT(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IFLE.java b/src/main/java/org/apache/bcel/generic/IFLE.java
deleted file mode 100644
index 0f847cb..0000000
--- a/src/main/java/org/apache/bcel/generic/IFLE.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IFLE - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFLE extends IfInstruction {
-
-    private static final long serialVersionUID = 7916641859064664263L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFLE() {
-    }
-
-
-    public IFLE(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IFLE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IFGT(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIFLE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IFLT.java b/src/main/java/org/apache/bcel/generic/IFLT.java
deleted file mode 100644
index c7929cb..0000000
--- a/src/main/java/org/apache/bcel/generic/IFLT.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IFLT - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFLT extends IfInstruction {
-
-    private static final long serialVersionUID = 2489268758129304231L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFLT() {
-    }
-
-
-    public IFLT(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IFLT, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IFGE(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIFLT(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IFNE.java b/src/main/java/org/apache/bcel/generic/IFNE.java
deleted file mode 100644
index 05e21c1..0000000
--- a/src/main/java/org/apache/bcel/generic/IFNE.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IFNE - Branch if int comparison with zero succeeds
- *
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFNE extends IfInstruction {
-
-    private static final long serialVersionUID = -5417647524534847152L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFNE() {
-    }
-
-
-    public IFNE(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IFNE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IFEQ(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIFNE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IFNONNULL.java b/src/main/java/org/apache/bcel/generic/IFNONNULL.java
deleted file mode 100644
index ce2a8ae..0000000
--- a/src/main/java/org/apache/bcel/generic/IFNONNULL.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IFNONNULL - Branch if reference is not null
- *
- * <PRE>Stack: ..., reference -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFNONNULL extends IfInstruction {
-
-    private static final long serialVersionUID = -6378085152112796792L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFNONNULL() {
-    }
-
-
-    public IFNONNULL(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IFNONNULL, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IFNULL(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIFNONNULL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IFNULL.java b/src/main/java/org/apache/bcel/generic/IFNULL.java
deleted file mode 100644
index 6e352f0..0000000
--- a/src/main/java/org/apache/bcel/generic/IFNULL.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IFNULL - Branch if reference is not null
- *
- * <PRE>Stack: ..., reference -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IFNULL extends IfInstruction {
-
-    private static final long serialVersionUID = 608514554995424349L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IFNULL() {
-    }
-
-
-    public IFNULL(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IFNULL, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IFNONNULL(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIFNULL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IF_ACMPEQ.java b/src/main/java/org/apache/bcel/generic/IF_ACMPEQ.java
deleted file mode 100644
index cba17b5..0000000
--- a/src/main/java/org/apache/bcel/generic/IF_ACMPEQ.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IF_ACMPEQ - Branch if reference comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ACMPEQ extends IfInstruction {
-
-    private static final long serialVersionUID = -4528733406576671849L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ACMPEQ() {
-    }
-
-
-    public IF_ACMPEQ(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IF_ACMPEQ, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IF_ACMPNE(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIF_ACMPEQ(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IF_ACMPNE.java b/src/main/java/org/apache/bcel/generic/IF_ACMPNE.java
deleted file mode 100644
index 54563b0..0000000
--- a/src/main/java/org/apache/bcel/generic/IF_ACMPNE.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IF_ACMPNE - Branch if reference comparison doesn't succeed
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ACMPNE extends IfInstruction {
-
-    private static final long serialVersionUID = -5532275839192747402L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ACMPNE() {
-    }
-
-
-    public IF_ACMPNE(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IF_ACMPNE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IF_ACMPEQ(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIF_ACMPNE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IF_ICMPEQ.java b/src/main/java/org/apache/bcel/generic/IF_ICMPEQ.java
deleted file mode 100644
index 2a3e5a4..0000000
--- a/src/main/java/org/apache/bcel/generic/IF_ICMPEQ.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IF_ICMPEQ - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPEQ extends IfInstruction {
-
-    private static final long serialVersionUID = -3149605608148417123L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPEQ() {
-    }
-
-
-    public IF_ICMPEQ(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IF_ICMPEQ, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IF_ICMPNE(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIF_ICMPEQ(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IF_ICMPGE.java b/src/main/java/org/apache/bcel/generic/IF_ICMPGE.java
deleted file mode 100644
index df12da4..0000000
--- a/src/main/java/org/apache/bcel/generic/IF_ICMPGE.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IF_ICMPGE - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPGE extends IfInstruction {
-
-    private static final long serialVersionUID = -1887574519712008723L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPGE() {
-    }
-
-
-    public IF_ICMPGE(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IF_ICMPGE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IF_ICMPLT(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIF_ICMPGE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IF_ICMPGT.java b/src/main/java/org/apache/bcel/generic/IF_ICMPGT.java
deleted file mode 100644
index 72f9fce..0000000
--- a/src/main/java/org/apache/bcel/generic/IF_ICMPGT.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IF_ICMPGT - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPGT extends IfInstruction {
-
-    private static final long serialVersionUID = -2569877744173094534L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPGT() {
-    }
-
-
-    public IF_ICMPGT(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IF_ICMPGT, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IF_ICMPLE(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIF_ICMPGT(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IF_ICMPLE.java b/src/main/java/org/apache/bcel/generic/IF_ICMPLE.java
deleted file mode 100644
index ef931c6..0000000
--- a/src/main/java/org/apache/bcel/generic/IF_ICMPLE.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IF_ICMPLE - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPLE extends IfInstruction {
-
-    private static final long serialVersionUID = -6863915647505504868L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPLE() {
-    }
-
-
-    public IF_ICMPLE(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IF_ICMPLE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IF_ICMPGT(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIF_ICMPLE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IF_ICMPLT.java b/src/main/java/org/apache/bcel/generic/IF_ICMPLT.java
deleted file mode 100644
index 3aba740..0000000
--- a/src/main/java/org/apache/bcel/generic/IF_ICMPLT.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IF_ICMPLT - Branch if int comparison succeeds
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPLT extends IfInstruction {
-
-    private static final long serialVersionUID = -6835991395337462478L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPLT() {
-    }
-
-
-    public IF_ICMPLT(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IF_ICMPLT, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IF_ICMPGE(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIF_ICMPLT(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IF_ICMPNE.java b/src/main/java/org/apache/bcel/generic/IF_ICMPNE.java
deleted file mode 100644
index 0d1cd28..0000000
--- a/src/main/java/org/apache/bcel/generic/IF_ICMPNE.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IF_ICMPNE - Branch if int comparison doesn't succeed
- *
- * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IF_ICMPNE extends IfInstruction {
-
-    private static final long serialVersionUID = -3908465635973274661L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IF_ICMPNE() {
-    }
-
-
-    public IF_ICMPNE(InstructionHandle target) {
-        super(org.apache.bcel.Constants.IF_ICMPNE, target);
-    }
-
-
-    /**
-     * @return negation of instruction
-     */
-    @Override
-    public IfInstruction negate() {
-        return new IF_ICMPEQ(target);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitIfInstruction(this);
-        v.visitIF_ICMPNE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IINC.java b/src/main/java/org/apache/bcel/generic/IINC.java
deleted file mode 100644
index 4dcbd54..0000000
--- a/src/main/java/org/apache/bcel/generic/IINC.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/**
- * IINC - Increment local variable by constant
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IINC extends LocalVariableInstruction {
-
-    private static final long serialVersionUID = -8938364416647466869L;
-    private boolean wide;
-    private int c;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IINC() {
-    }
-
-
-    /**
-     * @param n index of local variable
-     * @param c increment factor
-     */
-    public IINC(int n, int c) {
-        super(); // Default behaviour of LocalVariableInstruction causes error
-        this.opcode = org.apache.bcel.Constants.IINC;
-        this.length = (short) 3;
-        setIndex(n); // May set wide as side effect
-        setIncrement(c);
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        if (wide) {
-            out.writeByte(org.apache.bcel.Constants.WIDE);
-        }
-        out.writeByte(opcode);
-        if (wide) {
-            out.writeShort(n);
-            out.writeShort(c);
-        } else {
-            out.writeByte(n);
-            out.writeByte(c);
-        }
-    }
-
-
-    private void setWide() {
-        wide = (n > org.apache.bcel.Constants.MAX_BYTE) || (Math.abs(c) > Byte.MAX_VALUE);
-        if (wide) {
-            length = 6; // wide byte included  
-        } else {
-            length = 3;
-        }
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        this.wide = wide;
-        if (wide) {
-            length = 6;
-            n = bytes.readUnsignedShort();
-            c = bytes.readShort();
-        } else {
-            length = 3;
-            n = bytes.readUnsignedByte();
-            c = bytes.readByte();
-        }
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + c;
-    }
-
-
-    /**
-     * Set index of local variable.
-     */
-    @Override
-    public final void setIndex( int n ) {
-        if (n < 0) {
-            throw new ClassGenException("Negative index value: " + n);
-        }
-        this.n = n;
-        setWide();
-    }
-
-
-    /**
-     * @return increment factor
-     */
-    public final int getIncrement() {
-        return c;
-    }
-
-
-    /**
-     * Set increment factor.
-     */
-    public final void setIncrement( int c ) {
-        this.c = c;
-        setWide();
-    }
-
-
-    /** @return int type
-     */
-    @Override
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.INT;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitLocalVariableInstruction(this);
-        v.visitIINC(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ILOAD.java b/src/main/java/org/apache/bcel/generic/ILOAD.java
deleted file mode 100644
index 523883a..0000000
--- a/src/main/java/org/apache/bcel/generic/ILOAD.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ILOAD - Load int from local variable onto stack
- * <PRE>Stack: ... -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ILOAD extends LoadInstruction {
-
-    private static final long serialVersionUID = 7568563453093184347L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ILOAD() {
-        super(org.apache.bcel.Constants.ILOAD, org.apache.bcel.Constants.ILOAD_0);
-    }
-
-
-    /** Load int from local variable
-     * @param n index of local variable
-     */
-    public ILOAD(int n) {
-        super(org.apache.bcel.Constants.ILOAD, org.apache.bcel.Constants.ILOAD_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitILOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IMPDEP1.java b/src/main/java/org/apache/bcel/generic/IMPDEP1.java
deleted file mode 100644
index 484d919..0000000
--- a/src/main/java/org/apache/bcel/generic/IMPDEP1.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * IMPDEP1 - Implementation dependent
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IMPDEP1 extends Instruction {
-
-    private static final long serialVersionUID = 134641616863598508L;
-
-
-    public IMPDEP1() {
-        super(org.apache.bcel.Constants.IMPDEP1, (short) 1);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitIMPDEP1(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IMPDEP2.java b/src/main/java/org/apache/bcel/generic/IMPDEP2.java
deleted file mode 100644
index a69edbc..0000000
--- a/src/main/java/org/apache/bcel/generic/IMPDEP2.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * IMPDEP2 - Implementation dependent
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IMPDEP2 extends Instruction {
-
-    private static final long serialVersionUID = 4097564761941607538L;
-
-
-    public IMPDEP2() {
-        super(org.apache.bcel.Constants.IMPDEP2, (short) 1);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitIMPDEP2(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IMUL.java b/src/main/java/org/apache/bcel/generic/IMUL.java
deleted file mode 100644
index b673ead..0000000
--- a/src/main/java/org/apache/bcel/generic/IMUL.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IMUL - Multiply ints
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IMUL extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -7475024981820292461L;
-
-
-    /** Multiply ints
-     */
-    public IMUL() {
-        super(org.apache.bcel.Constants.IMUL);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitIMUL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/INEG.java b/src/main/java/org/apache/bcel/generic/INEG.java
deleted file mode 100644
index 103f63e..0000000
--- a/src/main/java/org/apache/bcel/generic/INEG.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * INEG - Negate int
- * <PRE>Stack: ..., value -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class INEG extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 6175987548738672934L;
-
-
-    public INEG() {
-        super(org.apache.bcel.Constants.INEG);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitINEG(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/INSTANCEOF.java b/src/main/java/org/apache/bcel/generic/INSTANCEOF.java
deleted file mode 100644
index de62b7d..0000000
--- a/src/main/java/org/apache/bcel/generic/INSTANCEOF.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * INSTANCEOF - Determine if object is of given type
- * <PRE>Stack: ..., objectref -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class INSTANCEOF extends CPInstruction implements LoadClass, ExceptionThrower,
-        StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = -1068668479062613915L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INSTANCEOF() {
-    }
-
-
-    public INSTANCEOF(int index) {
-        super(org.apache.bcel.Constants.INSTANCEOF, index);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return org.apache.bcel.ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION;
-    }
-
-
-    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
-        Type t = getType(cpg);
-        if (t instanceof ArrayType) {
-            t = ((ArrayType) t).getBasicType();
-        }
-        return (t instanceof ObjectType) ? (ObjectType) t : null;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitLoadClass(this);
-        v.visitExceptionThrower(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitTypedInstruction(this);
-        v.visitCPInstruction(this);
-        v.visitINSTANCEOF(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/INVOKEDYNAMIC.java b/src/main/java/org/apache/bcel/generic/INVOKEDYNAMIC.java
deleted file mode 100644
index e994c4a..0000000
--- a/src/main/java/org/apache/bcel/generic/INVOKEDYNAMIC.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.util.ByteSequence;
-
-/**
- * Class for INVOKEDYNAMIC. Not an instance of InvokeInstruction, since that class
- * expects to be able to get the class of the method. Ignores the bootstrap
- * mechanism entirely.
- *
- * @version $Id: InvokeInstruction.java 1152072 2011-07-29 01:54:05Z dbrosius $
- * @since 6.0
- */
-public class INVOKEDYNAMIC extends InvokeInstruction {
-
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INVOKEDYNAMIC() {
-    }
-
-
-    public INVOKEDYNAMIC(int index) {
-        super(Constants.INVOKEDYNAMIC, index);
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        out.writeShort(index);
-        out.writeByte(0);
-        out.writeByte(0);
-       }
-
-
-    /**
-     * Read needed data (i.e., index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        super.initFromFile(bytes, wide);
-        length = 5;
-        bytes.readByte(); // Skip 0 byte
-        bytes.readByte(); // Skip 0 byte
-    }
-
-
-    /**
-     * @return mnemonic for instruction with symbolic references resolved
-     */
-    @Override
-    public String toString( ConstantPool cp ) {
-        return super.toString(cp);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 3] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ILLEGAL_ACCESS_ERROR;
-        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 1] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
-        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitStackProducer(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitInvokeInstruction(this);
-        v.visitINVOKEDYNAMIC(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java b/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java
deleted file mode 100644
index 218a160..0000000
--- a/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * INVOKEINTERFACE - Invoke interface method
- * <PRE>Stack: ..., objectref, [arg1, [arg2 ...]] -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class INVOKEINTERFACE extends InvokeInstruction {
-
-    private static final long serialVersionUID = 8198753714085379482L;
-    private int nargs; // Number of arguments on stack (number of stack slots), called "count" in vmspec2
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INVOKEINTERFACE() {
-    }
-
-
-    public INVOKEINTERFACE(int index, int nargs) {
-        super(Constants.INVOKEINTERFACE, index);
-        length = 5;
-        if (nargs < 1) {
-            throw new ClassGenException("Number of arguments must be > 0 " + nargs);
-        }
-        this.nargs = nargs;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        out.writeShort(index);
-        out.writeByte(nargs);
-        out.writeByte(0);
-    }
-
-
-    /**
-     * The <B>count</B> argument according to the Java Language Specification,
-     * Second Edition.
-     */
-    public int getCount() {
-        return nargs;
-    }
-
-
-    /**
-     * Read needed data (i.e., index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        super.initFromFile(bytes, wide);
-        length = 5;
-        nargs = bytes.readUnsignedByte();
-        bytes.readByte(); // Skip 0 byte
-    }
-
-
-    /**
-     * @return mnemonic for instruction with symbolic references resolved
-     */
-    @Override
-    public String toString( ConstantPool cp ) {
-        return super.toString(cp) + " " + nargs;
-    }
-
-
-    @Override
-    public int consumeStack( ConstantPoolGen cpg ) { // nargs is given in byte-code
-        return nargs; // nargs includes this reference
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 3] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ILLEGAL_ACCESS_ERROR;
-        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 1] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
-        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitStackProducer(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitInvokeInstruction(this);
-        v.visitINVOKEINTERFACE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java b/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java
deleted file mode 100644
index 05d8d4c..0000000
--- a/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * INVOKESPECIAL - Invoke instance method; special handling for superclass, private
- * and instance initialization method invocations
- *
- * <PRE>Stack: ..., objectref, [arg1, [arg2 ...]] -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class INVOKESPECIAL extends InvokeInstruction {
-
-    private static final long serialVersionUID = -6615779239416262849L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INVOKESPECIAL() {
-    }
-
-
-    public INVOKESPECIAL(int index) {
-        super(Constants.INVOKESPECIAL, index);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 3] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitStackProducer(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitInvokeInstruction(this);
-        v.visitINVOKESPECIAL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java b/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java
deleted file mode 100644
index 5ac750d..0000000
--- a/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * INVOKESTATIC - Invoke a class (static) method
- *
- * <PRE>Stack: ..., [arg1, [arg2 ...]] -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class INVOKESTATIC extends InvokeInstruction {
-
-    private static final long serialVersionUID = -2160020248508943620L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INVOKESTATIC() {
-    }
-
-
-    public INVOKESTATIC(int index) {
-        super(Constants.INVOKESTATIC, index);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitStackProducer(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitInvokeInstruction(this);
-        v.visitINVOKESTATIC(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java b/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java
deleted file mode 100644
index bf0fe5d..0000000
--- a/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * INVOKEVIRTUAL - Invoke instance method; dispatch based on class
- *
- * <PRE>Stack: ..., objectref, [arg1, [arg2 ...]] -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class INVOKEVIRTUAL extends InvokeInstruction {
-
-    private static final long serialVersionUID = -7355623307528443725L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INVOKEVIRTUAL() {
-    }
-
-
-    public INVOKEVIRTUAL(int index) {
-        super(Constants.INVOKEVIRTUAL, index);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 3] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitStackProducer(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitInvokeInstruction(this);
-        v.visitINVOKEVIRTUAL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IOR.java b/src/main/java/org/apache/bcel/generic/IOR.java
deleted file mode 100644
index 5ae4214..0000000
--- a/src/main/java/org/apache/bcel/generic/IOR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IOR - Bitwise OR int
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IOR extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -6128609553204409153L;
-
-
-    public IOR() {
-        super(org.apache.bcel.Constants.IOR);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitIOR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IREM.java b/src/main/java/org/apache/bcel/generic/IREM.java
deleted file mode 100644
index 3d2ab7f..0000000
--- a/src/main/java/org/apache/bcel/generic/IREM.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * IREM - Remainder of int
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IREM extends ArithmeticInstruction implements ExceptionThrower {
-
-    private static final long serialVersionUID = 834504719616513910L;
-
-
-    /** Remainder of ints
-     */
-    public IREM() {
-        super(org.apache.bcel.Constants.IREM);
-    }
-
-
-    /** @return exceptions this instruction may cause
-     */
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitIREM(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IRETURN.java b/src/main/java/org/apache/bcel/generic/IRETURN.java
deleted file mode 100644
index c195b51..0000000
--- a/src/main/java/org/apache/bcel/generic/IRETURN.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IRETURN -  Return int from method
- * <PRE>Stack: ..., value -&gt; &lt;empty&gt;</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IRETURN extends ReturnInstruction {
-
-    private static final long serialVersionUID = 4067606299818510584L;
-
-
-    /** Return int from method
-     */
-    public IRETURN() {
-        super(org.apache.bcel.Constants.IRETURN);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitReturnInstruction(this);
-        v.visitIRETURN(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ISHL.java b/src/main/java/org/apache/bcel/generic/ISHL.java
deleted file mode 100644
index 634653d..0000000
--- a/src/main/java/org/apache/bcel/generic/ISHL.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * ISHL - Arithmetic shift left int
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ISHL extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -7440998118555505042L;
-
-
-    public ISHL() {
-        super(org.apache.bcel.Constants.ISHL);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitISHL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ISHR.java b/src/main/java/org/apache/bcel/generic/ISHR.java
deleted file mode 100644
index bdf2fac..0000000
--- a/src/main/java/org/apache/bcel/generic/ISHR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * ISHR - Arithmetic shift right int
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ISHR extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 7401114050910307281L;
-
-
-    public ISHR() {
-        super(org.apache.bcel.Constants.ISHR);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitISHR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ISTORE.java b/src/main/java/org/apache/bcel/generic/ISTORE.java
deleted file mode 100644
index 5e1ce52..0000000
--- a/src/main/java/org/apache/bcel/generic/ISTORE.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ISTORE - Store int from stack into local variable
- * <PRE>Stack: ..., value -&gt; ... </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ISTORE extends StoreInstruction {
-
-    private static final long serialVersionUID = 6155373362393796303L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ISTORE() {
-        super(org.apache.bcel.Constants.ISTORE, org.apache.bcel.Constants.ISTORE_0);
-    }
-
-
-    /** Store int into local variable
-     * @param n index of local variable
-     */
-    public ISTORE(int n) {
-        super(org.apache.bcel.Constants.ISTORE, org.apache.bcel.Constants.ISTORE_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitISTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ISUB.java b/src/main/java/org/apache/bcel/generic/ISUB.java
deleted file mode 100644
index 6337819..0000000
--- a/src/main/java/org/apache/bcel/generic/ISUB.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * ISUB - Substract ints
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ISUB extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 1878271684888856459L;
-
-
-    /** Substract ints
-     */
-    public ISUB() {
-        super(org.apache.bcel.Constants.ISUB);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitISUB(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IUSHR.java b/src/main/java/org/apache/bcel/generic/IUSHR.java
deleted file mode 100644
index 13c0af7..0000000
--- a/src/main/java/org/apache/bcel/generic/IUSHR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IUSHR - Logical shift right int
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IUSHR extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -4507658555921269426L;
-
-
-    public IUSHR() {
-        super(org.apache.bcel.Constants.IUSHR);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitIUSHR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IXOR.java b/src/main/java/org/apache/bcel/generic/IXOR.java
deleted file mode 100644
index b017145..0000000
--- a/src/main/java/org/apache/bcel/generic/IXOR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * IXOR - Bitwise XOR int
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IXOR extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -6524415552072672532L;
-
-
-    public IXOR() {
-        super(org.apache.bcel.Constants.IXOR);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitIXOR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/IfInstruction.java b/src/main/java/org/apache/bcel/generic/IfInstruction.java
deleted file mode 100644
index ed98a06..0000000
--- a/src/main/java/org/apache/bcel/generic/IfInstruction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Super class for the IFxxx family of instructions.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class IfInstruction extends BranchInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = -781053966413893941L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IfInstruction() {
-    }
-
-
-    /**
-     * @param opcode opcode of instruction
-     * @param target Target instruction to branch to
-     */
-    protected IfInstruction(short opcode, InstructionHandle target) {
-        super(opcode, target);
-    }
-
-
-    /**
-     * @return negation of instruction, e.g. IFEQ.negate() == IFNE
-     */
-    public abstract IfInstruction negate();
-}
diff --git a/src/main/java/org/apache/bcel/generic/IndexedInstruction.java b/src/main/java/org/apache/bcel/generic/IndexedInstruction.java
deleted file mode 100644
index 11ee967..0000000
--- a/src/main/java/org/apache/bcel/generic/IndexedInstruction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denote entity that refers to an index, e.g. local variable instructions,
- * RET, CPInstruction, etc.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface IndexedInstruction {
-
-    int getIndex();
-
-
-    void setIndex( int index );
-}
diff --git a/src/main/java/org/apache/bcel/generic/Instruction.java b/src/main/java/org/apache/bcel/generic/Instruction.java
deleted file mode 100644
index 8ae3092..0000000
--- a/src/main/java/org/apache/bcel/generic/Instruction.java
+++ /dev/null
@@ -1,568 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * Abstract super class for all Java byte codes.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class Instruction implements Cloneable, Serializable {
-
-    private static final long serialVersionUID = -2518741982574515847L;
-    protected short length = 1; // Length of instruction in bytes 
-    protected short opcode = -1; // Opcode number
-    private static InstructionComparator cmp = InstructionComparator.DEFAULT;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    Instruction() {
-    }
-
-
-    public Instruction(short opcode, short length) {
-        this.length = length;
-        this.opcode = opcode;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode); // Common for all instructions
-    }
-
-
-    /** @return name of instruction, i.e., opcode name
-     */
-    public String getName() {
-        return Constants.OPCODE_NAMES[opcode];
-    }
-
-
-    /**
-     * Long output format:
-     *
-     * &lt;name of opcode&gt; "["&lt;opcode number&gt;"]" 
-     * "("&lt;length of instruction&gt;")"
-     *
-     * @param verbose long/short format switch
-     * @return mnemonic for instruction
-     */
-    public String toString( boolean verbose ) {
-        if (verbose) {
-            return getName() + "[" + opcode + "](" + length + ")";
-        } else {
-            return getName();
-        }
-    }
-
-
-    /**
-     * @return mnemonic for instruction in verbose format
-     */
-    @Override
-    public String toString() {
-        return toString(true);
-    }
-
-
-    /**
-     * @return mnemonic for instruction with sumbolic references resolved
-     */
-    public String toString( ConstantPool cp ) {
-        return toString(false);
-    }
-
-
-    /**
-     * Use with caution, since `BranchInstruction's have a `target' reference which
-     * is not copied correctly (only basic types are). This also applies for 
-     * `Select' instructions with their multiple branch targets.
-     *
-     * @see BranchInstruction
-     * @return (shallow) copy of an instruction
-     */
-    public Instruction copy() {
-        Instruction i = null;
-        // "Constant" instruction, no need to duplicate
-        if (InstructionConstants.INSTRUCTIONS[this.getOpcode()] != null) {
-            i = this;
-        } else {
-            try {
-                i = (Instruction) clone();
-            } catch (CloneNotSupportedException e) {
-                System.err.println(e);
-            }
-        }
-        return i;
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     *
-     * @param bytes byte sequence to read from
-     * @param wide "wide" instruction flag
-     * @throws IOException may be thrown if the implementation needs to read data from the file
-     */
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-    }
-
-
-    /**
-     * Read an instruction from (byte code) input stream and return the
-     * appropiate object.
-     *
-     * @param bytes input stream bytes
-     * @return instruction object being read
-     */
-    public static Instruction readInstruction( ByteSequence bytes ) throws IOException {
-        boolean wide = false;
-        short opcode = (short) bytes.readUnsignedByte();
-        Instruction obj = null;
-        if (opcode == Constants.WIDE) { // Read next opcode after wide byte
-            wide = true;
-            opcode = (short) bytes.readUnsignedByte();
-        }
-        if (InstructionConstants.INSTRUCTIONS[opcode] != null) {
-            return InstructionConstants.INSTRUCTIONS[opcode]; // Used predefined immutable object, if available
-        }
-
-        switch (opcode) {
-            case Constants.BIPUSH:
-                obj = new BIPUSH();
-                break;
-            case Constants.SIPUSH:
-                obj = new SIPUSH();
-                break;
-            case Constants.LDC:
-                obj = new LDC();
-                break;
-            case Constants.LDC_W:
-                obj = new LDC_W();
-                break;
-            case Constants.LDC2_W:
-                obj = new LDC2_W();
-                break;
-            case Constants.ILOAD:
-                obj = new ILOAD();
-                break;
-            case Constants.LLOAD:
-                obj = new LLOAD();
-                break;
-            case Constants.FLOAD:
-                obj = new FLOAD();
-                break;
-            case Constants.DLOAD:
-                obj = new DLOAD();
-                break;
-            case Constants.ALOAD:
-                obj = new ALOAD();
-                break;
-            case Constants.ILOAD_0:
-                obj = new ILOAD(0);
-                break;
-            case Constants.ILOAD_1:
-                obj = new ILOAD(1);
-                break;
-            case Constants.ILOAD_2:
-                obj = new ILOAD(2);
-                break;
-            case Constants.ILOAD_3:
-                obj = new ILOAD(3);
-                break;
-            case Constants.LLOAD_0:
-                obj = new LLOAD(0);
-                break;
-            case Constants.LLOAD_1:
-                obj = new LLOAD(1);
-                break;
-            case Constants.LLOAD_2:
-                obj = new LLOAD(2);
-                break;
-            case Constants.LLOAD_3:
-                obj = new LLOAD(3);
-                break;
-            case Constants.FLOAD_0:
-                obj = new FLOAD(0);
-                break;
-            case Constants.FLOAD_1:
-                obj = new FLOAD(1);
-                break;
-            case Constants.FLOAD_2:
-                obj = new FLOAD(2);
-                break;
-            case Constants.FLOAD_3:
-                obj = new FLOAD(3);
-                break;
-            case Constants.DLOAD_0:
-                obj = new DLOAD(0);
-                break;
-            case Constants.DLOAD_1:
-                obj = new DLOAD(1);
-                break;
-            case Constants.DLOAD_2:
-                obj = new DLOAD(2);
-                break;
-            case Constants.DLOAD_3:
-                obj = new DLOAD(3);
-                break;
-            case Constants.ALOAD_0:
-                obj = new ALOAD(0);
-                break;
-            case Constants.ALOAD_1:
-                obj = new ALOAD(1);
-                break;
-            case Constants.ALOAD_2:
-                obj = new ALOAD(2);
-                break;
-            case Constants.ALOAD_3:
-                obj = new ALOAD(3);
-                break;
-            case Constants.ISTORE:
-                obj = new ISTORE();
-                break;
-            case Constants.LSTORE:
-                obj = new LSTORE();
-                break;
-            case Constants.FSTORE:
-                obj = new FSTORE();
-                break;
-            case Constants.DSTORE:
-                obj = new DSTORE();
-                break;
-            case Constants.ASTORE:
-                obj = new ASTORE();
-                break;
-            case Constants.ISTORE_0:
-                obj = new ISTORE(0);
-                break;
-            case Constants.ISTORE_1:
-                obj = new ISTORE(1);
-                break;
-            case Constants.ISTORE_2:
-                obj = new ISTORE(2);
-                break;
-            case Constants.ISTORE_3:
-                obj = new ISTORE(3);
-                break;
-            case Constants.LSTORE_0:
-                obj = new LSTORE(0);
-                break;
-            case Constants.LSTORE_1:
-                obj = new LSTORE(1);
-                break;
-            case Constants.LSTORE_2:
-                obj = new LSTORE(2);
-                break;
-            case Constants.LSTORE_3:
-                obj = new LSTORE(3);
-                break;
-            case Constants.FSTORE_0:
-                obj = new FSTORE(0);
-                break;
-            case Constants.FSTORE_1:
-                obj = new FSTORE(1);
-                break;
-            case Constants.FSTORE_2:
-                obj = new FSTORE(2);
-                break;
-            case Constants.FSTORE_3:
-                obj = new FSTORE(3);
-                break;
-            case Constants.DSTORE_0:
-                obj = new DSTORE(0);
-                break;
-            case Constants.DSTORE_1:
-                obj = new DSTORE(1);
-                break;
-            case Constants.DSTORE_2:
-                obj = new DSTORE(2);
-                break;
-            case Constants.DSTORE_3:
-                obj = new DSTORE(3);
-                break;
-            case Constants.ASTORE_0:
-                obj = new ASTORE(0);
-                break;
-            case Constants.ASTORE_1:
-                obj = new ASTORE(1);
-                break;
-            case Constants.ASTORE_2:
-                obj = new ASTORE(2);
-                break;
-            case Constants.ASTORE_3:
-                obj = new ASTORE(3);
-                break;
-            case Constants.IINC:
-                obj = new IINC();
-                break;
-            case Constants.IFEQ:
-                obj = new IFEQ();
-                break;
-            case Constants.IFNE:
-                obj = new IFNE();
-                break;
-            case Constants.IFLT:
-                obj = new IFLT();
-                break;
-            case Constants.IFGE:
-                obj = new IFGE();
-                break;
-            case Constants.IFGT:
-                obj = new IFGT();
-                break;
-            case Constants.IFLE:
-                obj = new IFLE();
-                break;
-            case Constants.IF_ICMPEQ:
-                obj = new IF_ICMPEQ();
-                break;
-            case Constants.IF_ICMPNE:
-                obj = new IF_ICMPNE();
-                break;
-            case Constants.IF_ICMPLT:
-                obj = new IF_ICMPLT();
-                break;
-            case Constants.IF_ICMPGE:
-                obj = new IF_ICMPGE();
-                break;
-            case Constants.IF_ICMPGT:
-                obj = new IF_ICMPGT();
-                break;
-            case Constants.IF_ICMPLE:
-                obj = new IF_ICMPLE();
-                break;
-            case Constants.IF_ACMPEQ:
-                obj = new IF_ACMPEQ();
-                break;
-            case Constants.IF_ACMPNE:
-                obj = new IF_ACMPNE();
-                break;
-            case Constants.GOTO:
-                obj = new GOTO();
-                break;
-            case Constants.JSR:
-                obj = new JSR();
-                break;
-            case Constants.RET:
-                obj = new RET();
-                break;
-            case Constants.TABLESWITCH:
-                obj = new TABLESWITCH();
-                break;
-            case Constants.LOOKUPSWITCH:
-                obj = new LOOKUPSWITCH();
-                break;
-            case Constants.GETSTATIC:
-                obj = new GETSTATIC();
-                break;
-            case Constants.PUTSTATIC:
-                obj = new PUTSTATIC();
-                break;
-            case Constants.GETFIELD:
-                obj = new GETFIELD();
-                break;
-            case Constants.PUTFIELD:
-                obj = new PUTFIELD();
-                break;
-            case Constants.INVOKEVIRTUAL:
-                obj = new INVOKEVIRTUAL();
-                break;
-            case Constants.INVOKESPECIAL:
-                obj = new INVOKESPECIAL();
-                break;
-            case Constants.INVOKESTATIC:
-                obj = new INVOKESTATIC();
-                break;
-            case Constants.INVOKEINTERFACE:
-                obj = new INVOKEINTERFACE();
-                break;
-            case Constants.INVOKEDYNAMIC:
-                obj = new INVOKEDYNAMIC();
-                break;
-            case Constants.NEW:
-                obj = new NEW();
-                break;
-            case Constants.NEWARRAY:
-                obj = new NEWARRAY();
-                break;
-            case Constants.ANEWARRAY:
-                obj = new ANEWARRAY();
-                break;
-            case Constants.CHECKCAST:
-                obj = new CHECKCAST();
-                break;
-            case Constants.INSTANCEOF:
-                obj = new INSTANCEOF();
-                break;
-            case Constants.MULTIANEWARRAY:
-                obj = new MULTIANEWARRAY();
-                break;
-            case Constants.IFNULL:
-                obj = new IFNULL();
-                break;
-            case Constants.IFNONNULL:
-                obj = new IFNONNULL();
-                break;
-            case Constants.GOTO_W:
-                obj = new GOTO_W();
-                break;
-            case Constants.JSR_W:
-                obj = new JSR_W();
-                break;
-            case Constants.BREAKPOINT:
-                obj = new BREAKPOINT();
-                break;
-            case Constants.IMPDEP1:
-                obj = new IMPDEP1();
-                break;
-            case Constants.IMPDEP2:
-                obj = new IMPDEP2();
-                break;
-            default:
-                throw new ClassGenException("Illegal opcode detected: " + opcode);
-
-        }
-
-        if (wide
-                && !((obj instanceof LocalVariableInstruction) || (obj instanceof IINC) || (obj instanceof RET))) {
-            throw new ClassGenException("Illegal opcode after wide: " + opcode);
-        }
-        obj.setOpcode(opcode);
-        obj.initFromFile(bytes, wide); // Do further initializations, if any
-        return obj;
-    }
-
-    /**
-     * This method also gives right results for instructions whose
-     * effect on the stack depends on the constant pool entry they
-     * reference.
-     *  @return Number of words consumed from stack by this instruction,
-     * or Constants.UNPREDICTABLE, if this can not be computed statically
-     */
-    public int consumeStack( ConstantPoolGen cpg ) {
-        return Constants.CONSUME_STACK[opcode];
-    }
-
-
-    /**
-     * This method also gives right results for instructions whose
-     * effect on the stack depends on the constant pool entry they
-     * reference.
-     * @return Number of words produced onto stack by this instruction,
-     * or Constants.UNPREDICTABLE, if this can not be computed statically
-     */
-    public int produceStack( ConstantPoolGen cpg ) {
-        return Constants.PRODUCE_STACK[opcode];
-    }
-
-
-    /**
-     * @return this instructions opcode
-     */
-    public short getOpcode() {
-        return opcode;
-    }
-
-
-    /**
-     * @return length (in bytes) of instruction
-     */
-    public int getLength() {
-        return length;
-    }
-
-
-    /**
-     * Needed in readInstruction.
-     */
-    private void setOpcode( short opcode ) {
-        this.opcode = opcode;
-    }
-
-
-    /** Some instructions may be reused, so don't do anything by default.
-     */
-    void dispose() {
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    public abstract void accept( Visitor v );
-
-
-    /** Get Comparator object used in the equals() method to determine
-     * equality of instructions.
-     *
-     * @return currently used comparator for equals()
-     * @deprecated use the built in comparator, or wrap this class in another object that implements these methods
-     */
-    @Deprecated
-    public static InstructionComparator getComparator() {
-        return cmp;
-    }
-
-
-    /** Set comparator to be used for equals().
-      * @deprecated use the built in comparator, or wrap this class in another object that implements these methods
-     */
-    @Deprecated
-    public static void setComparator( InstructionComparator c ) {
-        cmp = c;
-    }
-
-
-    /** Check for equality, delegated to comparator
-     * @return true if that is an Instruction and has the same opcode
-     */
-    @Override
-    public boolean equals( Object that ) {
-        return (that instanceof Instruction) ? cmp.equals(this, (Instruction) that) : false;
-    }
-
-    /** calculate the hashCode of this object
-     * @return the hashCode
-     */
-    @Override
-    public int hashCode() {
-        return opcode;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/InstructionComparator.java b/src/main/java/org/apache/bcel/generic/InstructionComparator.java
deleted file mode 100644
index 41a7de2..0000000
--- a/src/main/java/org/apache/bcel/generic/InstructionComparator.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Equality of instructions isn't clearly to be defined. You might
- * wish, for example, to compare whether instructions have the same
- * meaning. E.g., whether two INVOKEVIRTUALs describe the same
- * call.<br>The DEFAULT comparator however, considers two instructions
- * to be equal if they have same opcode and point to the same indexes
- * (if any) in the constant pool or the same local variable index. Branch
- * instructions must have the same target.
- *
- * @see Instruction
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface InstructionComparator {
-
-    public static final InstructionComparator DEFAULT = new InstructionComparator() {
-
-        public boolean equals( Instruction i1, Instruction i2 ) {
-            if (i1.opcode == i2.opcode) {
-                if (i1 instanceof Select) {
-                    InstructionHandle[] t1 = ((Select) i1).getTargets();
-                    InstructionHandle[] t2 = ((Select) i2).getTargets();
-                    if (t1.length == t2.length) {
-                        for (int i = 0; i < t1.length; i++) {
-                            if (t1[i] != t2[i]) {
-                                return false;
-                            }
-                        }
-                        return true;
-                    }
-                } else if (i1 instanceof BranchInstruction) {
-                    return ((BranchInstruction) i1).target == ((BranchInstruction) i2).target;
-                } else if (i1 instanceof ConstantPushInstruction) {
-                    return ((ConstantPushInstruction) i1).getValue().equals(
-                            ((ConstantPushInstruction) i2).getValue());
-                } else if (i1 instanceof IndexedInstruction) {
-                    return ((IndexedInstruction) i1).getIndex() == ((IndexedInstruction) i2)
-                            .getIndex();
-                } else if (i1 instanceof NEWARRAY) {
-                    return ((NEWARRAY) i1).getTypecode() == ((NEWARRAY) i2).getTypecode();
-                } else {
-                    return true;
-                }
-            }
-            return false;
-        }
-    };
-
-
-    boolean equals( Instruction i1, Instruction i2 );
-}
diff --git a/src/main/java/org/apache/bcel/generic/InstructionConstants.java b/src/main/java/org/apache/bcel/generic/InstructionConstants.java
deleted file mode 100644
index f0911e0..0000000
--- a/src/main/java/org/apache/bcel/generic/InstructionConstants.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-
-/** 
- * This interface contains shareable instruction objects.
- *
- * In order to save memory you can use some instructions multiply,
- * since they have an immutable state and are directly derived from
- * Instruction.  I.e. they have no instance fields that could be
- * changed. Since some of these instructions like ICONST_0 occur
- * very frequently this can save a lot of time and space. This
- * feature is an adaptation of the FlyWeight design pattern, we
- * just use an array instead of a factory.
- *
- * The Instructions can also accessed directly under their names, so
- * it's possible to write il.append(Instruction.ICONST_0);
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface InstructionConstants {
-
-    /** Predefined instruction objects
-     */
-    public static final Instruction NOP = new NOP();
-    public static final Instruction ACONST_NULL = new ACONST_NULL();
-    public static final Instruction ICONST_M1 = new ICONST(-1);
-    public static final Instruction ICONST_0 = new ICONST(0);
-    public static final Instruction ICONST_1 = new ICONST(1);
-    public static final Instruction ICONST_2 = new ICONST(2);
-    public static final Instruction ICONST_3 = new ICONST(3);
-    public static final Instruction ICONST_4 = new ICONST(4);
-    public static final Instruction ICONST_5 = new ICONST(5);
-    public static final Instruction LCONST_0 = new LCONST(0);
-    public static final Instruction LCONST_1 = new LCONST(1);
-    public static final Instruction FCONST_0 = new FCONST(0);
-    public static final Instruction FCONST_1 = new FCONST(1);
-    public static final Instruction FCONST_2 = new FCONST(2);
-    public static final Instruction DCONST_0 = new DCONST(0);
-    public static final Instruction DCONST_1 = new DCONST(1);
-    public static final ArrayInstruction IALOAD = new IALOAD();
-    public static final ArrayInstruction LALOAD = new LALOAD();
-    public static final ArrayInstruction FALOAD = new FALOAD();
-    public static final ArrayInstruction DALOAD = new DALOAD();
-    public static final ArrayInstruction AALOAD = new AALOAD();
-    public static final ArrayInstruction BALOAD = new BALOAD();
-    public static final ArrayInstruction CALOAD = new CALOAD();
-    public static final ArrayInstruction SALOAD = new SALOAD();
-    public static final ArrayInstruction IASTORE = new IASTORE();
-    public static final ArrayInstruction LASTORE = new LASTORE();
-    public static final ArrayInstruction FASTORE = new FASTORE();
-    public static final ArrayInstruction DASTORE = new DASTORE();
-    public static final ArrayInstruction AASTORE = new AASTORE();
-    public static final ArrayInstruction BASTORE = new BASTORE();
-    public static final ArrayInstruction CASTORE = new CASTORE();
-    public static final ArrayInstruction SASTORE = new SASTORE();
-    public static final StackInstruction POP = new POP();
-    public static final StackInstruction POP2 = new POP2();
-    public static final StackInstruction DUP = new DUP();
-    public static final StackInstruction DUP_X1 = new DUP_X1();
-    public static final StackInstruction DUP_X2 = new DUP_X2();
-    public static final StackInstruction DUP2 = new DUP2();
-    public static final StackInstruction DUP2_X1 = new DUP2_X1();
-    public static final StackInstruction DUP2_X2 = new DUP2_X2();
-    public static final StackInstruction SWAP = new SWAP();
-    public static final ArithmeticInstruction IADD = new IADD();
-    public static final ArithmeticInstruction LADD = new LADD();
-    public static final ArithmeticInstruction FADD = new FADD();
-    public static final ArithmeticInstruction DADD = new DADD();
-    public static final ArithmeticInstruction ISUB = new ISUB();
-    public static final ArithmeticInstruction LSUB = new LSUB();
-    public static final ArithmeticInstruction FSUB = new FSUB();
-    public static final ArithmeticInstruction DSUB = new DSUB();
-    public static final ArithmeticInstruction IMUL = new IMUL();
-    public static final ArithmeticInstruction LMUL = new LMUL();
-    public static final ArithmeticInstruction FMUL = new FMUL();
-    public static final ArithmeticInstruction DMUL = new DMUL();
-    public static final ArithmeticInstruction IDIV = new IDIV();
-    public static final ArithmeticInstruction LDIV = new LDIV();
-    public static final ArithmeticInstruction FDIV = new FDIV();
-    public static final ArithmeticInstruction DDIV = new DDIV();
-    public static final ArithmeticInstruction IREM = new IREM();
-    public static final ArithmeticInstruction LREM = new LREM();
-    public static final ArithmeticInstruction FREM = new FREM();
-    public static final ArithmeticInstruction DREM = new DREM();
-    public static final ArithmeticInstruction INEG = new INEG();
-    public static final ArithmeticInstruction LNEG = new LNEG();
-    public static final ArithmeticInstruction FNEG = new FNEG();
-    public static final ArithmeticInstruction DNEG = new DNEG();
-    public static final ArithmeticInstruction ISHL = new ISHL();
-    public static final ArithmeticInstruction LSHL = new LSHL();
-    public static final ArithmeticInstruction ISHR = new ISHR();
-    public static final ArithmeticInstruction LSHR = new LSHR();
-    public static final ArithmeticInstruction IUSHR = new IUSHR();
-    public static final ArithmeticInstruction LUSHR = new LUSHR();
-    public static final ArithmeticInstruction IAND = new IAND();
-    public static final ArithmeticInstruction LAND = new LAND();
-    public static final ArithmeticInstruction IOR = new IOR();
-    public static final ArithmeticInstruction LOR = new LOR();
-    public static final ArithmeticInstruction IXOR = new IXOR();
-    public static final ArithmeticInstruction LXOR = new LXOR();
-    public static final ConversionInstruction I2L = new I2L();
-    public static final ConversionInstruction I2F = new I2F();
-    public static final ConversionInstruction I2D = new I2D();
-    public static final ConversionInstruction L2I = new L2I();
-    public static final ConversionInstruction L2F = new L2F();
-    public static final ConversionInstruction L2D = new L2D();
-    public static final ConversionInstruction F2I = new F2I();
-    public static final ConversionInstruction F2L = new F2L();
-    public static final ConversionInstruction F2D = new F2D();
-    public static final ConversionInstruction D2I = new D2I();
-    public static final ConversionInstruction D2L = new D2L();
-    public static final ConversionInstruction D2F = new D2F();
-    public static final ConversionInstruction I2B = new I2B();
-    public static final ConversionInstruction I2C = new I2C();
-    public static final ConversionInstruction I2S = new I2S();
-    public static final Instruction LCMP = new LCMP();
-    public static final Instruction FCMPL = new FCMPL();
-    public static final Instruction FCMPG = new FCMPG();
-    public static final Instruction DCMPL = new DCMPL();
-    public static final Instruction DCMPG = new DCMPG();
-    public static final ReturnInstruction IRETURN = new IRETURN();
-    public static final ReturnInstruction LRETURN = new LRETURN();
-    public static final ReturnInstruction FRETURN = new FRETURN();
-    public static final ReturnInstruction DRETURN = new DRETURN();
-    public static final ReturnInstruction ARETURN = new ARETURN();
-    public static final ReturnInstruction RETURN = new RETURN();
-    public static final Instruction ARRAYLENGTH = new ARRAYLENGTH();
-    public static final Instruction ATHROW = new ATHROW();
-    public static final Instruction MONITORENTER = new MONITORENTER();
-    public static final Instruction MONITOREXIT = new MONITOREXIT();
-    /** You can use these constants in multiple places safely, if you can guarantee
-     * that you will never alter their internal values, e.g. call setIndex().
-     */
-    public static final LocalVariableInstruction THIS = new ALOAD(0);
-    public static final LocalVariableInstruction ALOAD_0 = THIS;
-    public static final LocalVariableInstruction ALOAD_1 = new ALOAD(1);
-    public static final LocalVariableInstruction ALOAD_2 = new ALOAD(2);
-    public static final LocalVariableInstruction ILOAD_0 = new ILOAD(0);
-    public static final LocalVariableInstruction ILOAD_1 = new ILOAD(1);
-    public static final LocalVariableInstruction ILOAD_2 = new ILOAD(2);
-    public static final LocalVariableInstruction ASTORE_0 = new ASTORE(0);
-    public static final LocalVariableInstruction ASTORE_1 = new ASTORE(1);
-    public static final LocalVariableInstruction ASTORE_2 = new ASTORE(2);
-    public static final LocalVariableInstruction ISTORE_0 = new ISTORE(0);
-    public static final LocalVariableInstruction ISTORE_1 = new ISTORE(1);
-    public static final LocalVariableInstruction ISTORE_2 = new ISTORE(2);
-    /** Get object via its opcode, for immutable instructions like
-     * branch instructions entries are set to null.
-     */
-    public static final Instruction[] INSTRUCTIONS = new Instruction[256];
-    /** Interfaces may have no static initializers, so we simulate this
-     * with an inner class.
-     */
-    static final Clinit bla = new Clinit();
-
-    static class Clinit {
-
-        Clinit() {
-            INSTRUCTIONS[Constants.NOP] = NOP;
-            INSTRUCTIONS[Constants.ACONST_NULL] = ACONST_NULL;
-            INSTRUCTIONS[Constants.ICONST_M1] = ICONST_M1;
-            INSTRUCTIONS[Constants.ICONST_0] = ICONST_0;
-            INSTRUCTIONS[Constants.ICONST_1] = ICONST_1;
-            INSTRUCTIONS[Constants.ICONST_2] = ICONST_2;
-            INSTRUCTIONS[Constants.ICONST_3] = ICONST_3;
-            INSTRUCTIONS[Constants.ICONST_4] = ICONST_4;
-            INSTRUCTIONS[Constants.ICONST_5] = ICONST_5;
-            INSTRUCTIONS[Constants.LCONST_0] = LCONST_0;
-            INSTRUCTIONS[Constants.LCONST_1] = LCONST_1;
-            INSTRUCTIONS[Constants.FCONST_0] = FCONST_0;
-            INSTRUCTIONS[Constants.FCONST_1] = FCONST_1;
-            INSTRUCTIONS[Constants.FCONST_2] = FCONST_2;
-            INSTRUCTIONS[Constants.DCONST_0] = DCONST_0;
-            INSTRUCTIONS[Constants.DCONST_1] = DCONST_1;
-            INSTRUCTIONS[Constants.IALOAD] = IALOAD;
-            INSTRUCTIONS[Constants.LALOAD] = LALOAD;
-            INSTRUCTIONS[Constants.FALOAD] = FALOAD;
-            INSTRUCTIONS[Constants.DALOAD] = DALOAD;
-            INSTRUCTIONS[Constants.AALOAD] = AALOAD;
-            INSTRUCTIONS[Constants.BALOAD] = BALOAD;
-            INSTRUCTIONS[Constants.CALOAD] = CALOAD;
-            INSTRUCTIONS[Constants.SALOAD] = SALOAD;
-            INSTRUCTIONS[Constants.IASTORE] = IASTORE;
-            INSTRUCTIONS[Constants.LASTORE] = LASTORE;
-            INSTRUCTIONS[Constants.FASTORE] = FASTORE;
-            INSTRUCTIONS[Constants.DASTORE] = DASTORE;
-            INSTRUCTIONS[Constants.AASTORE] = AASTORE;
-            INSTRUCTIONS[Constants.BASTORE] = BASTORE;
-            INSTRUCTIONS[Constants.CASTORE] = CASTORE;
-            INSTRUCTIONS[Constants.SASTORE] = SASTORE;
-            INSTRUCTIONS[Constants.POP] = POP;
-            INSTRUCTIONS[Constants.POP2] = POP2;
-            INSTRUCTIONS[Constants.DUP] = DUP;
-            INSTRUCTIONS[Constants.DUP_X1] = DUP_X1;
-            INSTRUCTIONS[Constants.DUP_X2] = DUP_X2;
-            INSTRUCTIONS[Constants.DUP2] = DUP2;
-            INSTRUCTIONS[Constants.DUP2_X1] = DUP2_X1;
-            INSTRUCTIONS[Constants.DUP2_X2] = DUP2_X2;
-            INSTRUCTIONS[Constants.SWAP] = SWAP;
-            INSTRUCTIONS[Constants.IADD] = IADD;
-            INSTRUCTIONS[Constants.LADD] = LADD;
-            INSTRUCTIONS[Constants.FADD] = FADD;
-            INSTRUCTIONS[Constants.DADD] = DADD;
-            INSTRUCTIONS[Constants.ISUB] = ISUB;
-            INSTRUCTIONS[Constants.LSUB] = LSUB;
-            INSTRUCTIONS[Constants.FSUB] = FSUB;
-            INSTRUCTIONS[Constants.DSUB] = DSUB;
-            INSTRUCTIONS[Constants.IMUL] = IMUL;
-            INSTRUCTIONS[Constants.LMUL] = LMUL;
-            INSTRUCTIONS[Constants.FMUL] = FMUL;
-            INSTRUCTIONS[Constants.DMUL] = DMUL;
-            INSTRUCTIONS[Constants.IDIV] = IDIV;
-            INSTRUCTIONS[Constants.LDIV] = LDIV;
-            INSTRUCTIONS[Constants.FDIV] = FDIV;
-            INSTRUCTIONS[Constants.DDIV] = DDIV;
-            INSTRUCTIONS[Constants.IREM] = IREM;
-            INSTRUCTIONS[Constants.LREM] = LREM;
-            INSTRUCTIONS[Constants.FREM] = FREM;
-            INSTRUCTIONS[Constants.DREM] = DREM;
-            INSTRUCTIONS[Constants.INEG] = INEG;
-            INSTRUCTIONS[Constants.LNEG] = LNEG;
-            INSTRUCTIONS[Constants.FNEG] = FNEG;
-            INSTRUCTIONS[Constants.DNEG] = DNEG;
-            INSTRUCTIONS[Constants.ISHL] = ISHL;
-            INSTRUCTIONS[Constants.LSHL] = LSHL;
-            INSTRUCTIONS[Constants.ISHR] = ISHR;
-            INSTRUCTIONS[Constants.LSHR] = LSHR;
-            INSTRUCTIONS[Constants.IUSHR] = IUSHR;
-            INSTRUCTIONS[Constants.LUSHR] = LUSHR;
-            INSTRUCTIONS[Constants.IAND] = IAND;
-            INSTRUCTIONS[Constants.LAND] = LAND;
-            INSTRUCTIONS[Constants.IOR] = IOR;
-            INSTRUCTIONS[Constants.LOR] = LOR;
-            INSTRUCTIONS[Constants.IXOR] = IXOR;
-            INSTRUCTIONS[Constants.LXOR] = LXOR;
-            INSTRUCTIONS[Constants.I2L] = I2L;
-            INSTRUCTIONS[Constants.I2F] = I2F;
-            INSTRUCTIONS[Constants.I2D] = I2D;
-            INSTRUCTIONS[Constants.L2I] = L2I;
-            INSTRUCTIONS[Constants.L2F] = L2F;
-            INSTRUCTIONS[Constants.L2D] = L2D;
-            INSTRUCTIONS[Constants.F2I] = F2I;
-            INSTRUCTIONS[Constants.F2L] = F2L;
-            INSTRUCTIONS[Constants.F2D] = F2D;
-            INSTRUCTIONS[Constants.D2I] = D2I;
-            INSTRUCTIONS[Constants.D2L] = D2L;
-            INSTRUCTIONS[Constants.D2F] = D2F;
-            INSTRUCTIONS[Constants.I2B] = I2B;
-            INSTRUCTIONS[Constants.I2C] = I2C;
-            INSTRUCTIONS[Constants.I2S] = I2S;
-            INSTRUCTIONS[Constants.LCMP] = LCMP;
-            INSTRUCTIONS[Constants.FCMPL] = FCMPL;
-            INSTRUCTIONS[Constants.FCMPG] = FCMPG;
-            INSTRUCTIONS[Constants.DCMPL] = DCMPL;
-            INSTRUCTIONS[Constants.DCMPG] = DCMPG;
-            INSTRUCTIONS[Constants.IRETURN] = IRETURN;
-            INSTRUCTIONS[Constants.LRETURN] = LRETURN;
-            INSTRUCTIONS[Constants.FRETURN] = FRETURN;
-            INSTRUCTIONS[Constants.DRETURN] = DRETURN;
-            INSTRUCTIONS[Constants.ARETURN] = ARETURN;
-            INSTRUCTIONS[Constants.RETURN] = RETURN;
-            INSTRUCTIONS[Constants.ARRAYLENGTH] = ARRAYLENGTH;
-            INSTRUCTIONS[Constants.ATHROW] = ATHROW;
-            INSTRUCTIONS[Constants.MONITORENTER] = MONITORENTER;
-            INSTRUCTIONS[Constants.MONITOREXIT] = MONITOREXIT;
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/InstructionFactory.java b/src/main/java/org/apache/bcel/generic/InstructionFactory.java
deleted file mode 100644
index 64c77ee..0000000
--- a/src/main/java/org/apache/bcel/generic/InstructionFactory.java
+++ /dev/null
@@ -1,771 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-
-/** 
- * Instances of this class may be used, e.g., to generate typed
- * versions of instructions. Its main purpose is to be used as the
- * byte code generating backend of a compiler. You can subclass it to
- * add your own create methods.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see Constants
- */
-public class InstructionFactory implements InstructionConstants, java.io.Serializable {
-
-    private static final long serialVersionUID = -1210011499635580258L;
-
-    private static final String[] short_names = {
-            "C", "F", "D", "B", "S", "I", "L"
-    };
-
-    protected ClassGen cg;
-    protected ConstantPoolGen cp;
-
-
-    public InstructionFactory(ClassGen cg, ConstantPoolGen cp) {
-        this.cg = cg;
-        this.cp = cp;
-    }
-
-
-    /** Initialize with ClassGen object
-     */
-    public InstructionFactory(ClassGen cg) {
-        this(cg, cg.getConstantPool());
-    }
-
-
-    /** Initialize just with ConstantPoolGen object
-     */
-    public InstructionFactory(ConstantPoolGen cp) {
-        this(null, cp);
-    }
-
-
-    /** Create an invoke instruction. (Except for invokedynamic.)
-     *
-     * @param class_name name of the called class
-     * @param name name of the called method
-     * @param ret_type return type of method
-     * @param arg_types argument types of method
-     * @param kind how to invoke, i.e., INVOKEINTERFACE, INVOKESTATIC, INVOKEVIRTUAL,
-     * or INVOKESPECIAL
-     * @see Constants
-     */
-    public InvokeInstruction createInvoke( String class_name, String name, Type ret_type,
-            Type[] arg_types, short kind ) {
-        int index;
-        int nargs = 0;
-        String signature = Type.getMethodSignature(ret_type, arg_types);
-        for (Type arg_type : arg_types) {
-            nargs += arg_type.getSize();
-        }
-        if (kind == Constants.INVOKEINTERFACE) {
-            index = cp.addInterfaceMethodref(class_name, name, signature);
-        } else {
-            index = cp.addMethodref(class_name, name, signature);
-        }
-        switch (kind) {
-            case Constants.INVOKESPECIAL:
-                return new INVOKESPECIAL(index);
-            case Constants.INVOKEVIRTUAL:
-                return new INVOKEVIRTUAL(index);
-            case Constants.INVOKESTATIC:
-                return new INVOKESTATIC(index);
-            case Constants.INVOKEINTERFACE:
-                return new INVOKEINTERFACE(index, nargs + 1);
-            default:
-                throw new RuntimeException("Oops: Unknown invoke kind:" + kind);
-        }
-    }
-
-    /** Create an invokedynamic instruction.
-     *
-     * @param bootstrap_index index into the bootstrap_methods array
-     * @param name name of the called method
-     * @param ret_type return type of method
-     * @param arg_types argument types of method
-     * @see Constants
-     */
-/*
- * createInvokeDynamic only needed if instrumention code wants to generate
- * a new invokedynamic instruction.  I don't think we need.  (markro)
- *
-    public InvokeInstruction createInvokeDynamic( int bootstrap_index, String name, Type ret_type,
-            Type[] arg_types) {
-        int index;
-        int nargs = 0;
-        String signature = Type.getMethodSignature(ret_type, arg_types);
-        for (int i = 0; i < arg_types.length; i++) {
-            nargs += arg_types[i].getSize();
-        }
-        // UNDONE - needs to be added to ConstantPoolGen
-        //index = cp.addInvokeDynamic(bootstrap_index, name, signature);
-        index = 0;
-        return new INVOKEDYNAMIC(index);
-    }
- */
-
-    /** Create a call to the most popular System.out.println() method.
-     *
-     * @param s the string to print
-     */
-    public InstructionList createPrintln( String s ) {
-        InstructionList il = new InstructionList();
-        int out = cp.addFieldref("java.lang.System", "out", "Ljava/io/PrintStream;");
-        int println = cp.addMethodref("java.io.PrintStream", "println", "(Ljava/lang/String;)V");
-        il.append(new GETSTATIC(out));
-        il.append(new PUSH(cp, s));
-        il.append(new INVOKEVIRTUAL(println));
-        return il;
-    }
-
-
-    /** Uses PUSH to push a constant value onto the stack.
-     * @param value must be of type Number, Boolean, Character or String
-     */
-    public Instruction createConstant( Object value ) {
-        PUSH push;
-        if (value instanceof Number) {
-            push = new PUSH(cp, (Number) value);
-        } else if (value instanceof String) {
-            push = new PUSH(cp, (String) value);
-        } else if (value instanceof Boolean) {
-            push = new PUSH(cp, (Boolean) value);
-        } else if (value instanceof Character) {
-            push = new PUSH(cp, (Character) value);
-        } else {
-            throw new ClassGenException("Illegal type: " + value.getClass());
-        }
-        return push.getInstruction();
-    }
-
-    private static class MethodObject {
-
-        Type[] arg_types;
-        Type result_type;
-        String class_name;
-        String name;
-
-
-        MethodObject(String c, String n, Type r, Type[] a) {
-            class_name = c;
-            name = n;
-            result_type = r;
-            arg_types = a;
-        }
-    }
-
-
-    private InvokeInstruction createInvoke( MethodObject m, short kind ) {
-        return createInvoke(m.class_name, m.name, m.result_type, m.arg_types, kind);
-    }
-
-    private static final MethodObject[] append_mos = {
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
-                Type.STRING
-            }),
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
-                Type.OBJECT
-            }),
-            null,
-            null, // indices 2, 3
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
-                Type.BOOLEAN
-            }),
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
-                Type.CHAR
-            }),
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
-                Type.FLOAT
-            }),
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
-                Type.DOUBLE
-            }),
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
-                Type.INT
-            }),
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, // No append(byte)
-                    new Type[] {
-                        Type.INT
-                    }),
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, // No append(short)
-                    new Type[] {
-                        Type.INT
-                    }),
-            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
-                Type.LONG
-            })
-    };
-
-
-    private static boolean isString( Type type ) {
-        return ((type instanceof ObjectType) && ((ObjectType) type).getClassName().equals(
-                "java.lang.String"));
-    }
-
-
-    public Instruction createAppend( Type type ) {
-        byte t = type.getType();
-        if (isString(type)) {
-            return createInvoke(append_mos[0], Constants.INVOKEVIRTUAL);
-        }
-        switch (t) {
-            case Constants.T_BOOLEAN:
-            case Constants.T_CHAR:
-            case Constants.T_FLOAT:
-            case Constants.T_DOUBLE:
-            case Constants.T_BYTE:
-            case Constants.T_SHORT:
-            case Constants.T_INT:
-            case Constants.T_LONG:
-                return createInvoke(append_mos[t], Constants.INVOKEVIRTUAL);
-            case Constants.T_ARRAY:
-            case Constants.T_OBJECT:
-                return createInvoke(append_mos[1], Constants.INVOKEVIRTUAL);
-            default:
-                throw new RuntimeException("Oops: No append for this type? " + type);
-        }
-    }
-
-
-    /** Create a field instruction.
-     *
-     * @param class_name name of the accessed class
-     * @param name name of the referenced field
-     * @param type  type of field
-     * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
-     * @see Constants
-     */
-    public FieldInstruction createFieldAccess( String class_name, String name, Type type, short kind ) {
-        int index;
-        String signature = type.getSignature();
-        index = cp.addFieldref(class_name, name, signature);
-        switch (kind) {
-            case Constants.GETFIELD:
-                return new GETFIELD(index);
-            case Constants.PUTFIELD:
-                return new PUTFIELD(index);
-            case Constants.GETSTATIC:
-                return new GETSTATIC(index);
-            case Constants.PUTSTATIC:
-                return new PUTSTATIC(index);
-            default:
-                throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
-        }
-    }
-
-
-    /** Create reference to `this'
-     */
-    public static Instruction createThis() {
-        return new ALOAD(0);
-    }
-
-
-    /** Create typed return
-     */
-    public static ReturnInstruction createReturn( Type type ) {
-        switch (type.getType()) {
-            case Constants.T_ARRAY:
-            case Constants.T_OBJECT:
-                return ARETURN;
-            case Constants.T_INT:
-            case Constants.T_SHORT:
-            case Constants.T_BOOLEAN:
-            case Constants.T_CHAR:
-            case Constants.T_BYTE:
-                return IRETURN;
-            case Constants.T_FLOAT:
-                return FRETURN;
-            case Constants.T_DOUBLE:
-                return DRETURN;
-            case Constants.T_LONG:
-                return LRETURN;
-            case Constants.T_VOID:
-                return RETURN;
-            default:
-                throw new RuntimeException("Invalid type: " + type);
-        }
-    }
-
-
-    private static ArithmeticInstruction createBinaryIntOp( char first, String op ) {
-        switch (first) {
-            case '-':
-                return ISUB;
-            case '+':
-                return IADD;
-            case '%':
-                return IREM;
-            case '*':
-                return IMUL;
-            case '/':
-                return IDIV;
-            case '&':
-                return IAND;
-            case '|':
-                return IOR;
-            case '^':
-                return IXOR;
-            case '<':
-                return ISHL;
-            case '>':
-                return op.equals(">>>") ? IUSHR : ISHR;
-            default:
-                throw new RuntimeException("Invalid operand " + op);
-        }
-    }
-
-
-    private static ArithmeticInstruction createBinaryLongOp( char first, String op ) {
-        switch (first) {
-            case '-':
-                return LSUB;
-            case '+':
-                return LADD;
-            case '%':
-                return LREM;
-            case '*':
-                return LMUL;
-            case '/':
-                return LDIV;
-            case '&':
-                return LAND;
-            case '|':
-                return LOR;
-            case '^':
-                return LXOR;
-            case '<':
-                return LSHL;
-            case '>':
-                return op.equals(">>>") ? LUSHR : LSHR;
-            default:
-                throw new RuntimeException("Invalid operand " + op);
-        }
-    }
-
-
-    private static ArithmeticInstruction createBinaryFloatOp( char op ) {
-        switch (op) {
-            case '-':
-                return FSUB;
-            case '+':
-                return FADD;
-            case '*':
-                return FMUL;
-            case '/':
-                return FDIV;
-            case '%':
-                return FREM;
-            default:
-                throw new RuntimeException("Invalid operand " + op);
-        }
-    }
-
-
-    private static ArithmeticInstruction createBinaryDoubleOp( char op ) {
-        switch (op) {
-            case '-':
-                return DSUB;
-            case '+':
-                return DADD;
-            case '*':
-                return DMUL;
-            case '/':
-                return DDIV;
-            case '%':
-                return DREM;
-            default:
-                throw new RuntimeException("Invalid operand " + op);
-        }
-    }
-
-
-    /**
-     * Create binary operation for simple basic types, such as int and float.
-     *
-     * @param op operation, such as "+", "*", "&lt;&lt;", etc.
-     */
-    public static ArithmeticInstruction createBinaryOperation( String op, Type type ) {
-        char first = op.toCharArray()[0];
-        switch (type.getType()) {
-            case Constants.T_BYTE:
-            case Constants.T_SHORT:
-            case Constants.T_INT:
-            case Constants.T_CHAR:
-                return createBinaryIntOp(first, op);
-            case Constants.T_LONG:
-                return createBinaryLongOp(first, op);
-            case Constants.T_FLOAT:
-                return createBinaryFloatOp(first);
-            case Constants.T_DOUBLE:
-                return createBinaryDoubleOp(first);
-            default:
-                throw new RuntimeException("Invalid type " + type);
-        }
-    }
-
-
-    /**
-     * @param size size of operand, either 1 (int, e.g.) or 2 (double)
-     */
-    public static StackInstruction createPop( int size ) {
-        return (size == 2) ? POP2 : POP;
-    }
-
-
-    /**
-     * @param size size of operand, either 1 (int, e.g.) or 2 (double)
-     */
-    public static StackInstruction createDup( int size ) {
-        return (size == 2) ? DUP2 : DUP;
-    }
-
-
-    /**
-     * @param size size of operand, either 1 (int, e.g.) or 2 (double)
-     */
-    public static StackInstruction createDup_2( int size ) {
-        return (size == 2) ? DUP2_X2 : DUP_X2;
-    }
-
-
-    /**
-     * @param size size of operand, either 1 (int, e.g.) or 2 (double)
-     */
-    public static StackInstruction createDup_1( int size ) {
-        return (size == 2) ? DUP2_X1 : DUP_X1;
-    }
-
-
-    /**
-     * @param index index of local variable
-     */
-    public static LocalVariableInstruction createStore( Type type, int index ) {
-        switch (type.getType()) {
-            case Constants.T_BOOLEAN:
-            case Constants.T_CHAR:
-            case Constants.T_BYTE:
-            case Constants.T_SHORT:
-            case Constants.T_INT:
-                return new ISTORE(index);
-            case Constants.T_FLOAT:
-                return new FSTORE(index);
-            case Constants.T_DOUBLE:
-                return new DSTORE(index);
-            case Constants.T_LONG:
-                return new LSTORE(index);
-            case Constants.T_ARRAY:
-            case Constants.T_OBJECT:
-                return new ASTORE(index);
-            default:
-                throw new RuntimeException("Invalid type " + type);
-        }
-    }
-
-
-    /**
-     * @param index index of local variable
-     */
-    public static LocalVariableInstruction createLoad( Type type, int index ) {
-        switch (type.getType()) {
-            case Constants.T_BOOLEAN:
-            case Constants.T_CHAR:
-            case Constants.T_BYTE:
-            case Constants.T_SHORT:
-            case Constants.T_INT:
-                return new ILOAD(index);
-            case Constants.T_FLOAT:
-                return new FLOAD(index);
-            case Constants.T_DOUBLE:
-                return new DLOAD(index);
-            case Constants.T_LONG:
-                return new LLOAD(index);
-            case Constants.T_ARRAY:
-            case Constants.T_OBJECT:
-                return new ALOAD(index);
-            default:
-                throw new RuntimeException("Invalid type " + type);
-        }
-    }
-
-
-    /**
-     * @param type type of elements of array, i.e., array.getElementType()
-     */
-    public static ArrayInstruction createArrayLoad( Type type ) {
-        switch (type.getType()) {
-            case Constants.T_BOOLEAN:
-            case Constants.T_BYTE:
-                return BALOAD;
-            case Constants.T_CHAR:
-                return CALOAD;
-            case Constants.T_SHORT:
-                return SALOAD;
-            case Constants.T_INT:
-                return IALOAD;
-            case Constants.T_FLOAT:
-                return FALOAD;
-            case Constants.T_DOUBLE:
-                return DALOAD;
-            case Constants.T_LONG:
-                return LALOAD;
-            case Constants.T_ARRAY:
-            case Constants.T_OBJECT:
-                return AALOAD;
-            default:
-                throw new RuntimeException("Invalid type " + type);
-        }
-    }
-
-
-    /**
-     * @param type type of elements of array, i.e., array.getElementType()
-     */
-    public static ArrayInstruction createArrayStore( Type type ) {
-        switch (type.getType()) {
-            case Constants.T_BOOLEAN:
-            case Constants.T_BYTE:
-                return BASTORE;
-            case Constants.T_CHAR:
-                return CASTORE;
-            case Constants.T_SHORT:
-                return SASTORE;
-            case Constants.T_INT:
-                return IASTORE;
-            case Constants.T_FLOAT:
-                return FASTORE;
-            case Constants.T_DOUBLE:
-                return DASTORE;
-            case Constants.T_LONG:
-                return LASTORE;
-            case Constants.T_ARRAY:
-            case Constants.T_OBJECT:
-                return AASTORE;
-            default:
-                throw new RuntimeException("Invalid type " + type);
-        }
-    }
-
-
-    /** Create conversion operation for two stack operands, this may be an I2C, instruction, e.g.,
-     * if the operands are basic types and CHECKCAST if they are reference types.
-     */
-    public Instruction createCast( Type src_type, Type dest_type ) {
-        if ((src_type instanceof BasicType) && (dest_type instanceof BasicType)) {
-            byte dest = dest_type.getType();
-            byte src = src_type.getType();
-            if (dest == Constants.T_LONG
-                    && (src == Constants.T_CHAR || src == Constants.T_BYTE || src == Constants.T_SHORT)) {
-                src = Constants.T_INT;
-            }
-            String name = "org.apache.bcel.generic." + short_names[src - Constants.T_CHAR] + "2"
-                    + short_names[dest - Constants.T_CHAR];
-            Instruction i = null;
-            try {
-                i = (Instruction) java.lang.Class.forName(name).newInstance();
-            } catch (Exception e) {
-                throw new RuntimeException("Could not find instruction: " + name, e);
-            }
-            return i;
-        } else if ((src_type instanceof ReferenceType) && (dest_type instanceof ReferenceType)) {
-            if (dest_type instanceof ArrayType) {
-                return new CHECKCAST(cp.addArrayClass((ArrayType) dest_type));
-            } else {
-                return new CHECKCAST(cp.addClass(((ObjectType) dest_type).getClassName()));
-            }
-        } else {
-            throw new RuntimeException("Can not cast " + src_type + " to " + dest_type);
-        }
-    }
-
-
-    public GETFIELD createGetField( String class_name, String name, Type t ) {
-        return new GETFIELD(cp.addFieldref(class_name, name, t.getSignature()));
-    }
-
-
-    public GETSTATIC createGetStatic( String class_name, String name, Type t ) {
-        return new GETSTATIC(cp.addFieldref(class_name, name, t.getSignature()));
-    }
-
-
-    public PUTFIELD createPutField( String class_name, String name, Type t ) {
-        return new PUTFIELD(cp.addFieldref(class_name, name, t.getSignature()));
-    }
-
-
-    public PUTSTATIC createPutStatic( String class_name, String name, Type t ) {
-        return new PUTSTATIC(cp.addFieldref(class_name, name, t.getSignature()));
-    }
-
-
-    public CHECKCAST createCheckCast( ReferenceType t ) {
-        if (t instanceof ArrayType) {
-            return new CHECKCAST(cp.addArrayClass((ArrayType) t));
-        } else {
-            return new CHECKCAST(cp.addClass((ObjectType) t));
-        }
-    }
-
-
-    public INSTANCEOF createInstanceOf( ReferenceType t ) {
-        if (t instanceof ArrayType) {
-            return new INSTANCEOF(cp.addArrayClass((ArrayType) t));
-        } else {
-            return new INSTANCEOF(cp.addClass((ObjectType) t));
-        }
-    }
-
-
-    public NEW createNew( ObjectType t ) {
-        return new NEW(cp.addClass(t));
-    }
-
-
-    public NEW createNew( String s ) {
-        return createNew(ObjectType.getInstance(s));
-    }
-
-
-    /** Create new array of given size and type.
-     * @return an instruction that creates the corresponding array at runtime, i.e. is an AllocationInstruction
-     */
-    public Instruction createNewArray( Type t, short dim ) {
-        if (dim == 1) {
-            if (t instanceof ObjectType) {
-                return new ANEWARRAY(cp.addClass((ObjectType) t));
-            } else if (t instanceof ArrayType) {
-                return new ANEWARRAY(cp.addArrayClass((ArrayType) t));
-            } else {
-                return new NEWARRAY(t.getType());
-            }
-        } else {
-            ArrayType at;
-            if (t instanceof ArrayType) {
-                at = (ArrayType) t;
-            } else {
-                at = new ArrayType(t, dim);
-            }
-            return new MULTIANEWARRAY(cp.addArrayClass(at), dim);
-        }
-    }
-
-
-    /** Create "null" value for reference types, 0 for basic types like int
-     */
-    public static Instruction createNull( Type type ) {
-        switch (type.getType()) {
-            case Constants.T_ARRAY:
-            case Constants.T_OBJECT:
-                return ACONST_NULL;
-            case Constants.T_INT:
-            case Constants.T_SHORT:
-            case Constants.T_BOOLEAN:
-            case Constants.T_CHAR:
-            case Constants.T_BYTE:
-                return ICONST_0;
-            case Constants.T_FLOAT:
-                return FCONST_0;
-            case Constants.T_DOUBLE:
-                return DCONST_0;
-            case Constants.T_LONG:
-                return LCONST_0;
-            case Constants.T_VOID:
-                return NOP;
-            default:
-                throw new RuntimeException("Invalid type: " + type);
-        }
-    }
-
-
-    /** Create branch instruction by given opcode, except LOOKUPSWITCH and TABLESWITCH.
-     * For those you should use the SWITCH compound instruction.
-     */
-    public static BranchInstruction createBranchInstruction( short opcode, InstructionHandle target ) {
-        switch (opcode) {
-            case Constants.IFEQ:
-                return new IFEQ(target);
-            case Constants.IFNE:
-                return new IFNE(target);
-            case Constants.IFLT:
-                return new IFLT(target);
-            case Constants.IFGE:
-                return new IFGE(target);
-            case Constants.IFGT:
-                return new IFGT(target);
-            case Constants.IFLE:
-                return new IFLE(target);
-            case Constants.IF_ICMPEQ:
-                return new IF_ICMPEQ(target);
-            case Constants.IF_ICMPNE:
-                return new IF_ICMPNE(target);
-            case Constants.IF_ICMPLT:
-                return new IF_ICMPLT(target);
-            case Constants.IF_ICMPGE:
-                return new IF_ICMPGE(target);
-            case Constants.IF_ICMPGT:
-                return new IF_ICMPGT(target);
-            case Constants.IF_ICMPLE:
-                return new IF_ICMPLE(target);
-            case Constants.IF_ACMPEQ:
-                return new IF_ACMPEQ(target);
-            case Constants.IF_ACMPNE:
-                return new IF_ACMPNE(target);
-            case Constants.GOTO:
-                return new GOTO(target);
-            case Constants.JSR:
-                return new JSR(target);
-            case Constants.IFNULL:
-                return new IFNULL(target);
-            case Constants.IFNONNULL:
-                return new IFNONNULL(target);
-            case Constants.GOTO_W:
-                return new GOTO_W(target);
-            case Constants.JSR_W:
-                return new JSR_W(target);
-            default:
-                throw new RuntimeException("Invalid opcode: " + opcode);
-        }
-    }
-
-
-    public void setClassGen( ClassGen c ) {
-        cg = c;
-    }
-
-
-    public ClassGen getClassGen() {
-        return cg;
-    }
-
-
-    public void setConstantPool( ConstantPoolGen c ) {
-        cp = c;
-    }
-
-
-    public ConstantPoolGen getConstantPool() {
-        return cp;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/InstructionHandle.java b/src/main/java/org/apache/bcel/generic/InstructionHandle.java
deleted file mode 100644
index f22bf83..0000000
--- a/src/main/java/org/apache/bcel/generic/InstructionHandle.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import org.apache.bcel.classfile.Utility;
-
-/**
- * Instances of this class give users a handle to the instructions contained in
- * an InstructionList. Instruction objects may be used more than once within a
- * list, this is useful because it saves memory and may be much faster.
- *
- * Within an InstructionList an InstructionHandle object is wrapped
- * around all instructions, i.e., it implements a cell in a
- * doubly-linked list. From the outside only the next and the
- * previous instruction (handle) are accessible. One
- * can traverse the list via an Enumeration returned by
- * InstructionList.elements().
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see Instruction
- * @see BranchHandle
- * @see InstructionList 
- */
-public class InstructionHandle implements java.io.Serializable {
-
-    private static final long serialVersionUID = -3585254135692924106L;
-    InstructionHandle next, prev; // Will be set from the outside
-    Instruction instruction;
-    protected int i_position = -1; // byte code offset of instruction
-    private Set<InstructionTargeter> targeters;
-    private Map<Object, Object> attributes;
-
-
-    public final InstructionHandle getNext() {
-        return next;
-    }
-
-
-    public final InstructionHandle getPrev() {
-        return prev;
-    }
-
-
-    public final Instruction getInstruction() {
-        return instruction;
-    }
-
-
-    /**
-     * Replace current instruction contained in this handle.
-     * Old instruction is disposed using Instruction.dispose().
-     */
-    public void setInstruction( Instruction i ) { // Overridden in BranchHandle
-        if (i == null) {
-            throw new ClassGenException("Assigning null to handle");
-        }
-        if ((this.getClass() != BranchHandle.class) && (i instanceof BranchInstruction)) {
-            throw new ClassGenException("Assigning branch instruction " + i + " to plain handle");
-        }
-        if (instruction != null) {
-            instruction.dispose();
-        }
-        instruction = i;
-    }
-
-
-    /**
-     * Temporarily swap the current instruction, without disturbing
-     * anything. Meant to be used by a debugger, implementing
-     * breakpoints. Current instruction is returned.
-     */
-    public Instruction swapInstruction( Instruction i ) {
-        Instruction oldInstruction = instruction;
-        instruction = i;
-        return oldInstruction;
-    }
-
-
-    /*private*/protected InstructionHandle(Instruction i) {
-        setInstruction(i);
-    }
-
-    private static InstructionHandle ih_list = null; // List of reusable handles
-
-
-    /** Factory method.
-     */
-    static InstructionHandle getInstructionHandle( Instruction i ) {
-        if (ih_list == null) {
-            return new InstructionHandle(i);
-        } else {
-            InstructionHandle ih = ih_list;
-            ih_list = ih.next;
-            ih.setInstruction(i);
-            return ih;
-        }
-    }
-
-
-    /**
-     * Called by InstructionList.setPositions when setting the position for every
-     * instruction. In the presence of variable length instructions `setPositions()'
-     * performs multiple passes over the instruction list to calculate the
-     * correct (byte) positions and offsets by calling this function.
-     *
-     * @param offset additional offset caused by preceding (variable length) instructions
-     * @param max_offset the maximum offset that may be caused by these instructions
-     * @return additional offset caused by possible change of this instruction's length
-     */
-    protected int updatePosition( int offset, int max_offset ) {
-        i_position += offset;
-        return 0;
-    }
-
-
-    /** @return the position, i.e., the byte code offset of the contained
-     * instruction. This is accurate only after
-     * InstructionList.setPositions() has been called.
-     */
-    public int getPosition() {
-        return i_position;
-    }
-
-
-    /** Set the position, i.e., the byte code offset of the contained
-     * instruction.
-     */
-    void setPosition( int pos ) {
-        i_position = pos;
-    }
-
-
-    /** Overridden in BranchHandle
-     */
-    protected void addHandle() {
-        next = ih_list;
-        ih_list = this;
-    }
-
-
-    /**
-     * Delete contents, i.e., remove user access and make handle reusable.
-     */
-    void dispose() {
-        next = prev = null;
-        instruction.dispose();
-        instruction = null;
-        i_position = -1;
-        attributes = null;
-        removeAllTargeters();
-        addHandle();
-    }
-
-
-    /** Remove all targeters, if any.
-     */
-    public void removeAllTargeters() {
-        if (targeters != null) {
-            targeters.clear();
-        }
-    }
-
-
-    /**
-     * Denote this handle isn't referenced anymore by t.
-     */
-    public void removeTargeter( InstructionTargeter t ) {
-        if (targeters != null) {
-            targeters.remove(t);
-        }
-    }
-
-
-    /**
-     * Denote this handle is being referenced by t.
-     */
-    public void addTargeter( InstructionTargeter t ) {
-        if (targeters == null) {
-            targeters = new HashSet<InstructionTargeter>();
-        }
-        //if(!targeters.contains(t))
-        targeters.add(t);
-    }
-
-
-    public boolean hasTargeters() {
-        return (targeters != null) && (targeters.size() > 0);
-    }
-
-
-    /**
-     * @return null, if there are no targeters
-     */
-    public InstructionTargeter[] getTargeters() {
-        if (!hasTargeters()) {
-            return new InstructionTargeter[0];
-        }
-        InstructionTargeter[] t = new InstructionTargeter[targeters.size()];
-        targeters.toArray(t);
-        return t;
-    }
-
-
-    /** @return a (verbose) string representation of the contained instruction. 
-     */
-    public String toString( boolean verbose ) {
-        return Utility.format(i_position, 4, false, ' ') + ": " + instruction.toString(verbose);
-    }
-
-
-    /** @return a string representation of the contained instruction. 
-     */
-    @Override
-    public String toString() {
-        return toString(true);
-    }
-
-
-    /** Add an attribute to an instruction handle.
-     *
-     * @param key the key object to store/retrieve the attribute
-     * @param attr the attribute to associate with this handle
-     */
-    public void addAttribute( Object key, Object attr ) {
-        if (attributes == null) {
-            attributes = new HashMap<Object, Object>(3);
-        }
-        attributes.put(key, attr);
-    }
-
-
-    /** Delete an attribute of an instruction handle.
-     *
-     * @param key the key object to retrieve the attribute
-     */
-    public void removeAttribute( Object key ) {
-        if (attributes != null) {
-            attributes.remove(key);
-        }
-    }
-
-
-    /** Get attribute of an instruction handle.
-     *
-     * @param key the key object to store/retrieve the attribute
-     */
-    public Object getAttribute( Object key ) {
-        if (attributes != null) {
-            return attributes.get(key);
-        }
-        return null;
-    }
-
-
-    /** @return all attributes associated with this handle
-     */
-    public Collection<Object> getAttributes() {
-        if (attributes == null) {
-            attributes = new HashMap<Object, Object>(3);
-        }
-        return attributes.values();
-    }
-
-
-    /** Convenience method, simply calls accept() on the contained instruction.
-     *
-     * @param v Visitor object
-     */
-    public void accept( Visitor v ) {
-        instruction.accept(v);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/InstructionList.java b/src/main/java/org/apache/bcel/generic/InstructionList.java
deleted file mode 100644
index 3a2d2b7..0000000
--- a/src/main/java/org/apache/bcel/generic/InstructionList.java
+++ /dev/null
@@ -1,1280 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * This class is a container for a list of <a
- * href="Instruction.html">Instruction</a> objects. Instructions can
- * be appended, inserted, moved, deleted, etc.. Instructions are being
- * wrapped into <a
- * href="InstructionHandle.html">InstructionHandles</a> objects that
- * are returned upon append/insert operations. They give the user
- * (read only) access to the list structure, such that it can be traversed and
- * manipulated in a controlled way.
- *
- * A list is finally dumped to a byte code array with <a
- * href="#getByteCode()">getByteCode</a>.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     Instruction
- * @see     InstructionHandle
- * @see BranchHandle
- */
-public class InstructionList implements Serializable {
-
-    private static final long serialVersionUID = 2651389055345707857L;
-    private InstructionHandle start = null, end = null;
-    private int length = 0; // number of elements in list
-    private int[] byte_positions; // byte code offsets corresponding to instructions
-
-
-    /**
-     * Create (empty) instruction list.
-     */
-    public InstructionList() {
-    }
-
-
-    /**
-     * Create instruction list containing one instruction.
-     * @param i initial instruction
-     */
-    public InstructionList(Instruction i) {
-        append(i);
-    }
-
-
-    /**
-     * Create instruction list containing one instruction.
-     * @param i initial instruction
-     */
-    public InstructionList(BranchInstruction i) {
-        append(i);
-    }
-
-
-    /**
-     * Initialize list with (nonnull) compound instruction. Consumes argument
-     * list, i.e., it becomes empty.
-     *
-     * @param c compound instruction (list)
-     */
-    public InstructionList(CompoundInstruction c) {
-        append(c.getInstructionList());
-    }
-
-
-    /**
-     * Test for empty list.
-     */
-    public boolean isEmpty() {
-        return start == null;
-    } // && end == null
-
-
-    /**
-     * Find the target instruction (handle) that corresponds to the given target
-     * position (byte code offset).
-     *
-     * @param ihs array of instruction handles, i.e. il.getInstructionHandles()
-     * @param pos array of positions corresponding to ihs, i.e. il.getInstructionPositions()
-     * @param count length of arrays
-     * @param target target position to search for
-     * @return target position's instruction handle if available
-     */
-    public static InstructionHandle findHandle( InstructionHandle[] ihs, int[] pos, int count,
-            int target ) {
-        int l = 0, r = count - 1;
-        /* Do a binary search since the pos array is orderd.
-         */
-        do {
-            int i = (l + r) / 2;
-            int j = pos[i];
-            if (j == target) {
-                return ihs[i];
-            } else if (target < j) {
-                r = i - 1;
-            } else {
-                l = i + 1;
-            }
-        } while (l <= r);
-        return null;
-    }
-
-
-    /**
-     * Get instruction handle for instruction at byte code position pos.
-     * This only works properly, if the list is freshly initialized from a byte array or
-     * setPositions() has been called before this method.
-     *
-     * @param pos byte code position to search for
-     * @return target position's instruction handle if available
-     */
-    public InstructionHandle findHandle( int pos ) {
-        int[] positions = byte_positions;
-        InstructionHandle ih = start;
-        for (int i = 0; i < length; i++) { 
-            if(positions[i] == pos) {
-                return ih;
-            }
-            ih = ih.next;
-        }
-        return null;
-    }
-
-
-    /**
-     * Initialize instruction list from byte array.
-     *
-     * @param code byte array containing the instructions
-     */
-    public InstructionList(byte[] code) {
-        ByteSequence bytes = new ByteSequence(code);
-        InstructionHandle[] ihs = new InstructionHandle[code.length];
-        int[] pos = new int[code.length]; // Can't be more than that
-        int count = 0; // Contains actual length
-        /* Pass 1: Create an object for each byte code and append them
-         * to the list.
-         */
-        try {
-            while (bytes.available() > 0) {
-                // Remember byte offset and associate it with the instruction
-                int off = bytes.getIndex();
-                pos[count] = off;
-                /* Read one instruction from the byte stream, the byte position is set
-                 * accordingly.
-                 */
-                Instruction i = Instruction.readInstruction(bytes);
-                InstructionHandle ih;
-                if (i instanceof BranchInstruction) {
-                    ih = append((BranchInstruction) i);
-                } else {
-                    ih = append(i);
-                }
-                ih.setPosition(off);
-                ihs[count] = ih;
-                count++;
-            }
-        } catch (IOException e) {
-            throw new ClassGenException(e.toString(), e);
-        }
-        byte_positions = new int[count]; // Trim to proper size
-        System.arraycopy(pos, 0, byte_positions, 0, count);
-        /* Pass 2: Look for BranchInstruction and update their targets, i.e.,
-         * convert offsets to instruction handles.
-         */
-        for (int i = 0; i < count; i++) {
-            if (ihs[i] instanceof BranchHandle) {
-                BranchInstruction bi = (BranchInstruction) ihs[i].instruction;
-                int target = bi.position + bi.getIndex(); /* Byte code position:
-                 * relative -> absolute. */
-                // Search for target position
-                InstructionHandle ih = findHandle(ihs, pos, count, target);
-                if (ih == null) {
-                    throw new ClassGenException("Couldn't find target for branch: " + bi);
-                }
-                bi.setTarget(ih); // Update target
-                // If it is a Select instruction, update all branch targets
-                if (bi instanceof Select) { // Either LOOKUPSWITCH or TABLESWITCH
-                    Select s = (Select) bi;
-                    int[] indices = s.getIndices();
-                    for (int j = 0; j < indices.length; j++) {
-                        target = bi.position + indices[j];
-                        ih = findHandle(ihs, pos, count, target);
-                        if (ih == null) {
-                            throw new ClassGenException("Couldn't find target for switch: " + bi);
-                        }
-                        s.setTarget(j, ih); // Update target      
-                    }
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Append another list after instruction (handle) ih contained in this list.
-     * Consumes argument list, i.e., it becomes empty.
-     *
-     * @param ih where to append the instruction list 
-     * @param il Instruction list to append to this one
-     * @return instruction handle pointing to the <B>first</B> appended instruction
-     */
-    public InstructionHandle append( InstructionHandle ih, InstructionList il ) {
-        if (il == null) {
-            throw new ClassGenException("Appending null InstructionList");
-        }
-        if (il.isEmpty()) {
-            return ih;
-        }
-        InstructionHandle next = ih.next, ret = il.start;
-        ih.next = il.start;
-        il.start.prev = ih;
-        il.end.next = next;
-        if (next != null) {
-            next.prev = il.end;
-        } else {
-            end = il.end; // Update end ...
-        }
-        length += il.length; // Update length
-        il.clear();
-        return ret;
-    }
-
-
-    /**
-     * Append another list after instruction i contained in this list.
-     * Consumes argument list, i.e., it becomes empty.
-     *
-     * @param i  where to append the instruction list 
-     * @param il Instruction list to append to this one
-     * @return instruction handle pointing to the <B>first</B> appended instruction
-     */
-    public InstructionHandle append( Instruction i, InstructionList il ) {
-        InstructionHandle ih;
-        if ((ih = findInstruction2(i)) == null) {
-            throw new ClassGenException("Instruction " + i + " is not contained in this list.");
-        }
-        return append(ih, il);
-    }
-
-
-    /**
-     * Append another list to this one.
-     * Consumes argument list, i.e., it becomes empty.
-     *
-     * @param il list to append to end of this list
-     * @return instruction handle of the <B>first</B> appended instruction
-     */
-    public InstructionHandle append( InstructionList il ) {
-        if (il == null) {
-            throw new ClassGenException("Appending null InstructionList");
-        }
-        if (il.isEmpty()) {
-            return null;
-        }
-        if (isEmpty()) {
-            start = il.start;
-            end = il.end;
-            length = il.length;
-            il.clear();
-            return start;
-        } else {
-            return append(end, il); // was end.instruction
-        }
-    }
-
-
-    /**
-     * Append an instruction to the end of this list.
-     *
-     * @param ih instruction to append
-     */
-    private void append( InstructionHandle ih ) {
-        if (isEmpty()) {
-            start = end = ih;
-            ih.next = ih.prev = null;
-        } else {
-            end.next = ih;
-            ih.prev = end;
-            ih.next = null;
-            end = ih;
-        }
-        length++; // Update length
-    }
-
-
-    /**
-     * Append an instruction to the end of this list.
-     *
-     * @param i instruction to append
-     * @return instruction handle of the appended instruction
-     */
-    public InstructionHandle append( Instruction i ) {
-        InstructionHandle ih = InstructionHandle.getInstructionHandle(i);
-        append(ih);
-        return ih;
-    }
-
-
-    /**
-     * Append a branch instruction to the end of this list.
-     *
-     * @param i branch instruction to append
-     * @return branch instruction handle of the appended instruction
-     */
-    public BranchHandle append( BranchInstruction i ) {
-        BranchHandle ih = BranchHandle.getBranchHandle(i);
-        append(ih);
-        return ih;
-    }
-
-
-    /**
-     * Append a single instruction j after another instruction i, which
-     * must be in this list of course!
-     *
-     * @param i Instruction in list
-     * @param j Instruction to append after i in list
-     * @return instruction handle of the first appended instruction
-     */
-    public InstructionHandle append( Instruction i, Instruction j ) {
-        return append(i, new InstructionList(j));
-    }
-
-
-    /**
-     * Append a compound instruction, after instruction i.
-     *
-     * @param i Instruction in list
-     * @param c The composite instruction (containing an InstructionList)
-     * @return instruction handle of the first appended instruction
-     */
-    public InstructionHandle append( Instruction i, CompoundInstruction c ) {
-        return append(i, c.getInstructionList());
-    }
-
-
-    /**
-     * Append a compound instruction.
-     *
-     * @param c The composite instruction (containing an InstructionList)
-     * @return instruction handle of the first appended instruction
-     */
-    public InstructionHandle append( CompoundInstruction c ) {
-        return append(c.getInstructionList());
-    }
-
-
-    /**
-     * Append a compound instruction.
-     *
-     * @param ih where to append the instruction list 
-     * @param c The composite instruction (containing an InstructionList)
-     * @return instruction handle of the first appended instruction
-     */
-    public InstructionHandle append( InstructionHandle ih, CompoundInstruction c ) {
-        return append(ih, c.getInstructionList());
-    }
-
-
-    /**
-     * Append an instruction after instruction (handle) ih contained in this list.
-     *
-     * @param ih where to append the instruction list 
-     * @param i Instruction to append
-     * @return instruction handle pointing to the <B>first</B> appended instruction
-     */
-    public InstructionHandle append( InstructionHandle ih, Instruction i ) {
-        return append(ih, new InstructionList(i));
-    }
-
-
-    /**
-     * Append an instruction after instruction (handle) ih contained in this list.
-     *
-     * @param ih where to append the instruction list 
-     * @param i Instruction to append
-     * @return instruction handle pointing to the <B>first</B> appended instruction
-     */
-    public BranchHandle append( InstructionHandle ih, BranchInstruction i ) {
-        BranchHandle bh = BranchHandle.getBranchHandle(i);
-        InstructionList il = new InstructionList();
-        il.append(bh);
-        append(ih, il);
-        return bh;
-    }
-
-
-    /**
-     * Insert another list before Instruction handle ih contained in this list.
-     * Consumes argument list, i.e., it becomes empty.
-     *
-     * @param ih  where to append the instruction list 
-     * @param il Instruction list to insert
-     * @return instruction handle of the first inserted instruction
-     */
-    public InstructionHandle insert( InstructionHandle ih, InstructionList il ) {
-        if (il == null) {
-            throw new ClassGenException("Inserting null InstructionList");
-        }
-        if (il.isEmpty()) {
-            return ih;
-        }
-        InstructionHandle prev = ih.prev, ret = il.start;
-        ih.prev = il.end;
-        il.end.next = ih;
-        il.start.prev = prev;
-        if (prev != null) {
-            prev.next = il.start;
-        } else {
-            start = il.start; // Update start ...
-        }
-        length += il.length; // Update length
-        il.clear();
-        return ret;
-    }
-
-
-    /**
-     * Insert another list.   
-     *
-     * @param il list to insert before start of this list
-     * @return instruction handle of the first inserted instruction
-     */
-    public InstructionHandle insert( InstructionList il ) {
-        if (isEmpty()) {
-            append(il); // Code is identical for this case
-            return start;
-        } else {
-            return insert(start, il);
-        }
-    }
-
-
-    /**
-     * Insert an instruction at start of this list.
-     *
-     * @param ih instruction to insert
-     */
-    private void insert( InstructionHandle ih ) {
-        if (isEmpty()) {
-            start = end = ih;
-            ih.next = ih.prev = null;
-        } else {
-            start.prev = ih;
-            ih.next = start;
-            ih.prev = null;
-            start = ih;
-        }
-        length++;
-    }
-
-
-    /**
-     * Insert another list before Instruction i contained in this list.
-     * Consumes argument list, i.e., it becomes empty.
-     *
-     * @param i  where to append the instruction list 
-     * @param il Instruction list to insert
-     * @return instruction handle pointing to the first inserted instruction,
-     * i.e., il.getStart()
-     */
-    public InstructionHandle insert( Instruction i, InstructionList il ) {
-        InstructionHandle ih;
-        if ((ih = findInstruction1(i)) == null) {
-            throw new ClassGenException("Instruction " + i + " is not contained in this list.");
-        }
-        return insert(ih, il);
-    }
-
-
-    /**
-     * Insert an instruction at start of this list.
-     *
-     * @param i instruction to insert
-     * @return instruction handle of the inserted instruction
-     */
-    public InstructionHandle insert( Instruction i ) {
-        InstructionHandle ih = InstructionHandle.getInstructionHandle(i);
-        insert(ih);
-        return ih;
-    }
-
-
-    /**
-     * Insert a branch instruction at start of this list.
-     *
-     * @param i branch instruction to insert
-     * @return branch instruction handle of the appended instruction
-     */
-    public BranchHandle insert( BranchInstruction i ) {
-        BranchHandle ih = BranchHandle.getBranchHandle(i);
-        insert(ih);
-        return ih;
-    }
-
-
-    /**
-     * Insert a single instruction j before another instruction i, which
-     * must be in this list of course!
-     *
-     * @param i Instruction in list
-     * @param j Instruction to insert before i in list
-     * @return instruction handle of the first inserted instruction
-     */
-    public InstructionHandle insert( Instruction i, Instruction j ) {
-        return insert(i, new InstructionList(j));
-    }
-
-
-    /**
-     * Insert a compound instruction before instruction i.
-     *
-     * @param i Instruction in list
-     * @param c The composite instruction (containing an InstructionList)
-     * @return instruction handle of the first inserted instruction
-     */
-    public InstructionHandle insert( Instruction i, CompoundInstruction c ) {
-        return insert(i, c.getInstructionList());
-    }
-
-
-    /**
-     * Insert a compound instruction.
-     *
-     * @param c The composite instruction (containing an InstructionList)
-     * @return instruction handle of the first inserted instruction
-     */
-    public InstructionHandle insert( CompoundInstruction c ) {
-        return insert(c.getInstructionList());
-    }
-
-
-    /**
-     * Insert an instruction before instruction (handle) ih contained in this list.
-     *
-     * @param ih where to insert to the instruction list 
-     * @param i Instruction to insert
-     * @return instruction handle of the first inserted instruction
-     */
-    public InstructionHandle insert( InstructionHandle ih, Instruction i ) {
-        return insert(ih, new InstructionList(i));
-    }
-
-
-    /**
-     * Insert a compound instruction.
-     *
-     * @param ih where to insert the instruction list 
-     * @param c The composite instruction (containing an InstructionList)
-     * @return instruction handle of the first inserted instruction
-     */
-    public InstructionHandle insert( InstructionHandle ih, CompoundInstruction c ) {
-        return insert(ih, c.getInstructionList());
-    }
-
-
-    /**
-     * Insert an instruction before instruction (handle) ih contained in this list.
-     *
-     * @param ih where to insert to the instruction list 
-     * @param i Instruction to insert
-     * @return instruction handle of the first inserted instruction
-     */
-    public BranchHandle insert( InstructionHandle ih, BranchInstruction i ) {
-        BranchHandle bh = BranchHandle.getBranchHandle(i);
-        InstructionList il = new InstructionList();
-        il.append(bh);
-        insert(ih, il);
-        return bh;
-    }
-
-
-    /**
-     * Take all instructions (handles) from "start" to "end" and append them after the
-     * new location "target". Of course, "end" must be after "start" and target must
-     * not be located withing this range. If you want to move something to the start of
-     * the list use null as value for target.<br>
-     * Any instruction targeters pointing to handles within the block, keep their targets.
-     *
-     * @param start  of moved block
-     * @param end    of moved block
-     * @param target of moved block
-     */
-    public void move( InstructionHandle start, InstructionHandle end, InstructionHandle target ) {
-        // Step 1: Check constraints
-        if ((start == null) || (end == null)) {
-            throw new ClassGenException("Invalid null handle: From " + start + " to " + end);
-        }
-        if ((target == start) || (target == end)) {
-            throw new ClassGenException("Invalid range: From " + start + " to " + end
-                    + " contains target " + target);
-        }
-        for (InstructionHandle ih = start; ih != end.next; ih = ih.next) {
-            if (ih == null) {
-                throw new ClassGenException("Invalid range: From " + start + " to " + end);
-            } else if (ih == target) {
-                throw new ClassGenException("Invalid range: From " + start + " to " + end
-                        + " contains target " + target);
-            }
-        }
-        // Step 2: Temporarily remove the given instructions from the list
-        InstructionHandle prev = start.prev, next = end.next;
-        if (prev != null) {
-            prev.next = next;
-        } else {
-            this.start = next;
-        }
-        if (next != null) {
-            next.prev = prev;
-        } else {
-            this.end = prev;
-        }
-        start.prev = end.next = null;
-        // Step 3: append after target
-        if (target == null) { // append to start of list
-            if (this.start != null) {
-                this.start.prev = end;
-            }
-            end.next = this.start;
-            this.start = start;
-        } else {
-            next = target.next;
-            target.next = start;
-            start.prev = target;
-            end.next = next;
-            if (next != null) {
-                next.prev = end;
-            } else {
-                this.end = end;
-            }
-        }
-    }
-
-
-    /**
-     * Move a single instruction (handle) to a new location.
-     *
-     * @param ih     moved instruction
-     * @param target new location of moved instruction
-     */
-    public void move( InstructionHandle ih, InstructionHandle target ) {
-        move(ih, ih, target);
-    }
-
-
-    /**
-     * Remove from instruction `prev' to instruction `next' both contained
-     * in this list. Throws TargetLostException when one of the removed instruction handles
-     * is still being targeted.
-     *
-     * @param prev where to start deleting (predecessor, exclusive)
-     * @param next where to end deleting (successor, exclusive)
-     */
-    private void remove( InstructionHandle prev, InstructionHandle next )
-            throws TargetLostException {
-        InstructionHandle first, last; // First and last deleted instruction
-        if ((prev == null) && (next == null)) {
-            first = start;
-            last = end;
-            start = end = null;
-        } else {
-            if (prev == null) { // At start of list
-                first = start;
-                start = next;
-            } else {
-                first = prev.next;
-                prev.next = next;
-            }
-            if (next == null) { // At end of list
-                last = end;
-                end = prev;
-            } else {
-                last = next.prev;
-                next.prev = prev;
-            }
-        }
-        first.prev = null; // Completely separated from rest of list
-        last.next = null;
-        List<InstructionHandle> target_vec = new ArrayList<InstructionHandle>();
-        for (InstructionHandle ih = first; ih != null; ih = ih.next) {
-            ih.getInstruction().dispose(); // e.g. BranchInstructions release their targets
-        }
-        StringBuilder buf = new StringBuilder("{ ");
-        for (InstructionHandle ih = first; ih != null; ih = next) {
-            next = ih.next;
-            length--;
-            if (ih.hasTargeters()) { // Still got targeters?
-                target_vec.add(ih);
-                buf.append(ih.toString(true) + " ");
-                ih.next = ih.prev = null;
-            } else {
-                ih.dispose();
-            }
-        }
-        buf.append("}");
-        if (!target_vec.isEmpty()) {
-            InstructionHandle[] targeted = new InstructionHandle[target_vec.size()];
-            target_vec.toArray(targeted);
-            throw new TargetLostException(targeted, buf.toString());
-        }
-    }
-
-
-    /**
-     * Remove instruction from this list. The corresponding Instruction
-     * handles must not be reused!
-     *
-     * @param ih instruction (handle) to remove 
-     */
-    public void delete( InstructionHandle ih ) throws TargetLostException {
-        remove(ih.prev, ih.next);
-    }
-
-
-    /**
-     * Remove instruction from this list. The corresponding Instruction
-     * handles must not be reused!
-     *
-     * @param i instruction to remove
-     */
-    public void delete( Instruction i ) throws TargetLostException {
-        InstructionHandle ih;
-        if ((ih = findInstruction1(i)) == null) {
-            throw new ClassGenException("Instruction " + i + " is not contained in this list.");
-        }
-        delete(ih);
-    }
-
-
-    /**
-     * Remove instructions from instruction `from' to instruction `to' contained
-     * in this list. The user must ensure that `from' is an instruction before
-     * `to', or risk havoc. The corresponding Instruction handles must not be reused!
-     *
-     * @param from where to start deleting (inclusive)
-     * @param to   where to end deleting (inclusive)
-     */
-    public void delete( InstructionHandle from, InstructionHandle to ) throws TargetLostException {
-        remove(from.prev, to.next);
-    }
-
-
-    /**
-     * Remove instructions from instruction `from' to instruction `to' contained
-     * in this list. The user must ensure that `from' is an instruction before
-     * `to', or risk havoc. The corresponding Instruction handles must not be reused!
-     *
-     * @param from where to start deleting (inclusive)
-     * @param to   where to end deleting (inclusive)
-     */
-    public void delete( Instruction from, Instruction to ) throws TargetLostException {
-        InstructionHandle from_ih, to_ih;
-        if ((from_ih = findInstruction1(from)) == null) {
-            throw new ClassGenException("Instruction " + from + " is not contained in this list.");
-        }
-        if ((to_ih = findInstruction2(to)) == null) {
-            throw new ClassGenException("Instruction " + to + " is not contained in this list.");
-        }
-        delete(from_ih, to_ih);
-    }
-
-
-    /**
-     * Search for given Instruction reference, start at beginning of list.
-     *
-     * @param i instruction to search for
-     * @return instruction found on success, null otherwise
-     */
-    private InstructionHandle findInstruction1( Instruction i ) {
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            if (ih.instruction == i) {
-                return ih;
-            }
-        }
-        return null;
-    }
-
-
-    /**
-     * Search for given Instruction reference, start at end of list
-     *
-     * @param i instruction to search for
-     * @return instruction found on success, null otherwise
-     */
-    private InstructionHandle findInstruction2( Instruction i ) {
-        for (InstructionHandle ih = end; ih != null; ih = ih.prev) {
-            if (ih.instruction == i) {
-                return ih;
-            }
-        }
-        return null;
-    }
-
-
-    public boolean contains( InstructionHandle i ) {
-        if (i == null) {
-            return false;
-        }
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            if (ih == i) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-
-    public boolean contains( Instruction i ) {
-        return findInstruction1(i) != null;
-    }
-
-
-    public void setPositions() {
-        setPositions(false);
-    }
-
-
-    /**
-     * Give all instructions their position number (offset in byte stream), i.e.,
-     * make the list ready to be dumped.
-     *
-     * @param check Perform sanity checks, e.g. if all targeted instructions really belong
-     * to this list
-     */
-    public void setPositions( boolean check ) {
-        int max_additional_bytes = 0, additional_bytes = 0;
-        int index = 0, count = 0;
-        int[] pos = new int[length];
-        /* Pass 0: Sanity checks
-         */
-        if (check) {
-            for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-                Instruction i = ih.instruction;
-                if (i instanceof BranchInstruction) { // target instruction within list?
-                    Instruction inst = ((BranchInstruction) i).getTarget().instruction;
-                    if (!contains(inst)) {
-                        throw new ClassGenException("Branch target of "
-                                + Constants.OPCODE_NAMES[i.opcode] + ":" + inst
-                                + " not in instruction list");
-                    }
-                    if (i instanceof Select) {
-                        InstructionHandle[] targets = ((Select) i).getTargets();
-                        for (InstructionHandle target : targets) {
-                            inst = target.instruction;
-                            if (!contains(inst)) {
-                                throw new ClassGenException("Branch target of "
-                                        + Constants.OPCODE_NAMES[i.opcode] + ":" + inst
-                                        + " not in instruction list");
-                            }
-                        }
-                    }
-                    if (!(ih instanceof BranchHandle)) {
-                        throw new ClassGenException("Branch instruction "
-                                + Constants.OPCODE_NAMES[i.opcode] + ":" + inst
-                                + " not contained in BranchHandle.");
-                    }
-                }
-            }
-        }
-        /* Pass 1: Set position numbers and sum up the maximum number of bytes an
-         * instruction may be shifted.
-         */
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            Instruction i = ih.instruction;
-            ih.setPosition(index);
-            pos[count++] = index;
-            /* Get an estimate about how many additional bytes may be added, because
-             * BranchInstructions may have variable length depending on the target
-             * offset (short vs. int) or alignment issues (TABLESWITCH and
-             * LOOKUPSWITCH).
-             */
-            switch (i.getOpcode()) {
-                case Constants.JSR:
-                case Constants.GOTO:
-                    max_additional_bytes += 2;
-                    break;
-                case Constants.TABLESWITCH:
-                case Constants.LOOKUPSWITCH:
-                    max_additional_bytes += 3;
-                    break;
-            }
-            index += i.getLength();
-        }
-        /* Pass 2: Expand the variable-length (Branch)Instructions depending on
-         * the target offset (short or int) and ensure that branch targets are
-         * within this list.
-         */
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            additional_bytes += ih.updatePosition(additional_bytes, max_additional_bytes);
-        }
-        /* Pass 3: Update position numbers (which may have changed due to the
-         * preceding expansions), like pass 1.
-         */
-        index = count = 0;
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            Instruction i = ih.instruction;
-            ih.setPosition(index);
-            pos[count++] = index;
-            index += i.getLength();
-        }
-        byte_positions = new int[count]; // Trim to proper size
-        System.arraycopy(pos, 0, byte_positions, 0, count);
-    }
-
-
-    /**
-     * When everything is finished, use this method to convert the instruction
-     * list into an array of bytes.
-     *
-     * @return the byte code ready to be dumped
-     */
-    public byte[] getByteCode() {
-        // Update position indices of instructions
-        setPositions();
-        ByteArrayOutputStream b = new ByteArrayOutputStream();
-        DataOutputStream out = new DataOutputStream(b);
-        try {
-            for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-                Instruction i = ih.instruction;
-                i.dump(out); // Traverse list
-            }
-        } catch (IOException e) {
-            System.err.println(e);
-            return new byte[0];
-        }
-        return b.toByteArray();
-    }
-
-
-    /**
-     * @return an array of instructions without target information for branch instructions.
-     */
-    public Instruction[] getInstructions() {
-        ByteSequence bytes = new ByteSequence(getByteCode());
-        List<Instruction> instructions = new ArrayList<Instruction>();
-        try {
-            while (bytes.available() > 0) {
-                instructions.add(Instruction.readInstruction(bytes));
-            }
-        } catch (IOException e) {
-            throw new ClassGenException(e.toString(), e);
-        }
-        return instructions.toArray(new Instruction[instructions.size()]);
-    }
-
-
-    @Override
-    public String toString() {
-        return toString(true);
-    }
-
-
-    /**
-     * @param verbose toggle output format
-     * @return String containing all instructions in this list.
-     */
-    public String toString( boolean verbose ) {
-        StringBuilder buf = new StringBuilder();
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            buf.append(ih.toString(verbose)).append("\n");
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return iterator that lists all instructions (handles)
-     */
-    public Iterator<InstructionHandle> iterator() {
-        return new Iterator<InstructionHandle>() {
-
-            private InstructionHandle ih = start;
-
-
-            public InstructionHandle next() throws NoSuchElementException {
-                if (ih == null) {
-                    throw new NoSuchElementException();
-                }
-                InstructionHandle i = ih;
-                ih = ih.next;
-                return i;
-            }
-
-
-            public void remove() {
-                throw new UnsupportedOperationException();
-            }
-
-
-            public boolean hasNext() {
-                return ih != null;
-            }
-        };
-    }
-
-
-    /**
-     * @return array containing all instructions (handles)
-     */
-    public InstructionHandle[] getInstructionHandles() {
-        InstructionHandle[] ihs = new InstructionHandle[length];
-        InstructionHandle ih = start;
-        for (int i = 0; i < length; i++) {
-            ihs[i] = ih;
-            ih = ih.next;
-        }
-        return ihs;
-    }
-
-
-    /**
-     * Get positions (offsets) of all instructions in the list. This relies on that
-     * the list has been freshly created from an byte code array, or that setPositions()
-     * has been called. Otherwise this may be inaccurate.
-     *
-     * @return array containing all instruction's offset in byte code
-     */
-    public int[] getInstructionPositions() {
-        return byte_positions;
-    }
-
-
-    /**
-     * @return complete, i.e., deep copy of this list
-     */
-    public InstructionList copy() {
-        Map<InstructionHandle, InstructionHandle> map = new HashMap<InstructionHandle, InstructionHandle>();
-        InstructionList il = new InstructionList();
-        /* Pass 1: Make copies of all instructions, append them to the new list
-         * and associate old instruction references with the new ones, i.e.,
-         * a 1:1 mapping.
-         */
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            Instruction i = ih.instruction;
-            Instruction c = i.copy(); // Use clone for shallow copy
-            if (c instanceof BranchInstruction) {
-                map.put(ih, il.append((BranchInstruction) c));
-            } else {
-                map.put(ih, il.append(c));
-            }
-        }
-        /* Pass 2: Update branch targets.
-         */
-        InstructionHandle ih = start;
-        InstructionHandle ch = il.start;
-        while (ih != null) {
-            Instruction i = ih.instruction;
-            Instruction c = ch.instruction;
-            if (i instanceof BranchInstruction) {
-                BranchInstruction bi = (BranchInstruction) i;
-                BranchInstruction bc = (BranchInstruction) c;
-                InstructionHandle itarget = bi.getTarget(); // old target
-                // New target is in hash map
-                bc.setTarget(map.get(itarget));
-                if (bi instanceof Select) { // Either LOOKUPSWITCH or TABLESWITCH
-                    InstructionHandle[] itargets = ((Select) bi).getTargets();
-                    InstructionHandle[] ctargets = ((Select) bc).getTargets();
-                    for (int j = 0; j < itargets.length; j++) { // Update all targets
-                        ctargets[j] = map.get(itargets[j]);
-                    }
-                }
-            }
-            ih = ih.next;
-            ch = ch.next;
-        }
-        return il;
-    }
-
-
-    /** Replace all references to the old constant pool with references to the new
-     *  constant pool
-     */
-    public void replaceConstantPool( ConstantPoolGen old_cp, ConstantPoolGen new_cp ) {
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            Instruction i = ih.instruction;
-            if (i instanceof CPInstruction) {
-                CPInstruction ci = (CPInstruction) i;
-                Constant c = old_cp.getConstant(ci.getIndex());
-                ci.setIndex(new_cp.addConstant(c, old_cp));
-            }
-        }
-    }
-
-
-    private void clear() {
-        start = end = null;
-        length = 0;
-    }
-
-
-    /**
-     * Delete contents of list. Provides better memory utilization,
-     * because the system then may reuse the instruction handles. This
-     * method is typically called right after {@link MethodGen#getMethod()}.
-     */
-    public void dispose() {
-        // Traverse in reverse order, because ih.next is overwritten
-        for (InstructionHandle ih = end; ih != null; ih = ih.prev) {
-            /* Causes BranchInstructions to release target and targeters, because it
-             * calls dispose() on the contained instruction.
-             */
-            ih.dispose();
-        }
-        clear();
-    }
-
-
-    /**
-     * @return start of list
-     */
-    public InstructionHandle getStart() {
-        return start;
-    }
-
-
-    /**
-     * @return end of list
-     */
-    public InstructionHandle getEnd() {
-        return end;
-    }
-
-
-    /**
-     * @return length of list (Number of instructions, not bytes)
-     */
-    public int getLength() {
-        return length;
-    }
-
-
-    /**
-     * @return length of list (Number of instructions, not bytes)
-     */
-    public int size() {
-        return length;
-    }
-
-
-    /**
-     * Redirect all references from old_target to new_target, i.e., update targets 
-     * of branch instructions.
-     *
-     * @param old_target the old target instruction handle
-     * @param new_target the new target instruction handle
-     */
-    public void redirectBranches( InstructionHandle old_target, InstructionHandle new_target ) {
-        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
-            Instruction i = ih.getInstruction();
-            if (i instanceof BranchInstruction) {
-                BranchInstruction b = (BranchInstruction) i;
-                InstructionHandle target = b.getTarget();
-                if (target == old_target) {
-                    b.setTarget(new_target);
-                }
-                if (b instanceof Select) { // Either LOOKUPSWITCH or TABLESWITCH
-                    InstructionHandle[] targets = ((Select) b).getTargets();
-                    for (int j = 0; j < targets.length; j++) {
-                        if (targets[j] == old_target) {
-                            ((Select) b).setTarget(j, new_target);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Redirect all references of local variables from old_target to new_target.
-     *
-     * @param lg array of local variables
-     * @param old_target the old target instruction handle
-     * @param new_target the new target instruction handle
-     * @see MethodGen
-     */
-    public void redirectLocalVariables( LocalVariableGen[] lg, InstructionHandle old_target,
-            InstructionHandle new_target ) {
-        for (LocalVariableGen element : lg) {
-            InstructionHandle start = element.getStart();
-            InstructionHandle end = element.getEnd();
-            if (start == old_target) {
-                element.setStart(new_target);
-            }
-            if (end == old_target) {
-                element.setEnd(new_target);
-            }
-        }
-    }
-
-
-    /**
-     * Redirect all references of exception handlers from old_target to new_target.
-     *
-     * @param exceptions array of exception handlers
-     * @param old_target the old target instruction handle
-     * @param new_target the new target instruction handle
-     * @see MethodGen
-     */
-    public void redirectExceptionHandlers( CodeExceptionGen[] exceptions,
-            InstructionHandle old_target, InstructionHandle new_target ) {
-        for (CodeExceptionGen exception : exceptions) {
-            if (exception.getStartPC() == old_target) {
-                exception.setStartPC(new_target);
-            }
-            if (exception.getEndPC() == old_target) {
-                exception.setEndPC(new_target);
-            }
-            if (exception.getHandlerPC() == old_target) {
-                exception.setHandlerPC(new_target);
-            }
-        }
-    }
-
-    private List<InstructionListObserver> observers;
-
-
-    /** Add observer for this object.
-     */
-    public void addObserver( InstructionListObserver o ) {
-        if (observers == null) {
-            observers = new ArrayList<InstructionListObserver>();
-        }
-        observers.add(o);
-    }
-
-
-    /** Remove observer for this object.
-     */
-    public void removeObserver( InstructionListObserver o ) {
-        if (observers != null) {
-            observers.remove(o);
-        }
-    }
-
-
-    /** Call notify() method on all observers. This method is not called
-     * automatically whenever the state has changed, but has to be
-     * called by the user after he has finished editing the object.
-     */
-    public void update() {
-        if (observers != null) {
-            for (InstructionListObserver observer : observers) {
-                observer.notify(this);
-            }
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/InstructionListObserver.java b/src/main/java/org/apache/bcel/generic/InstructionListObserver.java
deleted file mode 100644
index 2e67b8e..0000000
--- a/src/main/java/org/apache/bcel/generic/InstructionListObserver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Implement this interface if you're interested in changes to an InstructionList object
- * and register yourself with addObserver().
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface InstructionListObserver {
-
-    void notify( InstructionList list );
-}
diff --git a/src/main/java/org/apache/bcel/generic/InstructionTargeter.java b/src/main/java/org/apache/bcel/generic/InstructionTargeter.java
deleted file mode 100644
index 5cc56bd..0000000
--- a/src/main/java/org/apache/bcel/generic/InstructionTargeter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-
-package org.apache.bcel.generic;
-
-/**
- * Denote that a class targets InstructionHandles within an InstructionList. Namely
- * the following implementers:
- *
- * @see BranchHandle
- * @see LocalVariableGen
- * @see CodeExceptionGen
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface InstructionTargeter {
-
-    /**
-     * Checks whether this targeter targets the specified instruction handle.
-     */
-    boolean containsTarget(InstructionHandle ih);
-
-    /**
-     * Replaces the target of this targeter from this old handle to the new handle.
-     *
-     * @param old_ih the old handle
-     * @param new_ih the new handle
-     * @throws ClassGenException if old_ih is not targeted by this object
-     */
-    void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih) throws ClassGenException;
-}
diff --git a/src/main/java/org/apache/bcel/generic/InvokeInstruction.java b/src/main/java/org/apache/bcel/generic/InvokeInstruction.java
deleted file mode 100644
index 1603794..0000000
--- a/src/main/java/org/apache/bcel/generic/InvokeInstruction.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.util.StringTokenizer;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantPool;
-
-/**
- * Super class for the INVOKExxx family of instructions.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class InvokeInstruction extends FieldOrMethod implements ExceptionThrower,
-        StackConsumer, StackProducer {
-
-    private static final long serialVersionUID = 6089031137856650442L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    InvokeInstruction() {
-    }
-
-
-    /**
-     * @param index to constant pool
-     */
-    protected InvokeInstruction(short opcode, int index) {
-        super(opcode, index);
-    }
-
-
-    /**
-     * @return mnemonic for instruction with symbolic references resolved
-     */
-    @Override
-    public String toString( ConstantPool cp ) {
-        Constant c = cp.getConstant(index);
-        StringTokenizer tok = new StringTokenizer(cp.constantToString(c));
-        return Constants.OPCODE_NAMES[opcode] + " " + tok.nextToken().replace('.', '/')
-                + tok.nextToken();
-    }
-
-
-    /**
-     * Also works for instructions whose stack effect depends on the
-     * constant pool entry they reference.
-     * @return Number of words consumed from stack by this instruction
-     */
-    @Override
-    public int consumeStack( ConstantPoolGen cpg ) {
-        int sum;
-        if ((opcode == Constants.INVOKESTATIC) || (opcode == Constants.INVOKEDYNAMIC)) {
-            sum = 0;
-        } else {
-            sum = 1; // this reference
-        }
-
-        String signature = getSignature(cpg);
-        sum += Type.getArgumentTypesSize(signature);
-        return sum;
-    }
-
-
-    /**
-     * Also works for instructions whose stack effect depends on the
-     * constant pool entry they reference.
-     * @return Number of words produced onto stack by this instruction
-     */
-    @Override
-    public int produceStack( ConstantPoolGen cpg ) {
-        String signature = getSignature(cpg);
-        return Type.getReturnTypeSize(signature);
-    }
-
-
-    /** @return return type of referenced method.
-     */
-    @Override
-    public Type getType( ConstantPoolGen cpg ) {
-        return getReturnType(cpg);
-    }
-
-
-    /** @return name of referenced method.
-     */
-    public String getMethodName( ConstantPoolGen cpg ) {
-        return getName(cpg);
-    }
-
-
-    /** @return return type of referenced method.
-     */
-    public Type getReturnType( ConstantPoolGen cpg ) {
-        return Type.getReturnType(getSignature(cpg));
-    }
-
-
-    /** @return argument types of referenced method.
-     */
-    public Type[] getArgumentTypes( ConstantPoolGen cpg ) {
-        return Type.getArgumentTypes(getSignature(cpg));
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/JSR.java b/src/main/java/org/apache/bcel/generic/JSR.java
deleted file mode 100644
index 57b6065..0000000
--- a/src/main/java/org/apache/bcel/generic/JSR.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-/** 
- * JSR - Jump to subroutine
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class JSR extends JsrInstruction implements VariableLengthInstruction {
-
-    private static final long serialVersionUID = 7425681395340093184L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    JSR() {
-    }
-
-
-    public JSR(InstructionHandle target) {
-        super(org.apache.bcel.Constants.JSR, target);
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        index = getTargetOffset();
-        if (opcode == org.apache.bcel.Constants.JSR) {
-            super.dump(out);
-        } else { // JSR_W
-            index = getTargetOffset();
-            out.writeByte(opcode);
-            out.writeInt(index);
-        }
-    }
-
-
-    @Override
-    protected int updatePosition( int offset, int max_offset ) {
-        int i = getTargetOffset(); // Depending on old position value
-        position += offset; // Position may be shifted by preceding expansions
-        if (Math.abs(i) >= (32767 - max_offset)) { // to large for short (estimate)
-            opcode = org.apache.bcel.Constants.JSR_W;
-            short old_length = length;
-            length = 5;
-            return length - old_length;
-        }
-        return 0;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitVariableLengthInstruction(this);
-        v.visitBranchInstruction(this);
-        v.visitJsrInstruction(this);
-        v.visitJSR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/JSR_W.java b/src/main/java/org/apache/bcel/generic/JSR_W.java
deleted file mode 100644
index ed10624..0000000
--- a/src/main/java/org/apache/bcel/generic/JSR_W.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * JSR_W - Jump to subroutine
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class JSR_W extends JsrInstruction {
-
-    private static final long serialVersionUID = -7352049131416924650L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    JSR_W() {
-    }
-
-
-    public JSR_W(InstructionHandle target) {
-        super(org.apache.bcel.Constants.JSR_W, target);
-        length = 5;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        index = getTargetOffset();
-        out.writeByte(opcode);
-        out.writeInt(index);
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        index = bytes.readInt();
-        length = 5;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitBranchInstruction(this);
-        v.visitJsrInstruction(this);
-        v.visitJSR_W(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/JsrInstruction.java b/src/main/java/org/apache/bcel/generic/JsrInstruction.java
deleted file mode 100644
index 2eff7d4..0000000
--- a/src/main/java/org/apache/bcel/generic/JsrInstruction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * Super class for JSR - Jump to subroutine
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class JsrInstruction extends BranchInstruction implements UnconditionalBranch,
-        TypedInstruction, StackProducer {
-
-    private static final long serialVersionUID = -6438850002848773481L;
-
-
-    JsrInstruction(short opcode, InstructionHandle target) {
-        super(opcode, target);
-    }
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    JsrInstruction() {
-    }
-
-
-    /** @return return address type
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return new ReturnaddressType(physicalSuccessor());
-    }
-
-
-    /**
-     * Returns an InstructionHandle to the physical successor
-     * of this JsrInstruction. <B>For this method to work,
-     * this JsrInstruction object must not be shared between
-     * multiple InstructionHandle objects!</B>
-     * Formally, there must not be InstructionHandle objects
-     * i, j where i != j and i.getInstruction() == this ==
-     * j.getInstruction().
-     * @return an InstructionHandle to the "next" instruction that
-     * will be executed when RETurned from a subroutine.
-     */
-    public InstructionHandle physicalSuccessor() {
-        InstructionHandle ih = this.target;
-        // Rewind!
-        while (ih.getPrev() != null) {
-            ih = ih.getPrev();
-        }
-        // Find the handle for "this" JsrInstruction object.
-        while (ih.getInstruction() != this) {
-            ih = ih.getNext();
-        }
-        InstructionHandle toThis = ih;
-        while (ih != null) {
-            ih = ih.getNext();
-            if ((ih != null) && (ih.getInstruction() == this)) {
-                throw new RuntimeException("physicalSuccessor() called on a shared JsrInstruction.");
-            }
-        }
-        // Return the physical successor        
-        return toThis.getNext();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/L2D.java b/src/main/java/org/apache/bcel/generic/L2D.java
deleted file mode 100644
index 9c561ed..0000000
--- a/src/main/java/org/apache/bcel/generic/L2D.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * L2D - Convert long to double
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class L2D extends ConversionInstruction {
-
-    private static final long serialVersionUID = 1166552346340922659L;
-
-
-    public L2D() {
-        super(org.apache.bcel.Constants.L2D);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitL2D(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/L2F.java b/src/main/java/org/apache/bcel/generic/L2F.java
deleted file mode 100644
index ecd5027..0000000
--- a/src/main/java/org/apache/bcel/generic/L2F.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * L2F - Convert long to float
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class L2F extends ConversionInstruction {
-
-    private static final long serialVersionUID = -7181529985408901328L;
-
-
-    public L2F() {
-        super(org.apache.bcel.Constants.L2F);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitL2F(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/L2I.java b/src/main/java/org/apache/bcel/generic/L2I.java
deleted file mode 100644
index babcfeb..0000000
--- a/src/main/java/org/apache/bcel/generic/L2I.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * L2I - Convert long to int
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class L2I extends ConversionInstruction {
-
-    private static final long serialVersionUID = -3263285222028195535L;
-
-
-    public L2I() {
-        super(org.apache.bcel.Constants.L2I);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitConversionInstruction(this);
-        v.visitL2I(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LADD.java b/src/main/java/org/apache/bcel/generic/LADD.java
deleted file mode 100644
index 8a05a8a..0000000
--- a/src/main/java/org/apache/bcel/generic/LADD.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LADD - Add longs
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LADD extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 2093272772688460551L;
-
-
-    public LADD() {
-        super(org.apache.bcel.Constants.LADD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLADD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LALOAD.java b/src/main/java/org/apache/bcel/generic/LALOAD.java
deleted file mode 100644
index 6249a18..0000000
--- a/src/main/java/org/apache/bcel/generic/LALOAD.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LALOAD - Load long from array
- * <PRE>Stack: ..., arrayref, index -&gt; ..., value1, value2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LALOAD extends ArrayInstruction implements StackProducer {
-
-    private static final long serialVersionUID = -3687594761485525620L;
-
-
-    /** Load long from array
-     */
-    public LALOAD() {
-        super(org.apache.bcel.Constants.LALOAD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitLALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LAND.java b/src/main/java/org/apache/bcel/generic/LAND.java
deleted file mode 100644
index b56ae1c..0000000
--- a/src/main/java/org/apache/bcel/generic/LAND.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LAND - Bitwise AND longs
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LAND extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 2429077463161192057L;
-
-
-    public LAND() {
-        super(org.apache.bcel.Constants.LAND);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLAND(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LASTORE.java b/src/main/java/org/apache/bcel/generic/LASTORE.java
deleted file mode 100644
index 9f383fd..0000000
--- a/src/main/java/org/apache/bcel/generic/LASTORE.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LASTORE -  Store into long array
- * <PRE>Stack: ..., arrayref, index, value.word1, value.word2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LASTORE extends ArrayInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = -6758326777570451990L;
-
-
-    /** Store long into array
-     */
-    public LASTORE() {
-        super(org.apache.bcel.Constants.LASTORE);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitLASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LCMP.java b/src/main/java/org/apache/bcel/generic/LCMP.java
deleted file mode 100644
index 7982944..0000000
--- a/src/main/java/org/apache/bcel/generic/LCMP.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * LCMP - Compare longs:
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt; ..., result &lt;= -1, 0, 1&gt;</PRE>
- *        
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LCMP extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
-
-    private static final long serialVersionUID = 2981727810276161294L;
-
-
-    public LCMP() {
-        super(org.apache.bcel.Constants.LCMP, (short) 1);
-    }
-
-
-    /** @return Type.LONG
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.LONG;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitLCMP(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LCONST.java b/src/main/java/org/apache/bcel/generic/LCONST.java
deleted file mode 100644
index 439378f..0000000
--- a/src/main/java/org/apache/bcel/generic/LCONST.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LCONST - Push 0 or 1, other values cause an exception
- *
- * <PRE>Stack: ... -&gt; ..., </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LCONST extends Instruction implements ConstantPushInstruction {
-
-    private static final long serialVersionUID = 909025807621177822L;
-    private long value;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LCONST() {
-    }
-
-
-    public LCONST(long l) {
-        super(org.apache.bcel.Constants.LCONST_0, (short) 1);
-        if (l == 0) {
-            opcode = org.apache.bcel.Constants.LCONST_0;
-        } else if (l == 1) {
-            opcode = org.apache.bcel.Constants.LCONST_1;
-        } else {
-            throw new ClassGenException("LCONST can be used only for 0 and 1: " + l);
-        }
-        value = l;
-    }
-
-
-    public Number getValue() {
-        return Long.valueOf(value);
-    }
-
-
-    /** @return Type.LONG
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.LONG;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitPushInstruction(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitConstantPushInstruction(this);
-        v.visitLCONST(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LDC.java b/src/main/java/org/apache/bcel/generic/LDC.java
deleted file mode 100644
index 2e3ebec..0000000
--- a/src/main/java/org/apache/bcel/generic/LDC.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * LDC - Push item from constant pool.
- *
- * <PRE>Stack: ... -&gt; ..., item</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LDC extends CPInstruction implements PushInstruction, ExceptionThrower {
-
-    private static final long serialVersionUID = -972820476154330719L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LDC() {
-    }
-
-
-    public LDC(int index) {
-        super(org.apache.bcel.Constants.LDC_W, index);
-        setSize();
-    }
-
-
-    // Adjust to proper size
-    protected final void setSize() {
-        if (index <= org.apache.bcel.Constants.MAX_BYTE) { // Fits in one byte?
-            opcode = org.apache.bcel.Constants.LDC;
-            length = 2;
-        } else {
-            opcode = org.apache.bcel.Constants.LDC_W;
-            length = 3;
-        }
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        if (length == 2) {
-            out.writeByte(index);
-        } else {
-            out.writeShort(index);
-        }
-    }
-
-
-    /**
-     * Set the index to constant pool and adjust size.
-     */
-    @Override
-    public final void setIndex( int index ) {
-        super.setIndex(index);
-        setSize();
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        length = 2;
-        index = bytes.readUnsignedByte();
-    }
-
-
-    public Object getValue( ConstantPoolGen cpg ) {
-        org.apache.bcel.classfile.Constant c = cpg.getConstantPool().getConstant(index);
-        switch (c.getTag()) {
-            case org.apache.bcel.Constants.CONSTANT_String:
-                int i = ((org.apache.bcel.classfile.ConstantString) c).getStringIndex();
-                c = cpg.getConstantPool().getConstant(i);
-                return ((org.apache.bcel.classfile.ConstantUtf8) c).getBytes();
-            case org.apache.bcel.Constants.CONSTANT_Float:
-                return new Float(((org.apache.bcel.classfile.ConstantFloat) c).getBytes());
-            case org.apache.bcel.Constants.CONSTANT_Integer:
-                return Integer.valueOf(((org.apache.bcel.classfile.ConstantInteger) c).getBytes());
-            case org.apache.bcel.Constants.CONSTANT_Class:
-                int nameIndex = ((org.apache.bcel.classfile.ConstantClass) c).getNameIndex();
-                c = cpg.getConstantPool().getConstant(nameIndex);
-                return new ObjectType(((org.apache.bcel.classfile.ConstantUtf8) c).getBytes());
-            default: // Never reached
-                throw new RuntimeException("Unknown or invalid constant type at " + index);
-        }
-    }
-
-
-    @Override
-    public Type getType( ConstantPoolGen cpg ) {
-        switch (cpg.getConstantPool().getConstant(index).getTag()) {
-            case org.apache.bcel.Constants.CONSTANT_String:
-                return Type.STRING;
-            case org.apache.bcel.Constants.CONSTANT_Float:
-                return Type.FLOAT;
-            case org.apache.bcel.Constants.CONSTANT_Integer:
-                return Type.INT;
-            case org.apache.bcel.Constants.CONSTANT_Class:
-                return Type.CLASS;
-            default: // Never reached
-                throw new RuntimeException("Unknown or invalid constant type at " + index);
-        }
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return org.apache.bcel.ExceptionConstants.EXCS_STRING_RESOLUTION;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitPushInstruction(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitCPInstruction(this);
-        v.visitLDC(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LDC2_W.java b/src/main/java/org/apache/bcel/generic/LDC2_W.java
deleted file mode 100644
index 247c822..0000000
--- a/src/main/java/org/apache/bcel/generic/LDC2_W.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LDC2_W - Push long or double from constant pool
- *
- * <PRE>Stack: ... -&gt; ..., item.word1, item.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LDC2_W extends CPInstruction implements PushInstruction {
-
-    private static final long serialVersionUID = 7403326732924539892L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LDC2_W() {
-    }
-
-
-    public LDC2_W(int index) {
-        super(org.apache.bcel.Constants.LDC2_W, index);
-    }
-
-
-    @Override
-    public Type getType( ConstantPoolGen cpg ) {
-        switch (cpg.getConstantPool().getConstant(index).getTag()) {
-            case org.apache.bcel.Constants.CONSTANT_Long:
-                return Type.LONG;
-            case org.apache.bcel.Constants.CONSTANT_Double:
-                return Type.DOUBLE;
-            default: // Never reached
-                throw new RuntimeException("Unknown constant type " + opcode);
-        }
-    }
-
-
-    public Number getValue( ConstantPoolGen cpg ) {
-        org.apache.bcel.classfile.Constant c = cpg.getConstantPool().getConstant(index);
-        switch (c.getTag()) {
-            case org.apache.bcel.Constants.CONSTANT_Long:
-                return Long.valueOf(((org.apache.bcel.classfile.ConstantLong) c).getBytes());
-            case org.apache.bcel.Constants.CONSTANT_Double:
-                return new Double(((org.apache.bcel.classfile.ConstantDouble) c).getBytes());
-            default: // Never reached
-                throw new RuntimeException("Unknown or invalid constant type at " + index);
-        }
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitPushInstruction(this);
-        v.visitTypedInstruction(this);
-        v.visitCPInstruction(this);
-        v.visitLDC2_W(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LDC_W.java b/src/main/java/org/apache/bcel/generic/LDC_W.java
deleted file mode 100644
index 2f6431b..0000000
--- a/src/main/java/org/apache/bcel/generic/LDC_W.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * LDC_W - Push item from constant pool (wide index)
- *
- * <PRE>Stack: ... -&gt; ..., item.word1, item.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LDC_W extends LDC {
-
-    private static final long serialVersionUID = -8040188785844554411L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LDC_W() {
-    }
-
-
-    public LDC_W(int index) {
-        super(index);
-    }
-
-
-    /**
-     * Read needed data (i.e., index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        setIndex(bytes.readUnsignedShort());
-        // Override just in case it has been changed
-        opcode = org.apache.bcel.Constants.LDC_W;
-        length = 3;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LDIV.java b/src/main/java/org/apache/bcel/generic/LDIV.java
deleted file mode 100644
index 8e4f53b..0000000
--- a/src/main/java/org/apache/bcel/generic/LDIV.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * LDIV - Divide longs
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LDIV extends ArithmeticInstruction implements ExceptionThrower {
-
-    private static final long serialVersionUID = 8188185695825749727L;
-
-
-    public LDIV() {
-        super(org.apache.bcel.Constants.LDIV);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLDIV(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LLOAD.java b/src/main/java/org/apache/bcel/generic/LLOAD.java
deleted file mode 100644
index 18944bc..0000000
--- a/src/main/java/org/apache/bcel/generic/LLOAD.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LLOAD - Load long from local variable
- *<PRE>Stack ... -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LLOAD extends LoadInstruction {
-
-    private static final long serialVersionUID = 379331602405124174L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LLOAD() {
-        super(org.apache.bcel.Constants.LLOAD, org.apache.bcel.Constants.LLOAD_0);
-    }
-
-
-    public LLOAD(int n) {
-        super(org.apache.bcel.Constants.LLOAD, org.apache.bcel.Constants.LLOAD_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitLLOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LMUL.java b/src/main/java/org/apache/bcel/generic/LMUL.java
deleted file mode 100644
index 2b22b2a..0000000
--- a/src/main/java/org/apache/bcel/generic/LMUL.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LMUL - Multiply longs
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LMUL extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 3538398481425889023L;
-
-
-    public LMUL() {
-        super(org.apache.bcel.Constants.LMUL);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLMUL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LNEG.java b/src/main/java/org/apache/bcel/generic/LNEG.java
deleted file mode 100644
index 14f9234..0000000
--- a/src/main/java/org/apache/bcel/generic/LNEG.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LNEG - Negate long
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LNEG extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 7749253327528155126L;
-
-
-    public LNEG() {
-        super(org.apache.bcel.Constants.LNEG);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLNEG(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LOOKUPSWITCH.java b/src/main/java/org/apache/bcel/generic/LOOKUPSWITCH.java
deleted file mode 100644
index 165b939..0000000
--- a/src/main/java/org/apache/bcel/generic/LOOKUPSWITCH.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * LOOKUPSWITCH - Switch with unordered set of values
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see SWITCH
- */
-public class LOOKUPSWITCH extends Select {
-
-    private static final long serialVersionUID = -8263209830709467636L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LOOKUPSWITCH() {
-    }
-
-
-    public LOOKUPSWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget) {
-        super(org.apache.bcel.Constants.LOOKUPSWITCH, match, targets, defaultTarget);
-        length = (short) (9 + match_length * 8); /* alignment remainder assumed
-         * 0 here, until dump time. */
-        fixed_length = length;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        super.dump(out);
-        out.writeInt(match_length); // npairs
-        for (int i = 0; i < match_length; i++) {
-            out.writeInt(match[i]); // match-offset pairs
-            out.writeInt(indices[i] = getTargetOffset(targets[i]));
-        }
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        super.initFromFile(bytes, wide); // reads padding
-        match_length = bytes.readInt();
-        fixed_length = (short) (9 + match_length * 8);
-        length = (short) (fixed_length + padding);
-        match = new int[match_length];
-        indices = new int[match_length];
-        targets = new InstructionHandle[match_length];
-        for (int i = 0; i < match_length; i++) {
-            match[i] = bytes.readInt();
-            indices[i] = bytes.readInt();
-        }
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitVariableLengthInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitSelect(this);
-        v.visitLOOKUPSWITCH(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LOR.java b/src/main/java/org/apache/bcel/generic/LOR.java
deleted file mode 100644
index 17425ea..0000000
--- a/src/main/java/org/apache/bcel/generic/LOR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LOR - Bitwise OR long
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LOR extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 7862213176431021916L;
-
-
-    public LOR() {
-        super(org.apache.bcel.Constants.LOR);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLOR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LREM.java b/src/main/java/org/apache/bcel/generic/LREM.java
deleted file mode 100644
index 6178ac7..0000000
--- a/src/main/java/org/apache/bcel/generic/LREM.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * LREM - Remainder of long
- * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LREM extends ArithmeticInstruction implements ExceptionThrower {
-
-    private static final long serialVersionUID = -3646771608200042527L;
-
-
-    public LREM() {
-        super(org.apache.bcel.Constants.LREM);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLREM(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LRETURN.java b/src/main/java/org/apache/bcel/generic/LRETURN.java
deleted file mode 100644
index c9e2ecf..0000000
--- a/src/main/java/org/apache/bcel/generic/LRETURN.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LRETURN -  Return long from method
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; &lt;empty&gt;</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LRETURN extends ReturnInstruction {
-
-    private static final long serialVersionUID = 6173148526583167918L;
-
-
-    public LRETURN() {
-        super(org.apache.bcel.Constants.LRETURN);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitReturnInstruction(this);
-        v.visitLRETURN(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LSHL.java b/src/main/java/org/apache/bcel/generic/LSHL.java
deleted file mode 100644
index e3ac819..0000000
--- a/src/main/java/org/apache/bcel/generic/LSHL.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LSHL - Arithmetic shift left long
- * <PRE>Stack: ..., value1.word1, value1.word2, value2 -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LSHL extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 7855322471731877312L;
-
-
-    public LSHL() {
-        super(org.apache.bcel.Constants.LSHL);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLSHL(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LSHR.java b/src/main/java/org/apache/bcel/generic/LSHR.java
deleted file mode 100644
index c4484aa..0000000
--- a/src/main/java/org/apache/bcel/generic/LSHR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LSHR - Arithmetic shift right long
- * <PRE>Stack: ..., value1.word1, value1.word2, value2 -&gt; ..., result.word1, result.word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LSHR extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -6376870568784516963L;
-
-
-    public LSHR() {
-        super(org.apache.bcel.Constants.LSHR);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLSHR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LSTORE.java b/src/main/java/org/apache/bcel/generic/LSTORE.java
deleted file mode 100644
index 2c70a01..0000000
--- a/src/main/java/org/apache/bcel/generic/LSTORE.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LSTORE - Store long into local variable
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ... </PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LSTORE extends StoreInstruction {
-
-    private static final long serialVersionUID = 1309214714647416201L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LSTORE() {
-        super(org.apache.bcel.Constants.LSTORE, org.apache.bcel.Constants.LSTORE_0);
-    }
-
-
-    public LSTORE(int n) {
-        super(org.apache.bcel.Constants.LSTORE, org.apache.bcel.Constants.LSTORE_0, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        super.accept(v);
-        v.visitLSTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LSUB.java b/src/main/java/org/apache/bcel/generic/LSUB.java
deleted file mode 100644
index 486890a..0000000
--- a/src/main/java/org/apache/bcel/generic/LSUB.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LSUB - Substract longs
- * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
- *        ..., result.word1, result.word2
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LSUB extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -8379864362938353932L;
-
-
-    public LSUB() {
-        super(org.apache.bcel.Constants.LSUB);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLSUB(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LUSHR.java b/src/main/java/org/apache/bcel/generic/LUSHR.java
deleted file mode 100644
index f8c89d8..0000000
--- a/src/main/java/org/apache/bcel/generic/LUSHR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LUSHR - Logical shift right long
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LUSHR extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = 9184663422046843885L;
-
-
-    public LUSHR() {
-        super(org.apache.bcel.Constants.LUSHR);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLUSHR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LXOR.java b/src/main/java/org/apache/bcel/generic/LXOR.java
deleted file mode 100644
index b7cc733..0000000
--- a/src/main/java/org/apache/bcel/generic/LXOR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * LXOR - Bitwise XOR long
- * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class LXOR extends ArithmeticInstruction {
-
-    private static final long serialVersionUID = -3031187042785170579L;
-
-
-    public LXOR() {
-        super(org.apache.bcel.Constants.LXOR);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitTypedInstruction(this);
-        v.visitStackProducer(this);
-        v.visitStackConsumer(this);
-        v.visitArithmeticInstruction(this);
-        v.visitLXOR(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LineNumberGen.java b/src/main/java/org/apache/bcel/generic/LineNumberGen.java
deleted file mode 100644
index 0880442..0000000
--- a/src/main/java/org/apache/bcel/generic/LineNumberGen.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.classfile.LineNumber;
-
-/** 
- * This class represents a line number within a method, i.e., give an instruction
- * a line number corresponding to the source code line.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     LineNumber
- * @see     MethodGen
- */
-public class LineNumberGen implements InstructionTargeter, Cloneable, java.io.Serializable {
-
-    private static final long serialVersionUID = 4939965573936108738L;
-    private InstructionHandle ih;
-    private int src_line;
-
-
-    /**
-     * Create a line number.
-     *
-     * @param ih instruction handle to reference
-     */
-    public LineNumberGen(InstructionHandle ih, int src_line) {
-        setInstruction(ih);
-        setSourceLine(src_line);
-    }
-
-
-    /**
-     * @return true, if ih is target of this line number
-     */
-    public boolean containsTarget( InstructionHandle ih ) {
-        return this.ih == ih;
-    }
-
-
-    /**
-     * @param old_ih old target
-     * @param new_ih new target
-     */
-    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
-        if (old_ih != ih) {
-            throw new ClassGenException("Not targeting " + old_ih + ", but " + ih + "}");
-        } else {
-            setInstruction(new_ih);
-        }
-    }
-
-
-    /**
-     * Get LineNumber attribute .
-     *
-     * This relies on that the instruction list has already been dumped to byte code or
-     * or that the `setPositions' methods has been called for the instruction list.
-     */
-    public LineNumber getLineNumber() {
-        return new LineNumber(ih.getPosition(), src_line);
-    }
-
-
-    public void setInstruction( InstructionHandle ih ) {
-        if (ih == null) {
-            throw new NullPointerException("InstructionHandle may not be null");
-        }
-        BranchInstruction.notifyTarget(this.ih, ih, this);
-        this.ih = ih;
-    }
-
-
-    @Override
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new Error("Clone Not Supported"); // never happens
-        }
-    }
-
-
-    public InstructionHandle getInstruction() {
-        return ih;
-    }
-
-
-    public void setSourceLine( int src_line ) {
-        this.src_line = src_line;
-    }
-
-
-    public int getSourceLine() {
-        return src_line;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LoadClass.java b/src/main/java/org/apache/bcel/generic/LoadClass.java
deleted file mode 100644
index 19f3269..0000000
--- a/src/main/java/org/apache/bcel/generic/LoadClass.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denotes that an instruction may start the process of loading and resolving 
- * the referenced class in the Virtual Machine.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface LoadClass {
-
-    /**
-     * Returns the ObjectType of the referenced class or interface
-     * that may be loaded and resolved.
-     * @return object type that may be loaded or null if a primitive is
-     * referenced
-     */
-    public ObjectType getLoadClassType( ConstantPoolGen cpg );
-
-
-    /**
-     * Returns the type associated with this instruction.
-     * LoadClass instances are always typed, but this type
-     * does not always refer to the type of the class or interface
-     * that it possibly forces to load. For example, GETFIELD would
-     * return the type of the field and not the type of the class
-     * where the field is defined.
-     * If no class is forced to be loaded, <B>null</B> is returned.
-     * An example for this is an ANEWARRAY instruction that creates
-     * an int[][].
-     * @see #getLoadClassType(ConstantPoolGen)
-     */
-    public Type getType( ConstantPoolGen cpg );
-}
diff --git a/src/main/java/org/apache/bcel/generic/LoadInstruction.java b/src/main/java/org/apache/bcel/generic/LoadInstruction.java
deleted file mode 100644
index 555a524..0000000
--- a/src/main/java/org/apache/bcel/generic/LoadInstruction.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denotes an unparameterized instruction to load a value from a local
- * variable, e.g. ILOAD.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class LoadInstruction extends LocalVariableInstruction implements PushInstruction {
-
-    private static final long serialVersionUID = 3661924741022212247L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     * tag and length are defined in readInstruction and initFromFile, respectively.
-     */
-    LoadInstruction(short canon_tag, short c_tag) {
-        super(canon_tag, c_tag);
-    }
-
-
-    /**
-     * @param opcode Instruction opcode
-     * @param c_tag Instruction number for compact version, ALOAD_0, e.g.
-     * @param n local variable index (unsigned short)
-     */
-    protected LoadInstruction(short opcode, short c_tag, int n) {
-        super(opcode, c_tag, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitPushInstruction(this);
-        v.visitTypedInstruction(this);
-        v.visitLocalVariableInstruction(this);
-        v.visitLoadInstruction(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LocalVariableGen.java b/src/main/java/org/apache/bcel/generic/LocalVariableGen.java
deleted file mode 100644
index fc81d46..0000000
--- a/src/main/java/org/apache/bcel/generic/LocalVariableGen.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.LocalVariable;
-
-/** 
- * This class represents a local variable within a method. It contains its
- * scope, name and type. The generated LocalVariable object can be obtained
- * with getLocalVariable which needs the instruction list and the constant
- * pool as parameters.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see     LocalVariable
- * @see     MethodGen
- */
-public class LocalVariableGen implements InstructionTargeter, NamedAndTyped, Cloneable,
-        java.io.Serializable {
-
-    private static final long serialVersionUID = -3810966319065955534L;
-    private int index;
-    private String name;
-    private Type type;
-    private InstructionHandle start, end;
-
-
-    /**
-     * Generate a local variable that with index `index'. Note that double and long
-     * variables need two indexs. Index indices have to be provided by the user.
-     *
-     * @param index index of local variable
-     * @param name its name
-     * @param type its type
-     * @param start from where the instruction is valid (null means from the start)
-     * @param end until where the instruction is valid (null means to the end)
-     */
-    public LocalVariableGen(int index, String name, Type type, InstructionHandle start,
-            InstructionHandle end) {
-        if ((index < 0) || (index > Constants.MAX_SHORT)) {
-            throw new ClassGenException("Invalid index index: " + index);
-        }
-        this.name = name;
-        this.type = type;
-        this.index = index;
-        setStart(start);
-        setEnd(end);
-    }
-
-
-    /**
-     * Get LocalVariable object.
-     *
-     * This relies on that the instruction list has already been dumped to byte code or
-     * or that the `setPositions' methods has been called for the instruction list.
-     *
-     * Note that for local variables whose scope end at the last
-     * instruction of the method's code, the JVM specification is ambiguous:
-     * both a start_pc+length ending at the last instruction and
-     * start_pc+length ending at first index beyond the end of the code are
-     * valid.
-     *
-     * @param cp constant pool
-     */
-    public LocalVariable getLocalVariable( ConstantPoolGen cp ) {
-        int start_pc = start.getPosition();
-        int length = end.getPosition() - start_pc;
-        if (end.getNext() == null) {
-            length += end.getInstruction().getLength();
-        }
-        int name_index = cp.addUtf8(name);
-        int signature_index = cp.addUtf8(type.getSignature());
-        return new LocalVariable(start_pc, length, name_index, signature_index, index, cp
-                .getConstantPool());
-    }
-
-
-    public void setIndex( int index ) {
-        this.index = index;
-    }
-
-
-    public int getIndex() {
-        return index;
-    }
-
-
-    public void setName( String name ) {
-        this.name = name;
-    }
-
-
-    public String getName() {
-        return name;
-    }
-
-
-    public void setType( Type type ) {
-        this.type = type;
-    }
-
-
-    public Type getType() {
-        return type;
-    }
-
-
-    public InstructionHandle getStart() {
-        return start;
-    }
-
-
-    public InstructionHandle getEnd() {
-        return end;
-    }
-
-
-    public void setStart( InstructionHandle start ) {
-        BranchInstruction.notifyTarget(this.start, start, this);
-        this.start = start;
-    }
-
-
-    public void setEnd( InstructionHandle end ) {
-        BranchInstruction.notifyTarget(this.end, end, this);
-        this.end = end;
-    }
-
-
-    /**
-     * @param old_ih old target, either start or end
-     * @param new_ih new target
-     */
-    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
-        boolean targeted = false;
-        if (start == old_ih) {
-            targeted = true;
-            setStart(new_ih);
-        }
-        if (end == old_ih) {
-            targeted = true;
-            setEnd(new_ih);
-        }
-        if (!targeted) {
-            throw new ClassGenException("Not targeting " + old_ih + ", but {" + start + ", " + end
-                    + "}");
-        }
-    }
-
-    /**
-     * Clear the references from and to this variable when it's removed.
-     */
-    void dispose() {
-        setStart(null);
-        setEnd(null);
-    }
-
-    /**
-     * @return true, if ih is target of this variable
-     */
-    public boolean containsTarget( InstructionHandle ih ) {
-        return (start == ih) || (end == ih);
-    }
-
-
-    @Override
-    public int hashCode() {
-        // If the user changes the name or type, problems with the targeter hashmap will occur.
-        // Note: index cannot be part of hash as it may be changed by the user.
-        return name.hashCode() ^ type.hashCode();
-    }
-
-
-    /**
-     * We consider to local variables to be equal, if the use the same index and
-     * are valid in the same range.
-     */
-    @Override
-    public boolean equals( Object o ) {
-        if (!(o instanceof LocalVariableGen)) {
-            return false;
-        }
-        LocalVariableGen l = (LocalVariableGen) o;
-        return (l.index == index) && (l.start == start) && (l.end == end);
-    }
-
-
-    @Override
-    public String toString() {
-        return "LocalVariableGen(" + name + ", " + type + ", " + start + ", " + end + ")";
-    }
-
-
-    @Override
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            throw new Error("Clone Not Supported"); // never happens
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/LocalVariableInstruction.java b/src/main/java/org/apache/bcel/generic/LocalVariableInstruction.java
deleted file mode 100644
index 335387c..0000000
--- a/src/main/java/org/apache/bcel/generic/LocalVariableInstruction.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-import org.apache.bcel.util.ByteSequence;
-
-/**
- * Abstract super class for instructions dealing with local variables.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class LocalVariableInstruction extends Instruction implements TypedInstruction,
-        IndexedInstruction {
-
-    private static final long serialVersionUID = 8322269736316122743L;
-    protected int n = -1; // index of referenced variable
-    private short c_tag = -1; // compact version, such as ILOAD_0
-    private short canon_tag = -1; // canonical tag such as ILOAD
-
-
-    private boolean wide() {
-        return n > Constants.MAX_BYTE;
-    }
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     * tag and length are defined in readInstruction and initFromFile, respectively.
-     */
-    LocalVariableInstruction(short canon_tag, short c_tag) {
-        super();
-        this.canon_tag = canon_tag;
-        this.c_tag = c_tag;
-    }
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Also used by IINC()!
-     */
-    LocalVariableInstruction() {
-    }
-
-
-    /**
-     * @param opcode Instruction opcode
-     * @param c_tag Instruction number for compact version, ALOAD_0, e.g.
-     * @param n local variable index (unsigned short)
-     */
-    protected LocalVariableInstruction(short opcode, short c_tag, int n) {
-        super(opcode, (short) 2);
-        this.c_tag = c_tag;
-        canon_tag = opcode;
-        setIndex(n);
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        if (wide()) {
-            out.writeByte(Constants.WIDE);
-        }
-        out.writeByte(opcode);
-        if (length > 1) { // Otherwise ILOAD_n, instruction, e.g.
-            if (wide()) {
-                out.writeShort(n);
-            } else {
-                out.writeByte(n);
-            }
-        }
-    }
-
-
-    /**
-     * Long output format:
-     *
-     * &lt;name of opcode&gt; "["&lt;opcode number&gt;"]" 
-     * "("&lt;length of instruction&gt;")" "&lt;"&lt; local variable index&gt;"&gt;"
-     *
-     * @param verbose long/short format switch
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        if (((opcode >= Constants.ILOAD_0) && (opcode <= Constants.ALOAD_3))
-                || ((opcode >= Constants.ISTORE_0) && (opcode <= Constants.ASTORE_3))) {
-            return super.toString(verbose);
-        } else {
-            return super.toString(verbose) + " " + n;
-        }
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     * <pre>
-     * (ILOAD &lt;= tag &lt;= ALOAD_3) || (ISTORE &lt;= tag &lt;= ASTORE_3)
-     * </pre>
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        if (wide) {
-            n = bytes.readUnsignedShort();
-            length = 4;
-        } else if (((opcode >= Constants.ILOAD) && (opcode <= Constants.ALOAD))
-                || ((opcode >= Constants.ISTORE) && (opcode <= Constants.ASTORE))) {
-            n = bytes.readUnsignedByte();
-            length = 2;
-        } else if (opcode <= Constants.ALOAD_3) { // compact load instruction such as ILOAD_2
-            n = (opcode - Constants.ILOAD_0) % 4;
-            length = 1;
-        } else { // Assert ISTORE_0 <= tag <= ASTORE_3
-            n = (opcode - Constants.ISTORE_0) % 4;
-            length = 1;
-        }
-    }
-
-
-    /**
-     * @return local variable index  referred by this instruction.
-     */
-    public final int getIndex() {
-        return n;
-    }
-
-
-    /**
-     * Set the local variable index
-     */
-    public void setIndex( int n ) {
-        if ((n < 0) || (n > Constants.MAX_SHORT)) {
-            throw new ClassGenException("Illegal value: " + n);
-        }
-        this.n = n;
-        if (n >= 0 && n <= 3) { // Use more compact instruction xLOAD_n
-            opcode = (short) (c_tag + n);
-            length = 1;
-        } else {
-            opcode = canon_tag;
-            if (wide()) {
-                length = 4;
-            } else {
-                length = 2;
-            }
-        }
-    }
-
-
-    /** @return canonical tag for instruction, e.g., ALOAD for ALOAD_0
-     */
-    public short getCanonicalTag() {
-        return canon_tag;
-    }
-
-
-    /**
-     * Returns the type associated with the instruction - 
-     * in case of ALOAD or ASTORE Type.OBJECT is returned.
-     * This is just a bit incorrect, because ALOAD and ASTORE
-     * may work on every ReferenceType (including Type.NULL) and
-     * ASTORE may even work on a ReturnaddressType .
-     * @return type associated with the instruction
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        switch (canon_tag) {
-            case Constants.ILOAD:
-            case Constants.ISTORE:
-                return Type.INT;
-            case Constants.LLOAD:
-            case Constants.LSTORE:
-                return Type.LONG;
-            case Constants.DLOAD:
-            case Constants.DSTORE:
-                return Type.DOUBLE;
-            case Constants.FLOAD:
-            case Constants.FSTORE:
-                return Type.FLOAT;
-            case Constants.ALOAD:
-            case Constants.ASTORE:
-                return Type.OBJECT;
-            default:
-                throw new ClassGenException("Oops: unknown case in switch" + canon_tag);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/MONITORENTER.java b/src/main/java/org/apache/bcel/generic/MONITORENTER.java
deleted file mode 100644
index a560fdb..0000000
--- a/src/main/java/org/apache/bcel/generic/MONITORENTER.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * MONITORENTER - Enter monitor for object
- * <PRE>Stack: ..., objectref -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class MONITORENTER extends Instruction implements ExceptionThrower, StackConsumer {
-
-    private static final long serialVersionUID = 4537302966975402521L;
-
-
-    public MONITORENTER() {
-        super(org.apache.bcel.Constants.MONITORENTER, (short) 1);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitStackConsumer(this);
-        v.visitMONITORENTER(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/MONITOREXIT.java b/src/main/java/org/apache/bcel/generic/MONITOREXIT.java
deleted file mode 100644
index ad57fc6..0000000
--- a/src/main/java/org/apache/bcel/generic/MONITOREXIT.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * MONITOREXIT - Exit monitor for object
- * <PRE>Stack: ..., objectref -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class MONITOREXIT extends Instruction implements ExceptionThrower, StackConsumer {
-
-    private static final long serialVersionUID = -1499496577099659601L;
-
-
-    public MONITOREXIT() {
-        super(org.apache.bcel.Constants.MONITOREXIT, (short) 1);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitStackConsumer(this);
-        v.visitMONITOREXIT(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/MULTIANEWARRAY.java b/src/main/java/org/apache/bcel/generic/MULTIANEWARRAY.java
deleted file mode 100644
index 99dd13a..0000000
--- a/src/main/java/org/apache/bcel/generic/MULTIANEWARRAY.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.ExceptionConstants;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * MULTIANEWARRAY - Create new mutidimensional array of references
- * <PRE>Stack: ..., count1, [count2, ...] -&gt; ..., arrayref</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class MULTIANEWARRAY extends CPInstruction implements LoadClass, AllocationInstruction,
-        ExceptionThrower {
-
-    private static final long serialVersionUID = -7439639244808941662L;
-    private short dimensions;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    MULTIANEWARRAY() {
-    }
-
-
-    public MULTIANEWARRAY(int index, short dimensions) {
-        super(org.apache.bcel.Constants.MULTIANEWARRAY, index);
-        if (dimensions < 1) {
-            throw new ClassGenException("Invalid dimensions value: " + dimensions);
-        }
-        this.dimensions = dimensions;
-        length = 4;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        out.writeShort(index);
-        out.writeByte(dimensions);
-    }
-
-
-    /**
-     * Read needed data (i.e., no. dimension) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        super.initFromFile(bytes, wide);
-        dimensions = bytes.readByte();
-        length = 4;
-    }
-
-
-    /**
-     * @return number of dimensions to be created
-     */
-    public final short getDimensions() {
-        return dimensions;
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + index + " " + dimensions;
-    }
-
-
-    /**
-     * @return mnemonic for instruction with symbolic references resolved
-     */
-    @Override
-    public String toString( ConstantPool cp ) {
-        return super.toString(cp) + " " + dimensions;
-    }
-
-
-    /**
-     * Also works for instructions whose stack effect depends on the
-     * constant pool entry they reference.
-     * @return Number of words consumed from stack by this instruction
-     */
-    @Override
-    public int consumeStack( ConstantPoolGen cpg ) {
-        return dimensions;
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length + 1] = ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION;
-        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.ILLEGAL_ACCESS_ERROR;
-        return cs;
-    }
-
-
-    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
-        Type t = getType(cpg);
-        if (t instanceof ArrayType) {
-            t = ((ArrayType) t).getBasicType();
-        }
-        return (t instanceof ObjectType) ? (ObjectType) t : null;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitLoadClass(this);
-        v.visitAllocationInstruction(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitCPInstruction(this);
-        v.visitMULTIANEWARRAY(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/MethodGen.java b/src/main/java/org/apache/bcel/generic/MethodGen.java
deleted file mode 100644
index edffcc5..0000000
--- a/src/main/java/org/apache/bcel/generic/MethodGen.java
+++ /dev/null
@@ -1,1229 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Stack;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.Annotations;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.CodeException;
-import org.apache.bcel.classfile.ExceptionTable;
-import org.apache.bcel.classfile.LineNumber;
-import org.apache.bcel.classfile.LineNumberTable;
-import org.apache.bcel.classfile.LocalVariable;
-import org.apache.bcel.classfile.LocalVariableTable;
-import org.apache.bcel.classfile.LocalVariableTypeTable;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.ParameterAnnotationEntry;
-import org.apache.bcel.classfile.ParameterAnnotations;
-import org.apache.bcel.classfile.RuntimeVisibleParameterAnnotations;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.util.BCELComparator;
-
-/** 
- * Template class for building up a method. This is done by defining exception
- * handlers, adding thrown exceptions, local variables and attributes, whereas
- * the `LocalVariableTable' and `LineNumberTable' attributes will be set
- * automatically for the code. Use stripAttributes() if you don't like this.
- *
- * While generating code it may be necessary to insert NOP operations. You can
- * use the `removeNOPs' method to get rid off them.
- * The resulting method object can be obtained via the `getMethod()' method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @author  <A HREF="http://www.vmeng.com/beard">Patrick C. Beard</A> [setMaxStack()]
- * @see     InstructionList
- * @see     Method
- */
-public class MethodGen extends FieldGenOrMethodGen {
-
-    private static final long serialVersionUID = -3924667713338957720L;
-    private String class_name;
-    private Type[] arg_types;
-    private String[] arg_names;
-    private int max_locals;
-    private int max_stack;
-    private InstructionList il;
-    private boolean strip_attributes;
-    private final List<LocalVariableGen> variable_vec = new ArrayList<LocalVariableGen>();
-    private final List<LineNumberGen> line_number_vec = new ArrayList<LineNumberGen>();
-    private final List<CodeExceptionGen> exception_vec = new ArrayList<CodeExceptionGen>();
-    private final List<String> throws_vec = new ArrayList<String>();
-    private final List<Attribute> code_attrs_vec = new ArrayList<Attribute>();
-
-    private List<AnnotationEntryGen>[] param_annotations; // Array of lists containing AnnotationGen objects
-    private boolean hasParameterAnnotations = false;
-    private boolean haveUnpackedParameterAnnotations = false;
-
-    private static BCELComparator _cmp = new BCELComparator() {
-
-        public boolean equals( Object o1, Object o2 ) {
-            MethodGen THIS = (MethodGen) o1;
-            MethodGen THAT = (MethodGen) o2;
-            return THIS.getName().equals(THAT.getName())
-                    && THIS.getSignature().equals(THAT.getSignature());
-        }
-
-
-        public int hashCode( Object o ) {
-            MethodGen THIS = (MethodGen) o;
-            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
-        }
-    };
-
-
-    /**
-     * Declare method. If the method is non-static the constructor
-     * automatically declares a local variable `$this' in slot 0. The
-     * actual code is contained in the `il' parameter, which may further
-     * manipulated by the user. But he must take care not to remove any
-     * instruction (handles) that are still referenced from this object.
-     *
-     * For example one may not add a local variable and later remove the
-     * instructions it refers to without causing havoc. It is safe
-     * however if you remove that local variable, too.
-     *
-     * @param access_flags access qualifiers
-     * @param return_type  method type
-     * @param arg_types argument types
-     * @param arg_names argument names (if this is null, default names will be provided
-     * for them)
-     * @param method_name name of method
-     * @param class_name class name containing this method (may be null, if you don't care)
-     * @param il instruction list associated with this method, may be null only for
-     * abstract or native methods
-     * @param cp constant pool
-     */
-    public MethodGen(int access_flags, Type return_type, Type[] arg_types, String[] arg_names,
-            String method_name, String class_name, InstructionList il, ConstantPoolGen cp) {
-        setAccessFlags(access_flags);
-        setType(return_type);
-        setArgumentTypes(arg_types);
-        setArgumentNames(arg_names);
-        setName(method_name);
-        setClassName(class_name);
-        setInstructionList(il);
-        setConstantPool(cp);
-        boolean abstract_ = isAbstract() || isNative();
-        InstructionHandle start = null;
-        InstructionHandle end = null;
-        if (!abstract_) {
-            start = il.getStart();
-            end = il.getEnd();
-            /* Add local variables, namely the implicit `this' and the arguments
-             */
-            if (!isStatic() && (class_name != null)) { // Instance method -> `this' is local var 0
-                addLocalVariable("this",  ObjectType.getInstance(class_name), start, end);
-            }
-        }
-        if (arg_types != null) {
-            int size = arg_types.length;
-            for (Type arg_type : arg_types) {
-                if (Type.VOID == arg_type) {
-                    throw new ClassGenException("'void' is an illegal argument type for a method");
-                }
-            }
-            if (arg_names != null) { // Names for variables provided?
-                if (size != arg_names.length) {
-                    throw new ClassGenException("Mismatch in argument array lengths: " + size
-                            + " vs. " + arg_names.length);
-                }
-            } else { // Give them dummy names
-                arg_names = new String[size];
-                for (int i = 0; i < size; i++) {
-                    arg_names[i] = "arg" + i;
-                }
-                setArgumentNames(arg_names);
-            }
-            if (!abstract_) {
-                for (int i = 0; i < size; i++) {
-                    addLocalVariable(arg_names[i], arg_types[i], start, end);
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Instantiate from existing method.
-     *
-     * @param m method
-     * @param class_name class name containing this method
-     * @param cp constant pool
-     */
-    public MethodGen(Method m, String class_name, ConstantPoolGen cp) {
-        this(m.getAccessFlags(), Type.getReturnType(m.getSignature()), Type.getArgumentTypes(m
-                .getSignature()), null /* may be overridden anyway */
-        , m.getName(), class_name,
-                ((m.getAccessFlags() & (Constants.ACC_ABSTRACT | Constants.ACC_NATIVE)) == 0)
-                        ? new InstructionList(m.getCode().getCode())
-                        : null, cp);
-        Attribute[] attributes = m.getAttributes();
-        for (Attribute attribute : attributes) {
-            Attribute a = attribute;
-            if (a instanceof Code) {
-                Code c = (Code) a;
-                setMaxStack(c.getMaxStack());
-                setMaxLocals(c.getMaxLocals());
-                CodeException[] ces = c.getExceptionTable();
-                if (ces != null) {
-                    for (CodeException ce : ces) {
-                        int type = ce.getCatchType();
-                        ObjectType c_type = null;
-                        if (type > 0) {
-                            String cen = m.getConstantPool().getConstantString(type,
-                                    Constants.CONSTANT_Class);
-                            c_type =  ObjectType.getInstance(cen);
-                        }
-                        int end_pc = ce.getEndPC();
-                        int length = m.getCode().getCode().length;
-                        InstructionHandle end;
-                        if (length == end_pc) { // May happen, because end_pc is exclusive
-                            end = il.getEnd();
-                        } else {
-                            end = il.findHandle(end_pc);
-                            end = end.getPrev(); // Make it inclusive
-                        }
-                        addExceptionHandler(il.findHandle(ce.getStartPC()), end, il.findHandle(ce
-                                .getHandlerPC()), c_type);
-                    }
-                }
-                Attribute[] c_attributes = c.getAttributes();
-                for (Attribute c_attribute : c_attributes) {
-                    a = c_attribute;
-                    if (a instanceof LineNumberTable) {
-                        LineNumber[] ln = ((LineNumberTable) a).getLineNumberTable();
-                        for (LineNumber l : ln) {
-                            InstructionHandle ih = il.findHandle(l.getStartPC());
-                            if (ih != null) {
-                                addLineNumber(ih, l.getLineNumber());
-                            }
-                        }
-                    } else if (a instanceof LocalVariableTable) {
-                        LocalVariable[] lv = ((LocalVariableTable) a).getLocalVariableTable();
-                        removeLocalVariables();
-                        for (LocalVariable l : lv) {
-                            InstructionHandle start = il.findHandle(l.getStartPC());
-                            InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength());
-                            // Repair malformed handles
-                            if (null == start) {
-                                start = il.getStart();
-                            }
-                            if (null == end) {
-                                end = il.getEnd();
-                            }
-                            addLocalVariable(l.getName(), Type.getType(l.getSignature()), l
-                                    .getIndex(), start, end);
-                        }
-                    } else if (a instanceof LocalVariableTypeTable) {
-                        LocalVariable[] lv = ((LocalVariableTypeTable) a).getLocalVariableTypeTable();
-                        removeLocalVariables();
-                        for (LocalVariable l : lv) {
-                            InstructionHandle start = il.findHandle(l.getStartPC());
-                            InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength());
-                            // Repair malformed handles
-                            if (null == start) {
-                                start = il.getStart();
-                            }
-                            if (null == end) {
-                                end = il.getEnd();
-                            }
-                            addLocalVariable(l.getName(), Type.getType(l.getSignature()), l
-                                    .getIndex(), start, end);
-                        }
-                    } else {
-                        addCodeAttribute(a);
-                    }
-                }
-            } else if (a instanceof ExceptionTable) {
-                String[] names = ((ExceptionTable) a).getExceptionNames();
-                for (String name2 : names) {
-                    addException(name2);
-                }
-            } else if (a instanceof Annotations) {
-                Annotations runtimeAnnotations = (Annotations) a;
-                AnnotationEntry[] aes = runtimeAnnotations.getAnnotationEntries();
-                for (AnnotationEntry element : aes) {
-                    addAnnotationEntry(new AnnotationEntryGen(element, cp, false));
-                }
-            } else {
-                addAttribute(a);
-            }
-        }
-    }
-
-
-    /**
-     * Adds a local variable to this method.
-     *
-     * @param name variable name
-     * @param type variable type
-     * @param slot the index of the local variable, if type is long or double, the next available
-     * index is slot+2
-     * @param start from where the variable is valid
-     * @param end until where the variable is valid
-     * @return new local variable object
-     * @see LocalVariable
-     */
-    public LocalVariableGen addLocalVariable( String name, Type type, int slot,
-            InstructionHandle start, InstructionHandle end ) {
-        byte t = type.getType();
-        if (t != Constants.T_ADDRESS) {
-            int add = type.getSize();
-            if (slot + add > max_locals) {
-                max_locals = slot + add;
-            }
-            LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end);
-            int i;
-            if ((i = variable_vec.indexOf(l)) >= 0) {
-                variable_vec.set(i, l);
-            } else {
-                variable_vec.add(l);
-            }
-            return l;
-        } else {
-            throw new IllegalArgumentException("Can not use " + type
-                    + " as type for local variable");
-        }
-    }
-
-
-    /**
-     * Adds a local variable to this method and assigns an index automatically.
-     *
-     * @param name variable name
-     * @param type variable type
-     * @param start from where the variable is valid, if this is null,
-     * it is valid from the start
-     * @param end until where the variable is valid, if this is null,
-     * it is valid to the end
-     * @return new local variable object
-     * @see LocalVariable
-     */
-    public LocalVariableGen addLocalVariable( String name, Type type, InstructionHandle start,
-            InstructionHandle end ) {
-        return addLocalVariable(name, type, max_locals, start, end);
-    }
-
-
-    /**
-     * Remove a local variable, its slot will not be reused, if you do not use addLocalVariable
-     * with an explicit index argument.
-     */
-    public void removeLocalVariable( LocalVariableGen l ) {
-        l.dispose();
-        variable_vec.remove(l);
-    }
-
-
-    /**
-     * Remove all local variables.
-     */
-    public void removeLocalVariables() {
-        for (LocalVariableGen lv : variable_vec) {
-            lv.dispose();
-        }
-        variable_vec.clear();
-    }
-
-
-    /*
-     * If the range of the variable has not been set yet, it will be set to be valid from
-     * the start to the end of the instruction list.
-     * 
-     * @return array of declared local variables sorted by index
-     */
-    public LocalVariableGen[] getLocalVariables() {
-        int size = variable_vec.size();
-        LocalVariableGen[] lg = new LocalVariableGen[size];
-        variable_vec.toArray(lg);
-        for (int i = 0; i < size; i++) {
-            if (lg[i].getStart() == null) {
-                lg[i].setStart(il.getStart());
-            }
-            if (lg[i].getEnd() == null) {
-                lg[i].setEnd(il.getEnd());
-            }
-        }
-        if (size > 1) {
-            Arrays.sort(lg, new Comparator<LocalVariableGen>() {
-                public int compare(LocalVariableGen o1, LocalVariableGen o2) {
-                    return o1.getIndex() - o2.getIndex();
-                }
-            });
-        }
-        return lg;
-    }
-
-
-    /**
-     * @return `LocalVariableTable' attribute of all the local variables of this method.
-     */
-    public LocalVariableTable getLocalVariableTable( ConstantPoolGen cp ) {
-        LocalVariableGen[] lg = getLocalVariables();
-        int size = lg.length;
-        LocalVariable[] lv = new LocalVariable[size];
-        for (int i = 0; i < size; i++) {
-            lv[i] = lg[i].getLocalVariable(cp);
-        }
-        return new LocalVariableTable(cp.addUtf8("LocalVariableTable"), 2 + lv.length * 10, lv, cp
-                .getConstantPool());
-    }
-
-
-    /**
-     * Give an instruction a line number corresponding to the source code line.
-     *
-     * @param ih instruction to tag
-     * @return new line number object
-     * @see LineNumber
-     */
-    public LineNumberGen addLineNumber( InstructionHandle ih, int src_line ) {
-        LineNumberGen l = new LineNumberGen(ih, src_line);
-        line_number_vec.add(l);
-        return l;
-    }
-
-
-    /**
-     * Remove a line number.
-     */
-    public void removeLineNumber( LineNumberGen l ) {
-        line_number_vec.remove(l);
-    }
-
-
-    /**
-     * Remove all line numbers.
-     */
-    public void removeLineNumbers() {
-        line_number_vec.clear();
-    }
-
-
-    /*
-     * @return array of line numbers
-     */
-    public LineNumberGen[] getLineNumbers() {
-        LineNumberGen[] lg = new LineNumberGen[line_number_vec.size()];
-        line_number_vec.toArray(lg);
-        return lg;
-    }
-
-
-    /**
-     * @return `LineNumberTable' attribute of all the local variables of this method.
-     */
-    public LineNumberTable getLineNumberTable( ConstantPoolGen cp ) {
-        int size = line_number_vec.size();
-        LineNumber[] ln = new LineNumber[size];
-        try {
-            for (int i = 0; i < size; i++) {
-                ln[i] = line_number_vec.get(i).getLineNumber();
-            }
-        } catch (ArrayIndexOutOfBoundsException e) {
-        } // Never occurs
-        return new LineNumberTable(cp.addUtf8("LineNumberTable"), 2 + ln.length * 4, ln, cp
-                .getConstantPool());
-    }
-
-
-    /**
-     * Add an exception handler, i.e., specify region where a handler is active and an
-     * instruction where the actual handling is done.
-     *
-     * @param start_pc Start of region (inclusive)
-     * @param end_pc End of region (inclusive)
-     * @param handler_pc Where handling is done
-     * @param catch_type class type of handled exception or null if any
-     * exception is handled
-     * @return new exception handler object
-     */
-    public CodeExceptionGen addExceptionHandler( InstructionHandle start_pc,
-            InstructionHandle end_pc, InstructionHandle handler_pc, ObjectType catch_type ) {
-        if ((start_pc == null) || (end_pc == null) || (handler_pc == null)) {
-            throw new ClassGenException("Exception handler target is null instruction");
-        }
-        CodeExceptionGen c = new CodeExceptionGen(start_pc, end_pc, handler_pc, catch_type);
-        exception_vec.add(c);
-        return c;
-    }
-
-
-    /**
-     * Remove an exception handler.
-     */
-    public void removeExceptionHandler( CodeExceptionGen c ) {
-        exception_vec.remove(c);
-    }
-
-
-    /**
-     * Remove all line numbers.
-     */
-    public void removeExceptionHandlers() {
-        exception_vec.clear();
-    }
-
-
-    /*
-     * @return array of declared exception handlers
-     */
-    public CodeExceptionGen[] getExceptionHandlers() {
-        CodeExceptionGen[] cg = new CodeExceptionGen[exception_vec.size()];
-        exception_vec.toArray(cg);
-        return cg;
-    }
-
-
-    /**
-     * @return code exceptions for `Code' attribute
-     */
-    private CodeException[] getCodeExceptions() {
-        int size = exception_vec.size();
-        CodeException[] c_exc = new CodeException[size];
-        try {
-            for (int i = 0; i < size; i++) {
-                CodeExceptionGen c =  exception_vec.get(i);
-                c_exc[i] = c.getCodeException(cp);
-            }
-        } catch (ArrayIndexOutOfBoundsException e) {
-        }
-        return c_exc;
-    }
-
-
-    /**
-     * Add an exception possibly thrown by this method.
-     *
-     * @param class_name (fully qualified) name of exception
-     */
-    public void addException( String class_name ) {
-        throws_vec.add(class_name);
-    }
-
-
-    /**
-     * Remove an exception.
-     */
-    public void removeException( String c ) {
-        throws_vec.remove(c);
-    }
-
-
-    /**
-     * Remove all exceptions.
-     */
-    public void removeExceptions() {
-        throws_vec.clear();
-    }
-
-
-    /*
-     * @return array of thrown exceptions
-     */
-    public String[] getExceptions() {
-        String[] e = new String[throws_vec.size()];
-        throws_vec.toArray(e);
-        return e;
-    }
-
-
-    /**
-     * @return `Exceptions' attribute of all the exceptions thrown by this method.
-     */
-    private ExceptionTable getExceptionTable( ConstantPoolGen cp ) {
-        int size = throws_vec.size();
-        int[] ex = new int[size];
-        try {
-            for (int i = 0; i < size; i++) {
-                ex[i] = cp.addClass(throws_vec.get(i));
-            }
-        } catch (ArrayIndexOutOfBoundsException e) {
-        }
-        return new ExceptionTable(cp.addUtf8("Exceptions"), 2 + 2 * size, ex, cp.getConstantPool());
-    }
-
-
-    /**
-     * Add an attribute to the code. Currently, the JVM knows about the
-     * LineNumberTable, LocalVariableTable and StackMap attributes,
-     * where the former two will be generated automatically and the
-     * latter is used for the MIDP only. Other attributes will be
-     * ignored by the JVM but do no harm.
-     *
-     * @param a attribute to be added
-     */
-    public void addCodeAttribute( Attribute a ) {
-        code_attrs_vec.add(a);
-    }
-
-
-    /**
-     * Remove a code attribute.
-     */
-    public void removeCodeAttribute( Attribute a ) {
-        code_attrs_vec.remove(a);
-    }
-
-
-    /**
-     * Remove all code attributes.
-     */
-    public void removeCodeAttributes() {
-        code_attrs_vec.clear();
-    }
-
-
-    /**
-     * @return all attributes of this method.
-     */
-    public Attribute[] getCodeAttributes() {
-        Attribute[] attributes = new Attribute[code_attrs_vec.size()];
-        code_attrs_vec.toArray(attributes);
-        return attributes;
-    }
-
-    public void addAnnotationsAsAttribute(ConstantPoolGen cp) {
-          Attribute[] attrs = AnnotationEntryGen.getAnnotationAttributes(cp,annotation_vec);
-        for (Attribute attr : attrs) {
-            addAttribute(attr);
-        }
-      }
-
-      public void addParameterAnnotationsAsAttribute(ConstantPoolGen cp) {
-          if (!hasParameterAnnotations) {
-            return;
-        }
-          Attribute[] attrs = AnnotationEntryGen.getParameterAnnotationAttributes(cp,param_annotations);
-          if (attrs!=null) {
-          for (Attribute attr : attrs) {
-              addAttribute(attr);
-          }
-          }
-      }
-
-
-    /**
-     * Get method object. Never forget to call setMaxStack() or setMaxStack(max), respectively,
-     * before calling this method (the same applies for max locals).
-     *
-     * @return method object
-     */
-    public Method getMethod() {
-        String signature = getSignature();
-        int name_index = cp.addUtf8(name);
-        int signature_index = cp.addUtf8(signature);
-        /* Also updates positions of instructions, i.e., their indices
-         */
-        byte[] byte_code = null;
-        if (il != null) {
-            byte_code = il.getByteCode();
-        }
-        LineNumberTable lnt = null;
-        LocalVariableTable lvt = null;
-        /* Create LocalVariableTable and LineNumberTable attributes (for debuggers, e.g.)
-         */
-        if ((variable_vec.size() > 0) && !strip_attributes) {
-            addCodeAttribute(lvt = getLocalVariableTable(cp));
-        }
-        if ((line_number_vec.size() > 0) && !strip_attributes) {
-            addCodeAttribute(lnt = getLineNumberTable(cp));
-        }
-        Attribute[] code_attrs = getCodeAttributes();
-        /* Each attribute causes 6 additional header bytes
-         */
-        int attrs_len = 0;
-        for (Attribute code_attr : code_attrs) {
-            attrs_len += (code_attr.getLength() + 6);
-        }
-        CodeException[] c_exc = getCodeExceptions();
-        int exc_len = c_exc.length * 8; // Every entry takes 8 bytes
-        Code code = null;
-        if ((il != null) && !isAbstract() && !isNative()) {
-            // Remove any stale code attribute
-            Attribute[] attributes = getAttributes();
-            for (Attribute a : attributes) {
-                if (a instanceof Code) {
-                    removeAttribute(a);
-                }
-            }
-            code = new Code(cp.addUtf8("Code"), 8 + byte_code.length + // prologue byte code
-                    2 + exc_len + // exceptions
-                    2 + attrs_len, // attributes
-                    max_stack, max_locals, byte_code, c_exc, code_attrs, cp.getConstantPool());
-            addAttribute(code);
-        }
-        addAnnotationsAsAttribute(cp);
-        addParameterAnnotationsAsAttribute(cp);
-        ExceptionTable et = null;
-        if (throws_vec.size() > 0) {
-            addAttribute(et = getExceptionTable(cp));
-            // Add `Exceptions' if there are "throws" clauses
-        }
-        Method m = new Method(access_flags, name_index, signature_index, getAttributes(), cp
-                .getConstantPool());
-        // Undo effects of adding attributes
-        if (lvt != null) {
-            removeCodeAttribute(lvt);
-        }
-        if (lnt != null) {
-            removeCodeAttribute(lnt);
-        }
-        if (code != null) {
-            removeAttribute(code);
-        }
-        if (et != null) {
-            removeAttribute(et);
-        }
-        return m;
-    }
-
-
-    /**
-     * Remove all NOPs from the instruction list (if possible) and update every
-     * object refering to them, i.e., branch instructions, local variables and
-     * exception handlers.
-     */
-    public void removeNOPs() {
-        if (il != null) {
-            InstructionHandle next;
-            /* Check branch instructions.
-             */
-            for (InstructionHandle ih = il.getStart(); ih != null; ih = next) {
-                next = ih.next;
-                if ((next != null) && (ih.getInstruction() instanceof NOP)) {
-                    try {
-                        il.delete(ih);
-                    } catch (TargetLostException e) {
-                        for (InstructionHandle target : e.getTargets()) {
-                            for (InstructionTargeter targeter : target.getTargeters()) {
-                                targeter.updateTarget(target, next);
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Set maximum number of local variables.
-     */
-    public void setMaxLocals( int m ) {
-        max_locals = m;
-    }
-
-
-    public int getMaxLocals() {
-        return max_locals;
-    }
-
-
-    /**
-     * Set maximum stack size for this method.
-     */
-    public void setMaxStack( int m ) {
-        max_stack = m;
-    }
-
-
-    public int getMaxStack() {
-        return max_stack;
-    }
-
-
-    /** @return class that contains this method
-     */
-    public String getClassName() {
-        return class_name;
-    }
-
-
-    public void setClassName( String class_name ) {
-        this.class_name = class_name;
-    }
-
-
-    public void setReturnType( Type return_type ) {
-        setType(return_type);
-    }
-
-
-    public Type getReturnType() {
-        return getType();
-    }
-
-
-    public void setArgumentTypes( Type[] arg_types ) {
-        this.arg_types = arg_types;
-    }
-
-
-    public Type[] getArgumentTypes() {
-        return arg_types.clone();
-    }
-
-
-    public void setArgumentType( int i, Type type ) {
-        arg_types[i] = type;
-    }
-
-
-    public Type getArgumentType( int i ) {
-        return arg_types[i];
-    }
-
-
-    public void setArgumentNames( String[] arg_names ) {
-        this.arg_names = arg_names;
-    }
-
-
-    public String[] getArgumentNames() {
-        return arg_names.clone();
-    }
-
-
-    public void setArgumentName( int i, String name ) {
-        arg_names[i] = name;
-    }
-
-
-    public String getArgumentName( int i ) {
-        return arg_names[i];
-    }
-
-
-    public InstructionList getInstructionList() {
-        return il;
-    }
-
-
-    public void setInstructionList( InstructionList il ) {
-        this.il = il;
-    }
-
-
-    @Override
-    public String getSignature() {
-        return Type.getMethodSignature(type, arg_types);
-    }
-
-
-    /**
-     * Computes max. stack size by performing control flow analysis.
-     */
-    public void setMaxStack() {
-        if (il != null) {
-            max_stack = getMaxStack(cp, il, getExceptionHandlers());
-        } else {
-            max_stack = 0;
-        }
-    }
-
-
-    /**
-     * Compute maximum number of local variables.
-     */
-    public void setMaxLocals() {
-        if (il != null) {
-            int max = isStatic() ? 0 : 1;
-            if (arg_types != null) {
-                for (Type arg_type : arg_types) {
-                    max += arg_type.getSize();
-                }
-            }
-            for (InstructionHandle ih = il.getStart(); ih != null; ih = ih.getNext()) {
-                Instruction ins = ih.getInstruction();
-                if ((ins instanceof LocalVariableInstruction) || (ins instanceof RET)
-                        || (ins instanceof IINC)) {
-                    int index = ((IndexedInstruction) ins).getIndex()
-                            + ((TypedInstruction) ins).getType(cp).getSize();
-                    if (index > max) {
-                        max = index;
-                    }
-                }
-            }
-            max_locals = max;
-        } else {
-            max_locals = 0;
-        }
-    }
-
-
-    /** Do not/Do produce attributes code attributesLineNumberTable and
-     * LocalVariableTable, like javac -O
-     */
-    public void stripAttributes( boolean flag ) {
-        strip_attributes = flag;
-    }
-
-    static final class BranchTarget {
-
-        InstructionHandle target;
-        int stackDepth;
-
-
-        BranchTarget(InstructionHandle target, int stackDepth) {
-            this.target = target;
-            this.stackDepth = stackDepth;
-        }
-    }
-
-    static final class BranchStack {
-
-        Stack<BranchTarget> branchTargets = new Stack<BranchTarget>();
-        Hashtable<InstructionHandle, BranchTarget> visitedTargets = new Hashtable<InstructionHandle, BranchTarget>();
-
-
-        public void push( InstructionHandle target, int stackDepth ) {
-            if (visited(target)) {
-                return;
-            }
-            branchTargets.push(visit(target, stackDepth));
-        }
-
-
-        public BranchTarget pop() {
-            if (!branchTargets.empty()) {
-                BranchTarget bt = branchTargets.pop();
-                return bt;
-            }
-            return null;
-        }
-
-
-        private BranchTarget visit( InstructionHandle target, int stackDepth ) {
-            BranchTarget bt = new BranchTarget(target, stackDepth);
-            visitedTargets.put(target, bt);
-            return bt;
-        }
-
-
-        private boolean visited( InstructionHandle target ) {
-            return (visitedTargets.get(target) != null);
-        }
-    }
-
-
-    /**
-     * Computes stack usage of an instruction list by performing control flow analysis.
-     *
-     * @return maximum stack depth used by method
-     */
-    public static int getMaxStack( ConstantPoolGen cp, InstructionList il, CodeExceptionGen[] et ) {
-        BranchStack branchTargets = new BranchStack();
-        /* Initially, populate the branch stack with the exception
-         * handlers, because these aren't (necessarily) branched to
-         * explicitly. in each case, the stack will have depth 1,
-         * containing the exception object.
-         */
-        for (CodeExceptionGen element : et) {
-            InstructionHandle handler_pc = element.getHandlerPC();
-            if (handler_pc != null) {
-                branchTargets.push(handler_pc, 1);
-            }
-        }
-        int stackDepth = 0, maxStackDepth = 0;
-        InstructionHandle ih = il.getStart();
-        while (ih != null) {
-            Instruction instruction = ih.getInstruction();
-            short opcode = instruction.getOpcode();
-            int delta = instruction.produceStack(cp) - instruction.consumeStack(cp);
-            stackDepth += delta;
-            if (stackDepth > maxStackDepth) {
-                maxStackDepth = stackDepth;
-            }
-            // choose the next instruction based on whether current is a branch.
-            if (instruction instanceof BranchInstruction) {
-                BranchInstruction branch = (BranchInstruction) instruction;
-                if (instruction instanceof Select) {
-                    // explore all of the select's targets. the default target is handled below.
-                    Select select = (Select) branch;
-                    InstructionHandle[] targets = select.getTargets();
-                    for (InstructionHandle target : targets) {
-                        branchTargets.push(target, stackDepth);
-                    }
-                    // nothing to fall through to.
-                    ih = null;
-                } else if (!(branch instanceof IfInstruction)) {
-                    // if an instruction that comes back to following PC,
-                    // push next instruction, with stack depth reduced by 1.
-                    if (opcode == Constants.JSR || opcode == Constants.JSR_W) {
-                        branchTargets.push(ih.getNext(), stackDepth - 1);
-                    }
-                    ih = null;
-                }
-                // for all branches, the target of the branch is pushed on the branch stack.
-                // conditional branches have a fall through case, selects don't, and
-                // jsr/jsr_w return to the next instruction.
-                branchTargets.push(branch.getTarget(), stackDepth);
-            } else {
-                // check for instructions that terminate the method.
-                if (opcode == Constants.ATHROW || opcode == Constants.RET
-                        || (opcode >= Constants.IRETURN && opcode <= Constants.RETURN)) {
-                    ih = null;
-                }
-            }
-            // normal case, go to the next instruction.
-            if (ih != null) {
-                ih = ih.getNext();
-            }
-            // if we have no more instructions, see if there are any deferred branches to explore.
-            if (ih == null) {
-                BranchTarget bt = branchTargets.pop();
-                if (bt != null) {
-                    ih = bt.target;
-                    stackDepth = bt.stackDepth;
-                }
-            }
-        }
-        return maxStackDepth;
-    }
-
-    private List<MethodObserver> observers;
-
-
-    /** Add observer for this object.
-     */
-    public void addObserver( MethodObserver o ) {
-        if (observers == null) {
-            observers = new ArrayList<MethodObserver>();
-        }
-        observers.add(o);
-    }
-
-
-    /** Remove observer for this object.
-     */
-    public void removeObserver( MethodObserver o ) {
-        if (observers != null) {
-            observers.remove(o);
-        }
-    }
-
-
-    /** Call notify() method on all observers. This method is not called
-     * automatically whenever the state has changed, but has to be
-     * called by the user after he has finished editing the object.
-     */
-    public void update() {
-        if (observers != null) {
-            for (MethodObserver observer : observers) {
-                observer.notify(this);
-            }
-        }
-    }
-
-
-    /**
-     * Return string representation close to declaration format,
-     * `public static void main(String[]) throws IOException', e.g.
-     *
-     * @return String representation of the method.
-     */
-    @Override
-    public final String toString() {
-        String access = Utility.accessToString(access_flags);
-        String signature = Type.getMethodSignature(type, arg_types);
-        signature = Utility.methodSignatureToString(signature, name, access, true,
-                getLocalVariableTable(cp));
-        StringBuilder buf = new StringBuilder(signature);
-        for (int i = 0; i < getAttributes().length; i++) {
-            Attribute a = getAttributes()[i];
-            if (!((a instanceof Code) || (a instanceof ExceptionTable))) {
-                buf.append(" [").append(a.toString()).append("]");
-            }
-        }
-
-        if (throws_vec.size() > 0) {
-            for (String throwsDescriptor : throws_vec) {
-                buf.append("\n\t\tthrows ").append(throwsDescriptor);
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /** @return deep copy of this method
-     */
-    public MethodGen copy( String class_name, ConstantPoolGen cp ) {
-        Method m = ((MethodGen) clone()).getMethod();
-        MethodGen mg = new MethodGen(m, class_name, this.cp);
-        if (this.cp != cp) {
-            mg.setConstantPool(cp);
-            mg.getInstructionList().replaceConstantPool(this.cp, cp);
-        }
-        return mg;
-    }
-
-    //J5TODO: Should param_annotations be an array of arrays? Rather than an array of lists, this
-    // is more likely to suggest to the caller it is readonly (which a List does not). 
-    /**
-     * Return a list of AnnotationGen objects representing parameter annotations
-     */
-    public List<AnnotationEntryGen> getAnnotationsOnParameter(int i) {
-        ensureExistingParameterAnnotationsUnpacked();
-        if (!hasParameterAnnotations || i>arg_types.length) {
-            return null;
-        }
-        return param_annotations[i];
-    }
-
-    /**
-     * Goes through the attributes on the method and identifies any that are
-     * RuntimeParameterAnnotations, extracting their contents and storing them
-     * as parameter annotations. There are two kinds of parameter annotation -
-     * visible and invisible. Once they have been unpacked, these attributes are
-     * deleted. (The annotations will be rebuilt as attributes when someone
-     * builds a Method object out of this MethodGen object).
-     */
-    private void ensureExistingParameterAnnotationsUnpacked()
-    {
-        if (haveUnpackedParameterAnnotations) {
-            return;
-        }
-        // Find attributes that contain parameter annotation data
-        Attribute[] attrs = getAttributes();
-        ParameterAnnotations paramAnnVisAttr = null;
-        ParameterAnnotations paramAnnInvisAttr = null;
-        for (Attribute attribute : attrs) {
-            if (attribute instanceof ParameterAnnotations)
-            {
-                // Initialize param_annotations
-                if (!hasParameterAnnotations)
-                {
-                    param_annotations = new List[arg_types.length];
-                    for (int j = 0; j < arg_types.length; j++) {
-                        param_annotations[j] = new ArrayList<AnnotationEntryGen>();
-                    }
-                }
-                hasParameterAnnotations = true;
-                ParameterAnnotations rpa = (ParameterAnnotations) attribute;
-                if (rpa instanceof RuntimeVisibleParameterAnnotations) {
-                    paramAnnVisAttr = rpa;
-                } else {
-                    paramAnnInvisAttr = rpa;
-                }
-                for (int j = 0; j < arg_types.length; j++)
-                {
-                    // This returns Annotation[] ...
-                    ParameterAnnotationEntry immutableArray = rpa
-                            .getParameterAnnotationEntries()[j];
-                    // ... which needs transforming into an AnnotationGen[] ...
-                    List<AnnotationEntryGen> mutable = makeMutableVersion(immutableArray.getAnnotationEntries());
-                    // ... then add these to any we already know about
-                    param_annotations[j].addAll(mutable);
-                }
-            }
-        }
-        if (paramAnnVisAttr != null) {
-            removeAttribute(paramAnnVisAttr);
-        }
-        if (paramAnnInvisAttr != null) {
-            removeAttribute(paramAnnInvisAttr);
-        }
-        haveUnpackedParameterAnnotations = true;
-    }
-
-    private List<AnnotationEntryGen> makeMutableVersion(AnnotationEntry[] mutableArray)
-    {
-        List<AnnotationEntryGen> result = new ArrayList<AnnotationEntryGen>();
-        for (AnnotationEntry element : mutableArray) {
-            result.add(new AnnotationEntryGen(element, getConstantPool(),
-                    false));
-        }
-        return result;
-    }
-
-    public void addParameterAnnotation(int parameterIndex,
-            AnnotationEntryGen annotation)
-    {
-        ensureExistingParameterAnnotationsUnpacked();
-        if (!hasParameterAnnotations)
-        {
-            param_annotations = new List[arg_types.length];
-            hasParameterAnnotations = true;
-        }
-        List<AnnotationEntryGen> existingAnnotations = param_annotations[parameterIndex];
-        if (existingAnnotations != null)
-        {
-            existingAnnotations.add(annotation);
-        }
-        else
-        {
-            List<AnnotationEntryGen> l = new ArrayList<AnnotationEntryGen>();
-            l.add(annotation);
-            param_annotations[parameterIndex] = l;
-        }
-    }          
-
-
-
-
-    /**
-     * @return Comparison strategy object
-     */
-    public static BCELComparator getComparator() {
-        return _cmp;
-    }
-
-
-    /**
-     * @param comparator Comparison strategy object
-     */
-    public static void setComparator( BCELComparator comparator ) {
-        _cmp = comparator;
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default two MethodGen objects are said to be equal when
-     * their names and signatures are equal.
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals( Object obj ) {
-        return _cmp.equals(this, obj);
-    }
-
-
-    /**
-     * Return value as defined by given BCELComparator strategy.
-     * By default return the hashcode of the method's name XOR signature.
-     * 
-     * @see java.lang.Object#hashCode()
-     */
-    @Override
-    public int hashCode() {
-        return _cmp.hashCode(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/MethodObserver.java b/src/main/java/org/apache/bcel/generic/MethodObserver.java
deleted file mode 100644
index d81d24b..0000000
--- a/src/main/java/org/apache/bcel/generic/MethodObserver.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Implement this interface if you're interested in changes to a MethodGen object
- * and register yourself with addObserver().
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface MethodObserver {
-
-    void notify( MethodGen method );
-}
diff --git a/src/main/java/org/apache/bcel/generic/NEW.java b/src/main/java/org/apache/bcel/generic/NEW.java
deleted file mode 100644
index da2900d..0000000
--- a/src/main/java/org/apache/bcel/generic/NEW.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * NEW - Create new object
- * <PRE>Stack: ... -&gt; ..., objectref</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class NEW extends CPInstruction implements LoadClass, AllocationInstruction,
-        ExceptionThrower, StackProducer {
-
-    private static final long serialVersionUID = 5773167897857305796L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    NEW() {
-    }
-
-
-    public NEW(int index) {
-        super(org.apache.bcel.Constants.NEW, index);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length + 1] = ExceptionConstants.INSTANTIATION_ERROR;
-        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.ILLEGAL_ACCESS_ERROR;
-        return cs;
-    }
-
-
-    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
-        return (ObjectType) getType(cpg);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitLoadClass(this);
-        v.visitAllocationInstruction(this);
-        v.visitExceptionThrower(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitCPInstruction(this);
-        v.visitNEW(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/NEWARRAY.java b/src/main/java/org/apache/bcel/generic/NEWARRAY.java
deleted file mode 100644
index 1cf1227..0000000
--- a/src/main/java/org/apache/bcel/generic/NEWARRAY.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * NEWARRAY -  Create new array of basic type (int, short, ...)
- * <PRE>Stack: ..., count -&gt; ..., arrayref</PRE>
- * type must be one of T_INT, T_SHORT, ...
- * 
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class NEWARRAY extends Instruction implements AllocationInstruction, ExceptionThrower,
-        StackProducer {
-
-    private static final long serialVersionUID = 7048445841018649405L;
-    private byte type;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    NEWARRAY() {
-    }
-
-
-    public NEWARRAY(byte type) {
-        super(org.apache.bcel.Constants.NEWARRAY, (short) 2);
-        this.type = type;
-    }
-
-
-    public NEWARRAY(BasicType type) {
-        this(type.getType());
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        out.writeByte(type);
-    }
-
-
-    /**
-     * @return numeric code for basic element type
-     */
-    public final byte getTypecode() {
-        return type;
-    }
-
-
-    /**
-     * @return type of constructed array
-     */
-    public final Type getType() {
-        return new ArrayType(BasicType.getType(type), 1);
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + org.apache.bcel.Constants.TYPE_NAMES[type];
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        type = bytes.readByte();
-        length = 2;
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            org.apache.bcel.ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION
-        };
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitAllocationInstruction(this);
-        v.visitExceptionThrower(this);
-        v.visitStackProducer(this);
-        v.visitNEWARRAY(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/NOP.java b/src/main/java/org/apache/bcel/generic/NOP.java
deleted file mode 100644
index dea41f0..0000000
--- a/src/main/java/org/apache/bcel/generic/NOP.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * NOP - Do nothing
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class NOP extends Instruction {
-
-    private static final long serialVersionUID = -244116825309415153L;
-
-
-    public NOP() {
-        super(org.apache.bcel.Constants.NOP, (short) 1);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitNOP(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/NameSignatureInstruction.java b/src/main/java/org/apache/bcel/generic/NameSignatureInstruction.java
deleted file mode 100644
index 66997a4..0000000
--- a/src/main/java/org/apache/bcel/generic/NameSignatureInstruction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.generic;
-
-import org.apache.bcel.classfile.ConstantCP;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantUtf8;
-
-/**
- * Super class for FieldOrMethod and INVOKEDYNAMIC, since they both have
- * names and signatures 
- *
- * @version $Id: FieldOrMethod.java 1481383 2013-05-11 17:34:32Z dbrosius $
- * @author  <A HREF="mailto:bill.pugh@gmail.com">Bill Pugh</A>
- * @since 6.0
- */
-public abstract class NameSignatureInstruction extends CPInstruction {
-
-    private static final long serialVersionUID = 1L;
-
-    public NameSignatureInstruction() {
-        super();
-    }
-
-    public NameSignatureInstruction(short opcode, int index) {
-        super(opcode, index);
-    }
-
-    public ConstantNameAndType getNameAndType(ConstantPoolGen cpg) {
-        ConstantPool cp = cpg.getConstantPool();
-        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
-        return  (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
-    }
-    /** @return signature of referenced method/field.
-     */
-    public String getSignature(ConstantPoolGen cpg) {
-        ConstantPool cp = cpg.getConstantPool();
-        ConstantNameAndType cnat = getNameAndType(cpg);
-        return ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
-    }
-
-    /** @return name of referenced method/field.
-     */
-    public String getName(ConstantPoolGen cpg) {
-        ConstantPool cp = cpg.getConstantPool();
-        ConstantNameAndType cnat = getNameAndType(cpg);
-        return ((ConstantUtf8) cp.getConstant(cnat.getNameIndex())).getBytes();
-    }
-
-}
\ No newline at end of file
diff --git a/src/main/java/org/apache/bcel/generic/NamedAndTyped.java b/src/main/java/org/apache/bcel/generic/NamedAndTyped.java
deleted file mode 100644
index 3a93a57..0000000
--- a/src/main/java/org/apache/bcel/generic/NamedAndTyped.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denote entity that has both name and type. This is true for local variables,
- * methods and fields.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface NamedAndTyped {
-
-    String getName();
-
-
-    Type getType();
-
-
-    void setName( String name );
-
-
-    void setType( Type type );
-}
diff --git a/src/main/java/org/apache/bcel/generic/ObjectType.java b/src/main/java/org/apache/bcel/generic/ObjectType.java
deleted file mode 100644
index 0678d28..0000000
--- a/src/main/java/org/apache/bcel/generic/ObjectType.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-
-/** 
- * Denotes reference such as java.lang.String.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ObjectType extends ReferenceType {
-
-    private static final long serialVersionUID = -2819379966444533294L;
-    private final String class_name; // Class name of type
-
-    public static ObjectType getInstance(String class_name) {
-        return new ObjectType(class_name);
-    }
-
-    /**
-     * @param class_name fully qualified class name, e.g. java.lang.String
-     */
-    public ObjectType(String class_name) {
-        super(Constants.T_REFERENCE, "L" + class_name.replace('.', '/') + ";");
-        this.class_name = class_name.replace('/', '.');
-    }
-
-
-    /** @return name of referenced class
-     */
-    public String getClassName() {
-        return class_name;
-    }
-
-
-    /** @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() {
-        return class_name.hashCode();
-    }
-
-
-    /** @return true if both type objects refer to the same class.
-     */
-    @Override
-    public boolean equals( Object type ) {
-        return (type instanceof ObjectType)
-                ? ((ObjectType) type).class_name.equals(class_name)
-                : false;
-    }
-
-
-    /**
-     * If "this" doesn't reference a class, it references an interface
-     * or a non-existant entity.
-     * @deprecated this method returns an inaccurate result
-     *   if the class or interface referenced cannot
-     *   be found: use referencesClassExact() instead
-     */
-    @Deprecated
-    public boolean referencesClass() {
-        try {
-            JavaClass jc = Repository.lookupClass(class_name);
-            return jc.isClass();
-        } catch (ClassNotFoundException e) {
-            return false;
-        }
-    }
-
-
-    /**
-     * If "this" doesn't reference an interface, it references a class
-     * or a non-existant entity.
-     * @deprecated this method returns an inaccurate result
-     *   if the class or interface referenced cannot
-     *   be found: use referencesInterfaceExact() instead
-     */
-    @Deprecated
-    public boolean referencesInterface() {
-        try {
-            JavaClass jc = Repository.lookupClass(class_name);
-            return !jc.isClass();
-        } catch (ClassNotFoundException e) {
-            return false;
-        }
-    }
-
-
-    /**
-     * Return true if this type references a class,
-     * false if it references an interface.
-     * @return true if the type references a class, false if
-     *   it references an interface
-     * @throws ClassNotFoundException if the class or interface
-     *   referenced by this type can't be found
-     */
-    public boolean referencesClassExact() throws ClassNotFoundException {
-        JavaClass jc = Repository.lookupClass(class_name);
-        return jc.isClass();
-    }
-
-
-    /**
-     * Return true if this type references an interface,
-     * false if it references a class.
-     * @return true if the type references an interface, false if
-     *   it references a class
-     * @throws ClassNotFoundException if the class or interface
-     *   referenced by this type can't be found
-     */
-    public boolean referencesInterfaceExact() throws ClassNotFoundException {
-        JavaClass jc = Repository.lookupClass(class_name);
-        return !jc.isClass();
-    }
-
-
-    /**
-     * Return true if this type is a subclass of given ObjectType.
-     * @throws ClassNotFoundException if any of this class's superclasses
-     *  can't be found
-     */
-    public boolean subclassOf( ObjectType superclass ) throws ClassNotFoundException {
-        if (this.referencesInterface() || superclass.referencesInterface()) {
-            return false;
-        }
-        return Repository.instanceOf(this.class_name, superclass.class_name);
-    }
-
-
-    /**
-     * Java Virtual Machine Specification edition 2, � 5.4.4 Access Control
-     * @throws ClassNotFoundException if the class referenced by this type
-     *   can't be found
-     */
-    public boolean accessibleTo( ObjectType accessor ) throws ClassNotFoundException {
-        JavaClass jc = Repository.lookupClass(class_name);
-        if (jc.isPublic()) {
-            return true;
-        } else {
-            JavaClass acc = Repository.lookupClass(accessor.class_name);
-            return acc.getPackageName().equals(jc.getPackageName());
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/POP.java b/src/main/java/org/apache/bcel/generic/POP.java
deleted file mode 100644
index df47a57..0000000
--- a/src/main/java/org/apache/bcel/generic/POP.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * POP - Pop top operand stack word
- *
- * <PRE>Stack: ..., word -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class POP extends StackInstruction implements PopInstruction {
-
-    private static final long serialVersionUID = -7366757965427670388L;
-
-
-    public POP() {
-        super(org.apache.bcel.Constants.POP);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitPopInstruction(this);
-        v.visitStackInstruction(this);
-        v.visitPOP(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/POP2.java b/src/main/java/org/apache/bcel/generic/POP2.java
deleted file mode 100644
index 4bfff24..0000000
--- a/src/main/java/org/apache/bcel/generic/POP2.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * POP2 - Pop two top operand stack words
- *
- * <PRE>Stack: ..., word2, word1 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class POP2 extends StackInstruction implements PopInstruction {
-
-    private static final long serialVersionUID = -3868598204285850458L;
-
-
-    public POP2() {
-        super(org.apache.bcel.Constants.POP2);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitPopInstruction(this);
-        v.visitStackInstruction(this);
-        v.visitPOP2(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/PUSH.java b/src/main/java/org/apache/bcel/generic/PUSH.java
deleted file mode 100644
index add84d2..0000000
--- a/src/main/java/org/apache/bcel/generic/PUSH.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-
-/** 
- * Wrapper class for push operations, which are implemented either as BIPUSH,
- * LDC or xCONST_n instructions.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class PUSH implements CompoundInstruction, VariableLengthInstruction,
-        InstructionConstants {
-
-    private Instruction instruction;
-
-
-    /**
-     * This constructor also applies for values of type short, char, byte 
-     *
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, int value) {
-        if ((value >= -1) && (value <= 5)) {
-            instruction = INSTRUCTIONS[Constants.ICONST_0 + value];
-        } else if ((value >= -128) && (value <= 127)) {
-            instruction = new BIPUSH((byte) value);
-        } else if ((value >= -32768) && (value <= 32767)) {
-            instruction = new SIPUSH((short) value);
-        } else {
-            instruction = new LDC(cp.addInteger(value));
-        }
-    }
-
-
-    /**
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, boolean value) {
-        instruction = INSTRUCTIONS[Constants.ICONST_0 + (value ? 1 : 0)];
-    }
-
-
-    /**
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, float value) {
-        if (value == 0.0) {
-            instruction = FCONST_0;
-        } else if (value == 1.0) {
-            instruction = FCONST_1;
-        } else if (value == 2.0) {
-            instruction = FCONST_2;
-        } else {
-            instruction = new LDC(cp.addFloat(value));
-        }
-    }
-
-
-    /**
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, long value) {
-        if (value == 0) {
-            instruction = LCONST_0;
-        } else if (value == 1) {
-            instruction = LCONST_1;
-        } else {
-            instruction = new LDC2_W(cp.addLong(value));
-        }
-    }
-
-
-    /**
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, double value) {
-        if (value == 0.0) {
-            instruction = DCONST_0;
-        } else if (value == 1.0) {
-            instruction = DCONST_1;
-        } else {
-            instruction = new LDC2_W(cp.addDouble(value));
-        }
-    }
-
-
-    /**
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, String value) {
-        if (value == null) {
-            instruction = ACONST_NULL;
-        } else {
-            instruction = new LDC(cp.addString(value));
-        }
-    }
-
-    /**
-     * 
-     * @param cp
-     * @param value
-     */
-    public PUSH(ConstantPoolGen cp, ObjectType value) {
-        if (value == null) {
-            instruction = ACONST_NULL;
-        } else {
-            instruction = new LDC(cp.addClass(value));
-        }
-    }
-    
-    /**
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, Number value) {
-        if ((value instanceof Integer) || (value instanceof Short) || (value instanceof Byte)) {
-            instruction = new PUSH(cp, value.intValue()).instruction;
-        } else if (value instanceof Double) {
-            instruction = new PUSH(cp, value.doubleValue()).instruction;
-        } else if (value instanceof Float) {
-            instruction = new PUSH(cp, value.floatValue()).instruction;
-        } else if (value instanceof Long) {
-            instruction = new PUSH(cp, value.longValue()).instruction;
-        } else {
-            throw new ClassGenException("What's this: " + value);
-        }
-    }
-
-
-    /**
-     * creates a push object from a Character value. Warning: Make sure not to attempt to allow
-     * autoboxing to create this value parameter, as an alternative constructor will be called
-     * 
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, Character value) {
-        this(cp, value.charValue());
-    }
-
-
-    /**
-     * @param cp Constant pool
-     * @param value to be pushed 
-     */
-    public PUSH(ConstantPoolGen cp, Boolean value) {
-        this(cp, value.booleanValue());
-    }
-
-
-    public final InstructionList getInstructionList() {
-        return new InstructionList(instruction);
-    }
-
-
-    public final Instruction getInstruction() {
-        return instruction;
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString() {
-        return instruction.toString() + " (PUSH)";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/PUTFIELD.java b/src/main/java/org/apache/bcel/generic/PUTFIELD.java
deleted file mode 100644
index 78f44df..0000000
--- a/src/main/java/org/apache/bcel/generic/PUTFIELD.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * PUTFIELD - Put field in object
- * <PRE>Stack: ..., objectref, value -&gt; ...</PRE>
- * OR
- * <PRE>Stack: ..., objectref, value.word1, value.word2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class PUTFIELD extends FieldInstruction implements PopInstruction, ExceptionThrower {
-
-    private static final long serialVersionUID = -3931392044558815011L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    PUTFIELD() {
-    }
-
-
-    public PUTFIELD(int index) {
-        super(Constants.PUTFIELD, index);
-    }
-
-
-    @Override
-    public int consumeStack( ConstantPoolGen cpg ) {
-        return getFieldSize(cpg) + 1;
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitStackConsumer(this);
-        v.visitPopInstruction(this);
-        v.visitTypedInstruction(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitFieldInstruction(this);
-        v.visitPUTFIELD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/PUTSTATIC.java b/src/main/java/org/apache/bcel/generic/PUTSTATIC.java
deleted file mode 100644
index 9431ade..0000000
--- a/src/main/java/org/apache/bcel/generic/PUTSTATIC.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-
-/** 
- * PUTSTATIC - Put static field in class
- * <PRE>Stack: ..., value -&gt; ...</PRE>
- * OR
- * <PRE>Stack: ..., value.word1, value.word2 -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class PUTSTATIC extends FieldInstruction implements ExceptionThrower, PopInstruction {
-
-    private static final long serialVersionUID = -1992788532422473584L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    PUTSTATIC() {
-    }
-
-
-    public PUTSTATIC(int index) {
-        super(Constants.PUTSTATIC, index);
-    }
-
-
-    @Override
-    public int consumeStack( ConstantPoolGen cpg ) {
-        return getFieldSize(cpg);
-    }
-
-
-    public Class<?>[] getExceptions() {
-        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
-        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
-                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
-        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
-        return cs;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitStackConsumer(this);
-        v.visitPopInstruction(this);
-        v.visitTypedInstruction(this);
-        v.visitLoadClass(this);
-        v.visitCPInstruction(this);
-        v.visitFieldOrMethod(this);
-        v.visitFieldInstruction(this);
-        v.visitPUTSTATIC(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/PopInstruction.java b/src/main/java/org/apache/bcel/generic/PopInstruction.java
deleted file mode 100644
index 5b29045..0000000
--- a/src/main/java/org/apache/bcel/generic/PopInstruction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denotes an unparameterized instruction to pop a value on top from the stack,
- * such as ISTORE, POP, PUTSTATIC.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see ISTORE
- * @see POP
- */
-public interface PopInstruction extends StackConsumer {
-}
diff --git a/src/main/java/org/apache/bcel/generic/PushInstruction.java b/src/main/java/org/apache/bcel/generic/PushInstruction.java
deleted file mode 100644
index d568e01..0000000
--- a/src/main/java/org/apache/bcel/generic/PushInstruction.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denotes an unparameterized instruction to produce a value on top of the stack,
- * such as ILOAD, LDC, SIPUSH, DUP, ICONST, etc.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
-
- * @see ILOAD
- * @see ICONST
- * @see LDC
- * @see DUP
- * @see SIPUSH
- * @see GETSTATIC
- */
-public interface PushInstruction extends StackProducer {
-}
diff --git a/src/main/java/org/apache/bcel/generic/RET.java b/src/main/java/org/apache/bcel/generic/RET.java
deleted file mode 100644
index d8758ea..0000000
--- a/src/main/java/org/apache/bcel/generic/RET.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * RET - Return from subroutine
- *
- * <PRE>Stack: ... -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class RET extends Instruction implements IndexedInstruction, TypedInstruction {
-
-    private static final long serialVersionUID = -3751746568458761719L;
-    private boolean wide;
-    private int index; // index to local variable containg the return address
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    RET() {
-    }
-
-
-    public RET(int index) {
-        super(org.apache.bcel.Constants.RET, (short) 2);
-        setIndex(index); // May set wide as side effect
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        if (wide) {
-            out.writeByte(org.apache.bcel.Constants.WIDE);
-        }
-        out.writeByte(opcode);
-        if (wide) {
-            out.writeShort(index);
-        } else {
-            out.writeByte(index);
-        }
-    }
-
-
-    private void setWide() {
-        wide = index > org.apache.bcel.Constants.MAX_BYTE;
-        if (wide) {
-            length = 4; // Including the wide byte  
-        } else {
-            length = 2;
-        }
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        this.wide = wide;
-        if (wide) {
-            index = bytes.readUnsignedShort();
-            length = 4;
-        } else {
-            index = bytes.readUnsignedByte();
-            length = 2;
-        }
-    }
-
-
-    /**
-     * @return index of local variable containg the return address
-     */
-    public final int getIndex() {
-        return index;
-    }
-
-
-    /**
-     * Set index of local variable containg the return address
-     */
-    public final void setIndex( int n ) {
-        if (n < 0) {
-            throw new ClassGenException("Negative index value: " + n);
-        }
-        index = n;
-        setWide();
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + index;
-    }
-
-
-    /** @return return address type
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return ReturnaddressType.NO_TARGET;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitRET(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/RETURN.java b/src/main/java/org/apache/bcel/generic/RETURN.java
deleted file mode 100644
index 48f9003..0000000
--- a/src/main/java/org/apache/bcel/generic/RETURN.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * RETURN -  Return from void method
- * <PRE>Stack: ... -&gt; &lt;empty&gt;</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class RETURN extends ReturnInstruction {
-
-    private static final long serialVersionUID = -7375896559820981467L;
-
-
-    public RETURN() {
-        super(org.apache.bcel.Constants.RETURN);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitReturnInstruction(this);
-        v.visitRETURN(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ReferenceType.java b/src/main/java/org/apache/bcel/generic/ReferenceType.java
deleted file mode 100644
index dfc612b..0000000
--- a/src/main/java/org/apache/bcel/generic/ReferenceType.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-
-/**
- * Super class for object and array types.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class ReferenceType extends Type {
-
-    private static final long serialVersionUID = -1434716548829506031L;
-
-
-    protected ReferenceType(byte t, String s) {
-        super(t, s);
-    }
-
-
-    /** Class is non-abstract but not instantiable from the outside
-     */
-    ReferenceType() {
-        super(Constants.T_OBJECT, "<null object>");
-    }
-
-
-    /**
-     * Return true iff this type is castable to another type t as defined in
-     * the JVM specification.  The case where this is Type.NULL is not
-     * defined (see the CHECKCAST definition in the JVM specification).
-     * However, because e.g. CHECKCAST doesn't throw a
-     * ClassCastException when casting a null reference to any Object,
-     * true is returned in this case.
-     *
-     * @throws ClassNotFoundException if any classes or interfaces required
-     *  to determine assignment compatibility can't be found
-     */
-    public boolean isCastableTo( Type t ) throws ClassNotFoundException {
-        if (this.equals(Type.NULL)) {
-            return t instanceof ReferenceType; // If this is ever changed in isAssignmentCompatible()
-        }
-        return isAssignmentCompatibleWith(t);
-        /* Yes, it's true: It's the same definition.
-         * See vmspec2 AASTORE / CHECKCAST definitions.
-         */
-    }
-
-
-    /**
-     * Return true iff this is assignment compatible with another type t
-     * as defined in the JVM specification; see the AASTORE definition
-     * there.
-     * @throws ClassNotFoundException if any classes or interfaces required
-     *  to determine assignment compatibility can't be found
-     */
-    public boolean isAssignmentCompatibleWith( Type t ) throws ClassNotFoundException {
-        if (!(t instanceof ReferenceType)) {
-            return false;
-        }
-        ReferenceType T = (ReferenceType) t;
-        if (this.equals(Type.NULL)) {
-            return true; // This is not explicitely stated, but clear. Isn't it?
-        }
-        /* If this is a class type then
-         */
-        if ((this instanceof ObjectType) && (((ObjectType) this).referencesClassExact())) {
-            /* If T is a class type, then this must be the same class as T,
-             or this must be a subclass of T;
-             */
-            if ((T instanceof ObjectType) && (((ObjectType) T).referencesClassExact())) {
-                if (this.equals(T)) {
-                    return true;
-                }
-                if (Repository.instanceOf(((ObjectType) this).getClassName(), ((ObjectType) T)
-                        .getClassName())) {
-                    return true;
-                }
-            }
-            /* If T is an interface type, this must implement interface T.
-             */
-            if ((T instanceof ObjectType) && (((ObjectType) T).referencesInterfaceExact())) {
-                if (Repository.implementationOf(((ObjectType) this).getClassName(),
-                        ((ObjectType) T).getClassName())) {
-                    return true;
-                }
-            }
-        }
-        /* If this is an interface type, then:
-         */
-        if ((this instanceof ObjectType) && (((ObjectType) this).referencesInterfaceExact())) {
-            /* If T is a class type, then T must be Object (�2.4.7).
-             */
-            if ((T instanceof ObjectType) && (((ObjectType) T).referencesClassExact())) {
-                if (T.equals(Type.OBJECT)) {
-                    return true;
-                }
-            }
-            /* If T is an interface type, then T must be the same interface
-             * as this or a superinterface of this (�2.13.2).
-             */
-            if ((T instanceof ObjectType) && (((ObjectType) T).referencesInterfaceExact())) {
-                if (this.equals(T)) {
-                    return true;
-                }
-                if (Repository.implementationOf(((ObjectType) this).getClassName(),
-                        ((ObjectType) T).getClassName())) {
-                    return true;
-                }
-            }
-        }
-        /* If this is an array type, namely, the type SC[], that is, an
-         * array of components of type SC, then:
-         */
-        if (this instanceof ArrayType) {
-            /* If T is a class type, then T must be Object (�2.4.7).
-             */
-            if ((T instanceof ObjectType) && (((ObjectType) T).referencesClassExact())) {
-                if (T.equals(Type.OBJECT)) {
-                    return true;
-                }
-            }
-            /* If T is an array type TC[], that is, an array of components
-             * of type TC, then one of the following must be true:
-             */
-            if (T instanceof ArrayType) {
-                /* TC and SC are the same primitive type (�2.4.1).
-                 */
-                Type sc = ((ArrayType) this).getElementType();
-                Type tc = ((ArrayType) T).getElementType();
-                if (sc instanceof BasicType && tc instanceof BasicType && sc.equals(tc)) {
-                    return true;
-                }
-                /* TC and SC are reference types (�2.4.6), and type SC is
-                 * assignable to TC by these runtime rules.
-                 */
-                if (tc instanceof ReferenceType && sc instanceof ReferenceType
-                        && ((ReferenceType) sc).isAssignmentCompatibleWith(tc)) {
-                    return true;
-                }
-            }
-            /* If T is an interface type, T must be one of the interfaces implemented by arrays (�2.15). */
-            // TODO: Check if this is still valid or find a way to dynamically find out which
-            // interfaces arrays implement. However, as of the JVM specification edition 2, there
-            // are at least two different pages where assignment compatibility is defined and
-            // on one of them "interfaces implemented by arrays" is exchanged with "'Cloneable' or
-            // 'java.io.Serializable'"
-            if ((T instanceof ObjectType) && (((ObjectType) T).referencesInterfaceExact())) {
-                for (String element : Constants.INTERFACES_IMPLEMENTED_BY_ARRAYS) {
-                    if (T.equals(ObjectType.getInstance(element))) {
-                        return true;
-                    }
-                }
-            }
-        }
-        return false; // default.
-    }
-
-
-    /**
-     * This commutative operation returns the first common superclass (narrowest ReferenceType
-     * referencing a class, not an interface).
-     * If one of the types is a superclass of the other, the former is returned.
-     * If "this" is Type.NULL, then t is returned.
-     * If t is Type.NULL, then "this" is returned.
-     * If "this" equals t ['this.equals(t)'] "this" is returned.
-     * If "this" or t is an ArrayType, then Type.OBJECT is returned;
-     * unless their dimensions match. Then an ArrayType of the same
-     * number of dimensions is returned, with its basic type being the
-     * first common super class of the basic types of "this" and t.
-     * If "this" or t is a ReferenceType referencing an interface, then Type.OBJECT is returned.
-     * If not all of the two classes' superclasses cannot be found, "null" is returned.
-     * See the JVM specification edition 2, "�4.9.2 The Bytecode Verifier".
-     *
-     * @throws ClassNotFoundException on failure to find superclasses of this
-     *  type, or the type passed as a parameter
-     */
-    public ReferenceType getFirstCommonSuperclass( ReferenceType t ) throws ClassNotFoundException {
-        if (this.equals(Type.NULL)) {
-            return t;
-        }
-        if (t.equals(Type.NULL)) {
-            return this;
-        }
-        if (this.equals(t)) {
-            return this;
-            /*
-             * TODO: Above sounds a little arbitrary. On the other hand, there is
-             * no object referenced by Type.NULL so we can also say all the objects
-             * referenced by Type.NULL were derived from java.lang.Object.
-             * However, the Java Language's "instanceof" operator proves us wrong:
-             * "null" is not referring to an instance of java.lang.Object :)
-             */
-        }
-        /* This code is from a bug report by Konstantin Shagin <konst@cs.technion.ac.il> */
-        if ((this instanceof ArrayType) && (t instanceof ArrayType)) {
-            ArrayType arrType1 = (ArrayType) this;
-            ArrayType arrType2 = (ArrayType) t;
-            if ((arrType1.getDimensions() == arrType2.getDimensions())
-                    && arrType1.getBasicType() instanceof ObjectType
-                    && arrType2.getBasicType() instanceof ObjectType) {
-                return new ArrayType(((ObjectType) arrType1.getBasicType())
-                        .getFirstCommonSuperclass((ObjectType) arrType2.getBasicType()), arrType1
-                        .getDimensions());
-            }
-        }
-        if ((this instanceof ArrayType) || (t instanceof ArrayType)) {
-            return Type.OBJECT;
-            // TODO: Is there a proof of OBJECT being the direct ancestor of every ArrayType?
-        }
-        if (((this instanceof ObjectType) && ((ObjectType) this).referencesInterface())
-                || ((t instanceof ObjectType) && ((ObjectType) t).referencesInterface())) {
-            return Type.OBJECT;
-            // TODO: The above line is correct comparing to the vmspec2. But one could
-            // make class file verification a bit stronger here by using the notion of
-            // superinterfaces or even castability or assignment compatibility.
-        }
-        // this and t are ObjectTypes, see above.
-        ObjectType thiz = (ObjectType) this;
-        ObjectType other = (ObjectType) t;
-        JavaClass[] thiz_sups = Repository.getSuperClasses(thiz.getClassName());
-        JavaClass[] other_sups = Repository.getSuperClasses(other.getClassName());
-        if ((thiz_sups == null) || (other_sups == null)) {
-            return null;
-        }
-        // Waaahh...
-        JavaClass[] this_sups = new JavaClass[thiz_sups.length + 1];
-        JavaClass[] t_sups = new JavaClass[other_sups.length + 1];
-        System.arraycopy(thiz_sups, 0, this_sups, 1, thiz_sups.length);
-        System.arraycopy(other_sups, 0, t_sups, 1, other_sups.length);
-        this_sups[0] = Repository.lookupClass(thiz.getClassName());
-        t_sups[0] = Repository.lookupClass(other.getClassName());
-        for (JavaClass t_sup : t_sups) {
-            for (JavaClass this_sup : this_sups) {
-                if (this_sup.equals(t_sup)) {
-                    return ObjectType.getInstance(this_sup.getClassName());
-                }
-            }
-        }
-        // Huh? Did you ask for Type.OBJECT's superclass??
-        return null;
-    }
-
-
-    /**
-     * This commutative operation returns the first common superclass (narrowest ReferenceType
-     * referencing a class, not an interface).
-     * If one of the types is a superclass of the other, the former is returned.
-     * If "this" is Type.NULL, then t is returned.
-     * If t is Type.NULL, then "this" is returned.
-     * If "this" equals t ['this.equals(t)'] "this" is returned.
-     * If "this" or t is an ArrayType, then Type.OBJECT is returned.
-     * If "this" or t is a ReferenceType referencing an interface, then Type.OBJECT is returned.
-     * If not all of the two classes' superclasses cannot be found, "null" is returned.
-     * See the JVM specification edition 2, "�4.9.2 The Bytecode Verifier".
-     *
-     * @deprecated use getFirstCommonSuperclass(ReferenceType t) which has
-     *             slightly changed semantics.
-     * @throws ClassNotFoundException on failure to find superclasses of this
-     *  type, or the type passed as a parameter
-     */
-    @Deprecated
-    public ReferenceType firstCommonSuperclass( ReferenceType t ) throws ClassNotFoundException {
-        if (this.equals(Type.NULL)) {
-            return t;
-        }
-        if (t.equals(Type.NULL)) {
-            return this;
-        }
-        if (this.equals(t)) {
-            return this;
-            /*
-             * TODO: Above sounds a little arbitrary. On the other hand, there is
-             * no object referenced by Type.NULL so we can also say all the objects
-             * referenced by Type.NULL were derived from java.lang.Object.
-             * However, the Java Language's "instanceof" operator proves us wrong:
-             * "null" is not referring to an instance of java.lang.Object :)
-             */
-        }
-        if ((this instanceof ArrayType) || (t instanceof ArrayType)) {
-            return Type.OBJECT;
-            // TODO: Is there a proof of OBJECT being the direct ancestor of every ArrayType?
-        }
-        if (((this instanceof ObjectType) && ((ObjectType) this).referencesInterface())
-                || ((t instanceof ObjectType) && ((ObjectType) t).referencesInterface())) {
-            return Type.OBJECT;
-            // TODO: The above line is correct comparing to the vmspec2. But one could
-            // make class file verification a bit stronger here by using the notion of
-            // superinterfaces or even castability or assignment compatibility.
-        }
-        // this and t are ObjectTypes, see above.
-        ObjectType thiz = (ObjectType) this;
-        ObjectType other = (ObjectType) t;
-        JavaClass[] thiz_sups = Repository.getSuperClasses(thiz.getClassName());
-        JavaClass[] other_sups = Repository.getSuperClasses(other.getClassName());
-        if ((thiz_sups == null) || (other_sups == null)) {
-            return null;
-        }
-        // Waaahh...
-        JavaClass[] this_sups = new JavaClass[thiz_sups.length + 1];
-        JavaClass[] t_sups = new JavaClass[other_sups.length + 1];
-        System.arraycopy(thiz_sups, 0, this_sups, 1, thiz_sups.length);
-        System.arraycopy(other_sups, 0, t_sups, 1, other_sups.length);
-        this_sups[0] = Repository.lookupClass(thiz.getClassName());
-        t_sups[0] = Repository.lookupClass(other.getClassName());
-        for (JavaClass t_sup : t_sups) {
-            for (JavaClass this_sup : this_sups) {
-                if (this_sup.equals(t_sup)) {
-                    return ObjectType.getInstance(this_sup.getClassName());
-                }
-            }
-        }
-        // Huh? Did you ask for Type.OBJECT's superclass??
-        return null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ReturnInstruction.java b/src/main/java/org/apache/bcel/generic/ReturnInstruction.java
deleted file mode 100644
index e30b44d..0000000
--- a/src/main/java/org/apache/bcel/generic/ReturnInstruction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.ExceptionConstants;
-
-/**
- * Super class for the xRETURN family of instructions.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class ReturnInstruction extends Instruction implements ExceptionThrower,
-        TypedInstruction, StackConsumer {
-
-    private static final long serialVersionUID = -1248578537710620153L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ReturnInstruction() {
-    }
-
-
-    /**
-     * @param opcode of instruction
-     */
-    protected ReturnInstruction(short opcode) {
-        super(opcode, (short) 1);
-    }
-
-
-    public Type getType() {
-        switch (opcode) {
-            case Constants.IRETURN:
-                return Type.INT;
-            case Constants.LRETURN:
-                return Type.LONG;
-            case Constants.FRETURN:
-                return Type.FLOAT;
-            case Constants.DRETURN:
-                return Type.DOUBLE;
-            case Constants.ARETURN:
-                return Type.OBJECT;
-            case Constants.RETURN:
-                return Type.VOID;
-            default: // Never reached
-                throw new ClassGenException("Unknown type " + opcode);
-        }
-    }
-
-
-    public Class<?>[] getExceptions() {
-        return new Class[] {
-            ExceptionConstants.ILLEGAL_MONITOR_STATE
-        };
-    }
-
-
-    /** @return type associated with the instruction
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return getType();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/ReturnaddressType.java b/src/main/java/org/apache/bcel/generic/ReturnaddressType.java
deleted file mode 100644
index 4a32ca4..0000000
--- a/src/main/java/org/apache/bcel/generic/ReturnaddressType.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import org.apache.bcel.Constants;
-
-/** 
- * Returnaddress, the type JSR or JSR_W instructions push upon the stack.
- *
- * see vmspec2 �3.3.3
- * @version $Id$
- * @author Enver Haase
- */
-public class ReturnaddressType extends Type {
-
-    private static final long serialVersionUID = 3782621476731023927L;
-    public static final ReturnaddressType NO_TARGET = new ReturnaddressType();
-    private InstructionHandle returnTarget;
-
-
-    /**
-     * A Returnaddress [that doesn't know where to return to].
-     */
-    private ReturnaddressType() {
-        super(Constants.T_ADDRESS, "<return address>");
-    }
-
-
-    /**
-     * Creates a ReturnaddressType object with a target.
-     */
-    public ReturnaddressType(InstructionHandle returnTarget) {
-        super(Constants.T_ADDRESS, "<return address targeting " + returnTarget + ">");
-        this.returnTarget = returnTarget;
-    }
-
-
-    /** @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() {
-        if (returnTarget == null) {
-            return 0;
-        }
-        return returnTarget.hashCode();
-    }
-
-
-    /**
-     * Returns if the two Returnaddresses refer to the same target.
-     */
-    @Override
-    public boolean equals( Object rat ) {
-        if (!(rat instanceof ReturnaddressType)) {
-            return false;
-        }
-        ReturnaddressType that = (ReturnaddressType) rat;
-        if (this.returnTarget == null || that.returnTarget == null) {
-            return that.returnTarget == this.returnTarget;
-        }
-        return that.returnTarget.equals(this.returnTarget);
-    }
-
-
-    /**
-     * @return the target of this ReturnaddressType
-     */
-    public InstructionHandle getTarget() {
-        return returnTarget;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/SALOAD.java b/src/main/java/org/apache/bcel/generic/SALOAD.java
deleted file mode 100644
index 6979570..0000000
--- a/src/main/java/org/apache/bcel/generic/SALOAD.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * SALOAD - Load short from array
- * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class SALOAD extends ArrayInstruction implements StackProducer {
-
-    private static final long serialVersionUID = 7178769326864697416L;
-
-
-    public SALOAD() {
-        super(org.apache.bcel.Constants.SALOAD);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackProducer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitSALOAD(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/SASTORE.java b/src/main/java/org/apache/bcel/generic/SASTORE.java
deleted file mode 100644
index 3c8e0f4..0000000
--- a/src/main/java/org/apache/bcel/generic/SASTORE.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * SASTORE - Store into short array
- * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class SASTORE extends ArrayInstruction implements StackConsumer {
-
-    private static final long serialVersionUID = -5187452948601765872L;
-
-
-    public SASTORE() {
-        super(org.apache.bcel.Constants.SASTORE);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitExceptionThrower(this);
-        v.visitTypedInstruction(this);
-        v.visitArrayInstruction(this);
-        v.visitSASTORE(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/SIPUSH.java b/src/main/java/org/apache/bcel/generic/SIPUSH.java
deleted file mode 100644
index 120f25b..0000000
--- a/src/main/java/org/apache/bcel/generic/SIPUSH.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/**
- * SIPUSH - Push short
- *
- * <PRE>Stack: ... -&gt; ..., value</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class SIPUSH extends Instruction implements ConstantPushInstruction {
-
-    private static final long serialVersionUID = -5670145672311191256L;
-    private short b;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    SIPUSH() {
-    }
-
-
-    public SIPUSH(short b) {
-        super(org.apache.bcel.Constants.SIPUSH, (short) 3);
-        this.b = b;
-    }
-
-
-    /**
-     * Dump instruction as short code to stream out.
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        super.dump(out);
-        out.writeShort(b);
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + b;
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        length = 3;
-        b = bytes.readShort();
-    }
-
-
-    public Number getValue() {
-        return Integer.valueOf(b);
-    }
-
-
-    /** @return Type.SHORT
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.SHORT;
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitPushInstruction(this);
-        v.visitStackProducer(this);
-        v.visitTypedInstruction(this);
-        v.visitConstantPushInstruction(this);
-        v.visitSIPUSH(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/SWAP.java b/src/main/java/org/apache/bcel/generic/SWAP.java
deleted file mode 100644
index 76e73fa..0000000
--- a/src/main/java/org/apache/bcel/generic/SWAP.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * SWAP - Swa top operand stack word
- * <PRE>Stack: ..., word2, word1 -&gt; ..., word1, word2</PRE>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class SWAP extends StackInstruction implements StackConsumer, StackProducer {
-
-    private static final long serialVersionUID = 1965736870393433312L;
-
-
-    public SWAP() {
-        super(org.apache.bcel.Constants.SWAP);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitStackProducer(this);
-        v.visitStackInstruction(this);
-        v.visitSWAP(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/SWITCH.java b/src/main/java/org/apache/bcel/generic/SWITCH.java
deleted file mode 100644
index 458cf74..0000000
--- a/src/main/java/org/apache/bcel/generic/SWITCH.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/** 
- * SWITCH - Branch depending on int value, generates either LOOKUPSWITCH or
- * TABLESWITCH instruction, depending on whether the match values (int[]) can be
- * sorted with no gaps between the numbers.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class SWITCH implements CompoundInstruction {
-
-    private int[] match;
-    private InstructionHandle[] targets;
-    private Select instruction;
-    private int match_length;
-
-
-    /**
-     * Template for switch() constructs. If the match array can be
-     * sorted in ascending order with gaps no larger than max_gap
-     * between the numbers, a TABLESWITCH instruction is generated, and
-     * a LOOKUPSWITCH otherwise. The former may be more efficient, but
-     * needs more space.
-     * 
-     * Note, that the key array always will be sorted, though we leave
-     * the original arrays unaltered.
-     *
-     * @param match array of match values (case 2: ... case 7: ..., etc.)
-     * @param targets the instructions to be branched to for each case
-     * @param target the default target
-     * @param max_gap maximum gap that may between case branches
-     */
-    public SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target, int max_gap) {
-        this.match = match.clone();
-        this.targets = targets.clone();
-        if ((match_length = match.length) < 2) {
-            instruction = new TABLESWITCH(match, targets, target);
-        } else {
-            sort(0, match_length - 1);
-            if (matchIsOrdered(max_gap)) {
-                fillup(max_gap, target);
-                instruction = new TABLESWITCH(this.match, this.targets, target);
-            } else {
-                instruction = new LOOKUPSWITCH(this.match, this.targets, target);
-            }
-        }
-    }
-
-
-    public SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target) {
-        this(match, targets, target, 1);
-    }
-
-
-    private void fillup( int max_gap, InstructionHandle target ) {
-        int max_size = match_length + match_length * max_gap;
-        int[] m_vec = new int[max_size];
-        InstructionHandle[] t_vec = new InstructionHandle[max_size];
-        int count = 1;
-        m_vec[0] = match[0];
-        t_vec[0] = targets[0];
-        for (int i = 1; i < match_length; i++) {
-            int prev = match[i - 1];
-            int gap = match[i] - prev;
-            for (int j = 1; j < gap; j++) {
-                m_vec[count] = prev + j;
-                t_vec[count] = target;
-                count++;
-            }
-            m_vec[count] = match[i];
-            t_vec[count] = targets[i];
-            count++;
-        }
-        match = new int[count];
-        targets = new InstructionHandle[count];
-        System.arraycopy(m_vec, 0, match, 0, count);
-        System.arraycopy(t_vec, 0, targets, 0, count);
-    }
-
-
-    /**
-     * Sort match and targets array with QuickSort.
-     */
-    private void sort( int l, int r ) {
-        int i = l, j = r;
-        int h, m = match[(l + r) / 2];
-        InstructionHandle h2;
-        do {
-            while (match[i] < m) {
-                i++;
-            }
-            while (m < match[j]) {
-                j--;
-            }
-            if (i <= j) {
-                h = match[i];
-                match[i] = match[j];
-                match[j] = h; // Swap elements
-                h2 = targets[i];
-                targets[i] = targets[j];
-                targets[j] = h2; // Swap instructions, too
-                i++;
-                j--;
-            }
-        } while (i <= j);
-        if (l < j) {
-            sort(l, j);
-        }
-        if (i < r) {
-            sort(i, r);
-        }
-    }
-
-
-    /**
-     * @return match is sorted in ascending order with no gap bigger than max_gap?
-     */
-    private boolean matchIsOrdered( int max_gap ) {
-        for (int i = 1; i < match_length; i++) {
-            if (match[i] - match[i - 1] > max_gap) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-
-    public final InstructionList getInstructionList() {
-        return new InstructionList(instruction);
-    }
-
-
-    public final Instruction getInstruction() {
-        return instruction;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/Select.java b/src/main/java/org/apache/bcel/generic/Select.java
deleted file mode 100644
index 48a7642..0000000
--- a/src/main/java/org/apache/bcel/generic/Select.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.
- * 
- * <p>We use our super's <code>target</code> property as the default target.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see LOOKUPSWITCH
- * @see TABLESWITCH
- * @see InstructionList
- */
-public abstract class Select extends BranchInstruction implements VariableLengthInstruction,
-        StackConsumer, StackProducer {
-
-    private static final long serialVersionUID = 2806771744559217250L;
-    protected int[] match; // matches, i.e., case 1: ...
-    protected int[] indices; // target offsets
-    protected InstructionHandle[] targets; // target objects in instruction list
-    protected int fixed_length; // fixed length defined by subclasses
-    protected int match_length; // number of cases
-    protected int padding = 0; // number of pad bytes for alignment
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    Select() {
-    }
-
-
-    /**
-     * (Match, target) pairs for switch.
-     * `Match' and `targets' must have the same length of course.
-     *
-     * @param match array of matching values
-     * @param targets instruction targets
-     * @param defaultTarget default instruction target
-     */
-    Select(short opcode, int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget) {
-        super(opcode, defaultTarget);
-        this.targets = targets;
-        for (InstructionHandle target2 : targets) {
-            notifyTarget(null, target2, this);
-        }
-        this.match = match;
-        if ((match_length = match.length) != targets.length) {
-            throw new ClassGenException("Match and target array have not the same length: Match length: " + match.length + " Target length: " + targets.length);
-        }
-        indices = new int[match_length];
-    }
-
-
-    /**
-     * Since this is a variable length instruction, it may shift the following
-     * instructions which then need to update their position.
-     *
-     * Called by InstructionList.setPositions when setting the position for every
-     * instruction. In the presence of variable length instructions `setPositions'
-     * performs multiple passes over the instruction list to calculate the
-     * correct (byte) positions and offsets by calling this function.
-     *
-     * @param offset additional offset caused by preceding (variable length) instructions
-     * @param max_offset the maximum offset that may be caused by these instructions
-     * @return additional offset caused by possible change of this instruction's length
-     */
-    @Override
-    protected int updatePosition( int offset, int max_offset ) {
-        position += offset; // Additional offset caused by preceding SWITCHs, GOTOs, etc.
-        short old_length = length;
-        /* Alignment on 4-byte-boundary, + 1, because of tag byte.
-         */
-        padding = (4 - ((position + 1) % 4)) % 4;
-        length = (short) (fixed_length + padding); // Update length
-        return length - old_length;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        for (int i = 0; i < padding; i++) {
-            out.writeByte(0);
-        }
-        index = getTargetOffset(); // Write default target offset
-        out.writeInt(index);
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        padding = (4 - (bytes.getIndex() % 4)) % 4; // Compute number of pad bytes
-        for (int i = 0; i < padding; i++) {
-            bytes.readByte();
-        }
-        // Default branch target common for both cases (TABLESWITCH, LOOKUPSWITCH)
-        index = bytes.readInt();
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    @Override
-    public String toString( boolean verbose ) {
-        StringBuilder buf = new StringBuilder(super.toString(verbose));
-        if (verbose) {
-            for (int i = 0; i < match_length; i++) {
-                String s = "null";
-                if (targets[i] != null) {
-                    s = targets[i].getInstruction().toString();
-                }
-                buf.append("(").append(match[i]).append(", ").append(s).append(" = {").append(
-                        indices[i]).append("})");
-            }
-        } else {
-            buf.append(" ...");
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * Set branch target for `i'th case
-     */
-    public void setTarget( int i, InstructionHandle target ) {
-        notifyTarget(targets[i], target, this);
-        targets[i] = target;
-    }
-
-
-    /**
-     * @param old_ih old target
-     * @param new_ih new target
-     */
-    @Override
-    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
-        boolean targeted = false;
-        if (target == old_ih) {
-            targeted = true;
-            setTarget(new_ih);
-        }
-        for (int i = 0; i < targets.length; i++) {
-            if (targets[i] == old_ih) {
-                targeted = true;
-                setTarget(i, new_ih);
-            }
-        }
-        if (!targeted) {
-            throw new ClassGenException("Not targeting " + old_ih);
-        }
-    }
-
-
-    /**
-     * @return true, if ih is target of this instruction
-     */
-    @Override
-    public boolean containsTarget( InstructionHandle ih ) {
-        if (target == ih) {
-            return true;
-        }
-        for (InstructionHandle target2 : targets) {
-            if (target2 == ih) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-
-    @Override
-    protected Object clone() throws CloneNotSupportedException {
-        Select copy = (Select) super.clone();
-        copy.match = match.clone();
-        copy.indices = indices.clone();
-        copy.targets = targets.clone();
-        return copy;
-    }
-
-
-    /**
-     * Inform targets that they're not targeted anymore.
-     */
-    @Override
-    void dispose() {
-        super.dispose();
-        for (InstructionHandle target2 : targets) {
-            target2.removeTargeter(this);
-        }
-    }
-
-
-    /**
-     * @return array of match indices
-     */
-    public int[] getMatchs() {
-        return match;
-    }
-
-
-    /**
-     * @return array of match target offsets
-     */
-    public int[] getIndices() {
-        return indices;
-    }
-
-
-    /**
-     * @return array of match targets
-     */
-    public InstructionHandle[] getTargets() {
-        return targets;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/SimpleElementValueGen.java b/src/main/java/org/apache/bcel/generic/SimpleElementValueGen.java
deleted file mode 100644
index 40651c5..0000000
--- a/src/main/java/org/apache/bcel/generic/SimpleElementValueGen.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.classfile.ConstantDouble;
-import org.apache.bcel.classfile.ConstantFloat;
-import org.apache.bcel.classfile.ConstantInteger;
-import org.apache.bcel.classfile.ConstantLong;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ElementValue;
-import org.apache.bcel.classfile.SimpleElementValue;
-
-/**
- * @since 6.0
- */
-public class SimpleElementValueGen extends ElementValueGen
-{
-    // For primitive types and string type, this points to the value entry in
-    // the cpGen
-    // For 'class' this points to the class entry in the cpGen
-    private int idx;
-
-    // ctors for each supported type... type could be inferred but for now lets
-    // force it to be passed
-    /**
-     * Protected ctor used for deserialization, doesn't *put* an entry in the
-     * constant pool, assumes the one at the supplied index is correct.
-     */
-    protected SimpleElementValueGen(int type, int idx, ConstantPoolGen cpGen)
-    {
-        super(type, cpGen);
-        this.idx = idx;
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, int value)
-    {
-        super(type, cpGen);
-        idx = cpGen.addInteger(value);
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, long value)
-    {
-        super(type, cpGen);
-        idx = cpGen.addLong(value);
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, double value)
-    {
-        super(type, cpGen);
-        idx = cpGen.addDouble(value);
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, float value)
-    {
-        super(type, cpGen);
-        idx = cpGen.addFloat(value);
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, short value)
-    {
-        super(type, cpGen);
-        idx = cpGen.addInteger(value);
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, byte value)
-    {
-        super(type, cpGen);
-        idx = cpGen.addInteger(value);
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, char value)
-    {
-        super(type, cpGen);
-        idx = cpGen.addInteger(value);
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, boolean value)
-    {
-        super(type, cpGen);
-        if (value) {
-            idx = cpGen.addInteger(1);
-        } else {
-            idx = cpGen.addInteger(0);
-        }
-    }
-
-    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, String value)
-    {
-        super(type, cpGen);
-        idx = cpGen.addUtf8(value);
-    }
-
-    /**
-     * The boolean controls whether we copy info from the 'old' constant pool to
-     * the 'new'. You need to use this ctor if the annotation is being copied
-     * from one file to another.
-     */
-    public SimpleElementValueGen(SimpleElementValue value,
-            ConstantPoolGen cpool, boolean copyPoolEntries)
-    {
-        super(value.getElementValueType(), cpool);
-        if (!copyPoolEntries)
-        {
-            // J5ASSERT: Could assert value.stringifyValue() is the same as
-            // cpool.getConstant(SimpleElementValuevalue.getIndex())
-            idx = value.getIndex();
-        }
-        else
-        {
-            switch (value.getElementValueType())
-            {
-            case STRING:
-                idx = cpool.addUtf8(value.getValueString());
-                break;
-            case PRIMITIVE_INT:
-                idx = cpool.addInteger(value.getValueInt());
-                break;
-            case PRIMITIVE_BYTE:
-                idx = cpool.addInteger(value.getValueByte());
-                break;
-            case PRIMITIVE_CHAR:
-                idx = cpool.addInteger(value.getValueChar());
-                break;
-            case PRIMITIVE_LONG:
-                idx = cpool.addLong(value.getValueLong());
-                break;
-            case PRIMITIVE_FLOAT:
-                idx = cpool.addFloat(value.getValueFloat());
-                break;
-            case PRIMITIVE_DOUBLE:
-                idx = cpool.addDouble(value.getValueDouble());
-                break;
-            case PRIMITIVE_BOOLEAN:
-                if (value.getValueBoolean())
-                {
-                    idx = cpool.addInteger(1);
-                }
-                else
-                {
-                    idx = cpool.addInteger(0);
-                }
-                break;
-            case PRIMITIVE_SHORT:
-                idx = cpool.addInteger(value.getValueShort());
-                break;
-            default:
-                throw new RuntimeException(
-                        "SimpleElementValueGen class does not know how "
-                                + "to copy this type " + type);
-            }
-        }
-    }
-
-    /**
-     * Return immutable variant
-     */
-    @Override
-    public ElementValue getElementValue()
-    {
-        return new SimpleElementValue(type, idx, cpGen.getConstantPool());
-    }
-
-    public int getIndex()
-    {
-        return idx;
-    }
-
-    public String getValueString()
-    {
-        if (type != STRING) {
-            throw new RuntimeException(
-                    "Dont call getValueString() on a non STRING ElementValue");
-        }
-        ConstantUtf8 c = (ConstantUtf8) cpGen.getConstant(idx);
-        return c.getBytes();
-    }
-
-    public int getValueInt()
-    {
-        if (type != PRIMITIVE_INT) {
-            throw new RuntimeException(
-                    "Dont call getValueString() on a non STRING ElementValue");
-        }
-        ConstantInteger c = (ConstantInteger) cpGen.getConstant(idx);
-        return c.getBytes();
-    }
-
-    // Whatever kind of value it is, return it as a string
-    @Override
-    public String stringifyValue()
-    {
-        switch (type)
-        {
-        case PRIMITIVE_INT:
-            ConstantInteger c = (ConstantInteger) cpGen.getConstant(idx);
-            return Integer.toString(c.getBytes());
-        case PRIMITIVE_LONG:
-            ConstantLong j = (ConstantLong) cpGen.getConstant(idx);
-            return Long.toString(j.getBytes());
-        case PRIMITIVE_DOUBLE:
-            ConstantDouble d = (ConstantDouble) cpGen.getConstant(idx);
-            return Double.toString(d.getBytes());
-        case PRIMITIVE_FLOAT:
-            ConstantFloat f = (ConstantFloat) cpGen.getConstant(idx);
-            return Float.toString(f.getBytes());
-        case PRIMITIVE_SHORT:
-            ConstantInteger s = (ConstantInteger) cpGen.getConstant(idx);
-            return Integer.toString(s.getBytes());
-        case PRIMITIVE_BYTE:
-            ConstantInteger b = (ConstantInteger) cpGen.getConstant(idx);
-            return Integer.toString(b.getBytes());
-        case PRIMITIVE_CHAR:
-            ConstantInteger ch = (ConstantInteger) cpGen.getConstant(idx);
-            return Integer.toString(ch.getBytes());
-        case PRIMITIVE_BOOLEAN:
-            ConstantInteger bo = (ConstantInteger) cpGen.getConstant(idx);
-            if (bo.getBytes() == 0) {
-                return "false";
-            } else {
-                return "true";
-            }
-        case STRING:
-            ConstantUtf8 cu8 = (ConstantUtf8) cpGen.getConstant(idx);
-            return cu8.getBytes();
-        default:
-            throw new RuntimeException(
-                    "SimpleElementValueGen class does not know how to stringify type "
-                            + type);
-        }
-    }
-
-    @Override
-    public void dump(DataOutputStream dos) throws IOException
-    {
-        dos.writeByte(type); // u1 kind of value
-        switch (type)
-        {
-        case PRIMITIVE_INT:
-        case PRIMITIVE_BYTE:
-        case PRIMITIVE_CHAR:
-        case PRIMITIVE_FLOAT:
-        case PRIMITIVE_LONG:
-        case PRIMITIVE_BOOLEAN:
-        case PRIMITIVE_SHORT:
-        case PRIMITIVE_DOUBLE:
-        case STRING:
-            dos.writeShort(idx);
-            break;
-        default:
-            throw new RuntimeException(
-                    "SimpleElementValueGen doesnt know how to write out type "
-                            + type);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/StackConsumer.java b/src/main/java/org/apache/bcel/generic/StackConsumer.java
deleted file mode 100644
index 790c310..0000000
--- a/src/main/java/org/apache/bcel/generic/StackConsumer.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denote an instruction that may consume a value from the stack.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface StackConsumer {
-
-    /** @return how many words are consumed from stack
-     */
-    int consumeStack( ConstantPoolGen cpg );
-}
diff --git a/src/main/java/org/apache/bcel/generic/StackInstruction.java b/src/main/java/org/apache/bcel/generic/StackInstruction.java
deleted file mode 100644
index e895cac..0000000
--- a/src/main/java/org/apache/bcel/generic/StackInstruction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Super class for stack operations like DUP and POP.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class StackInstruction extends Instruction {
-
-    private static final long serialVersionUID = -8542057001831958935L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    StackInstruction() {
-    }
-
-
-    /**
-     * @param opcode instruction opcode
-     */
-    protected StackInstruction(short opcode) {
-        super(opcode, (short) 1);
-    }
-
-
-    /** @return Type.UNKNOWN
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.UNKNOWN;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/StackProducer.java b/src/main/java/org/apache/bcel/generic/StackProducer.java
deleted file mode 100644
index 82e481e..0000000
--- a/src/main/java/org/apache/bcel/generic/StackProducer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denote an instruction that may produce a value on top of the stack
- * (this excludes DUP_X1, e.g.)
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface StackProducer {
-
-    /** @return how many words are produced on stack
-     */
-    int produceStack( ConstantPoolGen cpg );
-}
diff --git a/src/main/java/org/apache/bcel/generic/StoreInstruction.java b/src/main/java/org/apache/bcel/generic/StoreInstruction.java
deleted file mode 100644
index d2cfac9..0000000
--- a/src/main/java/org/apache/bcel/generic/StoreInstruction.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denotes an unparameterized instruction to store a value into a local variable,
- * e.g. ISTORE.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class StoreInstruction extends LocalVariableInstruction implements PopInstruction {
-
-    private static final long serialVersionUID = -774241740383612113L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     * tag and length are defined in readInstruction and initFromFile, respectively.
-     */
-    StoreInstruction(short canon_tag, short c_tag) {
-        super(canon_tag, c_tag);
-    }
-
-
-    /**
-     * @param opcode Instruction opcode
-     * @param c_tag Instruction number for compact version, ASTORE_0, e.g.
-     * @param n local variable index (unsigned short)
-     */
-    protected StoreInstruction(short opcode, short c_tag, int n) {
-        super(opcode, c_tag, n);
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitStackConsumer(this);
-        v.visitPopInstruction(this);
-        v.visitTypedInstruction(this);
-        v.visitLocalVariableInstruction(this);
-        v.visitStoreInstruction(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/TABLESWITCH.java b/src/main/java/org/apache/bcel/generic/TABLESWITCH.java
deleted file mode 100644
index e1d59b1..0000000
--- a/src/main/java/org/apache/bcel/generic/TABLESWITCH.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.util.ByteSequence;
-
-/** 
- * TABLESWITCH - Switch within given range of values, i.e., low..high
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see SWITCH
- */
-public class TABLESWITCH extends Select {
-
-    private static final long serialVersionUID = -1178229029789923698L;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    TABLESWITCH() {
-    }
-
-
-    /**
-     * @param match sorted array of match values, match[0] must be low value, 
-     * match[match_length - 1] high value
-     * @param targets where to branch for matched values
-     * @param defaultTarget default branch
-     */
-    public TABLESWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget) {
-        super(org.apache.bcel.Constants.TABLESWITCH, match, targets, defaultTarget);
-        length = (short) (13 + match_length * 4); /* Alignment remainder assumed
-         * 0 here, until dump time */
-        fixed_length = length;
-    }
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    @Override
-    public void dump( DataOutputStream out ) throws IOException {
-        super.dump(out);
-        int low = (match_length > 0) ? match[0] : 0;
-        out.writeInt(low);
-        int high = (match_length > 0) ? match[match_length - 1] : 0;
-        out.writeInt(high);
-        for (int i = 0; i < match_length; i++) {
-            out.writeInt(indices[i] = getTargetOffset(targets[i]));
-        }
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    @Override
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        super.initFromFile(bytes, wide);
-        int low = bytes.readInt();
-        int high = bytes.readInt();
-        match_length = high - low + 1;
-        fixed_length = (short) (13 + match_length * 4);
-        length = (short) (fixed_length + padding);
-        match = new int[match_length];
-        indices = new int[match_length];
-        targets = new InstructionHandle[match_length];
-        for (int i = 0; i < match_length; i++) {
-            match[i] = low + i;
-            indices[i] = bytes.readInt();
-        }
-    }
-
-
-    /**
-     * Call corresponding visitor method(s). The order is:
-     * Call visitor methods of implemented interfaces first, then
-     * call methods according to the class hierarchy in descending order,
-     * i.e., the most specific visitXXX() call comes last.
-     *
-     * @param v Visitor object
-     */
-    @Override
-    public void accept( Visitor v ) {
-        v.visitVariableLengthInstruction(this);
-        v.visitStackConsumer(this);
-        v.visitBranchInstruction(this);
-        v.visitSelect(this);
-        v.visitTABLESWITCH(this);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/TargetLostException.java b/src/main/java/org/apache/bcel/generic/TargetLostException.java
deleted file mode 100644
index 8e2b371..0000000
--- a/src/main/java/org/apache/bcel/generic/TargetLostException.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Thrown by InstructionList.remove() when one or multiple disposed instructions
- * are still being referenced by an InstructionTargeter object. I.e. the
- * InstructionTargeter has to be notified that (one of) the InstructionHandle it
- * is referencing is being removed from the InstructionList and thus not valid anymore.
- *
- * <p>Making this an exception instead of a return value forces the user to handle
- * these case explicitely in a try { ... } catch. The following code illustrates
- * how this may be done:</p>
- *
- * <PRE>
- *     ...
- *     try {
- *         il.delete(start_ih, end_ih);
- *     } catch(TargetLostException e) {
- *         for (InstructionHandle target : e.getTargets()) {
- *             for (InstructionTargeter targeter : target.getTargeters()) {
- *                 targeter.updateTarget(target, new_target);
- *             }
- *         }
- *     }
- * </PRE>
- *
- * @see InstructionHandle
- * @see InstructionList
- * @see InstructionTargeter
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class TargetLostException extends Exception {
-
-    private static final long serialVersionUID = -6857272667645328384L;
-    private final InstructionHandle[] targets;
-
-
-    TargetLostException(InstructionHandle[] t, String mesg) {
-        super(mesg);
-        targets = t;
-    }
-
-
-    /**
-     * @return list of instructions still being targeted.
-     */
-    public InstructionHandle[] getTargets() {
-        return targets;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/Type.java b/src/main/java/org/apache/bcel/generic/Type.java
deleted file mode 100644
index b74a5b2..0000000
--- a/src/main/java/org/apache/bcel/generic/Type.java
+++ /dev/null
@@ -1,395 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.ClassFormatException;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.verifier.structurals.LocalVariables;
-import org.apache.bcel.verifier.structurals.OperandStack;
-
-/**
- * Abstract super class for all possible java types, namely basic types
- * such as int, object types like String and array types, e.g. int[]
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class Type implements java.io.Serializable {
-
-    private static final long serialVersionUID = -1985077286871826895L;
-    protected byte type;
-    protected String signature; // signature for the type
-    /** Predefined constants
-     */
-    public static final BasicType VOID = new BasicType(Constants.T_VOID);
-    public static final BasicType BOOLEAN = new BasicType(Constants.T_BOOLEAN);
-    public static final BasicType INT = new BasicType(Constants.T_INT);
-    public static final BasicType SHORT = new BasicType(Constants.T_SHORT);
-    public static final BasicType BYTE = new BasicType(Constants.T_BYTE);
-    public static final BasicType LONG = new BasicType(Constants.T_LONG);
-    public static final BasicType DOUBLE = new BasicType(Constants.T_DOUBLE);
-    public static final BasicType FLOAT = new BasicType(Constants.T_FLOAT);
-    public static final BasicType CHAR = new BasicType(Constants.T_CHAR);
-    public static final ObjectType OBJECT = ObjectType.getInstance("java.lang.Object");
-    public static final ObjectType CLASS = ObjectType.getInstance("java.lang.Class");
-    public static final ObjectType STRING = ObjectType.getInstance("java.lang.String");
-    public static final ObjectType STRINGBUFFER = ObjectType.getInstance("java.lang.StringBuffer");
-    public static final ObjectType THROWABLE = ObjectType.getInstance("java.lang.Throwable");
-    public static final Type[] NO_ARGS = new Type[0];
-    public static final ReferenceType NULL = new ReferenceType() {
-
-        private static final long serialVersionUID = 4526765862386946282L;
-    };
-    public static final Type UNKNOWN = new Type(Constants.T_UNKNOWN, "<unknown object>") {
-
-        private static final long serialVersionUID = 1321113605813486066L;
-    };
-
-
-    protected Type(byte t, String s) {
-        type = t;
-        signature = s;
-    }
-
-
-    /**
-     * @return hashcode of Type
-     */
-    @Override
-    public int hashCode() {
-        return type ^ signature.hashCode();
-    }
-
-
-    /**
-     * @return whether the Types are equal
-     */
-    @Override
-    public boolean equals(Object o) {
-          if (o instanceof Type) {
-              Type t = (Type)o;
-              return (type == t.type) && signature.equals(t.signature);
-          }
-          return false;
-    }
-
-
-    /**
-     * @return signature for given type.
-     */
-    public String getSignature() {
-        return signature;
-    }
-
-
-    /**
-     * @return type as defined in Constants
-     */
-    public byte getType() {
-        return type;
-    }
-
-    /**
-     * boolean, short and char variable are considered as int in the stack or local variable area.
-     * Returns {@link Type#INT} for {@link Type#BOOLEAN}, {@link Type#SHORT} or {@link Type#CHAR}, otherwise
-     * returns the given type.
-     * @see OperandStack#push(Type)
-     * @see LocalVariables#set(int, Type)
-     */
-    public Type normalizeForStackOrLocal(){
-        if (this == Type.BOOLEAN || this == Type.BYTE || this == Type.SHORT || this == Type.CHAR){
-            return Type.INT;
-        }
-        return this;
-    }
-
-    /**
-     * @return stack size of this type (2 for long and double, 0 for void, 1 otherwise)
-     */
-    public int getSize() {
-        switch (type) {
-            case Constants.T_DOUBLE:
-            case Constants.T_LONG:
-                return 2;
-            case Constants.T_VOID:
-                return 0;
-            default:
-                return 1;
-        }
-    }
-
-
-    /**
-     * @return Type string, e.g. `int[]'
-     */
-    @Override
-    public String toString() {
-        return ((this.equals(Type.NULL) || (type >= Constants.T_UNKNOWN))) ? signature : Utility
-                .signatureToString(signature, false);
-    }
-
-
-    /**
-     * Convert type to Java method signature, e.g. int[] f(java.lang.String x)
-     * becomes (Ljava/lang/String;)[I
-     *
-     * @param return_type what the method returns
-     * @param arg_types what are the argument types
-     * @return method signature for given type(s).
-     */
-    public static String getMethodSignature( Type return_type, Type[] arg_types ) {
-        StringBuilder buf = new StringBuilder("(");
-        if (arg_types != null) {
-            for (Type arg_type : arg_types) {
-                buf.append(arg_type.getSignature());
-            }
-        }
-        buf.append(')');
-        buf.append(return_type.getSignature());
-        return buf.toString();
-    }
-
-    private static final ThreadLocal<Integer> consumed_chars = new ThreadLocal<Integer>() {
-
-        @Override
-        protected Integer initialValue() {
-            return Integer.valueOf(0);
-        }
-    };//int consumed_chars=0; // Remember position in string, see getArgumentTypes
-
-
-    private static int unwrap( ThreadLocal<Integer> tl ) {
-        return tl.get().intValue();
-    }
-
-
-    private static void wrap( ThreadLocal<Integer> tl, int value ) {
-        tl.set(Integer.valueOf(value));
-    }
-
-
-    /**
-     * Convert signature to a Type object.
-     * @param signature signature string such as Ljava/lang/String;
-     * @return type object
-     */
-    public static Type getType( String signature ) throws StringIndexOutOfBoundsException {
-        byte type = Utility.typeOfSignature(signature);
-        if (type <= Constants.T_VOID) {
-            //corrected concurrent private static field acess
-            wrap(consumed_chars, 1);
-            return BasicType.getType(type);
-        } else if (type == Constants.T_ARRAY) {
-            int dim = 0;
-            do { // Count dimensions
-                dim++;
-            } while (signature.charAt(dim) == '[');
-            // Recurse, but just once, if the signature is ok
-            Type t = getType(signature.substring(dim));
-            //corrected concurrent private static field acess
-            //  consumed_chars += dim; // update counter - is replaced by
-            int _temp = unwrap(consumed_chars) + dim;
-            wrap(consumed_chars, _temp);
-            return new ArrayType(t, dim);
-        } else { // type == T_REFERENCE
-            int index = signature.indexOf(';'); // Look for closing `;'
-            if (index < 0) {
-                throw new ClassFormatException("Invalid signature: " + signature);
-            }
-            //corrected concurrent private static field acess
-            wrap(consumed_chars, index + 1); // "Lblabla;" `L' and `;' are removed
-            return ObjectType.getInstance(signature.substring(1, index).replace('/', '.'));
-        }
-    }
-
-
-    /**
-     * Convert return value of a method (signature) to a Type object.
-     *
-     * @param signature signature string such as (Ljava/lang/String;)V
-     * @return return type
-     */
-    public static Type getReturnType( String signature ) {
-        try {
-            // Read return type after `)'
-            int index = signature.lastIndexOf(')') + 1;
-            return getType(signature.substring(index));
-        } catch (StringIndexOutOfBoundsException e) { // Should never occur
-            throw new ClassFormatException("Invalid method signature: " + signature, e);
-        }
-    }
-
-
-    /**
-     * Convert arguments of a method (signature) to an array of Type objects.
-     * @param signature signature string such as (Ljava/lang/String;)V
-     * @return array of argument types
-     */
-    public static Type[] getArgumentTypes( String signature ) {
-        List<Type> vec = new ArrayList<Type>();
-        int index;
-        Type[] types;
-        try { // Read all declarations between for `(' and `)'
-            if (signature.charAt(0) != '(') {
-                throw new ClassFormatException("Invalid method signature: " + signature);
-            }
-            index = 1; // current string position
-            while (signature.charAt(index) != ')') {
-                vec.add(getType(signature.substring(index)));
-                //corrected concurrent private static field acess
-                index += unwrap(consumed_chars); // update position
-            }
-        } catch (StringIndexOutOfBoundsException e) { // Should never occur
-            throw new ClassFormatException("Invalid method signature: " + signature, e);
-        }
-        types = new Type[vec.size()];
-        vec.toArray(types);
-        return types;
-    }
-
-
-    /** Convert runtime java.lang.Class to BCEL Type object.
-     * @param cl Java class
-     * @return corresponding Type object
-     */
-    public static Type getType( java.lang.Class<?> cl ) {
-        if (cl == null) {
-            throw new IllegalArgumentException("Class must not be null");
-        }
-        /* That's an amzingly easy case, because getName() returns
-         * the signature. That's what we would have liked anyway.
-         */
-        if (cl.isArray()) {
-            return getType(cl.getName());
-        } else if (cl.isPrimitive()) {
-            if (cl == Integer.TYPE) {
-                return INT;
-            } else if (cl == Void.TYPE) {
-                return VOID;
-            } else if (cl == Double.TYPE) {
-                return DOUBLE;
-            } else if (cl == Float.TYPE) {
-                return FLOAT;
-            } else if (cl == Boolean.TYPE) {
-                return BOOLEAN;
-            } else if (cl == Byte.TYPE) {
-                return BYTE;
-            } else if (cl == Short.TYPE) {
-                return SHORT;
-            } else if (cl == Byte.TYPE) {
-                return BYTE;
-            } else if (cl == Long.TYPE) {
-                return LONG;
-            } else if (cl == Character.TYPE) {
-                return CHAR;
-            } else {
-                throw new IllegalStateException("Ooops, what primitive type is " + cl);
-            }
-        } else { // "Real" class
-            return ObjectType.getInstance(cl.getName());
-        }
-    }
-
-
-    /**
-     * Convert runtime java.lang.Class[] to BCEL Type objects.
-     * @param classes an array of runtime class objects
-     * @return array of corresponding Type objects
-     */
-    public static Type[] getTypes( java.lang.Class<?>[] classes ) {
-        Type[] ret = new Type[classes.length];
-        for (int i = 0; i < ret.length; i++) {
-            ret[i] = getType(classes[i]);
-        }
-        return ret;
-    }
-
-
-    public static String getSignature( java.lang.reflect.Method meth ) {
-        StringBuilder sb = new StringBuilder("(");
-        Class<?>[] params = meth.getParameterTypes(); // avoid clone
-        for (Class<?> param : params) {
-            sb.append(getType(param).getSignature());
-        }
-        sb.append(")");
-        sb.append(getType(meth.getReturnType()).getSignature());
-        return sb.toString();
-    }
-
-    static int size(int coded) {
-        return coded & 3;
-    }
-
-    static int consumed(int coded) {
-        return coded >> 2;
-    }
-
-    static int encode(int size, int consumed) {
-        return consumed << 2 | size;
-    }
-
-    static int getArgumentTypesSize( String signature ) {
-        int res = 0;
-        int index;
-        try { // Read all declarations between for `(' and `)'
-            if (signature.charAt(0) != '(') {
-                throw new ClassFormatException("Invalid method signature: " + signature);
-            }
-            index = 1; // current string position
-            while (signature.charAt(index) != ')') {
-                int coded = getTypeSize(signature.substring(index));
-                res += size(coded);
-                index += consumed(coded);
-            }
-        } catch (StringIndexOutOfBoundsException e) { // Should never occur
-            throw new ClassFormatException("Invalid method signature: " + signature, e);
-        }
-        return res;
-    }
-
-    static int getTypeSize( String signature ) throws StringIndexOutOfBoundsException {
-        byte type = Utility.typeOfSignature(signature);
-        if (type <= Constants.T_VOID) {
-            return encode(BasicType.getType(type).getSize(), 1);
-        } else if (type == Constants.T_ARRAY) {
-            int dim = 0;
-            do { // Count dimensions
-                dim++;
-            } while (signature.charAt(dim) == '[');
-            // Recurse, but just once, if the signature is ok
-            int consumed = consumed(getTypeSize(signature.substring(dim)));
-            return encode(1, dim + consumed);
-        } else { // type == T_REFERENCE
-            int index = signature.indexOf(';'); // Look for closing `;'
-            if (index < 0) {
-                throw new ClassFormatException("Invalid signature: " + signature);
-            }
-            return encode(1, index + 1);
-        }
-    }
-
-
-    static int getReturnTypeSize(String signature) {
-        int index = signature.lastIndexOf(')') + 1;
-        return Type.size(getTypeSize(signature.substring(index)));
-    }
-}
diff --git a/src/main/java/org/apache/bcel/generic/TypedInstruction.java b/src/main/java/org/apache/bcel/generic/TypedInstruction.java
deleted file mode 100644
index a91a25e..0000000
--- a/src/main/java/org/apache/bcel/generic/TypedInstruction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Get the type associated with an instruction, int for ILOAD, or the type
- * of the field of a PUTFIELD instruction, e.g..
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface TypedInstruction {
-
-    Type getType( ConstantPoolGen cpg );
-}
diff --git a/src/main/java/org/apache/bcel/generic/UnconditionalBranch.java b/src/main/java/org/apache/bcel/generic/UnconditionalBranch.java
deleted file mode 100644
index 1996af1..0000000
--- a/src/main/java/org/apache/bcel/generic/UnconditionalBranch.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denotes an instruction to perform an unconditional branch, i.e., GOTO, JSR.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
-
- * @see GOTO
- * @see JSR
- */
-public interface UnconditionalBranch {
-}
diff --git a/src/main/java/org/apache/bcel/generic/VariableLengthInstruction.java b/src/main/java/org/apache/bcel/generic/VariableLengthInstruction.java
deleted file mode 100644
index fe7630a..0000000
--- a/src/main/java/org/apache/bcel/generic/VariableLengthInstruction.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Denotes an instruction to be a variable length instruction, such as
- * GOTO, JSR, LOOKUPSWITCH and TABLESWITCH.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
-
- * @see GOTO
- * @see JSR
- * @see LOOKUPSWITCH
- * @see TABLESWITCH
- */
-public interface VariableLengthInstruction {
-}
diff --git a/src/main/java/org/apache/bcel/generic/Visitor.java b/src/main/java/org/apache/bcel/generic/Visitor.java
deleted file mode 100644
index 34fd3cd..0000000
--- a/src/main/java/org/apache/bcel/generic/Visitor.java
+++ /dev/null
@@ -1,572 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.generic;
-
-/**
- * Interface implementing the Visitor pattern programming style.
- * I.e., a class that implements this interface can handle all types of
- * instructions with the properly typed methods just by calling the accept()
- * method.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public interface Visitor {
-
-    void visitStackInstruction( StackInstruction obj );
-
-
-    void visitLocalVariableInstruction( LocalVariableInstruction obj );
-
-
-    void visitBranchInstruction( BranchInstruction obj );
-
-
-    void visitLoadClass( LoadClass obj );
-
-
-    void visitFieldInstruction( FieldInstruction obj );
-
-
-    void visitIfInstruction( IfInstruction obj );
-
-
-    void visitConversionInstruction( ConversionInstruction obj );
-
-
-    void visitPopInstruction( PopInstruction obj );
-
-
-    void visitStoreInstruction( StoreInstruction obj );
-
-
-    void visitTypedInstruction( TypedInstruction obj );
-
-
-    void visitSelect( Select obj );
-
-
-    void visitJsrInstruction( JsrInstruction obj );
-
-
-    void visitGotoInstruction( GotoInstruction obj );
-
-
-    void visitUnconditionalBranch( UnconditionalBranch obj );
-
-
-    void visitPushInstruction( PushInstruction obj );
-
-
-    void visitArithmeticInstruction( ArithmeticInstruction obj );
-
-
-    void visitCPInstruction( CPInstruction obj );
-
-
-    void visitInvokeInstruction( InvokeInstruction obj );
-
-
-    void visitArrayInstruction( ArrayInstruction obj );
-
-
-    void visitAllocationInstruction( AllocationInstruction obj );
-
-
-    void visitReturnInstruction( ReturnInstruction obj );
-
-
-    void visitFieldOrMethod( FieldOrMethod obj );
-
-
-    void visitConstantPushInstruction( ConstantPushInstruction obj );
-
-
-    void visitExceptionThrower( ExceptionThrower obj );
-
-
-    void visitLoadInstruction( LoadInstruction obj );
-
-
-    void visitVariableLengthInstruction( VariableLengthInstruction obj );
-
-
-    void visitStackProducer( StackProducer obj );
-
-
-    void visitStackConsumer( StackConsumer obj );
-
-
-    void visitACONST_NULL( ACONST_NULL obj );
-
-
-    void visitGETSTATIC( GETSTATIC obj );
-
-
-    void visitIF_ICMPLT( IF_ICMPLT obj );
-
-
-    void visitMONITOREXIT( MONITOREXIT obj );
-
-
-    void visitIFLT( IFLT obj );
-
-
-    void visitLSTORE( LSTORE obj );
-
-
-    void visitPOP2( POP2 obj );
-
-
-    void visitBASTORE( BASTORE obj );
-
-
-    void visitISTORE( ISTORE obj );
-
-
-    void visitCHECKCAST( CHECKCAST obj );
-
-
-    void visitFCMPG( FCMPG obj );
-
-
-    void visitI2F( I2F obj );
-
-
-    void visitATHROW( ATHROW obj );
-
-
-    void visitDCMPL( DCMPL obj );
-
-
-    void visitARRAYLENGTH( ARRAYLENGTH obj );
-
-
-    void visitDUP( DUP obj );
-
-
-    void visitINVOKESTATIC( INVOKESTATIC obj );
-
-
-    void visitLCONST( LCONST obj );
-
-
-    void visitDREM( DREM obj );
-
-
-    void visitIFGE( IFGE obj );
-
-
-    void visitCALOAD( CALOAD obj );
-
-
-    void visitLASTORE( LASTORE obj );
-
-
-    void visitI2D( I2D obj );
-
-
-    void visitDADD( DADD obj );
-
-
-    void visitINVOKESPECIAL( INVOKESPECIAL obj );
-
-
-    void visitIAND( IAND obj );
-
-
-    void visitPUTFIELD( PUTFIELD obj );
-
-
-    void visitILOAD( ILOAD obj );
-
-
-    void visitDLOAD( DLOAD obj );
-
-
-    void visitDCONST( DCONST obj );
-
-
-    void visitNEW( NEW obj );
-
-
-    void visitIFNULL( IFNULL obj );
-
-
-    void visitLSUB( LSUB obj );
-
-
-    void visitL2I( L2I obj );
-
-
-    void visitISHR( ISHR obj );
-
-
-    void visitTABLESWITCH( TABLESWITCH obj );
-
-
-    void visitIINC( IINC obj );
-
-
-    void visitDRETURN( DRETURN obj );
-
-
-    void visitFSTORE( FSTORE obj );
-
-
-    void visitDASTORE( DASTORE obj );
-
-
-    void visitIALOAD( IALOAD obj );
-
-
-    void visitDDIV( DDIV obj );
-
-
-    void visitIF_ICMPGE( IF_ICMPGE obj );
-
-
-    void visitLAND( LAND obj );
-
-
-    void visitIDIV( IDIV obj );
-
-
-    void visitLOR( LOR obj );
-
-
-    void visitCASTORE( CASTORE obj );
-
-
-    void visitFREM( FREM obj );
-
-
-    void visitLDC( LDC obj );
-
-
-    void visitBIPUSH( BIPUSH obj );
-
-
-    void visitDSTORE( DSTORE obj );
-
-
-    void visitF2L( F2L obj );
-
-
-    void visitFMUL( FMUL obj );
-
-
-    void visitLLOAD( LLOAD obj );
-
-
-    void visitJSR( JSR obj );
-
-
-    void visitFSUB( FSUB obj );
-
-
-    void visitSASTORE( SASTORE obj );
-
-
-    void visitALOAD( ALOAD obj );
-
-
-    void visitDUP2_X2( DUP2_X2 obj );
-
-
-    void visitRETURN( RETURN obj );
-
-
-    void visitDALOAD( DALOAD obj );
-
-
-    void visitSIPUSH( SIPUSH obj );
-
-
-    void visitDSUB( DSUB obj );
-
-
-    void visitL2F( L2F obj );
-
-
-    void visitIF_ICMPGT( IF_ICMPGT obj );
-
-
-    void visitF2D( F2D obj );
-
-
-    void visitI2L( I2L obj );
-
-
-    void visitIF_ACMPNE( IF_ACMPNE obj );
-
-
-    void visitPOP( POP obj );
-
-
-    void visitI2S( I2S obj );
-
-
-    void visitIFEQ( IFEQ obj );
-
-
-    void visitSWAP( SWAP obj );
-
-
-    void visitIOR( IOR obj );
-
-
-    void visitIREM( IREM obj );
-
-
-    void visitIASTORE( IASTORE obj );
-
-
-    void visitNEWARRAY( NEWARRAY obj );
-
-
-    void visitINVOKEINTERFACE( INVOKEINTERFACE obj );
-
-
-    void visitINEG( INEG obj );
-
-
-    void visitLCMP( LCMP obj );
-
-
-    void visitJSR_W( JSR_W obj );
-
-
-    void visitMULTIANEWARRAY( MULTIANEWARRAY obj );
-
-
-    void visitDUP_X2( DUP_X2 obj );
-
-
-    void visitSALOAD( SALOAD obj );
-
-
-    void visitIFNONNULL( IFNONNULL obj );
-
-
-    void visitDMUL( DMUL obj );
-
-
-    void visitIFNE( IFNE obj );
-
-
-    void visitIF_ICMPLE( IF_ICMPLE obj );
-
-
-    void visitLDC2_W( LDC2_W obj );
-
-
-    void visitGETFIELD( GETFIELD obj );
-
-
-    void visitLADD( LADD obj );
-
-
-    void visitNOP( NOP obj );
-
-
-    void visitFALOAD( FALOAD obj );
-
-
-    void visitINSTANCEOF( INSTANCEOF obj );
-
-
-    void visitIFLE( IFLE obj );
-
-
-    void visitLXOR( LXOR obj );
-
-
-    void visitLRETURN( LRETURN obj );
-
-
-    void visitFCONST( FCONST obj );
-
-
-    void visitIUSHR( IUSHR obj );
-
-
-    void visitBALOAD( BALOAD obj );
-
-
-    void visitDUP2( DUP2 obj );
-
-
-    void visitIF_ACMPEQ( IF_ACMPEQ obj );
-
-
-    void visitIMPDEP1( IMPDEP1 obj );
-
-
-    void visitMONITORENTER( MONITORENTER obj );
-
-
-    void visitLSHL( LSHL obj );
-
-
-    void visitDCMPG( DCMPG obj );
-
-
-    void visitD2L( D2L obj );
-
-
-    void visitIMPDEP2( IMPDEP2 obj );
-
-
-    void visitL2D( L2D obj );
-
-
-    void visitRET( RET obj );
-
-
-    void visitIFGT( IFGT obj );
-
-
-    void visitIXOR( IXOR obj );
-
-
-    void visitINVOKEVIRTUAL( INVOKEVIRTUAL obj );
-
-
-    void visitINVOKEDYNAMIC( INVOKEDYNAMIC obj );
-
-
-    void visitFASTORE( FASTORE obj );
-
-
-    void visitIRETURN( IRETURN obj );
-
-
-    void visitIF_ICMPNE( IF_ICMPNE obj );
-
-
-    void visitFLOAD( FLOAD obj );
-
-
-    void visitLDIV( LDIV obj );
-
-
-    void visitPUTSTATIC( PUTSTATIC obj );
-
-
-    void visitAALOAD( AALOAD obj );
-
-
-    void visitD2I( D2I obj );
-
-
-    void visitIF_ICMPEQ( IF_ICMPEQ obj );
-
-
-    void visitAASTORE( AASTORE obj );
-
-
-    void visitARETURN( ARETURN obj );
-
-
-    void visitDUP2_X1( DUP2_X1 obj );
-
-
-    void visitFNEG( FNEG obj );
-
-
-    void visitGOTO_W( GOTO_W obj );
-
-
-    void visitD2F( D2F obj );
-
-
-    void visitGOTO( GOTO obj );
-
-
-    void visitISUB( ISUB obj );
-
-
-    void visitF2I( F2I obj );
-
-
-    void visitDNEG( DNEG obj );
-
-
-    void visitICONST( ICONST obj );
-
-
-    void visitFDIV( FDIV obj );
-
-
-    void visitI2B( I2B obj );
-
-
-    void visitLNEG( LNEG obj );
-
-
-    void visitLREM( LREM obj );
-
-
-    void visitIMUL( IMUL obj );
-
-
-    void visitIADD( IADD obj );
-
-
-    void visitLSHR( LSHR obj );
-
-
-    void visitLOOKUPSWITCH( LOOKUPSWITCH obj );
-
-
-    void visitDUP_X1( DUP_X1 obj );
-
-
-    void visitFCMPL( FCMPL obj );
-
-
-    void visitI2C( I2C obj );
-
-
-    void visitLMUL( LMUL obj );
-
-
-    void visitLUSHR( LUSHR obj );
-
-
-    void visitISHL( ISHL obj );
-
-
-    void visitLALOAD( LALOAD obj );
-
-
-    void visitASTORE( ASTORE obj );
-
-
-    void visitANEWARRAY( ANEWARRAY obj );
-
-
-    void visitFRETURN( FRETURN obj );
-
-
-    void visitFADD( FADD obj );
-
-
-    void visitBREAKPOINT( BREAKPOINT obj );
-}
diff --git a/src/main/java/org/apache/bcel/util/AttributeHTML.java b/src/main/java/org/apache/bcel/util/AttributeHTML.java
deleted file mode 100644
index e586742..0000000
--- a/src/main/java/org/apache/bcel/util/AttributeHTML.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.CodeException;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ConstantValue;
-import org.apache.bcel.classfile.ExceptionTable;
-import org.apache.bcel.classfile.InnerClass;
-import org.apache.bcel.classfile.InnerClasses;
-import org.apache.bcel.classfile.LineNumber;
-import org.apache.bcel.classfile.LineNumberTable;
-import org.apache.bcel.classfile.LocalVariable;
-import org.apache.bcel.classfile.LocalVariableTable;
-import org.apache.bcel.classfile.SourceFile;
-import org.apache.bcel.classfile.Utility;
-
-/**
- * Convert found attributes into HTML file.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * 
- */
-final class AttributeHTML implements org.apache.bcel.Constants {
-
-    private final String class_name; // name of current class
-    private final PrintWriter file; // file to write to
-    private int attr_count = 0;
-    private final ConstantHTML constant_html;
-    private final ConstantPool constant_pool;
-
-
-    AttributeHTML(String dir, String class_name, ConstantPool constant_pool,
-            ConstantHTML constant_html) throws IOException {
-        this.class_name = class_name;
-        this.constant_pool = constant_pool;
-        this.constant_html = constant_html;
-        file = new PrintWriter(new FileOutputStream(dir + class_name + "_attributes.html"));
-        file.println("<HTML><BODY BGCOLOR=\"#C0C0C0\"><TABLE BORDER=0>");
-    }
-
-
-    private String codeLink( int link, int method_number ) {
-        return "<A HREF=\"" + class_name + "_code.html#code" + method_number + "@" + link
-                + "\" TARGET=Code>" + link + "</A>";
-    }
-
-
-    final void close() {
-        file.println("</TABLE></BODY></HTML>");
-        file.close();
-    }
-
-
-    final void writeAttribute( Attribute attribute, String anchor ) {
-        writeAttribute(attribute, anchor, 0);
-    }
-
-
-    final void writeAttribute( Attribute attribute, String anchor, int method_number ) {
-        byte tag = attribute.getTag();
-        int index;
-        if (tag == ATTR_UNKNOWN) {
-            return;
-        }
-        attr_count++; // Increment number of attributes found so far
-        if (attr_count % 2 == 0) {
-            file.print("<TR BGCOLOR=\"#C0C0C0\"><TD>");
-        } else {
-            file.print("<TR BGCOLOR=\"#A0A0A0\"><TD>");
-        }
-        file.println("<H4><A NAME=\"" + anchor + "\">" + attr_count + " " + ATTRIBUTE_NAMES[tag]
-                + "</A></H4>");
-        /* Handle different attributes
-         */
-        switch (tag) {
-            case ATTR_CODE:
-                Code c = (Code) attribute;
-                // Some directly printable values
-                file.print("<UL><LI>Maximum stack size = " + c.getMaxStack()
-                        + "</LI>\n<LI>Number of local variables = " + c.getMaxLocals()
-                        + "</LI>\n<LI><A HREF=\"" + class_name + "_code.html#method"
-                        + method_number + "\" TARGET=Code>Byte code</A></LI></UL>\n");
-                // Get handled exceptions and list them
-                CodeException[] ce = c.getExceptionTable();
-                int len = ce.length;
-                if (len > 0) {
-                    file.print("<P><B>Exceptions handled</B><UL>");
-                    for (CodeException cex : ce) {
-                        int catch_type = cex.getCatchType(); // Index in constant pool
-                        file.print("<LI>");
-                        if (catch_type != 0) {
-                            file.print(constant_html.referenceConstant(catch_type)); // Create Link to _cp.html
-                        } else {
-                            file.print("Any Exception");
-                        }
-                        file.print("<BR>(Ranging from lines "
-                                + codeLink(cex.getStartPC(), method_number) + " to "
-                                + codeLink(cex.getEndPC(), method_number) + ", handled at line "
-                                + codeLink(cex.getHandlerPC(), method_number) + ")</LI>");
-                    }
-                    file.print("</UL>");
-                }
-                break;
-            case ATTR_CONSTANT_VALUE:
-                index = ((ConstantValue) attribute).getConstantValueIndex();
-                // Reference _cp.html
-                file.print("<UL><LI><A HREF=\"" + class_name + "_cp.html#cp" + index
-                        + "\" TARGET=\"ConstantPool\">Constant value index(" + index
-                        + ")</A></UL>\n");
-                break;
-            case ATTR_SOURCE_FILE:
-                index = ((SourceFile) attribute).getSourceFileIndex();
-                // Reference _cp.html
-                file.print("<UL><LI><A HREF=\"" + class_name + "_cp.html#cp" + index
-                        + "\" TARGET=\"ConstantPool\">Source file index(" + index + ")</A></UL>\n");
-                break;
-            case ATTR_EXCEPTIONS:
-                // List thrown exceptions
-                int[] indices = ((ExceptionTable) attribute).getExceptionIndexTable();
-                file.print("<UL>");
-            for (int indice : indices) {
-                file.print("<LI><A HREF=\"" + class_name + "_cp.html#cp" + indice
-                        + "\" TARGET=\"ConstantPool\">Exception class index(" + indice
-                        + ")</A>\n");
-            }
-                file.print("</UL>\n");
-                break;
-            case ATTR_LINE_NUMBER_TABLE:
-                LineNumber[] line_numbers = ((LineNumberTable) attribute).getLineNumberTable();
-                // List line number pairs
-                file.print("<P>");
-                for (int i = 0; i < line_numbers.length; i++) {
-                    file.print("(" + line_numbers[i].getStartPC() + ",&nbsp;"
-                            + line_numbers[i].getLineNumber() + ")");
-                    if (i < line_numbers.length - 1) {
-                        file.print(", "); // breakable
-                    }
-                }
-                break;
-            case ATTR_LOCAL_VARIABLE_TABLE:
-                LocalVariable[] vars = ((LocalVariableTable) attribute).getLocalVariableTable();
-                // List name, range and type
-                file.print("<UL>");
-            for (LocalVariable var : vars) {
-                index = var.getSignatureIndex();
-                String signature = ((ConstantUtf8) constant_pool.getConstant(index,
-                        CONSTANT_Utf8)).getBytes();
-                signature = Utility.signatureToString(signature, false);
-                int start = var.getStartPC();
-                int end = (start + var.getLength());
-                file.println("<LI>" + Class2HTML.referenceType(signature) + "&nbsp;<B>"
-                        + var.getName() + "</B> in slot %" + var.getIndex()
-                        + "<BR>Valid from lines " + "<A HREF=\"" + class_name
-                        + "_code.html#code" + method_number + "@" + start + "\" TARGET=Code>"
-                        + start + "</A> to " + "<A HREF=\"" + class_name + "_code.html#code"
-                        + method_number + "@" + end + "\" TARGET=Code>" + end + "</A></LI>");
-            }
-                file.print("</UL>\n");
-                break;
-            case ATTR_INNER_CLASSES:
-                InnerClass[] classes = ((InnerClasses) attribute).getInnerClasses();
-                // List inner classes
-                file.print("<UL>");
-            for (InnerClass classe : classes) {
-                String name, access;
-                index = classe.getInnerNameIndex();
-                if (index > 0) {
-                    name = ((ConstantUtf8) constant_pool.getConstant(index, CONSTANT_Utf8))
-                            .getBytes();
-                } else {
-                    name = "&lt;anonymous&gt;";
-                }
-                access = Utility.accessToString(classe.getInnerAccessFlags());
-                file.print("<LI><FONT COLOR=\"#FF0000\">" + access + "</FONT> "
-                        + constant_html.referenceConstant(classe.getInnerClassIndex())
-                        + " in&nbsp;class "
-                        + constant_html.referenceConstant(classe.getOuterClassIndex())
-                        + " named " + name + "</LI>\n");
-            }
-                file.print("</UL>\n");
-                break;
-            default: // Such as Unknown attribute or Deprecated
-                file.print("<P>" + attribute);
-        }
-        file.println("</TD></TR>");
-        file.flush();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/BCELComparator.java b/src/main/java/org/apache/bcel/util/BCELComparator.java
deleted file mode 100644
index 5b56f65..0000000
--- a/src/main/java/org/apache/bcel/util/BCELComparator.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-/**
- * Used for BCEL comparison strategy
- * 
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @version $Id$
- * @since 5.2
- */
-public interface BCELComparator {
-
-    /**
-     * Compare two objects and return what THIS.equals(THAT) should return
-     * 
-     * @param THIS
-     * @param THAT
-     * @return true if and only if THIS equals THAT
-     */
-    boolean equals( Object THIS, Object THAT );
-
-
-    /**
-     * Return hashcode for THIS.hashCode()
-     * 
-     * @param THIS
-     * @return hashcode for THIS.hashCode()
-     */
-    int hashCode( Object THIS );
-}
diff --git a/src/main/java/org/apache/bcel/util/BCELFactory.java b/src/main/java/org/apache/bcel/util/BCELFactory.java
deleted file mode 100644
index 0427804..0000000
--- a/src/main/java/org/apache/bcel/util/BCELFactory.java
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.generic.AllocationInstruction;
-import org.apache.bcel.generic.ArrayInstruction;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.BranchHandle;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.CHECKCAST;
-import org.apache.bcel.generic.CPInstruction;
-import org.apache.bcel.generic.CodeExceptionGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.ConstantPushInstruction;
-import org.apache.bcel.generic.EmptyVisitor;
-import org.apache.bcel.generic.FieldInstruction;
-import org.apache.bcel.generic.IINC;
-import org.apache.bcel.generic.INSTANCEOF;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InvokeInstruction;
-import org.apache.bcel.generic.LDC;
-import org.apache.bcel.generic.LDC2_W;
-import org.apache.bcel.generic.LocalVariableInstruction;
-import org.apache.bcel.generic.MULTIANEWARRAY;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.NEWARRAY;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.RET;
-import org.apache.bcel.generic.ReturnInstruction;
-import org.apache.bcel.generic.Select;
-import org.apache.bcel.generic.Type;
-
-/**
- * Factory creates il.append() statements, and sets instruction targets.
- * A helper class for BCELifier.
- *
- * @see BCELifier
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-class BCELFactory extends EmptyVisitor {
-
-    private final MethodGen _mg;
-    private final PrintWriter _out;
-    private final ConstantPoolGen _cp;
-
-
-    BCELFactory(MethodGen mg, PrintWriter out) {
-        _mg = mg;
-        _cp = mg.getConstantPool();
-        _out = out;
-    }
-
-    private final Map<Instruction, InstructionHandle> branch_map = new HashMap<Instruction, InstructionHandle>();
-
-
-    public void start() {
-        if (!_mg.isAbstract() && !_mg.isNative()) {
-            for (InstructionHandle ih = _mg.getInstructionList().getStart(); ih != null; ih = ih
-                    .getNext()) {
-                Instruction i = ih.getInstruction();
-                if (i instanceof BranchInstruction) {
-                    branch_map.put(i, ih); // memorize container
-                }
-                if (ih.hasTargeters()) {
-                    if (i instanceof BranchInstruction) {
-                        _out.println("    InstructionHandle ih_" + ih.getPosition() + ";");
-                    } else {
-                        _out.print("    InstructionHandle ih_" + ih.getPosition() + " = ");
-                    }
-                } else {
-                    _out.print("    ");
-                }
-                if (!visitInstruction(i)) {
-                    i.accept(this);
-                }
-            }
-            updateBranchTargets();
-            updateExceptionHandlers();
-        }
-    }
-
-
-    private boolean visitInstruction( Instruction i ) {
-        short opcode = i.getOpcode();
-        if ((InstructionConstants.INSTRUCTIONS[opcode] != null)
-                && !(i instanceof ConstantPushInstruction) && !(i instanceof ReturnInstruction)) { // Handled below
-            _out.println("il.append(InstructionConstants."
-                    + i.getName().toUpperCase(Locale.ENGLISH) + ");");
-            return true;
-        }
-        return false;
-    }
-
-
-    @Override
-    public void visitLocalVariableInstruction( LocalVariableInstruction i ) {
-        short opcode = i.getOpcode();
-        Type type = i.getType(_cp);
-        if (opcode == Constants.IINC) {
-            _out.println("il.append(new IINC(" + i.getIndex() + ", " + ((IINC) i).getIncrement()
-                    + "));");
-        } else {
-            String kind = (opcode < Constants.ISTORE) ? "Load" : "Store";
-            _out.println("il.append(_factory.create" + kind + "(" + BCELifier.printType(type)
-                    + ", " + i.getIndex() + "));");
-        }
-    }
-
-
-    @Override
-    public void visitArrayInstruction( ArrayInstruction i ) {
-        short opcode = i.getOpcode();
-        Type type = i.getType(_cp);
-        String kind = (opcode < Constants.IASTORE) ? "Load" : "Store";
-        _out.println("il.append(_factory.createArray" + kind + "(" + BCELifier.printType(type)
-                + "));");
-    }
-
-
-    @Override
-    public void visitFieldInstruction( FieldInstruction i ) {
-        short opcode = i.getOpcode();
-        String class_name = i.getClassName(_cp);
-        String field_name = i.getFieldName(_cp);
-        Type type = i.getFieldType(_cp);
-        _out.println("il.append(_factory.createFieldAccess(\"" + class_name + "\", \"" + field_name
-                + "\", " + BCELifier.printType(type) + ", " + "Constants."
-                + Constants.OPCODE_NAMES[opcode].toUpperCase(Locale.ENGLISH) + "));");
-    }
-
-
-    @Override
-    public void visitInvokeInstruction( InvokeInstruction i ) {
-        short opcode = i.getOpcode();
-        String class_name = i.getClassName(_cp);
-        String method_name = i.getMethodName(_cp);
-        Type type = i.getReturnType(_cp);
-        Type[] arg_types = i.getArgumentTypes(_cp);
-        _out.println("il.append(_factory.createInvoke(\"" + class_name + "\", \"" + method_name
-                + "\", " + BCELifier.printType(type) + ", "
-                + BCELifier.printArgumentTypes(arg_types) + ", " + "Constants."
-                + Constants.OPCODE_NAMES[opcode].toUpperCase(Locale.ENGLISH) + "));");
-    }
-
-
-    @Override
-    public void visitAllocationInstruction( AllocationInstruction i ) {
-        Type type;
-        if (i instanceof CPInstruction) {
-            type = ((CPInstruction) i).getType(_cp);
-        } else {
-            type = ((NEWARRAY) i).getType();
-        }
-        short opcode = ((Instruction) i).getOpcode();
-        int dim = 1;
-        switch (opcode) {
-            case Constants.NEW:
-                _out.println("il.append(_factory.createNew(\"" + ((ObjectType) type).getClassName()
-                        + "\"));");
-                break;
-            case Constants.MULTIANEWARRAY:
-                dim = ((MULTIANEWARRAY) i).getDimensions();
-                //$FALL-THROUGH$
-            case Constants.ANEWARRAY:
-            case Constants.NEWARRAY:
-                if (type instanceof ArrayType) {
-                    type = ((ArrayType) type).getBasicType();
-                }
-                _out.println("il.append(_factory.createNewArray(" + BCELifier.printType(type)
-                        + ", (short) " + dim + "));");
-                break;
-            default:
-                throw new RuntimeException("Oops: " + opcode);
-        }
-    }
-
-
-    private void createConstant( Object value ) {
-        String embed = value.toString();
-        if (value instanceof String) {
-            embed = '"' + Utility.convertString(embed) + '"';
-        } else if (value instanceof Character) {
-            embed = "(char)0x" + Integer.toHexString(((Character) value).charValue());
-        } else if (value instanceof Float) {
-            embed += "f";
-        } else if (value instanceof Long) {
-            embed += "L";
-        } else if (value instanceof ObjectType){
-            ObjectType ot = (ObjectType) value;
-            embed = "new ObjectType(\""+ot.getClassName()+"\")";
-        }
-
-        _out.println("il.append(new PUSH(_cp, " + embed + "));");
-    }
-
-
-    @Override
-    public void visitLDC( LDC i ) {
-        createConstant(i.getValue(_cp));
-    }
-
-
-    @Override
-    public void visitLDC2_W( LDC2_W i ) {
-        createConstant(i.getValue(_cp));
-    }
-
-
-    @Override
-    public void visitConstantPushInstruction( ConstantPushInstruction i ) {
-        createConstant(i.getValue());
-    }
-
-
-    @Override
-    public void visitINSTANCEOF( INSTANCEOF i ) {
-        Type type = i.getType(_cp);
-        _out.println("il.append(new INSTANCEOF(_cp.addClass(" + BCELifier.printType(type) + ")));");
-    }
-
-
-    @Override
-    public void visitCHECKCAST( CHECKCAST i ) {
-        Type type = i.getType(_cp);
-        _out.println("il.append(_factory.createCheckCast(" + BCELifier.printType(type) + "));");
-    }
-
-
-    @Override
-    public void visitReturnInstruction( ReturnInstruction i ) {
-        Type type = i.getType(_cp);
-        _out.println("il.append(_factory.createReturn(" + BCELifier.printType(type) + "));");
-    }
-
-    // Memorize BranchInstructions that need an update
-    private final List<BranchInstruction> branches = new ArrayList<BranchInstruction>();
-
-
-    @Override
-    public void visitBranchInstruction( BranchInstruction bi ) {
-        BranchHandle bh = (BranchHandle) branch_map.get(bi);
-        int pos = bh.getPosition();
-        String name = bi.getName() + "_" + pos;
-        if (bi instanceof Select) {
-            Select s = (Select) bi;
-            branches.add(bi);
-            StringBuilder args = new StringBuilder("new int[] { ");
-            int[] matchs = s.getMatchs();
-            for (int i = 0; i < matchs.length; i++) {
-                args.append(matchs[i]);
-                if (i < matchs.length - 1) {
-                    args.append(", ");
-                }
-            }
-            args.append(" }");
-            _out.print("Select " + name + " = new " + bi.getName().toUpperCase(Locale.ENGLISH)
-                    + "(" + args + ", new InstructionHandle[] { ");
-            for (int i = 0; i < matchs.length; i++) {
-                _out.print("null");
-                if (i < matchs.length - 1) {
-                    _out.print(", ");
-                }
-            }
-            _out.println(" }, null);");
-        } else {
-            int t_pos = bh.getTarget().getPosition();
-            String target;
-            if (pos > t_pos) {
-                target = "ih_" + t_pos;
-            } else {
-                branches.add(bi);
-                target = "null";
-            }
-            _out.println("    BranchInstruction " + name + " = _factory.createBranchInstruction("
-                    + "Constants." + bi.getName().toUpperCase(Locale.ENGLISH) + ", " + target
-                    + ");");
-        }
-        if (bh.hasTargeters()) {
-            _out.println("    ih_" + pos + " = il.append(" + name + ");");
-        } else {
-            _out.println("    il.append(" + name + ");");
-        }
-    }
-
-
-    @Override
-    public void visitRET( RET i ) {
-        _out.println("il.append(new RET(" + i.getIndex() + ")));");
-    }
-
-
-    private void updateBranchTargets() {
-        for (BranchInstruction bi : branches) {
-            BranchHandle bh = (BranchHandle) branch_map.get(bi);
-            int pos = bh.getPosition();
-            String name = bi.getName() + "_" + pos;
-            int t_pos = bh.getTarget().getPosition();
-            _out.println("    " + name + ".setTarget(ih_" + t_pos + ");");
-            if (bi instanceof Select) {
-                InstructionHandle[] ihs = ((Select) bi).getTargets();
-                for (int j = 0; j < ihs.length; j++) {
-                    t_pos = ihs[j].getPosition();
-                    _out.println("    " + name + ".setTarget(" + j + ", ih_" + t_pos + ");");
-                }
-            }
-        }
-    }
-
-
-    private void updateExceptionHandlers() {
-        CodeExceptionGen[] handlers = _mg.getExceptionHandlers();
-        for (CodeExceptionGen h : handlers) {
-            String type = (h.getCatchType() == null) ? "null" : BCELifier.printType(h
-                    .getCatchType());
-            _out.println("    method.addExceptionHandler(" + "ih_" + h.getStartPC().getPosition()
-                    + ", " + "ih_" + h.getEndPC().getPosition() + ", " + "ih_"
-                    + h.getHandlerPC().getPosition() + ", " + type + ");");
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/BCELifier.java b/src/main/java/org/apache/bcel/util/BCELifier.java
deleted file mode 100644
index b50f9a5..0000000
--- a/src/main/java/org/apache/bcel/util/BCELifier.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.Locale;
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.ConstantValue;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Utility;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.Type;
-
-/** 
- * This class takes a given JavaClass object and converts it to a
- * Java program that creates that very class using BCEL. This
- * gives new users of BCEL a useful example showing how things
- * are done with BCEL. It does not cover all features of BCEL,
- * but tries to mimic hand-written code as close as possible.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
- */
-public class BCELifier extends org.apache.bcel.classfile.EmptyVisitor {
-
-    private static final int FLAG_FOR_UNKNOWN = -1;
-    private static final int FLAG_FOR_CLASS = 0;
-    private static final int FLAG_FOR_METHOD = 1;
-    private final JavaClass _clazz;
-    private final PrintWriter _out;
-    private final ConstantPoolGen _cp;
-
-
-    /** @param clazz Java class to "decompile"
-     * @param out where to output Java program
-     */
-    public BCELifier(JavaClass clazz, OutputStream out) {
-        _clazz = clazz;
-        _out = new PrintWriter(out);
-        _cp = new ConstantPoolGen(_clazz.getConstantPool());
-    }
-
-
-    /** Start Java code generation
-     */
-    public void start() {
-        visitJavaClass(_clazz);
-        _out.flush();
-    }
-
-
-    @Override
-    public void visitJavaClass( JavaClass clazz ) {
-        String class_name = clazz.getClassName();
-        String super_name = clazz.getSuperclassName();
-        String package_name = clazz.getPackageName();
-        String inter = Utility.printArray(clazz.getInterfaceNames(), false, true);
-        if (!"".equals(package_name)) {
-            class_name = class_name.substring(package_name.length() + 1);
-            _out.println("package " + package_name + ";");
-            _out.println();
-        }
-        _out.println("import org.apache.bcel.generic.*;");
-        _out.println("import org.apache.bcel.classfile.*;");
-        _out.println("import org.apache.bcel.*;");
-        _out.println("import java.io.*;");
-        _out.println();
-        _out.println("public class " + class_name + "Creator implements Constants {");
-        _out.println("  private InstructionFactory _factory;");
-        _out.println("  private ConstantPoolGen    _cp;");
-        _out.println("  private ClassGen           _cg;");
-        _out.println();
-        _out.println("  public " + class_name + "Creator() {");
-        _out.println("    _cg = new ClassGen(\""
-                + (("".equals(package_name)) ? class_name : package_name + "." + class_name)
-                + "\", \"" + super_name + "\", " + "\"" + clazz.getSourceFileName() + "\", "
-                + printFlags(clazz.getAccessFlags(), FLAG_FOR_CLASS) + ", " + "new String[] { "
-                + inter + " });");
-        _out.println();
-        _out.println("    _cp = _cg.getConstantPool();");
-        _out.println("    _factory = new InstructionFactory(_cg, _cp);");
-        _out.println("  }");
-        _out.println();
-        printCreate();
-        Field[] fields = clazz.getFields();
-        if (fields.length > 0) {
-            _out.println("  private void createFields() {");
-            _out.println("    FieldGen field;");
-            for (Field field : fields) {
-                field.accept(this);
-            }
-            _out.println("  }");
-            _out.println();
-        }
-        Method[] methods = clazz.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            _out.println("  private void createMethod_" + i + "() {");
-            methods[i].accept(this);
-            _out.println("  }");
-            _out.println();
-        }
-        printMain();
-        _out.println("}");
-    }
-
-
-    private void printCreate() {
-        _out.println("  public void create(OutputStream out) throws IOException {");
-        Field[] fields = _clazz.getFields();
-        if (fields.length > 0) {
-            _out.println("    createFields();");
-        }
-        Method[] methods = _clazz.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            _out.println("    createMethod_" + i + "();");
-        }
-        _out.println("    _cg.getJavaClass().dump(out);");
-        _out.println("  }");
-        _out.println();
-    }
-
-
-    private void printMain() {
-        String class_name = _clazz.getClassName();
-        _out.println("  public static void main(String[] args) throws Exception {");
-        _out.println("    " + class_name + "Creator creator = new " + class_name + "Creator();");
-        _out.println("    creator.create(new FileOutputStream(\"" + class_name + ".class\"));");
-        _out.println("  }");
-    }
-
-
-    @Override
-    public void visitField( Field field ) {
-        _out.println();
-        _out.println("    field = new FieldGen(" + printFlags(field.getAccessFlags()) + ", "
-                + printType(field.getSignature()) + ", \"" + field.getName() + "\", _cp);");
-        ConstantValue cv = field.getConstantValue();
-        if (cv != null) {
-            String value = cv.toString();
-            _out.println("    field.setInitValue(" + value + ")");
-        }
-        _out.println("    _cg.addField(field.getField());");
-    }
-
-
-    @Override
-    public void visitMethod( Method method ) {
-        MethodGen mg = new MethodGen(method, _clazz.getClassName(), _cp);
-        Type result_type = mg.getReturnType();
-        Type[] arg_types = mg.getArgumentTypes();
-        _out.println("    InstructionList il = new InstructionList();");
-        _out.println("    MethodGen method = new MethodGen("
-                + printFlags(method.getAccessFlags(), FLAG_FOR_METHOD) + ", "
-                + printType(result_type) + ", " + printArgumentTypes(arg_types) + ", "
-                + "new String[] { " + Utility.printArray(mg.getArgumentNames(), false, true)
-                + " }, \"" + method.getName() + "\", \"" + _clazz.getClassName() + "\", il, _cp);");
-        _out.println();
-        BCELFactory factory = new BCELFactory(mg, _out);
-        factory.start();
-        _out.println("    method.setMaxStack();");
-        _out.println("    method.setMaxLocals();");
-        _out.println("    _cg.addMethod(method.getMethod());");
-        _out.println("    il.dispose();");
-    }
-
-
-    static String printFlags( int flags ) {
-        return printFlags(flags, FLAG_FOR_UNKNOWN);
-    }
-
-
-    static String printFlags( int flags, int reason ) {
-        if (flags == 0) {
-            return "0";
-        }
-        StringBuilder buf = new StringBuilder();
-        for (int i = 0, pow = 1; pow <= Constants.MAX_ACC_FLAG; i++) {
-            if ((flags & pow) != 0) {
-                if ((pow == Constants.ACC_SYNCHRONIZED) && (reason == FLAG_FOR_CLASS)) {
-                    buf.append("ACC_SUPER | ");
-                } else if ((pow == Constants.ACC_VOLATILE) && (reason == FLAG_FOR_METHOD)) {
-                    buf.append("ACC_BRIDGE | ");
-                } else if ((pow == Constants.ACC_TRANSIENT) && (reason == FLAG_FOR_METHOD)) {
-                    buf.append("ACC_VARARGS | ");
-                } else {
-                    buf.append("ACC_")
-                            .append(Constants.ACCESS_NAMES[i].toUpperCase(Locale.ENGLISH)).append(
-                                    " | ");
-                }
-            }
-            pow <<= 1;
-        }
-        String str = buf.toString();
-        return str.substring(0, str.length() - 3);
-    }
-
-
-    static String printArgumentTypes( Type[] arg_types ) {
-        if (arg_types.length == 0) {
-            return "Type.NO_ARGS";
-        }
-        StringBuilder args = new StringBuilder();
-        for (int i = 0; i < arg_types.length; i++) {
-            args.append(printType(arg_types[i]));
-            if (i < arg_types.length - 1) {
-                args.append(", ");
-            }
-        }
-        return "new Type[] { " + args.toString() + " }";
-    }
-
-
-    static String printType( Type type ) {
-        return printType(type.getSignature());
-    }
-
-
-    static String printType( String signature ) {
-        Type type = Type.getType(signature);
-        byte t = type.getType();
-        if (t <= Constants.T_VOID) {
-            return "Type." + Constants.TYPE_NAMES[t].toUpperCase(Locale.ENGLISH);
-        } else if (type.toString().equals("java.lang.String")) {
-            return "Type.STRING";
-        } else if (type.toString().equals("java.lang.Object")) {
-            return "Type.OBJECT";
-        } else if (type.toString().equals("java.lang.StringBuffer")) {
-            return "Type.STRINGBUFFER";
-        } else if (type instanceof ArrayType) {
-            ArrayType at = (ArrayType) type;
-            return "new ArrayType(" + printType(at.getBasicType()) + ", " + at.getDimensions()
-                    + ")";
-        } else {
-            return "new ObjectType(\"" + Utility.signatureToString(signature, false) + "\")";
-        }
-    }
-
-
-    /** Default main method
-     */
-    public static void main( String[] argv ) throws Exception {
-        JavaClass java_class;
-        String name = argv[0];
-        if ((java_class = Repository.lookupClass(name)) == null) {
-            java_class = new ClassParser(name).parse(); // May throw IOException
-        }
-        BCELifier bcelifier = new BCELifier(java_class, System.out);
-        bcelifier.start();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ByteSequence.java b/src/main/java/org/apache/bcel/util/ByteSequence.java
deleted file mode 100644
index 72541ee..0000000
--- a/src/main/java/org/apache/bcel/util/ByteSequence.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-
-/**
- * Utility class that implements a sequence of bytes which can be read
- * via the `readByte()' method. This is used to implement a wrapper for the 
- * Java byte code stream to gain some more readability.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public final class ByteSequence extends DataInputStream {
-
-    private final ByteArrayStream byteStream;
-
-
-    public ByteSequence(byte[] bytes) {
-        super(new ByteArrayStream(bytes));
-        byteStream = (ByteArrayStream) in;
-    }
-
-
-    public final int getIndex() {
-        return byteStream.getPosition();
-    }
-
-
-    final void unreadByte() {
-        byteStream.unreadByte();
-    }
-
-    private static final class ByteArrayStream extends ByteArrayInputStream {
-
-        ByteArrayStream(byte[] bytes) {
-            super(bytes);
-        }
-
-        final int getPosition() {
-            // pos is protected in ByteArrayInputStream
-            return pos;
-        }
-
-        final void unreadByte() {
-            if (pos > 0) {
-                pos--;
-            }
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/Class2HTML.java b/src/main/java/org/apache/bcel/util/Class2HTML.java
deleted file mode 100644
index bce475e..0000000
--- a/src/main/java/org/apache/bcel/util/Class2HTML.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Utility;
-
-/**
- * Read class file(s) and convert them into HTML files.
- *
- * Given a JavaClass object "class" that is in package "package" five files
- * will be created in the specified directory.
- *
- * <OL>
- * <LI> "package"."class".html as the main file which defines the frames for
- * the following subfiles.
- * <LI>  "package"."class"_attributes.html contains all (known) attributes found in the file
- * <LI>  "package"."class"_cp.html contains the constant pool
- * <LI>  "package"."class"_code.html contains the byte code
- * <LI>  "package"."class"_methods.html contains references to all methods and fields of the class
- * </OL>
- *
- * All subfiles reference each other appropiately, e.g. clicking on a
- * method in the Method's frame will jump to the appropiate method in
- * the Code frame.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
- */
-public class Class2HTML implements Constants {
-
-    private final JavaClass java_class; // current class object
-    private final String dir;
-    private static String class_package; // name of package, unclean to make it static, but ...
-    private static String class_name; // name of current class, dito
-    private static ConstantPool constant_pool;
-
-
-    /**
-     * Write contents of the given JavaClass into HTML files.
-     * 
-     * @param java_class The class to write
-     * @param dir The directory to put the files in
-     */
-    public Class2HTML(JavaClass java_class, String dir) throws IOException {
-        Method[] methods = java_class.getMethods();
-        this.java_class = java_class;
-        this.dir = dir;
-        class_name = java_class.getClassName(); // Remember full name
-        constant_pool = java_class.getConstantPool();
-        // Get package name by tacking off everything after the last `.'
-        int index = class_name.lastIndexOf('.');
-        if (index > -1) {
-            class_package = class_name.substring(0, index);
-        } else {
-            class_package = ""; // default package
-        }
-        ConstantHTML constant_html = new ConstantHTML(dir, class_name, class_package, methods,
-                constant_pool);
-        /* Attributes can't be written in one step, so we just open a file
-         * which will be written consequently.
-         */
-        AttributeHTML attribute_html = new AttributeHTML(dir, class_name, constant_pool,
-                constant_html);
-//        MethodHTML method_html = new MethodHTML(dir, class_name, methods, java_class.getFields(),
-//                constant_html, attribute_html);
-        // Write main file (with frames, yuk)
-        writeMainHTML(attribute_html);
-        new CodeHTML(dir, class_name, methods, constant_pool, constant_html);
-        attribute_html.close();
-    }
-
-
-    public static void main( String argv[] ) {
-        String[] file_name = new String[argv.length];
-        int files = 0;
-        ClassParser parser = null;
-        JavaClass java_class = null;
-        String zip_file = null;
-        char sep = File.separatorChar;
-        String dir = "." + sep; // Where to store HTML files
-        try {
-            /* Parse command line arguments.
-             */
-            for (int i = 0; i < argv.length; i++) {
-                if (argv[i].charAt(0) == '-') { // command line switch
-                    if (argv[i].equals("-d")) { // Specify target directory, default `.�
-                        dir = argv[++i];
-                        if (!dir.endsWith("" + sep)) {
-                            dir = dir + sep;
-                        }
-                        new File(dir).mkdirs(); // Create target directory if necessary
-                    } else if (argv[i].equals("-zip")) {
-                        zip_file = argv[++i];
-                    } else {
-                        System.out.println("Unknown option " + argv[i]);
-                    }
-                } else {
-                    file_name[files++] = argv[i];
-                }
-            }
-            if (files == 0) {
-                System.err.println("Class2HTML: No input files specified.");
-            } else { // Loop through files ...
-                for (int i = 0; i < files; i++) {
-                    System.out.print("Processing " + file_name[i] + "...");
-                    if (zip_file == null) {
-                        parser = new ClassParser(file_name[i]); // Create parser object from file
-                    } else {
-                        parser = new ClassParser(zip_file, file_name[i]); // Create parser object from zip file
-                    }
-                    java_class = parser.parse();
-                    new Class2HTML(java_class, dir);
-                    System.out.println("Done.");
-                }
-            }
-        } catch (Exception e) {
-            System.out.println(e);
-            e.printStackTrace(System.out);
-        }
-    }
-
-
-    /**
-     * Utility method that converts a class reference in the constant pool,
-     * i.e., an index to a string.
-     */
-    static String referenceClass( int index ) {
-        String str = constant_pool.getConstantString(index, CONSTANT_Class);
-        str = Utility.compactClassName(str);
-        str = Utility.compactClassName(str, class_package + ".", true);
-        return "<A HREF=\"" + class_name + "_cp.html#cp" + index + "\" TARGET=ConstantPool>" + str
-                + "</A>";
-    }
-
-
-    static String referenceType( String type ) {
-        String short_type = Utility.compactClassName(type);
-        short_type = Utility.compactClassName(short_type, class_package + ".", true);
-        int index = type.indexOf('['); // Type is an array?
-        String base_type = type;
-        if (index > -1) {
-            base_type = type.substring(0, index); // Tack of the `['
-        }
-        // test for basic type
-        if (base_type.equals("int") || base_type.equals("short") || base_type.equals("boolean")
-                || base_type.equals("void") || base_type.equals("char") || base_type.equals("byte")
-                || base_type.equals("long") || base_type.equals("double")
-                || base_type.equals("float")) {
-            return "<FONT COLOR=\"#00FF00\">" + type + "</FONT>";
-        }
-        return "<A HREF=\"" + base_type + ".html\" TARGET=_top>" + short_type + "</A>";
-    }
-
-
-    static String toHTML( String str ) {
-        StringBuilder buf = new StringBuilder();
-        try { // Filter any characters HTML doesn't like such as < and > in particular
-            for (int i = 0; i < str.length(); i++) {
-                char ch;
-                switch (ch = str.charAt(i)) {
-                    case '<':
-                        buf.append("&lt;");
-                        break;
-                    case '>':
-                        buf.append("&gt;");
-                        break;
-                    case '\n':
-                        buf.append("\\n");
-                        break;
-                    case '\r':
-                        buf.append("\\r");
-                        break;
-                    default:
-                        buf.append(ch);
-                }
-            }
-        } catch (StringIndexOutOfBoundsException e) {
-        } // Never occurs
-        return buf.toString();
-    }
-
-
-    private void writeMainHTML( AttributeHTML attribute_html ) throws IOException {
-        PrintWriter file = new PrintWriter(new FileOutputStream(dir + class_name + ".html"));
-        Attribute[] attributes = java_class.getAttributes();
-        file.println("<HTML>\n" + "<HEAD><TITLE>Documentation for " + class_name + "</TITLE>"
-                + "</HEAD>\n" + "<FRAMESET BORDER=1 cols=\"30%,*\">\n"
-                + "<FRAMESET BORDER=1 rows=\"80%,*\">\n" + "<FRAME NAME=\"ConstantPool\" SRC=\""
-                + class_name + "_cp.html" + "\"\n MARGINWIDTH=\"0\" "
-                + "MARGINHEIGHT=\"0\" FRAMEBORDER=\"1\" SCROLLING=\"AUTO\">\n"
-                + "<FRAME NAME=\"Attributes\" SRC=\"" + class_name + "_attributes.html"
-                + "\"\n MARGINWIDTH=\"0\" "
-                + "MARGINHEIGHT=\"0\" FRAMEBORDER=\"1\" SCROLLING=\"AUTO\">\n" + "</FRAMESET>\n"
-                + "<FRAMESET BORDER=1 rows=\"80%,*\">\n" + "<FRAME NAME=\"Code\" SRC=\""
-                + class_name + "_code.html\"\n MARGINWIDTH=0 "
-                + "MARGINHEIGHT=0 FRAMEBORDER=1 SCROLLING=\"AUTO\">\n"
-                + "<FRAME NAME=\"Methods\" SRC=\"" + class_name
-                + "_methods.html\"\n MARGINWIDTH=0 "
-                + "MARGINHEIGHT=0 FRAMEBORDER=1 SCROLLING=\"AUTO\">\n"
-                + "</FRAMESET></FRAMESET></HTML>");
-        file.close();
-        for (int i = 0; i < attributes.length; i++) {
-            attribute_html.writeAttribute(attributes[i], "class" + i);
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ClassLoader.java b/src/main/java/org/apache/bcel/util/ClassLoader.java
deleted file mode 100644
index dee61fc..0000000
--- a/src/main/java/org/apache/bcel/util/ClassLoader.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.ByteArrayInputStream;
-import java.util.Hashtable;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Utility;
-
-/**
- * <p>Drop in replacement for the standard class loader of the JVM. You can use it
- * in conjunction with the JavaWrapper to dynamically modify/create classes
- * as they're requested.</p>
- *
- * <p>This class loader recognizes special requests in a distinct
- * format, i.e., when the name of the requested class contains with
- * "$$BCEL$$" it calls the createClass() method with that name
- * (everything bevor the $$BCEL$$ is considered to be the package
- * name. You can subclass the class loader and override that
- * method. "Normal" classes class can be modified by overriding the
- * modifyClass() method which is called just before defineClass().</p>
- *
- * <p>There may be a number of packages where you have to use the
- * default class loader (which may also be faster). You can define the
- * set of packages where to use the system class loader in the
- * constructor. The default value contains "java.", "sun.",
- * "javax."</p>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see JavaWrapper
- * @see ClassPath
- */
-public class ClassLoader extends java.lang.ClassLoader {
-
-    public static final String[] DEFAULT_IGNORED_PACKAGES = {
-            "java.", "javax.", "sun."
-    };
-    private final Hashtable<String, Class<?>> classes = new Hashtable<String, Class<?>>(); // Hashtable is synchronized thus thread-safe
-    private final String[] ignored_packages;
-    private Repository repository = SyntheticRepository.getInstance();
-
-
-    /** Ignored packages are by default ( "java.", "sun.",
-     * "javax."), i.e. loaded by system class loader
-     */
-    public ClassLoader() {
-        this(DEFAULT_IGNORED_PACKAGES);
-    }
-
-
-    /** @param deferTo delegate class loader to use for ignored packages
-     */
-    public ClassLoader(java.lang.ClassLoader deferTo) {
-        super(deferTo);
-        this.ignored_packages = DEFAULT_IGNORED_PACKAGES;
-        this.repository = new ClassLoaderRepository(deferTo);
-    }
-
-
-    /** @param ignored_packages classes contained in these packages will be loaded
-     * with the system class loader
-     */
-    public ClassLoader(String[] ignored_packages) {
-        this.ignored_packages = ignored_packages;
-    }
-
-
-    /** @param ignored_packages classes contained in these packages will be loaded
-     * with the system class loader
-     * @param deferTo delegate class loader to use for ignored packages
-     */
-    public ClassLoader(java.lang.ClassLoader deferTo, String[] ignored_packages) {
-        this(ignored_packages);
-        this.repository = new ClassLoaderRepository(deferTo);
-    }
-
-    @Override
-    protected Class<?> loadClass( String class_name, boolean resolve ) throws ClassNotFoundException {
-        Class<?> cl = null;
-        /* First try: lookup hash table.
-         */
-        if ((cl = classes.get(class_name)) == null) {
-            /* Second try: Load system class using system class loader. You better
-             * don't mess around with them.
-             */
-            for (String ignored_package : ignored_packages) {
-                if (class_name.startsWith(ignored_package)) {
-                    cl = getParent().loadClass(class_name);
-                    break;
-                }
-            }
-            if (cl == null) {
-                JavaClass clazz = null;
-                /* Third try: Special request?
-                 */
-                if (class_name.contains("$$BCEL$$")) {
-                    clazz = createClass(class_name);
-                } else { // Fourth try: Load classes via repository
-                    if ((clazz = repository.loadClass(class_name)) != null) {
-                        clazz = modifyClass(clazz);
-                    } else {
-                        throw new ClassNotFoundException(class_name);
-                    }
-                }
-                if (clazz != null) {
-                    byte[] bytes = clazz.getBytes();
-                    cl = defineClass(class_name, bytes, 0, bytes.length);
-                } else {
-                    cl = Class.forName(class_name);
-                }
-            }
-            if (resolve) {
-                resolveClass(cl);
-            }
-        }
-        classes.put(class_name, cl);
-        return cl;
-    }
-
-
-    /** Override this method if you want to alter a class before it gets actually
-     * loaded. Does nothing by default.
-     */
-    protected JavaClass modifyClass( JavaClass clazz ) {
-        return clazz;
-    }
-
-
-    /** 
-     * Override this method to create you own classes on the fly. The
-     * name contains the special token $$BCEL$$. Everything before that
-     * token is consddered to be a package name. You can encode you own
-     * arguments into the subsequent string. You must regard however not
-     * to use any "illegal" characters, i.e., characters that may not
-     * appear in a Java class name too<br>
-     *
-     * The default implementation interprets the string as a encoded compressed
-     * Java class, unpacks and decodes it with the Utility.decode() method, and
-     * parses the resulting byte array and returns the resulting JavaClass object.
-     *
-     * @param class_name compressed byte code with "$$BCEL$$" in it
-     */
-    protected JavaClass createClass( String class_name ) {
-        int index = class_name.indexOf("$$BCEL$$");
-        String real_name = class_name.substring(index + 8);
-        JavaClass clazz = null;
-        try {
-            byte[] bytes = Utility.decode(real_name, true);
-            ClassParser parser = new ClassParser(new ByteArrayInputStream(bytes), "foo");
-            clazz = parser.parse();
-        } catch (Throwable e) {
-            e.printStackTrace();
-            return null;
-        }
-        // Adapt the class name to the passed value
-        ConstantPool cp = clazz.getConstantPool();
-        ConstantClass cl = (ConstantClass) cp.getConstant(clazz.getClassNameIndex(),
-                Constants.CONSTANT_Class);
-        ConstantUtf8 name = (ConstantUtf8) cp.getConstant(cl.getNameIndex(),
-                Constants.CONSTANT_Utf8);
-        name.setBytes(class_name.replace('.', '/'));
-        return clazz;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java b/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java
deleted file mode 100644
index 3998717..0000000
--- a/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.JavaClass;
-
-/**
- * The repository maintains information about which classes have
- * been loaded.
- *
- * It loads its data from the ClassLoader implementation
- * passed into its constructor.
- *
- * @see org.apache.bcel.Repository
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @author David Dixon-Peugh
- */
-public class ClassLoaderRepository implements Repository {
-
-    private static final long serialVersionUID = -1052781833503868187L;
-    private final java.lang.ClassLoader loader;
-    private final Map<String, JavaClass> loadedClasses = new HashMap<String, JavaClass>(); // CLASSNAME X JAVACLASS
-
-
-    public ClassLoaderRepository(java.lang.ClassLoader loader) {
-        this.loader = loader;
-    }
-
-
-    /**
-     * Store a new JavaClass into this Repository.
-     */
-    public void storeClass( JavaClass clazz ) {
-        loadedClasses.put(clazz.getClassName(), clazz);
-        clazz.setRepository(this);
-    }
-
-
-    /**
-     * Remove class from repository
-     */
-    public void removeClass( JavaClass clazz ) {
-        loadedClasses.remove(clazz.getClassName());
-    }
-
-
-    /**
-     * Find an already defined JavaClass.
-     */
-    public JavaClass findClass( String className ) {
-        return loadedClasses.containsKey(className) ? loadedClasses.get(className) : null;
-    }
-
-
-    /**
-     * Lookup a JavaClass object from the Class Name provided.
-     */
-    public JavaClass loadClass( String className ) throws ClassNotFoundException {
-        String classFile = className.replace('.', '/');
-        JavaClass RC = findClass(className);
-        if (RC != null) {
-            return RC;
-        }
-        try {
-            InputStream is = loader.getResourceAsStream(classFile + ".class");
-            if (is == null) {
-                throw new ClassNotFoundException(className + " not found.");
-            }
-            try {
-                ClassParser parser = new ClassParser(is, className);
-                RC = parser.parse();
-                storeClass(RC);
-                return RC;
-            } finally {
-                is.close();
-            }
-        } catch (IOException e) {
-            throw new ClassNotFoundException(className + " not found: " + e, e);
-        }
-    }
-
-
-    public JavaClass loadClass( Class<?> clazz ) throws ClassNotFoundException {
-        return loadClass(clazz.getName());
-    }
-
-
-    /** Clear all entries from cache.
-     */
-    public void clear() {
-        loadedClasses.clear();
-    }
-
-
-    /*
-     * @return null
-     */
-    public ClassPath getClassPath() {
-        return null;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ClassPath.java b/src/main/java/org/apache/bcel/util/ClassPath.java
deleted file mode 100644
index 109dd32..0000000
--- a/src/main/java/org/apache/bcel/util/ClassPath.java
+++ /dev/null
@@ -1,539 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Serializable;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Locale;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-/**
- * Responsible for loading (class) files from the CLASSPATH. Inspired by
- * sun.tools.ClassPath.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class ClassPath implements Serializable {
-
-    private static final long serialVersionUID = 2099441438483340671L;
-    public static final ClassPath SYSTEM_CLASS_PATH = new ClassPath();
-
-    private static final FilenameFilter ARCHIVE_FILTER = new FilenameFilter() {
-
-        public boolean accept( File dir, String name ) {
-            name = name.toLowerCase(Locale.ENGLISH);
-            return name.endsWith(".zip") || name.endsWith(".jar");
-        }
-    };
-
-    private final PathEntry[] paths;
-    private final String class_path;
-    private ClassPath parent;
-
-    public ClassPath(ClassPath parent, String class_path) {
-        this(class_path);
-        this.parent = parent;
-    }
-
-    /**
-     * Search for classes in given path.
-     * 
-     * @param class_path
-     */
-    public ClassPath(String class_path) {
-        this.class_path = class_path;
-        List<PathEntry> vec = new ArrayList<PathEntry>();
-        for (StringTokenizer tok = new StringTokenizer(class_path, File.pathSeparator); tok.hasMoreTokens();) {
-            String path = tok.nextToken();
-            if (!path.equals("")) {
-                File file = new File(path);
-                try {
-                    if (file.exists()) {
-                        if (file.isDirectory()) {
-                            vec.add(new Dir(path));
-                        } else {
-                            vec.add(new Zip(new ZipFile(file)));
-                        }
-                    }
-                } catch (IOException e) {
-                    if (path.endsWith(".zip") || path.endsWith(".jar")) {
-                        System.err.println("CLASSPATH component " + file + ": " + e);
-                    }
-                }
-            }
-        }
-        paths = new PathEntry[vec.size()];
-        vec.toArray(paths);
-    }
-
-
-    /**
-     * Search for classes in CLASSPATH.
-     * @deprecated Use SYSTEM_CLASS_PATH constant
-     */
-    @Deprecated
-    public ClassPath() {
-        this(getClassPath());
-    }
-
-
-    /** @return used class path string
-     */
-    @Override
-    public String toString() {
-        if (parent != null) {
-            return parent.toString() + File.pathSeparator + class_path;
-        }
-        return class_path;
-    }
-
-    @Override
-    public int hashCode() {
-        if (parent != null) {
-            return class_path.hashCode() + parent.hashCode();            
-        }
-        return class_path.hashCode();
-    }
-
-
-    @Override
-    public boolean equals( Object o ) {
-        if (o instanceof ClassPath) {
-            ClassPath cp = (ClassPath)o;
-            return class_path.equals(cp.toString());
-        }
-        return false;
-    }
-
-
-    private static void getPathComponents( String path, List<String> list ) {
-        if (path != null) {
-            StringTokenizer tok = new StringTokenizer(path, File.pathSeparator);
-            while (tok.hasMoreTokens()) {
-                String name = tok.nextToken();
-                File file = new File(name);
-                if (file.exists()) {
-                    list.add(name);
-                }
-            }
-        }
-    }
-
-
-    /** Checks for class path components in the following properties:
-     * "java.class.path", "sun.boot.class.path", "java.ext.dirs"
-     *
-     * @return class path as used by default by BCEL
-     */
-    public static String getClassPath() {
-        String class_path = System.getProperty("java.class.path");
-        String boot_path = System.getProperty("sun.boot.class.path");
-        String ext_path = System.getProperty("java.ext.dirs");
-        List<String> list = new ArrayList<String>();
-        getPathComponents(class_path, list);
-        getPathComponents(boot_path, list);
-        List<String> dirs = new ArrayList<String>();
-        getPathComponents(ext_path, dirs);
-        for (String d : dirs) {
-            File ext_dir = new File(d);
-            String[] extensions = ext_dir.list(ARCHIVE_FILTER);
-            if (extensions != null) {
-                for (String extension : extensions) {
-                    list.add(ext_dir.getPath() + File.separatorChar + extension);
-                }
-            }
-        }
-        StringBuilder buf = new StringBuilder();
-        String separator = "";
-        for (String path : list) {
-            buf.append(separator);
-            separator = File.pathSeparator;
-            buf.append(path);
-        }
-        return buf.toString().intern();
-    }
-
-
-    /**
-     * @param name fully qualified class name, e.g. java.lang.String
-     * @return input stream for class
-     */
-    public InputStream getInputStream( String name ) throws IOException {
-        return getInputStream(name.replace('.', '/'), ".class");
-    }
-
-
-    /**
-     * Return stream for class or resource on CLASSPATH.
-     *
-     * @param name fully qualified file name, e.g. java/lang/String
-     * @param suffix file name ends with suff, e.g. .java
-     * @return input stream for file on class path
-     */
-    public InputStream getInputStream( String name, String suffix ) throws IOException {
-        InputStream is = null;
-        try {
-            is = getClass().getClassLoader().getResourceAsStream(name + suffix);
-        } catch (Exception e) {
-        }
-        if (is != null) {
-            return is;
-        }
-        return getClassFile(name, suffix).getInputStream();
-    }
-
-    /**
-     * @param name fully qualified resource name, e.g. java/lang/String.class
-     * @return InputStream supplying the resource, or null if no resource with that name.
-     */
-    public InputStream getResourceAsStream(String name) {
-        for (PathEntry path : paths) {
-            InputStream is;
-            if ((is = path.getResourceAsStream(name)) != null) {
-                return is;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * @param name fully qualified resource name, e.g. java/lang/String.class
-     * @return URL supplying the resource, or null if no resource with that name.
-     */
-    public URL getResource(String name) {
-        for (PathEntry path : paths) {
-            URL url;
-            if ((url = path.getResource(name)) != null) {
-                return url;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * @param name fully qualified resource name, e.g. java/lang/String.class
-     * @return An Enumeration of URLs supplying the resource, or an
-     * empty Enumeration if no resource with that name.
-     */
-    public Enumeration<URL> getResources(String name) {
-        Vector<URL> results = new Vector<URL>();
-        for (PathEntry path : paths) {
-            URL url;
-            if ((url = path.getResource(name)) != null) {
-                results.add(url);
-            }
-        }
-        return results.elements();
-    }
-
-    /**
-     * @param name fully qualified file name, e.g. java/lang/String
-     * @param suffix file name ends with suff, e.g. .java
-     * @return class file for the java class
-     */
-    public ClassFile getClassFile( String name, String suffix ) throws IOException {
-        ClassFile cf = null;
-
-        if (parent != null) {
-            cf = parent.getClassFileInternal(name, suffix);
-        }
-
-        if (cf == null) {
-            cf = getClassFileInternal(name, suffix);
-        }
-
-        if (cf != null) {
-            return cf;
-        }
-
-        throw new IOException("Couldn't find: " + name + suffix);
-    }
-
-    private ClassFile getClassFileInternal(String name, String suffix) throws IOException {
-
-      for (PathEntry path : paths) {
-          ClassFile cf = path.getClassFile(name, suffix);
-
-          if(cf != null) {
-              return cf;
-          }
-      }
-
-      return null;
-   }
-
-
-    /**
-     * @param name fully qualified class name, e.g. java.lang.String
-     * @return input stream for class
-     */
-    public ClassFile getClassFile( String name ) throws IOException {
-        return getClassFile(name, ".class");
-    }
-
-
-    /**
-     * @param name fully qualified file name, e.g. java/lang/String
-     * @param suffix file name ends with suffix, e.g. .java
-     * @return byte array for file on class path
-     */
-    public byte[] getBytes( String name, String suffix ) throws IOException {
-        DataInputStream dis = null;
-        try {
-            InputStream is = getInputStream(name, suffix);
-            if (is == null) {
-                throw new IOException("Couldn't find: " + name + suffix);
-            }
-            dis = new DataInputStream(is);
-            byte[] bytes = new byte[is.available()];
-            dis.readFully(bytes);
-            return bytes;
-        } finally {
-            if (dis != null) {
-                dis.close();
-            }
-        }
-    }
-
-
-    /**
-     * @return byte array for class
-     */
-    public byte[] getBytes( String name ) throws IOException {
-        return getBytes(name, ".class");
-    }
-
-
-    /**
-     * @param name name of file to search for, e.g. java/lang/String.java
-     * @return full (canonical) path for file
-     */
-    public String getPath( String name ) throws IOException {
-        int index = name.lastIndexOf('.');
-        String suffix = "";
-        if (index > 0) {
-            suffix = name.substring(index);
-            name = name.substring(0, index);
-        }
-        return getPath(name, suffix);
-    }
-
-
-    /**
-     * @param name name of file to search for, e.g. java/lang/String
-     * @param suffix file name suffix, e.g. .java
-     * @return full (canonical) path for file, if it exists
-     */
-    public String getPath( String name, String suffix ) throws IOException {
-        return getClassFile(name, suffix).getPath();
-    }
-
-    private static abstract class PathEntry implements Serializable {
-
-        private static final long serialVersionUID = 6828494485207666122L;
-        abstract ClassFile getClassFile( String name, String suffix ) throws IOException;
-        abstract URL getResource(String name);
-        abstract InputStream getResourceAsStream(String name);
-    }
-
-    /** Contains information about file/ZIP entry of the Java class.
-     */
-    public interface ClassFile {
-
-        /** @return input stream for class file.
-         */
-        public abstract InputStream getInputStream() throws IOException;
-
-
-        /** @return canonical path to class file.
-         */
-        public abstract String getPath();
-
-
-        /** @return base path of found class, i.e. class is contained relative
-         * to that path, which may either denote a directory, or zip file
-         */
-        public abstract String getBase();
-
-
-        /** @return modification time of class file.
-         */
-        public abstract long getTime();
-
-
-        /** @return size of class file.
-         */
-        public abstract long getSize();
-    }
-
-    private static class Dir extends PathEntry {
-
-        private static final long serialVersionUID = 4374062802142373088L;
-        private final String dir;
-
-
-        Dir(String d) {
-            dir = d;
-        }
-
-        @Override
-        URL getResource(String name) {
-            // Resource specification uses '/' whatever the platform
-            final File file = new File(dir + File.separatorChar + name.replace('/', File.separatorChar));
-            try {
-                return file.exists() ? file.toURI().toURL() : null;
-            } catch (MalformedURLException e) {
-               return null;
-            }
-        }
-
-        @Override
-        InputStream getResourceAsStream(String name) {
-            // Resource specification uses '/' whatever the platform
-            final File file = new File(dir + File.separatorChar + name.replace('/', File.separatorChar));
-            try {
-               return file.exists() ? new FileInputStream(file) : null;
-            } catch (IOException e) {
-               return null;
-            }
-        }
-
-        @Override
-        ClassFile getClassFile( String name, String suffix ) throws IOException {
-            final File file = new File(dir + File.separatorChar
-                    + name.replace('.', File.separatorChar) + suffix);
-            return file.exists() ? new ClassFile() {
-
-                public InputStream getInputStream() throws IOException {
-                    return new FileInputStream(file);
-                }
-
-
-                public String getPath() {
-                    try {
-                        return file.getCanonicalPath();
-                    } catch (IOException e) {
-                        return null;
-                    }
-                }
-
-
-                public long getTime() {
-                    return file.lastModified();
-                }
-
-
-                public long getSize() {
-                    return file.length();
-                }
-
-
-                public String getBase() {
-                    return dir;
-                }
-            } : null;
-        }
-
-
-        @Override
-        public String toString() {
-            return dir;
-        }
-    }
-
-    private static class Zip extends PathEntry {
-
-        private static final long serialVersionUID = -2210747632897905532L;
-        private final ZipFile zip;
-
-
-        Zip(ZipFile z) {
-            zip = z;
-        }
-
-        @Override
-        URL getResource(String name) {
-            final ZipEntry entry = zip.getEntry(name);
-            try {
-                return (entry != null) ? new URL("jar:file:" + zip.getName() + "!/" + name) : null;
-            } catch (MalformedURLException e) {
-                return null;
-           }
-        }
-
-        @Override
-        InputStream getResourceAsStream(String name) {
-            final ZipEntry entry = zip.getEntry(name);
-            try {
-                return (entry != null) ? zip.getInputStream(entry) : null;
-            } catch (IOException e) {
-                return null;
-            }
-        }
-
-        @Override
-        ClassFile getClassFile( String name, String suffix ) throws IOException {
-            final ZipEntry entry = zip.getEntry(name.replace('.', '/') + suffix);
-
-            if (entry == null) {
-                return null;
-            }
-
-            return new ClassFile() {
-
-                public InputStream getInputStream() throws IOException {
-                    return zip.getInputStream(entry);
-                }
-
-
-                public String getPath() {
-                    return entry.toString();
-                }
-
-
-                public long getTime() {
-                    return entry.getTime();
-                }
-
-
-                public long getSize() {
-                    return entry.getSize();
-                }
-
-
-                public String getBase() {
-                    return zip.getName();
-                }
-            };
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ClassQueue.java b/src/main/java/org/apache/bcel/util/ClassQueue.java
deleted file mode 100644
index e33b593..0000000
--- a/src/main/java/org/apache/bcel/util/ClassQueue.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.util.LinkedList;
-import org.apache.bcel.classfile.JavaClass;
-
-/** 
- * Utility class implementing a (typesafe) queue of JavaClass
- * objects.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
- */
-public class ClassQueue implements java.io.Serializable {
-
-    private static final long serialVersionUID = 685144104322420292L;
-    protected LinkedList<JavaClass> vec = new LinkedList<JavaClass>();
-
-
-    public void enqueue( JavaClass clazz ) {
-        vec.addLast(clazz);
-    }
-
-
-    public JavaClass dequeue() {
-        return vec.removeFirst();
-    }
-
-
-    public boolean empty() {
-        return vec.isEmpty();
-    }
-
-
-    @Override
-    public String toString() {
-        return vec.toString();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ClassSet.java b/src/main/java/org/apache/bcel/util/ClassSet.java
deleted file mode 100644
index 5c70506..0000000
--- a/src/main/java/org/apache/bcel/util/ClassSet.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.bcel.classfile.JavaClass;
-
-/** 
- * Utility class implementing a (typesafe) set of JavaClass objects.
- * Since JavaClass has no equals() method, the name of the class is
- * used for comparison.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
- * @see ClassStack
- */
-public class ClassSet implements java.io.Serializable {
-
-    private static final long serialVersionUID = -7476907380350035254L;
-    private final Map<String, JavaClass> _map = new HashMap<String, JavaClass>();
-
-
-    public boolean add( JavaClass clazz ) {
-        boolean result = false;
-        if (!_map.containsKey(clazz.getClassName())) {
-            result = true;
-            _map.put(clazz.getClassName(), clazz);
-        }
-        return result;
-    }
-
-
-    public void remove( JavaClass clazz ) {
-        _map.remove(clazz.getClassName());
-    }
-
-
-    public boolean empty() {
-        return _map.isEmpty();
-    }
-
-
-    public JavaClass[] toArray() {
-        Collection<JavaClass> values = _map.values();
-        JavaClass[] classes = new JavaClass[values.size()];
-        values.toArray(classes);
-        return classes;
-    }
-
-
-    public String[] getClassNames() {
-        return _map.keySet().toArray(new String[_map.keySet().size()]);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ClassStack.java b/src/main/java/org/apache/bcel/util/ClassStack.java
deleted file mode 100644
index a59cb98..0000000
--- a/src/main/java/org/apache/bcel/util/ClassStack.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.util.Stack;
-import org.apache.bcel.classfile.JavaClass;
-
-/** 
- * Utility class implementing a (typesafe) stack of JavaClass objects.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
- * @see Stack
- */
-public class ClassStack implements java.io.Serializable {
-
-    private static final long serialVersionUID = 6126079269396985982L;
-    private final Stack<JavaClass> stack = new Stack<JavaClass>();
-
-
-    public void push( JavaClass clazz ) {
-        stack.push(clazz);
-    }
-
-
-    public JavaClass pop() {
-        return stack.pop();
-    }
-
-
-    public JavaClass top() {
-        return stack.peek();
-    }
-
-
-    public boolean empty() {
-        return stack.empty();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ClassVector.java b/src/main/java/org/apache/bcel/util/ClassVector.java
deleted file mode 100644
index 6051d74..0000000
--- a/src/main/java/org/apache/bcel/util/ClassVector.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.bcel.classfile.JavaClass;
-
-/** 
- * Utility class implementing a (typesafe) collection of JavaClass
- * objects. Contains the most important methods of a Vector.
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
- * 
- * @deprecated as of 5.1.1 - 7/17/2005
- */
-@Deprecated
-public class ClassVector implements java.io.Serializable {
-
-    private static final long serialVersionUID = 5600397075672780806L;
-    protected List<JavaClass> vec = new ArrayList<JavaClass>();
-
-
-    public void addElement( JavaClass clazz ) {
-        vec.add(clazz);
-    }
-
-
-    public JavaClass elementAt( int index ) {
-        return vec.get(index);
-    }
-
-
-    public void removeElementAt( int index ) {
-        vec.remove(index);
-    }
-
-
-    public JavaClass[] toArray() {
-        JavaClass[] classes = new JavaClass[vec.size()];
-        vec.toArray(classes);
-        return classes;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/CodeHTML.java b/src/main/java/org/apache/bcel/util/CodeHTML.java
deleted file mode 100644
index cd10de4..0000000
--- a/src/main/java/org/apache/bcel/util/CodeHTML.java
+++ /dev/null
@@ -1,578 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.BitSet;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.CodeException;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantInterfaceMethodref;
-import org.apache.bcel.classfile.ConstantInvokeDynamic;
-import org.apache.bcel.classfile.ConstantMethodref;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.LocalVariable;
-import org.apache.bcel.classfile.LocalVariableTable;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Utility;
-
-/**
- * Convert code into HTML file.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * 
- */
-final class CodeHTML implements org.apache.bcel.Constants {
-
-    private final String class_name; // name of current class
-//    private Method[] methods; // Methods to print
-    private final PrintWriter file; // file to write to
-    private BitSet goto_set;
-    private final ConstantPool constant_pool;
-    private final ConstantHTML constant_html;
-    private static boolean wide = false;
-
-
-    CodeHTML(String dir, String class_name, Method[] methods, ConstantPool constant_pool,
-            ConstantHTML constant_html) throws IOException {
-        this.class_name = class_name;
-//        this.methods = methods;
-        this.constant_pool = constant_pool;
-        this.constant_html = constant_html;
-        file = new PrintWriter(new FileOutputStream(dir + class_name + "_code.html"));
-        file.println("<HTML><BODY BGCOLOR=\"#C0C0C0\">");
-        for (int i = 0; i < methods.length; i++) {
-            writeMethod(methods[i], i);
-        }
-        file.println("</BODY></HTML>");
-        file.close();
-    }
-
-
-    /**
-     * Disassemble a stream of byte codes and return the
-     * string representation.
-     *
-     * @param  stream data input stream
-     * @return String representation of byte code
-     */
-    private String codeToHTML( ByteSequence bytes, int method_number ) throws IOException {
-        short opcode = (short) bytes.readUnsignedByte();
-        StringBuilder buf;
-        String name, signature;
-        int default_offset = 0, low, high;
-        int index, class_index, vindex, constant;
-        int[] jump_table;
-        int no_pad_bytes = 0, offset;
-        buf = new StringBuilder(256);
-        buf.append("<TT>").append(OPCODE_NAMES[opcode]).append("</TT></TD><TD>");
-        /* Special case: Skip (0-3) padding bytes, i.e., the
-         * following bytes are 4-byte-aligned
-         */
-        if ((opcode == TABLESWITCH) || (opcode == LOOKUPSWITCH)) {
-            int remainder = bytes.getIndex() % 4;
-            no_pad_bytes = (remainder == 0) ? 0 : 4 - remainder;
-            for (int i = 0; i < no_pad_bytes; i++) {
-                bytes.readByte();
-            }
-            // Both cases have a field default_offset in common
-            default_offset = bytes.readInt();
-        }
-        switch (opcode) {
-            case TABLESWITCH:
-                low = bytes.readInt();
-                high = bytes.readInt();
-                offset = bytes.getIndex() - 12 - no_pad_bytes - 1;
-                default_offset += offset;
-                buf.append("<TABLE BORDER=1><TR>");
-                // Print switch indices in first row (and default)
-                jump_table = new int[high - low + 1];
-                for (int i = 0; i < jump_table.length; i++) {
-                    jump_table[i] = offset + bytes.readInt();
-                    buf.append("<TH>").append(low + i).append("</TH>");
-                }
-                buf.append("<TH>default</TH></TR>\n<TR>");
-                // Print target and default indices in second row
-            for (int element : jump_table) {
-                buf.append("<TD><A HREF=\"#code").append(method_number).append("@").append(
-                        element).append("\">").append(element).append("</A></TD>");
-            }
-                buf.append("<TD><A HREF=\"#code").append(method_number).append("@").append(
-                        default_offset).append("\">").append(default_offset).append(
-                        "</A></TD></TR>\n</TABLE>\n");
-                break;
-            /* Lookup switch has variable length arguments.
-             */
-            case LOOKUPSWITCH:
-                int npairs = bytes.readInt();
-                offset = bytes.getIndex() - 8 - no_pad_bytes - 1;
-                jump_table = new int[npairs];
-                default_offset += offset;
-                buf.append("<TABLE BORDER=1><TR>");
-                // Print switch indices in first row (and default)
-                for (int i = 0; i < npairs; i++) {
-                    int match = bytes.readInt();
-                    jump_table[i] = offset + bytes.readInt();
-                    buf.append("<TH>").append(match).append("</TH>");
-                }
-                buf.append("<TH>default</TH></TR>\n<TR>");
-                // Print target and default indices in second row
-                for (int i = 0; i < npairs; i++) {
-                    buf.append("<TD><A HREF=\"#code").append(method_number).append("@").append(
-                            jump_table[i]).append("\">").append(jump_table[i]).append("</A></TD>");
-                }
-                buf.append("<TD><A HREF=\"#code").append(method_number).append("@").append(
-                        default_offset).append("\">").append(default_offset).append(
-                        "</A></TD></TR>\n</TABLE>\n");
-                break;
-            /* Two address bytes + offset from start of byte stream form the
-             * jump target.
-             */
-            case GOTO:
-            case IFEQ:
-            case IFGE:
-            case IFGT:
-            case IFLE:
-            case IFLT:
-            case IFNE:
-            case IFNONNULL:
-            case IFNULL:
-            case IF_ACMPEQ:
-            case IF_ACMPNE:
-            case IF_ICMPEQ:
-            case IF_ICMPGE:
-            case IF_ICMPGT:
-            case IF_ICMPLE:
-            case IF_ICMPLT:
-            case IF_ICMPNE:
-            case JSR:
-                index = (bytes.getIndex() + bytes.readShort() - 1);
-                buf.append("<A HREF=\"#code").append(method_number).append("@").append(index)
-                        .append("\">").append(index).append("</A>");
-                break;
-            /* Same for 32-bit wide jumps
-             */
-            case GOTO_W:
-            case JSR_W:
-                int windex = bytes.getIndex() + bytes.readInt() - 1;
-                buf.append("<A HREF=\"#code").append(method_number).append("@").append(windex)
-                        .append("\">").append(windex).append("</A>");
-                break;
-            /* Index byte references local variable (register)
-             */
-            case ALOAD:
-            case ASTORE:
-            case DLOAD:
-            case DSTORE:
-            case FLOAD:
-            case FSTORE:
-            case ILOAD:
-            case ISTORE:
-            case LLOAD:
-            case LSTORE:
-            case RET:
-                if (wide) {
-                    vindex = bytes.readShort();
-                    wide = false; // Clear flag
-                } else {
-                    vindex = bytes.readUnsignedByte();
-                }
-                buf.append("%").append(vindex);
-                break;
-            /*
-             * Remember wide byte which is used to form a 16-bit address in the
-             * following instruction. Relies on that the method is called again with
-             * the following opcode.
-             */
-            case WIDE:
-                wide = true;
-                buf.append("(wide)");
-                break;
-            /* Array of basic type.
-             */
-            case NEWARRAY:
-                buf.append("<FONT COLOR=\"#00FF00\">").append(TYPE_NAMES[bytes.readByte()]).append(
-                        "</FONT>");
-                break;
-            /* Access object/class fields.
-             */
-            case GETFIELD:
-            case GETSTATIC:
-            case PUTFIELD:
-            case PUTSTATIC:
-                index = bytes.readShort();
-                ConstantFieldref c1 = (ConstantFieldref) constant_pool.getConstant(index,
-                        CONSTANT_Fieldref);
-                class_index = c1.getClassIndex();
-                name = constant_pool.getConstantString(class_index, CONSTANT_Class);
-                name = Utility.compactClassName(name, false);
-                index = c1.getNameAndTypeIndex();
-                String field_name = constant_pool.constantToString(index, CONSTANT_NameAndType);
-                if (name.equals(class_name)) { // Local field
-                    buf.append("<A HREF=\"").append(class_name).append("_methods.html#field")
-                            .append(field_name).append("\" TARGET=Methods>").append(field_name)
-                            .append("</A>\n");
-                } else {
-                    buf.append(constant_html.referenceConstant(class_index)).append(".").append(
-                            field_name);
-                }
-                break;
-            /* Operands are references to classes in constant pool
-             */
-            case CHECKCAST:
-            case INSTANCEOF:
-            case NEW:
-                index = bytes.readShort();
-                buf.append(constant_html.referenceConstant(index));
-                break;
-            /* Operands are references to methods in constant pool
-             */
-            case INVOKESPECIAL:
-            case INVOKESTATIC:
-            case INVOKEVIRTUAL:
-            case INVOKEINTERFACE:
-            case INVOKEDYNAMIC:
-                int m_index = bytes.readShort();
-                String str;
-                if (opcode == INVOKEINTERFACE) { // Special treatment needed
-                    bytes.readUnsignedByte(); // Redundant
-                    bytes.readUnsignedByte(); // Reserved
-//                    int nargs = bytes.readUnsignedByte(); // Redundant
-//                    int reserved = bytes.readUnsignedByte(); // Reserved
-                    ConstantInterfaceMethodref c = (ConstantInterfaceMethodref) constant_pool
-                            .getConstant(m_index, CONSTANT_InterfaceMethodref);
-                    class_index = c.getClassIndex();
-                    index = c.getNameAndTypeIndex();
-                    name = Class2HTML.referenceClass(class_index);
-                } else if (opcode == INVOKEDYNAMIC) { // Special treatment needed
-                    bytes.readUnsignedByte(); // Reserved
-                    bytes.readUnsignedByte(); // Reserved
-                    ConstantInvokeDynamic c = (ConstantInvokeDynamic) constant_pool
-                            .getConstant(m_index, CONSTANT_InvokeDynamic);
-                    index = c.getNameAndTypeIndex();
-                    name = "#" + c.getBootstrapMethodAttrIndex();
-                } else {
-                    // UNDONE: Java8 now allows INVOKESPECIAL and INVOKESTATIC to
-                    // reference EITHER a Methodref OR an InterfaceMethodref.
-                    // Not sure if that affects this code or not.  (markro)
-                    ConstantMethodref c = (ConstantMethodref) constant_pool.getConstant(m_index,
-                            CONSTANT_Methodref);
-                    class_index = c.getClassIndex();
-                    index = c.getNameAndTypeIndex();
-                name = Class2HTML.referenceClass(class_index);
-                }
-                str = Class2HTML.toHTML(constant_pool.constantToString(constant_pool.getConstant(
-                        index, CONSTANT_NameAndType)));
-                // Get signature, i.e., types
-                ConstantNameAndType c2 = (ConstantNameAndType) constant_pool.getConstant(index,
-                        CONSTANT_NameAndType);
-                signature = constant_pool.constantToString(c2.getSignatureIndex(), CONSTANT_Utf8);
-                String[] args = Utility.methodSignatureArgumentTypes(signature, false);
-                String type = Utility.methodSignatureReturnType(signature, false);
-                buf.append(name).append(".<A HREF=\"").append(class_name).append("_cp.html#cp")
-                        .append(m_index).append("\" TARGET=ConstantPool>").append(str).append(
-                                "</A>").append("(");
-                // List arguments
-                for (int i = 0; i < args.length; i++) {
-                    buf.append(Class2HTML.referenceType(args[i]));
-                    if (i < args.length - 1) {
-                        buf.append(", ");
-                    }
-                }
-                // Attach return type
-                buf.append("):").append(Class2HTML.referenceType(type));
-                break;
-            /* Operands are references to items in constant pool
-             */
-            case LDC_W:
-            case LDC2_W:
-                index = bytes.readShort();
-                buf.append("<A HREF=\"").append(class_name).append("_cp.html#cp").append(index)
-                        .append("\" TARGET=\"ConstantPool\">").append(
-                                Class2HTML.toHTML(constant_pool.constantToString(index,
-                                        constant_pool.getConstant(index).getTag()))).append("</a>");
-                break;
-            case LDC:
-                index = bytes.readUnsignedByte();
-                buf.append("<A HREF=\"").append(class_name).append("_cp.html#cp").append(index)
-                        .append("\" TARGET=\"ConstantPool\">").append(
-                                Class2HTML.toHTML(constant_pool.constantToString(index,
-                                        constant_pool.getConstant(index).getTag()))).append("</a>");
-                break;
-            /* Array of references.
-             */
-            case ANEWARRAY:
-                index = bytes.readShort();
-                buf.append(constant_html.referenceConstant(index));
-                break;
-            /* Multidimensional array of references.
-             */
-            case MULTIANEWARRAY:
-                index = bytes.readShort();
-                int dimensions = bytes.readByte();
-                buf.append(constant_html.referenceConstant(index)).append(":").append(dimensions)
-                        .append("-dimensional");
-                break;
-            /* Increment local variable.
-             */
-            case IINC:
-                if (wide) {
-                    vindex = bytes.readShort();
-                    constant = bytes.readShort();
-                    wide = false;
-                } else {
-                    vindex = bytes.readUnsignedByte();
-                    constant = bytes.readByte();
-                }
-                buf.append("%").append(vindex).append(" ").append(constant);
-                break;
-            default:
-                if (NO_OF_OPERANDS[opcode] > 0) {
-                    for (int i = 0; i < TYPE_OF_OPERANDS[opcode].length; i++) {
-                        switch (TYPE_OF_OPERANDS[opcode][i]) {
-                            case T_BYTE:
-                                buf.append(bytes.readUnsignedByte());
-                                break;
-                            case T_SHORT: // Either branch or index
-                                buf.append(bytes.readShort());
-                                break;
-                            case T_INT:
-                                buf.append(bytes.readInt());
-                                break;
-                            default: // Never reached
-                                System.err.println("Unreachable default case reached!");
-                                System.exit(-1);
-                        }
-                        buf.append("&nbsp;");
-                    }
-                }
-        }
-        buf.append("</TD>");
-        return buf.toString();
-    }
-
-
-    /**
-     * Find all target addresses in code, so that they can be marked
-     * with &lt;A NAME = ...&gt;. Target addresses are kept in an BitSet object.
-     */
-    private void findGotos( ByteSequence bytes, Code code ) throws IOException {
-        int index;
-        goto_set = new BitSet(bytes.available());
-        int opcode;
-        /* First get Code attribute from method and the exceptions handled
-         * (try .. catch) in this method. We only need the line number here.
-         */
-        if (code != null) {
-            CodeException[] ce = code.getExceptionTable();
-            for (CodeException cex : ce) {
-                goto_set.set(cex.getStartPC());
-                goto_set.set(cex.getEndPC());
-                goto_set.set(cex.getHandlerPC());
-            }
-            // Look for local variables and their range
-            Attribute[] attributes = code.getAttributes();
-            for (Attribute attribute : attributes) {
-                if (attribute.getTag() == ATTR_LOCAL_VARIABLE_TABLE) {
-                    LocalVariable[] vars = ((LocalVariableTable) attribute)
-                            .getLocalVariableTable();
-                    for (LocalVariable var : vars) {
-                        int start = var.getStartPC();
-                        int end = (start + var.getLength());
-                        goto_set.set(start);
-                        goto_set.set(end);
-                    }
-                    break;
-                }
-            }
-        }
-        // Get target addresses from GOTO, JSR, TABLESWITCH, etc.
-        for (; bytes.available() > 0;) {
-            opcode = bytes.readUnsignedByte();
-            //System.out.println(OPCODE_NAMES[opcode]);
-            switch (opcode) {
-                case TABLESWITCH:
-                case LOOKUPSWITCH:
-                    //bytes.readByte(); // Skip already read byte
-                    int remainder = bytes.getIndex() % 4;
-                    int no_pad_bytes = (remainder == 0) ? 0 : 4 - remainder;
-                    int default_offset,
-                    offset;
-                    for (int j = 0; j < no_pad_bytes; j++) {
-                        bytes.readByte();
-                    }
-                    // Both cases have a field default_offset in common
-                    default_offset = bytes.readInt();
-                    if (opcode == TABLESWITCH) {
-                        int low = bytes.readInt();
-                        int high = bytes.readInt();
-                        offset = bytes.getIndex() - 12 - no_pad_bytes - 1;
-                        default_offset += offset;
-                        goto_set.set(default_offset);
-                        for (int j = 0; j < (high - low + 1); j++) {
-                            index = offset + bytes.readInt();
-                            goto_set.set(index);
-                        }
-                    } else { // LOOKUPSWITCH
-                        int npairs = bytes.readInt();
-                        offset = bytes.getIndex() - 8 - no_pad_bytes - 1;
-                        default_offset += offset;
-                        goto_set.set(default_offset);
-                        for (int j = 0; j < npairs; j++) {
-//                            int match = bytes.readInt();
-                            bytes.readInt();
-                            index = offset + bytes.readInt();
-                            goto_set.set(index);
-                        }
-                    }
-                    break;
-                case GOTO:
-                case IFEQ:
-                case IFGE:
-                case IFGT:
-                case IFLE:
-                case IFLT:
-                case IFNE:
-                case IFNONNULL:
-                case IFNULL:
-                case IF_ACMPEQ:
-                case IF_ACMPNE:
-                case IF_ICMPEQ:
-                case IF_ICMPGE:
-                case IF_ICMPGT:
-                case IF_ICMPLE:
-                case IF_ICMPLT:
-                case IF_ICMPNE:
-                case JSR:
-                    //bytes.readByte(); // Skip already read byte
-                    index = bytes.getIndex() + bytes.readShort() - 1;
-                    goto_set.set(index);
-                    break;
-                case GOTO_W:
-                case JSR_W:
-                    //bytes.readByte(); // Skip already read byte
-                    index = bytes.getIndex() + bytes.readInt() - 1;
-                    goto_set.set(index);
-                    break;
-                default:
-                    bytes.unreadByte();
-                    codeToHTML(bytes, 0); // Ignore output
-            }
-        }
-    }
-
-
-    /**
-     * Write a single method with the byte code associated with it.
-     */
-    private void writeMethod( Method method, int method_number ) throws IOException {
-        // Get raw signature
-        String signature = method.getSignature();
-        // Get array of strings containing the argument types
-        String[] args = Utility.methodSignatureArgumentTypes(signature, false);
-        // Get return type string
-        String type = Utility.methodSignatureReturnType(signature, false);
-        // Get method name
-        String name = method.getName();
-        String html_name = Class2HTML.toHTML(name);
-        // Get method's access flags
-        String access = Utility.accessToString(method.getAccessFlags());
-        access = Utility.replace(access, " ", "&nbsp;");
-        // Get the method's attributes, the Code Attribute in particular
-        Attribute[] attributes = method.getAttributes();
-        file.print("<P><B><FONT COLOR=\"#FF0000\">" + access + "</FONT>&nbsp;" + "<A NAME=method"
-                + method_number + ">" + Class2HTML.referenceType(type) + "</A>&nbsp<A HREF=\""
-                + class_name + "_methods.html#method" + method_number + "\" TARGET=Methods>"
-                + html_name + "</A>(");
-        for (int i = 0; i < args.length; i++) {
-            file.print(Class2HTML.referenceType(args[i]));
-            if (i < args.length - 1) {
-                file.print(",&nbsp;");
-            }
-        }
-        file.println(")</B></P>");
-        Code c = null;
-        byte[] code = null;
-        if (attributes.length > 0) {
-            file.print("<H4>Attributes</H4><UL>\n");
-            for (int i = 0; i < attributes.length; i++) {
-                byte tag = attributes[i].getTag();
-                if (tag != ATTR_UNKNOWN) {
-                    file.print("<LI><A HREF=\"" + class_name + "_attributes.html#method"
-                            + method_number + "@" + i + "\" TARGET=Attributes>"
-                            + ATTRIBUTE_NAMES[tag] + "</A></LI>\n");
-                } else {
-                    file.print("<LI>" + attributes[i] + "</LI>");
-                }
-                if (tag == ATTR_CODE) {
-                    c = (Code) attributes[i];
-                    Attribute[] attributes2 = c.getAttributes();
-                    code = c.getCode();
-                    file.print("<UL>");
-                    for (int j = 0; j < attributes2.length; j++) {
-                        tag = attributes2[j].getTag();
-                        file.print("<LI><A HREF=\"" + class_name + "_attributes.html#" + "method"
-                                + method_number + "@" + i + "@" + j + "\" TARGET=Attributes>"
-                                + ATTRIBUTE_NAMES[tag] + "</A></LI>\n");
-                    }
-                    file.print("</UL>");
-                }
-            }
-            file.println("</UL>");
-        }
-        if (code != null) { // No code, an abstract method, e.g.
-            //System.out.println(name + "\n" + Utility.codeToString(code, constant_pool, 0, -1));
-            // Print the byte code
-            ByteSequence stream = new ByteSequence(code);
-            stream.mark(stream.available());
-            findGotos(stream, c);
-            stream.reset();
-            file.println("<TABLE BORDER=0><TR><TH ALIGN=LEFT>Byte<BR>offset</TH>"
-                    + "<TH ALIGN=LEFT>Instruction</TH><TH ALIGN=LEFT>Argument</TH>");
-            for (; stream.available() > 0;) {
-                int offset = stream.getIndex();
-                String str = codeToHTML(stream, method_number);
-                String anchor = "";
-                /* Set an anchor mark if this line is targetted by a goto, jsr, etc.
-                 * Defining an anchor for every line is very inefficient!
-                 */
-                if (goto_set.get(offset)) {
-                    anchor = "<A NAME=code" + method_number + "@" + offset + "></A>";
-                }
-                String anchor2;
-                if (stream.getIndex() == code.length) {
-                    anchor2 = "<A NAME=code" + method_number + "@" + code.length + ">" + offset
-                            + "</A>";
-                } else {
-                    anchor2 = "" + offset;
-                }
-                file
-                        .println("<TR VALIGN=TOP><TD>" + anchor2 + "</TD><TD>" + anchor + str
-                                + "</TR>");
-            }
-            // Mark last line, may be targetted from Attributes window
-            file.println("<TR><TD> </A></TD></TR>");
-            file.println("</TABLE>");
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/ConstantHTML.java b/src/main/java/org/apache/bcel/util/ConstantHTML.java
deleted file mode 100644
index cf65474..0000000
--- a/src/main/java/org/apache/bcel/util/ConstantHTML.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantInterfaceMethodref;
-import org.apache.bcel.classfile.ConstantMethodref;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantString;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Utility;
-
-/**
- * Convert constant pool into HTML file.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * 
- */
-final class ConstantHTML implements org.apache.bcel.Constants {
-
-    private final String class_name; // name of current class
-    private final String class_package; // name of package
-    private final ConstantPool constant_pool; // reference to constant pool
-    private final PrintWriter file; // file to write to
-    private final String[] constant_ref; // String to return for cp[i]
-    private final Constant[] constants; // The constants in the cp
-    private final Method[] methods;
-
-
-    ConstantHTML(String dir, String class_name, String class_package, Method[] methods,
-            ConstantPool constant_pool) throws IOException {
-        this.class_name = class_name;
-        this.class_package = class_package;
-        this.constant_pool = constant_pool;
-        this.methods = methods;
-        constants = constant_pool.getConstantPool();
-        file = new PrintWriter(new FileOutputStream(dir + class_name + "_cp.html"));
-        constant_ref = new String[constants.length];
-        constant_ref[0] = "&lt;unknown&gt;";
-        file.println("<HTML><BODY BGCOLOR=\"#C0C0C0\"><TABLE BORDER=0>");
-        // Loop through constants, constants[0] is reserved
-        for (int i = 1; i < constants.length; i++) {
-            if (i % 2 == 0) {
-                file.print("<TR BGCOLOR=\"#C0C0C0\"><TD>");
-            } else {
-                file.print("<TR BGCOLOR=\"#A0A0A0\"><TD>");
-            }
-            if (constants[i] != null) {
-                writeConstant(i);
-            }
-            file.print("</TD></TR>\n");
-        }
-        file.println("</TABLE></BODY></HTML>");
-        file.close();
-    }
-
-
-    String referenceConstant( int index ) {
-        return constant_ref[index];
-    }
-
-
-    private void writeConstant( int index ) {
-        byte tag = constants[index].getTag();
-        int class_index, name_index;
-        String ref;
-        // The header is always the same
-        file.println("<H4> <A NAME=cp" + index + ">" + index + "</A> " + CONSTANT_NAMES[tag]
-                + "</H4>");
-        /* For every constant type get the needed parameters and print them appropiately 
-         */
-        switch (tag) {
-            case CONSTANT_InterfaceMethodref:
-            case CONSTANT_Methodref:
-                // Get class_index and name_and_type_index, depending on type
-                if (tag == CONSTANT_Methodref) {
-                    ConstantMethodref c = (ConstantMethodref) constant_pool.getConstant(index,
-                            CONSTANT_Methodref);
-                    class_index = c.getClassIndex();
-                    name_index = c.getNameAndTypeIndex();
-                } else {
-                    ConstantInterfaceMethodref c1 = (ConstantInterfaceMethodref) constant_pool
-                            .getConstant(index, CONSTANT_InterfaceMethodref);
-                    class_index = c1.getClassIndex();
-                    name_index = c1.getNameAndTypeIndex();
-                }
-                // Get method name and its class
-                String method_name = constant_pool.constantToString(name_index,
-                        CONSTANT_NameAndType);
-                String html_method_name = Class2HTML.toHTML(method_name);
-                // Partially compacted class name, i.e., / -> .
-                String method_class = constant_pool.constantToString(class_index, CONSTANT_Class);
-                String short_method_class = Utility.compactClassName(method_class); // I.e., remove java.lang.
-                short_method_class = Utility.compactClassName(short_method_class, class_package
-                        + ".", true); // Remove class package prefix
-                // Get method signature
-                ConstantNameAndType c2 = (ConstantNameAndType) constant_pool.getConstant(
-                        name_index, CONSTANT_NameAndType);
-                String signature = constant_pool.constantToString(c2.getSignatureIndex(),
-                        CONSTANT_Utf8);
-                // Get array of strings containing the argument types
-                String[] args = Utility.methodSignatureArgumentTypes(signature, false);
-                // Get return type string
-                String type = Utility.methodSignatureReturnType(signature, false);
-                String ret_type = Class2HTML.referenceType(type);
-                StringBuilder buf = new StringBuilder("(");
-                for (int i = 0; i < args.length; i++) {
-                    buf.append(Class2HTML.referenceType(args[i]));
-                    if (i < args.length - 1) {
-                        buf.append(",&nbsp;");
-                    }
-                }
-                buf.append(")");
-                String arg_types = buf.toString();
-                if (method_class.equals(class_name)) {
-                    ref = "<A HREF=\"" + class_name + "_code.html#method"
-                            + getMethodNumber(method_name + signature) + "\" TARGET=Code>"
-                            + html_method_name + "</A>";
-                } else {
-                    ref = "<A HREF=\"" + method_class + ".html" + "\" TARGET=_top>"
-                            + short_method_class + "</A>." + html_method_name;
-                }
-                constant_ref[index] = ret_type + "&nbsp;<A HREF=\"" + class_name + "_cp.html#cp"
-                        + class_index + "\" TARGET=Constants>" + short_method_class
-                        + "</A>.<A HREF=\"" + class_name + "_cp.html#cp" + index
-                        + "\" TARGET=ConstantPool>" + html_method_name + "</A>&nbsp;" + arg_types;
-                file.println("<P><TT>" + ret_type + "&nbsp;" + ref + arg_types
-                        + "&nbsp;</TT>\n<UL>" + "<LI><A HREF=\"#cp" + class_index
-                        + "\">Class index(" + class_index + ")</A>\n" + "<LI><A HREF=\"#cp"
-                        + name_index + "\">NameAndType index(" + name_index + ")</A></UL>");
-                break;
-            case CONSTANT_Fieldref:
-                // Get class_index and name_and_type_index
-                ConstantFieldref c3 = (ConstantFieldref) constant_pool.getConstant(index,
-                        CONSTANT_Fieldref);
-                class_index = c3.getClassIndex();
-                name_index = c3.getNameAndTypeIndex();
-                // Get method name and its class (compacted)
-                String field_class = constant_pool.constantToString(class_index, CONSTANT_Class);
-                String short_field_class = Utility.compactClassName(field_class); // I.e., remove java.lang.
-                short_field_class = Utility.compactClassName(short_field_class,
-                        class_package + ".", true); // Remove class package prefix
-                String field_name = constant_pool
-                        .constantToString(name_index, CONSTANT_NameAndType);
-                if (field_class.equals(class_name)) {
-                    ref = "<A HREF=\"" + field_class + "_methods.html#field" + field_name
-                            + "\" TARGET=Methods>" + field_name + "</A>";
-                } else {
-                    ref = "<A HREF=\"" + field_class + ".html\" TARGET=_top>" + short_field_class
-                            + "</A>." + field_name + "\n";
-                }
-                constant_ref[index] = "<A HREF=\"" + class_name + "_cp.html#cp" + class_index
-                        + "\" TARGET=Constants>" + short_field_class + "</A>.<A HREF=\""
-                        + class_name + "_cp.html#cp" + index + "\" TARGET=ConstantPool>"
-                        + field_name + "</A>";
-                file.println("<P><TT>" + ref + "</TT><BR>\n" + "<UL>" + "<LI><A HREF=\"#cp"
-                        + class_index + "\">Class(" + class_index + ")</A><BR>\n"
-                        + "<LI><A HREF=\"#cp" + name_index + "\">NameAndType(" + name_index
-                        + ")</A></UL>");
-                break;
-            case CONSTANT_Class:
-                ConstantClass c4 = (ConstantClass) constant_pool.getConstant(index, CONSTANT_Class);
-                name_index = c4.getNameIndex();
-                String class_name2 = constant_pool.constantToString(index, tag); // / -> .
-                String short_class_name = Utility.compactClassName(class_name2); // I.e., remove java.lang.
-                short_class_name = Utility.compactClassName(short_class_name, class_package + ".",
-                        true); // Remove class package prefix
-                ref = "<A HREF=\"" + class_name2 + ".html\" TARGET=_top>" + short_class_name
-                        + "</A>";
-                constant_ref[index] = "<A HREF=\"" + class_name + "_cp.html#cp" + index
-                        + "\" TARGET=ConstantPool>" + short_class_name + "</A>";
-                file.println("<P><TT>" + ref + "</TT><UL>" + "<LI><A HREF=\"#cp" + name_index
-                        + "\">Name index(" + name_index + ")</A></UL>\n");
-                break;
-            case CONSTANT_String:
-                ConstantString c5 = (ConstantString) constant_pool.getConstant(index,
-                        CONSTANT_String);
-                name_index = c5.getStringIndex();
-                String str = Class2HTML.toHTML(constant_pool.constantToString(index, tag));
-                file.println("<P><TT>" + str + "</TT><UL>" + "<LI><A HREF=\"#cp" + name_index
-                        + "\">Name index(" + name_index + ")</A></UL>\n");
-                break;
-            case CONSTANT_NameAndType:
-                ConstantNameAndType c6 = (ConstantNameAndType) constant_pool.getConstant(index,
-                        CONSTANT_NameAndType);
-                name_index = c6.getNameIndex();
-                int signature_index = c6.getSignatureIndex();
-                file.println("<P><TT>"
-                        + Class2HTML.toHTML(constant_pool.constantToString(index, tag))
-                        + "</TT><UL>" + "<LI><A HREF=\"#cp" + name_index + "\">Name index("
-                        + name_index + ")</A>\n" + "<LI><A HREF=\"#cp" + signature_index
-                        + "\">Signature index(" + signature_index + ")</A></UL>\n");
-                break;
-            default:
-                file
-                        .println("<P><TT>"
-                                + Class2HTML.toHTML(constant_pool.constantToString(index, tag))
-                                + "</TT>\n");
-        } // switch
-    }
-
-
-    private int getMethodNumber( String str ) {
-        for (int i = 0; i < methods.length; i++) {
-            String cmp = methods[i].getName() + methods[i].getSignature();
-            if (cmp.equals(str)) {
-                return i;
-            }
-        }
-        return -1;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/InstructionFinder.java b/src/main/java/org/apache/bcel/util/InstructionFinder.java
deleted file mode 100644
index 608d444..0000000
--- a/src/main/java/org/apache/bcel/util/InstructionFinder.java
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.ClassGenException;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-
-/**
- * InstructionFinder is a tool to search for given instructions patterns, i.e.,
- * match sequences of instructions in an instruction list via regular
- * expressions. This can be used, e.g., in order to implement a peep hole
- * optimizer that looks for code patterns and replaces them with faster
- * equivalents.
- * 
- * <p>
- * This class internally uses the java.util.regex
- * package to search for regular expressions.
- * 
- * A typical application would look like this:
- * 
- * <pre>
- * 
- *  
- *   InstructionFinder f   = new InstructionFinder(il);
- *   String            pat = &quot;IfInstruction ICONST_0 GOTO ICONST_1 NOP (IFEQ|IFNE)&quot;;
- *   
- *   for(Iterator i = f.search(pat, constraint); i.hasNext(); ) {
- *   InstructionHandle[] match = (InstructionHandle[])i.next();
- *   ...
- *   il.delete(match[1], match[5]);
- *   ...
- *   }
- *   
- *  
- * </pre>
- * 
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see Instruction
- * @see InstructionList
- */
-public class InstructionFinder {
-
-    private static final int OFFSET = 32767; // char + OFFSET is
-    // outside of
-    // LATIN-1
-    private static final int NO_OPCODES = 256; // Potential number,
-    // some are not used
-    private static final Map<String, String> map = new HashMap<String, String>();
-    private final InstructionList il;
-    private String il_string; // instruction list
-    // as string
-    private InstructionHandle[] handles; // map instruction
-
-
-    // list to array
-    /**
-     * @param il
-     *          instruction list to search for given patterns
-     */
-    public InstructionFinder(InstructionList il) {
-        this.il = il;
-        reread();
-    }
-
-
-    /**
-     * Reread the instruction list, e.g., after you've altered the list upon a
-     * match.
-     */
-    public final void reread() {
-        int size = il.getLength();
-        char[] buf = new char[size]; // Create a string with length equal to il
-        // length
-        handles = il.getInstructionHandles();
-        // Map opcodes to characters
-        for (int i = 0; i < size; i++) {
-            buf[i] = makeChar(handles[i].getInstruction().getOpcode());
-        }
-        il_string = new String(buf);
-    }
-
-
-    /**
-     * Map symbolic instruction names like "getfield" to a single character.
-     * 
-     * @param pattern
-     *          instruction pattern in lower case
-     * @return encoded string for a pattern such as "BranchInstruction".
-     */
-    private static String mapName( String pattern ) {
-        String result = map.get(pattern);
-        if (result != null) {
-            return result;
-        }
-        for (short i = 0; i < NO_OPCODES; i++) {
-            if (pattern.equals(Constants.OPCODE_NAMES[i])) {
-                return "" + makeChar(i);
-            }
-        }
-        throw new RuntimeException("Instruction unknown: " + pattern);
-    }
-
-
-    /**
-     * Replace symbolic names of instructions with the appropiate character and
-     * remove all white space from string. Meta characters such as +, * are
-     * ignored.
-     * 
-     * @param pattern
-     *          The pattern to compile
-     * @return translated regular expression string
-     */
-    private static String compilePattern( String pattern ) {
-        //Bug: BCEL-77 - Instructions are assumed to be english, to avoid odd Locale issues
-        String lower = pattern.toLowerCase(Locale.ENGLISH);
-        StringBuilder buf = new StringBuilder();
-        int size = pattern.length();
-        for (int i = 0; i < size; i++) {
-            char ch = lower.charAt(i);
-            if (Character.isLetterOrDigit(ch)) {
-                StringBuilder name = new StringBuilder();
-                while ((Character.isLetterOrDigit(ch) || ch == '_') && i < size) {
-                    name.append(ch);
-                    if (++i < size) {
-                        ch = lower.charAt(i);
-                    } else {
-                        break;
-                    }
-                }
-                i--;
-                buf.append(mapName(name.toString()));
-            } else if (!Character.isWhitespace(ch)) {
-                buf.append(ch);
-            }
-        }
-        return buf.toString();
-    }
-
-
-    /**
-     * @return the matched piece of code as an array of instruction (handles)
-     */
-    private InstructionHandle[] getMatch( int matched_from, int match_length ) {
-        InstructionHandle[] match = new InstructionHandle[match_length];
-        System.arraycopy(handles, matched_from, match, 0, match_length);
-        return match;
-    }
-
-
-    /**
-     * Search for the given pattern in the instruction list. You can search for
-     * any valid opcode via its symbolic name, e.g. "istore". You can also use a
-     * super class or an interface name to match a whole set of instructions, e.g.
-     * "BranchInstruction" or "LoadInstruction". "istore" is also an alias for all
-     * "istore_x" instructions. Additional aliases are "if" for "ifxx", "if_icmp"
-     * for "if_icmpxx", "if_acmp" for "if_acmpxx".
-     * 
-     * Consecutive instruction names must be separated by white space which will
-     * be removed during the compilation of the pattern.
-     * 
-     * For the rest the usual pattern matching rules for regular expressions
-     * apply.
-     * <P>
-     * Example pattern:
-     * 
-     * <pre>
-     * search(&quot;BranchInstruction NOP ((IfInstruction|GOTO)+ ISTORE Instruction)*&quot;);
-     * </pre>
-     * 
-     * <p>
-     * If you alter the instruction list upon a match such that other matching
-     * areas are affected, you should call reread() to update the finder and call
-     * search() again, because the matches are cached.
-     * 
-     * @param pattern
-     *          the instruction pattern to search for, where case is ignored
-     * @param from
-     *          where to start the search in the instruction list
-     * @param constraint
-     *          optional CodeConstraint to check the found code pattern for
-     *          user-defined constraints
-     * @return iterator of matches where e.nextElement() returns an array of
-     *         instruction handles describing the matched area
-     */
-    public final Iterator<InstructionHandle[]> search( String pattern, InstructionHandle from, CodeConstraint constraint ) {
-        String search = compilePattern(pattern);
-        int start = -1;
-        for (int i = 0; i < handles.length; i++) {
-            if (handles[i] == from) {
-                start = i; // Where to start search from (index)
-                break;
-            }
-        }
-        if (start == -1) {
-            throw new ClassGenException("Instruction handle " + from
-                    + " not found in instruction list.");
-        }
-        Pattern regex = Pattern.compile(search);
-        List<InstructionHandle[]> matches = new ArrayList<InstructionHandle[]>();
-        Matcher matcher = regex.matcher(il_string);
-        while (start < il_string.length() && matcher.find(start)) {
-            int startExpr = matcher.start();
-            int endExpr = matcher.end();
-            int lenExpr = (endExpr - startExpr);
-            InstructionHandle[] match = getMatch(startExpr, lenExpr);
-            if ((constraint == null) || constraint.checkCode(match)) {
-                matches.add(match);
-            }
-            start = endExpr;
-        }
-        return matches.iterator();
-    }
-
-
-    /**
-     * Start search beginning from the start of the given instruction list.
-     * 
-     * @param pattern
-     *          the instruction pattern to search for, where case is ignored
-     * @return iterator of matches where e.nextElement() returns an array of
-     *         instruction handles describing the matched area
-     */
-    public final Iterator<InstructionHandle[]> search( String pattern ) {
-        return search(pattern, il.getStart(), null);
-    }
-
-
-    /**
-     * Start search beginning from `from'.
-     * 
-     * @param pattern
-     *          the instruction pattern to search for, where case is ignored
-     * @param from
-     *          where to start the search in the instruction list
-     * @return iterator of matches where e.nextElement() returns an array of
-     *         instruction handles describing the matched area
-     */
-    public final Iterator<InstructionHandle[]> search( String pattern, InstructionHandle from ) {
-        return search(pattern, from, null);
-    }
-
-
-    /**
-     * Start search beginning from the start of the given instruction list. Check
-     * found matches with the constraint object.
-     * 
-     * @param pattern
-     *          the instruction pattern to search for, case is ignored
-     * @param constraint
-     *          constraints to be checked on matching code
-     * @return instruction handle or `null' if the match failed
-     */
-    public final Iterator<InstructionHandle[]> search( String pattern, CodeConstraint constraint ) {
-        return search(pattern, il.getStart(), constraint);
-    }
-
-
-    /**
-     * Convert opcode number to char.
-     */
-    private static char makeChar( short opcode ) {
-        return (char) (opcode + OFFSET);
-    }
-
-
-    /**
-     * @return the inquired instruction list
-     */
-    public final InstructionList getInstructionList() {
-        return il;
-    }
-
-    /**
-     * Code patterns found may be checked using an additional user-defined
-     * constraint object whether they really match the needed criterion. I.e.,
-     * check constraints that can not expressed with regular expressions.
-     * 
-     */
-    public static interface CodeConstraint {
-
-        /**
-         * @param match
-         *          array of instructions matching the requested pattern
-         * @return true if the matched area is really useful
-         */
-        public boolean checkCode( InstructionHandle[] match );
-    }
-
-    // Initialize pattern map
-    static {
-        map.put("arithmeticinstruction","(irem|lrem|iand|ior|ineg|isub|lneg|fneg|fmul|ldiv|fadd|lxor|frem|idiv|land|ixor|ishr|fsub|lshl|fdiv|iadd|lor|dmul|lsub|ishl|imul|lmul|lushr|dneg|iushr|lshr|ddiv|drem|dadd|ladd|dsub)");
-        map.put("invokeinstruction", "(invokevirtual|invokeinterface|invokestatic|invokespecial|invokedynamic)");
-        map.put("arrayinstruction", "(baload|aastore|saload|caload|fastore|lastore|iaload|castore|iastore|aaload|bastore|sastore|faload|laload|daload|dastore)");
-        map.put("gotoinstruction", "(goto|goto_w)");
-        map.put("conversioninstruction", "(d2l|l2d|i2s|d2i|l2i|i2b|l2f|d2f|f2i|i2d|i2l|f2d|i2c|f2l|i2f)");
-        map.put("localvariableinstruction","(fstore|iinc|lload|dstore|dload|iload|aload|astore|istore|fload|lstore)");
-        map.put("loadinstruction", "(fload|dload|lload|iload|aload)");
-        map.put("fieldinstruction", "(getfield|putstatic|getstatic|putfield)");
-        map.put("cpinstruction", "(ldc2_w|invokeinterface|invokedynamic|multianewarray|putstatic|instanceof|getstatic|checkcast|getfield|invokespecial|ldc_w|invokestatic|invokevirtual|putfield|ldc|new|anewarray)");
-        map.put("stackinstruction", "(dup2|swap|dup2_x2|pop|pop2|dup|dup2_x1|dup_x2|dup_x1)");
-        map.put("branchinstruction", "(ifle|if_acmpne|if_icmpeq|if_acmpeq|ifnonnull|goto_w|iflt|ifnull|if_icmpne|tableswitch|if_icmple|ifeq|if_icmplt|jsr_w|if_icmpgt|ifgt|jsr|goto|ifne|ifge|lookupswitch|if_icmpge)");
-        map.put("returninstruction", "(lreturn|ireturn|freturn|dreturn|areturn|return)");
-        map.put("storeinstruction", "(istore|fstore|dstore|astore|lstore)");
-        map.put("select", "(tableswitch|lookupswitch)");
-        map.put("ifinstruction", "(ifeq|ifgt|if_icmpne|if_icmpeq|ifge|ifnull|ifne|if_icmple|if_icmpge|if_acmpeq|if_icmplt|if_acmpne|ifnonnull|iflt|if_icmpgt|ifle)");
-        map.put("jsrinstruction", "(jsr|jsr_w)");
-        map.put("variablelengthinstruction", "(tableswitch|jsr|goto|lookupswitch)");
-        map.put("unconditionalbranch", "(goto|jsr|jsr_w|athrow|goto_w)");
-        map.put("constantpushinstruction", "(dconst|bipush|sipush|fconst|iconst|lconst)");
-        map.put("typedinstruction", "(imul|lsub|aload|fload|lor|new|aaload|fcmpg|iand|iaload|lrem|idiv|d2l|isub|dcmpg|dastore|ret|f2d|f2i|drem|iinc|i2c|checkcast|frem|lreturn|astore|lushr|daload|dneg|fastore|istore|lshl|ldiv|lstore|areturn|ishr|ldc_w|invokeinterface|invokedynamic|aastore|lxor|ishl|l2d|i2f|return|faload|sipush|iushr|caload|instanceof|invokespecial|putfield|fmul|ireturn|laload|d2f|lneg|ixor|i2l|fdiv|lastore|multianewarray|i2b|getstatic|i2d|putstatic|fcmpl|saload|ladd|irem|dload|jsr_w|dconst|dcmpl|fsub|freturn|ldc|aconst_null|castore|lmul|ldc2_w|dadd|iconst|f2l|ddiv|dstore|land|jsr|anewarray|dmul|bipush|dsub|sastore|d2i|i2s|lshr|iadd|l2i|lload|bastore|fstore|fneg|iload|fadd|baload|fconst|ior|ineg|dreturn|l2f|lconst|getfield|invokevirtual|invokestatic|iastore)");
-        map.put("popinstruction", "(fstore|dstore|pop|pop2|astore|putstatic|istore|lstore)");
-        map.put("allocationinstruction", "(multianewarray|new|anewarray|newarray)");
-        map.put("indexedinstruction", "(lload|lstore|fload|ldc2_w|invokeinterface|invokedynamic|multianewarray|astore|dload|putstatic|instanceof|getstatic|checkcast|getfield|invokespecial|dstore|istore|iinc|ldc_w|ret|fstore|invokestatic|iload|putfield|invokevirtual|ldc|new|aload|anewarray)");
-        map.put("pushinstruction", "(dup|lload|dup2|bipush|fload|ldc2_w|sipush|lconst|fconst|dload|getstatic|ldc_w|aconst_null|dconst|iload|ldc|iconst|aload)");
-        map.put("stackproducer", "(imul|lsub|aload|fload|lor|new|aaload|fcmpg|iand|iaload|lrem|idiv|d2l|isub|dcmpg|dup|f2d|f2i|drem|i2c|checkcast|frem|lushr|daload|dneg|lshl|ldiv|ishr|ldc_w|invokeinterface|invokedynamic|lxor|ishl|l2d|i2f|faload|sipush|iushr|caload|instanceof|invokespecial|fmul|laload|d2f|lneg|ixor|i2l|fdiv|getstatic|i2b|swap|i2d|dup2|fcmpl|saload|ladd|irem|dload|jsr_w|dconst|dcmpl|fsub|ldc|arraylength|aconst_null|tableswitch|lmul|ldc2_w|iconst|dadd|f2l|ddiv|land|jsr|anewarray|dmul|bipush|dsub|d2i|newarray|i2s|lshr|iadd|lload|l2i|fneg|iload|fadd|baload|fconst|lookupswitch|ior|ineg|lconst|l2f|getfield|invokevirtual|invokestatic)");
-        map.put("stackconsumer", "(imul|lsub|lor|iflt|fcmpg|if_icmpgt|iand|ifeq|if_icmplt|lrem|ifnonnull|idiv|d2l|isub|dcmpg|dastore|if_icmpeq|f2d|f2i|drem|i2c|checkcast|frem|lreturn|astore|lushr|pop2|monitorexit|dneg|fastore|istore|lshl|ldiv|lstore|areturn|if_icmpge|ishr|monitorenter|invokeinterface|invokedynamic|aastore|lxor|ishl|l2d|i2f|return|iushr|instanceof|invokespecial|fmul|ireturn|d2f|lneg|ixor|pop|i2l|ifnull|fdiv|lastore|i2b|if_acmpeq|ifge|swap|i2d|putstatic|fcmpl|ladd|irem|dcmpl|fsub|freturn|ifgt|castore|lmul|dadd|f2l|ddiv|dstore|land|if_icmpne|if_acmpne|dmul|dsub|sastore|ifle|d2i|i2s|lshr|iadd|l2i|bastore|fstore|fneg|fadd|ior|ineg|ifne|dreturn|l2f|if_icmple|getfield|invokevirtual|invokestatic|iastore)");
-        map.put("exceptionthrower","(irem|lrem|laload|putstatic|baload|dastore|areturn|getstatic|ldiv|anewarray|iastore|castore|idiv|saload|lastore|fastore|putfield|lreturn|caload|getfield|return|aastore|freturn|newarray|instanceof|multianewarray|athrow|faload|iaload|aaload|dreturn|monitorenter|checkcast|bastore|arraylength|new|invokevirtual|sastore|ldc_w|ireturn|invokespecial|monitorexit|invokeinterface|invokedynamic|ldc|invokestatic|daload)");
-        map.put("loadclass", "(multianewarray|invokeinterface|invokedynamic|instanceof|invokespecial|putfield|checkcast|putstatic|invokevirtual|new|getstatic|invokestatic|getfield|anewarray)");
-        map.put("instructiontargeter", "(ifle|if_acmpne|if_icmpeq|if_acmpeq|ifnonnull|goto_w|iflt|ifnull|if_icmpne|tableswitch|if_icmple|ifeq|if_icmplt|jsr_w|if_icmpgt|ifgt|jsr|goto|ifne|ifge|lookupswitch|if_icmpge)");
-        // Some aliases
-        map.put("if_icmp", "(if_icmpne|if_icmpeq|if_icmple|if_icmpge|if_icmplt|if_icmpgt)");
-        map.put("if_acmp", "(if_acmpeq|if_acmpne)");
-        map.put("if", "(ifeq|ifne|iflt|ifge|ifgt|ifle)");
-        // Precompile some aliases first
-        map.put("iconst", precompile(Constants.ICONST_0, Constants.ICONST_5, Constants.ICONST_M1));
-        map.put("lconst", new String(new char[] { '(', makeChar(Constants.LCONST_0), '|', makeChar(Constants.LCONST_1), ')' }));
-        map.put("dconst", new String(new char[] { '(', makeChar(Constants.DCONST_0), '|', makeChar(Constants.DCONST_1), ')' }));
-        map.put("fconst", new String(new char[] { '(', makeChar(Constants.FCONST_0), '|', makeChar(Constants.FCONST_1), ')' }));
-        map.put("iload", precompile(Constants.ILOAD_0, Constants.ILOAD_3, Constants.ILOAD));
-        map.put("dload", precompile(Constants.DLOAD_0, Constants.DLOAD_3, Constants.DLOAD));
-        map.put("fload", precompile(Constants.FLOAD_0, Constants.FLOAD_3, Constants.FLOAD));
-        map.put("aload", precompile(Constants.ALOAD_0, Constants.ALOAD_3, Constants.ALOAD));
-        map.put("istore", precompile(Constants.ISTORE_0, Constants.ISTORE_3, Constants.ISTORE));
-        map.put("dstore", precompile(Constants.DSTORE_0, Constants.DSTORE_3, Constants.DSTORE));
-        map.put("fstore", precompile(Constants.FSTORE_0, Constants.FSTORE_3, Constants.FSTORE));
-        map.put("astore", precompile(Constants.ASTORE_0, Constants.ASTORE_3, Constants.ASTORE));
-        // Compile strings
-        for (String key : map.keySet()) {
-            String value = map.get(key);
-            char ch = value.charAt(1); // Omit already precompiled patterns
-            if (ch < OFFSET) {
-                map.put(key, compilePattern(value)); // precompile all
-                                                        // patterns
-            }
-        }
-        // Add instruction alias to match anything
-        StringBuilder buf = new StringBuilder("(");
-        for (short i = 0; i < NO_OPCODES; i++) {
-            if (Constants.NO_OF_OPERANDS[i] != Constants.UNDEFINED) { // Not
-                                                                        // an
-                // invalid
-                // opcode
-                buf.append(makeChar(i));
-                if (i < NO_OPCODES - 1) {
-                    buf.append('|');
-                }
-            }
-        }
-        buf.append(')');
-        map.put("instruction", buf.toString());
-    }
-
-
-    private static String precompile( short from, short to, short extra ) {
-        StringBuilder buf = new StringBuilder("(");
-        for (short i = from; i <= to; i++) {
-            buf.append(makeChar(i));
-            buf.append('|');
-        }
-        buf.append(makeChar(extra));
-        buf.append(")");
-        return buf.toString();
-    }
-
-
-    /*
-     * Internal debugging routines.
-     */
-//    private static final String pattern2string( String pattern ) {
-//        return pattern2string(pattern, true);
-//    }
-
-
-//    private static final String pattern2string( String pattern, boolean make_string ) {
-//        StringBuffer buf = new StringBuffer();
-//        for (int i = 0; i < pattern.length(); i++) {
-//            char ch = pattern.charAt(i);
-//            if (ch >= OFFSET) {
-//                if (make_string) {
-//                    buf.append(Constants.OPCODE_NAMES[ch - OFFSET]);
-//                } else {
-//                    buf.append((ch - OFFSET));
-//                }
-//            } else {
-//                buf.append(ch);
-//            }
-//        }
-//        return buf.toString();
-//    }
-}
diff --git a/src/main/java/org/apache/bcel/util/JavaWrapper.java b/src/main/java/org/apache/bcel/util/JavaWrapper.java
deleted file mode 100644
index 10d3104..0000000
--- a/src/main/java/org/apache/bcel/util/JavaWrapper.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-
-/**
- * Java interpreter replacement, i.e., wrapper that uses its own ClassLoader
- * to modify/generate classes as they're requested. You can take this as a template
- * for your own applications.<br>
- * Call this wrapper with:
- * 
- * <pre>java org.apache.bcel.util.JavaWrapper &lt;real.class.name&gt; [arguments]</pre>
- * 
- * <p>To use your own class loader you can set the "bcel.classloader" system property
- * which defaults to "org.apache.bcel.util.ClassLoader", e.g., with:</p>
- * <pre>java org.apache.bcel.util.JavaWrapper -Dbcel.classloader=foo.MyLoader &lt;real.class.name&gt; [arguments]</pre>
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @see ClassLoader
- */
-public class JavaWrapper {
-
-    private final java.lang.ClassLoader loader;
-
-
-    private static java.lang.ClassLoader getClassLoader() {
-        String s = System.getProperty("bcel.classloader");
-        if ((s == null) || "".equals(s)) {
-            s = "org.apache.bcel.util.ClassLoader";
-        }
-        try {
-            return (java.lang.ClassLoader) Class.forName(s).newInstance();
-        } catch (Exception e) {
-            throw new RuntimeException(e.toString(), e);
-        }
-    }
-
-
-    public JavaWrapper(java.lang.ClassLoader loader) {
-        this.loader = loader;
-    }
-
-
-    public JavaWrapper() {
-        this(getClassLoader());
-    }
-
-
-    /** Runs the main method of the given class with the arguments passed in argv
-     *
-     * @param class_name the fully qualified class name
-     * @param argv the arguments just as you would pass them directly
-     */
-    public void runMain( String class_name, String[] argv ) throws ClassNotFoundException {
-        Class<?> cl = loader.loadClass(class_name);
-        Method method = null;
-        try {
-            method = cl.getMethod("main", new Class[] {
-                argv.getClass()
-            });
-            /* Method main is sane ?
-             */
-            int m = method.getModifiers();
-            Class<?> r = method.getReturnType();
-            if (!(Modifier.isPublic(m) && Modifier.isStatic(m)) || Modifier.isAbstract(m)
-                    || (r != Void.TYPE)) {
-                throw new NoSuchMethodException();
-            }
-        } catch (NoSuchMethodException no) {
-            System.out.println("In class " + class_name
-                    + ": public static void main(String[] argv) is not defined");
-            return;
-        }
-        try {
-            method.invoke(null, new Object[] {
-                argv
-            });
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-    }
-
-
-    /** Default main method used as wrapper, expects the fully qualified class name
-     * of the real class as the first argument.
-     */
-    public static void main( String[] argv ) throws Exception {
-        /* Expects class name as first argument, other arguments are by-passed.
-         */
-        if (argv.length == 0) {
-            System.out.println("Missing class name.");
-            return;
-        }
-        String class_name = argv[0];
-        String[] new_argv = new String[argv.length - 1];
-        System.arraycopy(argv, 1, new_argv, 0, new_argv.length);
-        JavaWrapper wrapper = new JavaWrapper();
-        wrapper.runMain(class_name, new_argv);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/MethodHTML.java b/src/main/java/org/apache/bcel/util/MethodHTML.java
deleted file mode 100644
index a09cd81..0000000
--- a/src/main/java/org/apache/bcel/util/MethodHTML.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.ConstantValue;
-import org.apache.bcel.classfile.ExceptionTable;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Utility;
-
-/**
- * Convert methods and fields into HTML file.
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * 
- */
-final class MethodHTML implements org.apache.bcel.Constants {
-
-    private final String class_name; // name of current class
-    private final PrintWriter file; // file to write to
-    private final ConstantHTML constant_html;
-    private final AttributeHTML attribute_html;
-
-
-    MethodHTML(String dir, String class_name, Method[] methods, Field[] fields,
-            ConstantHTML constant_html, AttributeHTML attribute_html) throws IOException {
-        this.class_name = class_name;
-        this.attribute_html = attribute_html;
-        this.constant_html = constant_html;
-        file = new PrintWriter(new FileOutputStream(dir + class_name + "_methods.html"));
-        file.println("<HTML><BODY BGCOLOR=\"#C0C0C0\"><TABLE BORDER=0>");
-        file.println("<TR><TH ALIGN=LEFT>Access&nbsp;flags</TH><TH ALIGN=LEFT>Type</TH>"
-                + "<TH ALIGN=LEFT>Field&nbsp;name</TH></TR>");
-        for (Field field : fields) {
-            writeField(field);
-        }
-        file.println("</TABLE>");
-        file.println("<TABLE BORDER=0><TR><TH ALIGN=LEFT>Access&nbsp;flags</TH>"
-                + "<TH ALIGN=LEFT>Return&nbsp;type</TH><TH ALIGN=LEFT>Method&nbsp;name</TH>"
-                + "<TH ALIGN=LEFT>Arguments</TH></TR>");
-        for (int i = 0; i < methods.length; i++) {
-            writeMethod(methods[i], i);
-        }
-        file.println("</TABLE></BODY></HTML>");
-        file.close();
-    }
-
-
-    /**
-     * Print field of class.
-     *
-     * @param field field to print
-     * @exception java.io.IOException
-     */
-    private void writeField( Field field ) throws IOException {
-        String type = Utility.signatureToString(field.getSignature());
-        String name = field.getName();
-        String access = Utility.accessToString(field.getAccessFlags());
-        Attribute[] attributes;
-        access = Utility.replace(access, " ", "&nbsp;");
-        file.print("<TR><TD><FONT COLOR=\"#FF0000\">" + access + "</FONT></TD>\n<TD>"
-                + Class2HTML.referenceType(type) + "</TD><TD><A NAME=\"field" + name + "\">" + name
-                + "</A></TD>");
-        attributes = field.getAttributes();
-        // Write them to the Attributes.html file with anchor "<name>[<i>]"
-        for (int i = 0; i < attributes.length; i++) {
-            attribute_html.writeAttribute(attributes[i], name + "@" + i);
-        }
-        for (int i = 0; i < attributes.length; i++) {
-            if (attributes[i].getTag() == ATTR_CONSTANT_VALUE) { // Default value
-                String str = ((ConstantValue) attributes[i]).toString();
-                // Reference attribute in _attributes.html
-                file.print("<TD>= <A HREF=\"" + class_name + "_attributes.html#" + name + "@" + i
-                        + "\" TARGET=\"Attributes\">" + str + "</TD>\n");
-                break;
-            }
-        }
-        file.println("</TR>");
-    }
-
-
-    private void writeMethod( Method method, int method_number ) {
-        // Get raw signature
-        String signature = method.getSignature();
-        // Get array of strings containing the argument types 
-        String[] args = Utility.methodSignatureArgumentTypes(signature, false);
-        // Get return type string
-        String type = Utility.methodSignatureReturnType(signature, false);
-        // Get method name
-        String name = method.getName(), html_name;
-        // Get method's access flags
-        String access = Utility.accessToString(method.getAccessFlags());
-        // Get the method's attributes, the Code Attribute in particular
-        Attribute[] attributes = method.getAttributes();
-        /* HTML doesn't like names like <clinit> and spaces are places to break
-         * lines. Both we don't want...
-         */
-        access = Utility.replace(access, " ", "&nbsp;");
-        html_name = Class2HTML.toHTML(name);
-        file.print("<TR VALIGN=TOP><TD><FONT COLOR=\"#FF0000\"><A NAME=method" + method_number
-                + ">" + access + "</A></FONT></TD>");
-        file.print("<TD>" + Class2HTML.referenceType(type) + "</TD><TD>" + "<A HREF=" + class_name
-                + "_code.html#method" + method_number + " TARGET=Code>" + html_name
-                + "</A></TD>\n<TD>(");
-        for (int i = 0; i < args.length; i++) {
-            file.print(Class2HTML.referenceType(args[i]));
-            if (i < args.length - 1) {
-                file.print(", ");
-            }
-        }
-        file.print(")</TD></TR>");
-        // Check for thrown exceptions
-        for (int i = 0; i < attributes.length; i++) {
-            attribute_html.writeAttribute(attributes[i], "method" + method_number + "@" + i,
-                    method_number);
-            byte tag = attributes[i].getTag();
-            if (tag == ATTR_EXCEPTIONS) {
-                file.print("<TR VALIGN=TOP><TD COLSPAN=2></TD><TH ALIGN=LEFT>throws</TH><TD>");
-                int[] exceptions = ((ExceptionTable) attributes[i]).getExceptionIndexTable();
-                for (int j = 0; j < exceptions.length; j++) {
-                    file.print(constant_html.referenceConstant(exceptions[j]));
-                    if (j < exceptions.length - 1) {
-                        file.print(", ");
-                    }
-                }
-                file.println("</TD></TR>");
-            } else if (tag == ATTR_CODE) {
-                Attribute[] c_a = ((Code) attributes[i]).getAttributes();
-                for (int j = 0; j < c_a.length; j++) {
-                    attribute_html.writeAttribute(c_a[j], "method" + method_number + "@" + i + "@"
-                            + j, method_number);
-                }
-            }
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/util/Repository.java b/src/main/java/org/apache/bcel/util/Repository.java
deleted file mode 100644
index 9442697..0000000
--- a/src/main/java/org/apache/bcel/util/Repository.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import org.apache.bcel.classfile.JavaClass;
-
-/**
- * Abstract definition of a class repository. Instances may be used
- * to load classes from different sources and may be used in the
- * Repository.setRepository method.
- *
- * @see org.apache.bcel.Repository
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @author David Dixon-Peugh
- */
-public interface Repository extends java.io.Serializable {
-
-    /**
-     * Store the provided class under "clazz.getClassName()" 
-     */
-    void storeClass( JavaClass clazz );
-
-
-    /**
-     * Remove class from repository
-     */
-    void removeClass( JavaClass clazz );
-
-
-    /**
-     * Find the class with the name provided, if the class
-     * isn't there, return NULL.
-     */
-    JavaClass findClass( String className );
-
-
-    /**
-     * Find the class with the name provided, if the class
-     * isn't there, make an attempt to load it.
-     */
-    JavaClass loadClass( String className ) throws java.lang.ClassNotFoundException;
-
-
-    /**
-     * Find the JavaClass instance for the given run-time class object
-     */
-    JavaClass loadClass( Class<?> clazz ) throws java.lang.ClassNotFoundException;
-
-
-    /** Clear all entries from cache.
-     */
-    void clear();
-
-
-    /** Get the ClassPath associated with this Repository
-     */
-    ClassPath getClassPath();
-}
diff --git a/src/main/java/org/apache/bcel/util/SyntheticRepository.java b/src/main/java/org/apache/bcel/util/SyntheticRepository.java
deleted file mode 100644
index 1d096c1..0000000
--- a/src/main/java/org/apache/bcel/util/SyntheticRepository.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.ref.SoftReference;
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.JavaClass;
-
-/**
- * This repository is used in situations where a Class is created
- * outside the realm of a ClassLoader. Classes are loaded from
- * the file systems using the paths specified in the given
- * class path. By default, this is the value returned by
- * ClassPath.getClassPath().
- * <br>
- * It is designed to be used as a singleton, however it
- * can also be used with custom classpaths.
- *
- * @see org.apache.bcel.Repository
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- * @author David Dixon-Peugh
- */
-public class SyntheticRepository implements Repository {
-
-    private static final long serialVersionUID = 2923440730410019444L;
-    //private static final String DEFAULT_PATH = ClassPath.getClassPath();
-    private static final Map<ClassPath, SyntheticRepository> _instances = new HashMap<ClassPath, SyntheticRepository>(); // CLASSPATH X REPOSITORY
-    private ClassPath _path = null;
-    private final Map<String, SoftReference<JavaClass>> _loadedClasses = new HashMap<String, SoftReference<JavaClass>>(); // CLASSNAME X JAVACLASS
-
-
-    private SyntheticRepository(ClassPath path) {
-        _path = path;
-    }
-
-
-    public static SyntheticRepository getInstance() {
-        return getInstance(ClassPath.SYSTEM_CLASS_PATH);
-    }
-
-
-    public static SyntheticRepository getInstance( ClassPath classPath ) {
-        SyntheticRepository rep = _instances.get(classPath);
-        if (rep == null) {
-            rep = new SyntheticRepository(classPath);
-            _instances.put(classPath, rep);
-        }
-        return rep;
-    }
-
-
-    /**
-     * Store a new JavaClass instance into this Repository.
-     */
-    public void storeClass( JavaClass clazz ) {
-        _loadedClasses.put(clazz.getClassName(), new SoftReference<JavaClass>(clazz));
-        clazz.setRepository(this);
-    }
-
-
-    /**
-     * Remove class from repository
-     */
-    public void removeClass( JavaClass clazz ) {
-        _loadedClasses.remove(clazz.getClassName());
-    }
-
-
-    /**
-     * Find an already defined (cached) JavaClass object by name.
-     */
-    public JavaClass findClass( String className ) {
-        SoftReference<JavaClass> ref = _loadedClasses.get(className);
-        if (ref == null) {
-            return null;
-        }
-        return ref.get();
-    }
-
-
-    /**
-     * Find a JavaClass object by name.
-     * If it is already in this Repository, the Repository version
-     * is returned.  Otherwise, the Repository's classpath is searched for
-     * the class (and it is added to the Repository if found).
-     *
-     * @param className the name of the class
-     * @return the JavaClass object
-     * @throws ClassNotFoundException if the class is not in the
-     *   Repository, and could not be found on the classpath
-     */
-    public JavaClass loadClass( String className ) throws ClassNotFoundException {
-        if (className == null || className.equals("")) {
-            throw new IllegalArgumentException("Invalid class name " + className);
-        }
-        className = className.replace('/', '.'); // Just in case, canonical form
-        JavaClass clazz = findClass(className);
-        if (clazz != null) {
-            return clazz;
-        }
-        try {
-            return loadClass(_path.getInputStream(className), className);
-        } catch (IOException e) {
-            throw new ClassNotFoundException("Exception while looking for class " + className
-                    + ": " + e, e);
-        }
-    }
-
-
-    /**
-     * Find the JavaClass object for a runtime Class object.
-     * If a class with the same name is already in this Repository,
-     * the Repository version is returned.  Otherwise, getResourceAsStream()
-     * is called on the Class object to find the class's representation.
-     * If the representation is found, it is added to the Repository.
-     *
-     * @see Class
-     * @param clazz the runtime Class object
-     * @return JavaClass object for given runtime class
-     * @throws ClassNotFoundException if the class is not in the
-     *   Repository, and its representation could not be found
-     */
-    public JavaClass loadClass( Class<?> clazz ) throws ClassNotFoundException {
-        InputStream clsStream = null;
-        try{
-            String className = clazz.getName();
-            JavaClass repositoryClass = findClass(className);
-            if (repositoryClass != null) {
-                return repositoryClass;
-            }
-            String name = className;
-            int i = name.lastIndexOf('.');
-            if (i > 0) {
-                name = name.substring(i + 1);
-            }
-            clsStream = clazz.getResourceAsStream(name + ".class");
-            return loadClass(clsStream, className);
-        } finally {
-            try{
-                if (clsStream != null){
-                    clsStream.close();
-                }
-            } catch(IOException ioe){
-                //don't care
-            }
-        }
-    }
-
-
-    private JavaClass loadClass( InputStream is, String className ) throws ClassNotFoundException {
-        try {
-            if (is != null) {
-                ClassParser parser = new ClassParser(is, className);
-                JavaClass clazz = parser.parse();
-                storeClass(clazz);
-                return clazz;
-            }
-        } catch (IOException e) {
-            throw new ClassNotFoundException("Exception while looking for class " + className
-                    + ": " + e, e);
-        } finally {
-            if (is != null){
-                try {
-                    is.close();
-                } catch (IOException e) {
-                }
-            }
-        }
-        throw new ClassNotFoundException("SyntheticRepository could not load " + className);
-    }
-
-
-    /** ClassPath associated with the Repository.
-     */
-    public ClassPath getClassPath() {
-        return _path;
-    }
-
-
-    /** Clear all entries from cache.
-     */
-    public void clear() {
-        _loadedClasses.clear();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/GraphicalVerifier.java b/src/main/java/org/apache/bcel/verifier/GraphicalVerifier.java
deleted file mode 100644
index 19ddf7d..0000000
--- a/src/main/java/org/apache/bcel/verifier/GraphicalVerifier.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-import java.awt.Dimension;
-import java.awt.Toolkit;
-import javax.swing.UIManager;
-import org.apache.bcel.generic.Type;
-
-/**
- * A graphical user interface application demonstrating JustIce.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class GraphicalVerifier {
-
-    boolean packFrame = false;
-
-
-    /** Constructor. */
-    public GraphicalVerifier() {
-        VerifierAppFrame frame = new VerifierAppFrame();
-        //Frames �berpr�fen, die voreingestellte Gr��e haben
-        //Frames packen, die nutzbare bevorzugte Gr��eninformationen enthalten, z.B. aus ihrem Layout
-        if (packFrame) {
-            frame.pack();
-        } else {
-            frame.validate();
-        }
-        //Das Fenster zentrieren
-        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
-        Dimension frameSize = frame.getSize();
-        if (frameSize.height > screenSize.height) {
-            frameSize.height = screenSize.height;
-        }
-        if (frameSize.width > screenSize.width) {
-            frameSize.width = screenSize.width;
-        }
-        frame.setLocation((screenSize.width - frameSize.width) / 2,
-                (screenSize.height - frameSize.height) / 2);
-        frame.setVisible(true);
-        frame.classNamesJList.setModel(new VerifierFactoryListModel());
-        VerifierFactory.getVerifier(Type.OBJECT.getClassName()); // Fill list with java.lang.Object
-        frame.classNamesJList.setSelectedIndex(0); // default, will verify java.lang.Object
-    }
-
-
-    /** Main method. */
-    public static void main( String[] args ) {
-        try {
-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        new GraphicalVerifier();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/NativeVerifier.java b/src/main/java/org/apache/bcel/verifier/NativeVerifier.java
deleted file mode 100644
index 6ce355c..0000000
--- a/src/main/java/org/apache/bcel/verifier/NativeVerifier.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-/**
- * The NativeVerifier class implements a main(String[] args) method that's
- * roughly compatible to the one in the Verifier class, but that uses the
- * JVM's internal verifier for its class file verification.
- * This can be used for comparison runs between the JVM-internal verifier
- * and JustIce.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public abstract class NativeVerifier {
-
-    /**
-     * This class must not be instantiated.
-     */
-    private NativeVerifier() {
-    }
-
-
-    /**
-     * Works only on the first argument.
-     */
-    public static void main( String[] args ) {
-        if (args.length != 1) {
-            System.out.println("Verifier front-end: need exactly one argument.");
-            System.exit(1);
-        }
-        int dotclasspos = args[0].lastIndexOf(".class");
-        if (dotclasspos != -1) {
-            args[0] = args[0].substring(0, dotclasspos);
-        }
-        args[0] = args[0].replace('/', '.');
-        //System.out.println(args[0]);
-        try {
-            Class.forName(args[0]);
-        } catch (ExceptionInInitializerError eiie) { //subclass of LinkageError!
-            System.out.println("NativeVerifier: ExceptionInInitializerError encountered on '"
-                    + args[0] + "'.");
-            System.out.println(eiie);
-            System.exit(1);
-        } catch (LinkageError le) {
-            System.out.println("NativeVerifier: LinkageError encountered on '" + args[0] + "'.");
-            System.out.println(le);
-            System.exit(1);
-        } catch (ClassNotFoundException cnfe) {
-            System.out.println("NativeVerifier: FILE NOT FOUND: '" + args[0] + "'.");
-            System.exit(1);
-        } catch (Throwable t) {
-            System.out.println("NativeVerifier: Unspecified verification error on'" + args[0]
-                    + "'.");
-            System.exit(1);
-        }
-        System.out.println("NativeVerifier: Class file '" + args[0] + "' seems to be okay.");
-        System.exit(0);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/PassVerifier.java b/src/main/java/org/apache/bcel/verifier/PassVerifier.java
deleted file mode 100644
index d4308d0..0000000
--- a/src/main/java/org/apache/bcel/verifier/PassVerifier.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A PassVerifier actually verifies a class file; it is instantiated
- * by a Verifier.
- * The verification should conform with a certain pass as described
- * in The Java Virtual Machine Specification, 2nd edition.
- * This book describes four passes. Pass one means loading the
- * class and verifying a few static constraints. Pass two actually
- * verifies some other constraints that could enforce loading in
- * referenced class files. Pass three is the first pass that actually
- * checks constraints in the code array of a method in the class file;
- * it has two parts with the first verifying static constraints and
- * the second part verifying structural constraints (where a data flow
- * analysis is used for). The fourth pass, finally, performs checks
- * that can only be done at run-time.
- * JustIce does not have a run-time pass, but certain constraints that
- * are usually delayed until run-time for performance reasons are also
- * checked during the second part of pass three.
- * PassVerifier instances perform caching.
- * That means, if you really want a new verification run of a certain
- * pass you must use a new instance of a given PassVerifier.
- *
- * @version $Id$
- * @author Enver Haase
- * @see org.apache.bcel.verifier.Verifier
- * @see #verify()
- */
-public abstract class PassVerifier {
-
-    /** The (warning) messages. */
-    private final List<String> messages = new ArrayList<String>();
-    /** The VerificationResult cache. */
-    private VerificationResult verificationResult = null;
-
-
-    /**
-     * This method runs a verification pass conforming to the
-     * Java Virtual Machine Specification, 2nd edition, on a
-     * class file.
-     * PassVerifier instances perform caching;
-     * i.e. if the verify() method once determined a VerificationResult,
-     * then this result may be returned after every invocation of this
-     * method instead of running the verification pass anew; likewise with
-     * the result of getMessages().
-     *
-     * @see #getMessages()
-     * @see #addMessage(String)
-     */
-    public VerificationResult verify() {
-        if (verificationResult == null) {
-            verificationResult = do_verify();
-        }
-        return verificationResult;
-    }
-
-
-    /** Does the real verification work, uncached. */
-    public abstract VerificationResult do_verify();
-
-
-    /**
-     * This method adds a (warning) message to the message pool of this
-     * PassVerifier. This method is normally only internally used by
-     * BCEL's class file verifier "JustIce" and should not be used from
-     * the outside. 
-     *
-     * @see #getMessages()
-     */
-    public void addMessage( String message ) {
-        messages.add(message);
-    }
-
-
-    /**
-     * Returns the (warning) messages that this PassVerifier accumulated
-     * during its do_verify()ing work.
-     *
-     * @see #addMessage(String)
-     * @see #do_verify()
-     */
-    public String[] getMessages() {
-        verify(); // create messages if not already done (cached!)
-        return messages.toArray(new String[messages.size()]);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/TransitiveHull.java b/src/main/java/org/apache/bcel/verifier/TransitiveHull.java
deleted file mode 100644
index c49579a..0000000
--- a/src/main/java/org/apache/bcel/verifier/TransitiveHull.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-
-/**
- * This class has a main method implementing a demonstration program
- * of how to use the VerifierFactoryObserver. It transitively verifies
- * all class files encountered; this may take up a lot of time and,
- * more notably, memory.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class TransitiveHull implements VerifierFactoryObserver {
-
-    /** Used for indentation. */
-    private int indent = 0;
-
-
-    /** Not publicly instantiable. */
-    private TransitiveHull() {
-    }
-
-
-    /* Implementing VerifierFactoryObserver. */
-    public void update( String classname ) {
-        System.gc(); // avoid swapping if possible.
-        for (int i = 0; i < indent; i++) {
-            System.out.print(" ");
-        }
-        System.out.println(classname);
-        indent += 1;
-        Verifier v = VerifierFactory.getVerifier(classname);
-        VerificationResult vr;
-        vr = v.doPass1();
-        if (vr != VerificationResult.VR_OK) {
-            System.out.println("Pass 1:\n" + vr);
-        }
-        vr = v.doPass2();
-        if (vr != VerificationResult.VR_OK) {
-            System.out.println("Pass 2:\n" + vr);
-        }
-        if (vr == VerificationResult.VR_OK) {
-            try {
-                JavaClass jc = Repository.lookupClass(v.getClassName());
-                for (int i = 0; i < jc.getMethods().length; i++) {
-                    vr = v.doPass3a(i);
-                    if (vr != VerificationResult.VR_OK) {
-                        System.out.println(v.getClassName() + ", Pass 3a, method " + i + " ['"
-                                + jc.getMethods()[i] + "']:\n" + vr);
-                    }
-                    vr = v.doPass3b(i);
-                    if (vr != VerificationResult.VR_OK) {
-                        System.out.println(v.getClassName() + ", Pass 3b, method " + i + " ['"
-                                + jc.getMethods()[i] + "']:\n" + vr);
-                    }
-                }
-            } catch (ClassNotFoundException e) {
-                System.err.println("Could not find class " + v.getClassName() + " in Repository");
-            }
-        }
-        indent -= 1;
-    }
-
-
-    /**
-     * This method implements a demonstration program
-     * of how to use the VerifierFactoryObserver. It transitively verifies
-     * all class files encountered; this may take up a lot of time and,
-     * more notably, memory.
-     */
-    public static void main( String[] args ) {
-        if (args.length != 1) {
-            System.out.println("Need exactly one argument: The root class to verify.");
-            System.exit(1);
-        }
-        int dotclasspos = args[0].lastIndexOf(".class");
-        if (dotclasspos != -1) {
-            args[0] = args[0].substring(0, dotclasspos);
-        }
-        args[0] = args[0].replace('/', '.');
-        TransitiveHull th = new TransitiveHull();
-        VerifierFactory.attach(th);
-        VerifierFactory.getVerifier(args[0]); // the observer is called back and does the actual trick.
-        VerifierFactory.detach(th);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/VerificationResult.java b/src/main/java/org/apache/bcel/verifier/VerificationResult.java
deleted file mode 100644
index 8865189..0000000
--- a/src/main/java/org/apache/bcel/verifier/VerificationResult.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-/**
- * A VerificationResult is what a PassVerifier returns
- * after verifying.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class VerificationResult {
-
-    /**
-     * Constant to indicate verification has not been tried yet.
-     * This happens if some earlier verification pass did not return VERIFIED_OK.
-     */
-    public static final int VERIFIED_NOTYET = 0;
-
-    /** Constant to indicate verification was passed. */
-    public static final int VERIFIED_OK = 1;
-
-    /** Constant to indicate verfication failed. */
-    public static final int VERIFIED_REJECTED = 2;
-
-    /**
-     * This string is the canonical message for verifications that have not been tried yet.
-     * This happens if some earlier verification pass did not return {@link #VERIFIED_OK}.
-     */
-    private static final String VERIFIED_NOTYET_MSG = "Not yet verified.";
-
-    /** This string is the canonical message for passed verification passes. */
-    private static final String VERIFIED_OK_MSG = "Passed verification.";
-
-    /**
-     * Canonical VerificationResult for not-yet-tried verifications.
-     * This happens if some earlier verification pass did not return {@link #VERIFIED_OK}.
-     */
-    public static final VerificationResult VR_NOTYET = new VerificationResult(VERIFIED_NOTYET, VERIFIED_NOTYET_MSG);
-
-    /** Canonical VerificationResult for passed verifications. */
-    public static final VerificationResult VR_OK = new VerificationResult(VERIFIED_OK, VERIFIED_OK_MSG);
-
-    /** The numeric status. */
-    private final int numeric;
-
-    /** The detailed message. */
-    private final String detailMessage;
-
-
-    /** The usual constructor. */
-    public VerificationResult(int status, String message) {
-        numeric = status;
-        detailMessage = message;
-    }
-
-
-    /**
-     * Returns one one the {@link #VERIFIED_OK}, {@link #VERIFIED_NOTYET},
-     * {@link #VERIFIED_REJECTED} constants.
-     */
-    public int getStatus() {
-        return numeric;
-    }
-
-
-    /** Returns a detailed message. */
-    public String getMessage() {
-        return detailMessage;
-    }
-
-
-    /**
-     * @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() {
-        return numeric ^ detailMessage.hashCode();
-    }
-
-
-    /**
-     * Returns if two VerificationResult instances are equal.
-     */
-    @Override
-    public boolean equals( Object o ) {
-        if (!(o instanceof VerificationResult)) {
-            return false;
-        }
-        VerificationResult other = (VerificationResult) o;
-        return ((other.numeric == this.numeric) && (other.detailMessage.equals(this.detailMessage)));
-    }
-
-
-    /**
-     * Returns a String representation of the VerificationResult.
-     */
-    @Override
-    public String toString() {
-        String ret = "";
-        if (numeric == VERIFIED_NOTYET) {
-            ret = "VERIFIED_NOTYET";
-        }
-        if (numeric == VERIFIED_OK) {
-            ret = "VERIFIED_OK";
-        }
-        if (numeric == VERIFIED_REJECTED) {
-            ret = "VERIFIED_REJECTED";
-        }
-        ret += "\n" + detailMessage + "\n";
-        return ret;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/Verifier.java b/src/main/java/org/apache/bcel/verifier/Verifier.java
deleted file mode 100644
index fd2a0af..0000000
--- a/src/main/java/org/apache/bcel/verifier/Verifier.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.verifier.statics.Pass1Verifier;
-import org.apache.bcel.verifier.statics.Pass2Verifier;
-import org.apache.bcel.verifier.statics.Pass3aVerifier;
-import org.apache.bcel.verifier.structurals.Pass3bVerifier;
-
-/**
- * A Verifier instance is there to verify a class file according to The Java Virtual
- * Machine Specification, 2nd Edition.
- *
- * Pass-3b-verification includes pass-3a-verification;
- * pass-3a-verification includes pass-2-verification;
- * pass-2-verification includes pass-1-verification.
- *
- * A Verifier creates PassVerifier instances to perform the actual verification.
- * Verifier instances are usually generated by the VerifierFactory.
- *
- * @version $Id$
- * @author Enver Haase
- * @see org.apache.bcel.verifier.VerifierFactory
- * @see org.apache.bcel.verifier.PassVerifier
- */
-public class Verifier {
-
-    /**
-     * The name of the class this verifier operates on.
-     */
-    private final String classname;
-    /** A Pass1Verifier for this Verifier instance. */
-    private Pass1Verifier p1v;
-    /** A Pass2Verifier for this Verifier instance. */
-    private Pass2Verifier p2v;
-    /** The Pass3aVerifiers for this Verifier instance. Key: Interned string specifying the method number. */
-    private final Map<String, Pass3aVerifier> p3avs = new HashMap<String, Pass3aVerifier>();
-    /** The Pass3bVerifiers for this Verifier instance. Key: Interned string specifying the method number. */
-    private final Map<String, Pass3bVerifier> p3bvs = new HashMap<String, Pass3bVerifier>();
-
-
-    /** Returns the VerificationResult for the given pass. */
-    public VerificationResult doPass1() {
-        if (p1v == null) {
-            p1v = new Pass1Verifier(this);
-        }
-        return p1v.verify();
-    }
-
-
-    /** Returns the VerificationResult for the given pass. */
-    public VerificationResult doPass2() {
-        if (p2v == null) {
-            p2v = new Pass2Verifier(this);
-        }
-        return p2v.verify();
-    }
-
-
-    /** Returns the VerificationResult for the given pass. */
-    public VerificationResult doPass3a( int method_no ) {
-        String key = Integer.toString(method_no);
-        Pass3aVerifier p3av;
-        p3av = p3avs.get(key);
-        if (p3avs.get(key) == null) {
-            p3av = new Pass3aVerifier(this, method_no);
-            p3avs.put(key, p3av);
-        }
-        return p3av.verify();
-    }
-
-
-    /** Returns the VerificationResult for the given pass. */
-    public VerificationResult doPass3b( int method_no ) {
-        String key = Integer.toString(method_no);
-        Pass3bVerifier p3bv;
-        p3bv = p3bvs.get(key);
-        if (p3bvs.get(key) == null) {
-            p3bv = new Pass3bVerifier(this, method_no);
-            p3bvs.put(key, p3bv);
-        }
-        return p3bv.verify();
-    }
-
-
-    /**
-     * Instantiation is done by the VerifierFactory.
-     *
-     * @see VerifierFactory
-     */
-    Verifier(String fully_qualified_classname) {
-        classname = fully_qualified_classname;
-        flush();
-    }
-
-
-    /**
-     * Returns the name of the class this verifier operates on.
-     * This is particularly interesting when this verifier was created
-     * recursively by another Verifier and you got a reference to this
-     * Verifier by the getVerifiers() method of the VerifierFactory.
-     * @see VerifierFactory
-     */
-    public final String getClassName() {
-        return classname;
-    }
-
-
-    /**
-     * Forget everything known about the class file; that means, really
-     * start a new verification of a possibly different class file from
-     * BCEL's repository.
-     *
-     */
-    public void flush() {
-        p1v = null;
-        p2v = null;
-        p3avs.clear();
-        p3bvs.clear();
-    }
-
-
-    /**
-     * This returns all the (warning) messages collected during verification.
-     * A prefix shows from which verifying pass a message originates.
-     */
-    public String[] getMessages() throws ClassNotFoundException {
-        List<String> messages = new ArrayList<String>();
-        if (p1v != null) {
-            String[] p1m = p1v.getMessages();
-            for (String element : p1m) {
-                messages.add("Pass 1: " + element);
-            }
-        }
-        if (p2v != null) {
-            String[] p2m = p2v.getMessages();
-            for (String element : p2m) {
-                messages.add("Pass 2: " + element);
-            }
-        }
-        for (Pass3aVerifier pv : p3avs.values()) {
-            String[] p3am = pv.getMessages();
-            int meth = pv.getMethodNo();
-            for (String element : p3am) {
-                messages.add("Pass 3a, method " + meth + " ('"
-                        + org.apache.bcel.Repository.lookupClass(classname).getMethods()[meth]
-                        + "'): " + element);
-            }
-        }
-        for (Pass3bVerifier pv : p3bvs.values()) {
-            String[] p3bm = pv.getMessages();
-            int meth = pv.getMethodNo();
-            for (String element : p3bm) {
-                messages.add("Pass 3b, method " + meth + " ('"
-                        + org.apache.bcel.Repository.lookupClass(classname).getMethods()[meth]
-                        + "'): " + element);
-            }
-        }
-        String[] ret = new String[messages.size()];
-        for (int i = 0; i < messages.size(); i++) {
-            ret[i] = messages.get(i);
-        }
-        return ret;
-    }
-
-
-    /**
-     * Verifies class files.
-     * This is a simple demonstration of how the API of BCEL's
-     * class file verifier "JustIce" may be used.
-     * You should supply command-line arguments which are
-     * fully qualified namea of the classes to verify. These class files
-     * must be somewhere in your CLASSPATH (refer to Sun's
-     * documentation for questions about this) or you must have put the classes
-     * into the BCEL Repository yourself (via 'addClass(JavaClass)').
-     */
-    public static void main( String[] args ) {
-        System.out
-                .println("JustIce by Enver Haase, (C) 2001-2002.\n<http://bcel.sourceforge.net>\n<http://commons.apache.org/bcel>\n");
-        for (int k = 0; k < args.length; k++) {
-            try {
-                if (args[k].endsWith(".class")) {
-                    int dotclasspos = args[k].lastIndexOf(".class");
-                    if (dotclasspos != -1) {
-                        args[k] = args[k].substring(0, dotclasspos);
-                    }
-                }
-                args[k] = args[k].replace('/', '.');
-                System.out.println("Now verifying: " + args[k] + "\n");
-                Verifier v = VerifierFactory.getVerifier(args[k]);
-                VerificationResult vr;
-                vr = v.doPass1();
-                System.out.println("Pass 1:\n" + vr);
-                vr = v.doPass2();
-                System.out.println("Pass 2:\n" + vr);
-                if (vr == VerificationResult.VR_OK) {
-                    JavaClass jc = org.apache.bcel.Repository.lookupClass(args[k]);
-                    for (int i = 0; i < jc.getMethods().length; i++) {
-                        vr = v.doPass3a(i);
-                        System.out.println("Pass 3a, method number " + i + " ['"
-                                + jc.getMethods()[i] + "']:\n" + vr);
-                        vr = v.doPass3b(i);
-                        System.out.println("Pass 3b, method number " + i + " ['"
-                                + jc.getMethods()[i] + "']:\n" + vr);
-                    }
-                }
-                System.out.println("Warnings:");
-                String[] warnings = v.getMessages();
-                if (warnings.length == 0) {
-                    System.out.println("<none>");
-                }
-                for (String warning : warnings) {
-                    System.out.println(warning);
-                }
-                System.out.println("\n");
-                // avoid swapping.
-                v.flush();
-                org.apache.bcel.Repository.clearCache();
-                System.gc();
-            } catch (ClassNotFoundException e) {
-                e.printStackTrace();
-            }
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/VerifierAppFrame.java b/src/main/java/org/apache/bcel/verifier/VerifierAppFrame.java
deleted file mode 100644
index c540587..0000000
--- a/src/main/java/org/apache/bcel/verifier/VerifierAppFrame.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-import java.awt.AWTEvent;
-import java.awt.CardLayout;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.InputEvent;
-import java.awt.event.WindowEvent;
-import javax.swing.BorderFactory;
-import javax.swing.JFrame;
-import javax.swing.JList;
-import javax.swing.JMenu;
-import javax.swing.JMenuBar;
-import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JSplitPane;
-import javax.swing.JTextPane;
-import javax.swing.ListSelectionModel;
-import javax.swing.event.ListSelectionEvent;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-
-/**
- * This class implements a machine-generated frame for use with
- * the GraphicalVerfifier.
- *
- * @version $Id$
- * @author Enver Haase
- * @see GraphicalVerifier
- */
-public class VerifierAppFrame extends JFrame {
-
-    private static final long serialVersionUID = -542458133073307640L;
-    JPanel contentPane;
-    JSplitPane jSplitPane1 = new JSplitPane();
-    JPanel jPanel1 = new JPanel();
-    JPanel jPanel2 = new JPanel();
-    JSplitPane jSplitPane2 = new JSplitPane();
-    JPanel jPanel3 = new JPanel();
-    JList classNamesJList = new JList();
-    GridLayout gridLayout1 = new GridLayout();
-    JPanel messagesPanel = new JPanel();
-    GridLayout gridLayout2 = new GridLayout();
-    JMenuBar jMenuBar1 = new JMenuBar();
-    JMenu jMenu1 = new JMenu();
-    JScrollPane jScrollPane1 = new JScrollPane();
-    JScrollPane messagesScrollPane = new JScrollPane();
-    JScrollPane jScrollPane3 = new JScrollPane();
-    GridLayout gridLayout4 = new GridLayout();
-    JScrollPane jScrollPane4 = new JScrollPane();
-    CardLayout cardLayout1 = new CardLayout();
-    private final String JUSTICE_VERSION = "JustIce by Enver Haase";
-    private String current_class;
-    GridLayout gridLayout3 = new GridLayout();
-    JTextPane pass1TextPane = new JTextPane();
-    JTextPane pass2TextPane = new JTextPane();
-    JTextPane messagesTextPane = new JTextPane();
-    JMenuItem newFileMenuItem = new JMenuItem();
-    JSplitPane jSplitPane3 = new JSplitPane();
-    JSplitPane jSplitPane4 = new JSplitPane();
-    JScrollPane jScrollPane2 = new JScrollPane();
-    JScrollPane jScrollPane5 = new JScrollPane();
-    JScrollPane jScrollPane6 = new JScrollPane();
-    JScrollPane jScrollPane7 = new JScrollPane();
-    JList pass3aJList = new JList();
-    JList pass3bJList = new JList();
-    JTextPane pass3aTextPane = new JTextPane();
-    JTextPane pass3bTextPane = new JTextPane();
-    JMenu jMenu2 = new JMenu();
-    JMenuItem whatisMenuItem = new JMenuItem();
-    JMenuItem aboutMenuItem = new JMenuItem();
-
-
-    /** Constructor. */
-    public VerifierAppFrame() {
-        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
-        try {
-            jbInit();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-
-    /** Initizalization of the components. */
-    private void jbInit() throws Exception {
-        //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Ihr Symbol]")));
-        contentPane = (JPanel) this.getContentPane();
-        contentPane.setLayout(cardLayout1);
-        this.setJMenuBar(jMenuBar1);
-        this.setSize(new Dimension(708, 451));
-        this.setTitle("JustIce");
-        jPanel1.setMinimumSize(new Dimension(100, 100));
-        jPanel1.setPreferredSize(new Dimension(100, 100));
-        jPanel1.setLayout(gridLayout1);
-        jSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT);
-        jPanel2.setLayout(gridLayout2);
-        jPanel3.setMinimumSize(new Dimension(200, 100));
-        jPanel3.setPreferredSize(new Dimension(400, 400));
-        jPanel3.setLayout(gridLayout4);
-        messagesPanel.setMinimumSize(new Dimension(100, 100));
-        messagesPanel.setLayout(gridLayout3);
-        jPanel2.setMinimumSize(new Dimension(200, 100));
-        jMenu1.setText("File");
-        jScrollPane1.getViewport().setBackground(Color.red);
-        messagesScrollPane.getViewport().setBackground(Color.red);
-        messagesScrollPane.setPreferredSize(new Dimension(10, 10));
-        classNamesJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
-
-            public void valueChanged( ListSelectionEvent e ) {
-                classNamesJList_valueChanged(e);
-            }
-        });
-        classNamesJList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-        jScrollPane3.setBorder(BorderFactory.createLineBorder(Color.black));
-        jScrollPane3.setPreferredSize(new Dimension(100, 100));
-        gridLayout4.setRows(4);
-        gridLayout4.setColumns(1);
-        gridLayout4.setHgap(1);
-        jScrollPane4.setBorder(BorderFactory.createLineBorder(Color.black));
-        jScrollPane4.setPreferredSize(new Dimension(100, 100));
-        pass1TextPane.setBorder(BorderFactory.createRaisedBevelBorder());
-        pass1TextPane.setToolTipText("");
-        pass1TextPane.setEditable(false);
-        pass2TextPane.setBorder(BorderFactory.createRaisedBevelBorder());
-        pass2TextPane.setEditable(false);
-        messagesTextPane.setBorder(BorderFactory.createRaisedBevelBorder());
-        messagesTextPane.setEditable(false);
-        newFileMenuItem.setText("New...");
-        newFileMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(78,
-                InputEvent.CTRL_MASK, true));
-        newFileMenuItem.addActionListener(new java.awt.event.ActionListener() {
-
-            public void actionPerformed( ActionEvent e ) {
-                newFileMenuItem_actionPerformed(e);
-            }
-        });
-        pass3aTextPane.setEditable(false);
-        pass3bTextPane.setEditable(false);
-        pass3aJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
-
-            public void valueChanged( ListSelectionEvent e ) {
-                pass3aJList_valueChanged(e);
-            }
-        });
-        pass3bJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
-
-            public void valueChanged( ListSelectionEvent e ) {
-                pass3bJList_valueChanged(e);
-            }
-        });
-        jMenu2.setText("Help");
-        whatisMenuItem.setText("What is...");
-        whatisMenuItem.addActionListener(new java.awt.event.ActionListener() {
-
-            public void actionPerformed( ActionEvent e ) {
-                whatisMenuItem_actionPerformed(e);
-            }
-        });
-        aboutMenuItem.setText("About");
-        aboutMenuItem.addActionListener(new java.awt.event.ActionListener() {
-
-            public void actionPerformed( ActionEvent e ) {
-                aboutMenuItem_actionPerformed(e);
-            }
-        });
-        jSplitPane2.add(messagesPanel, JSplitPane.BOTTOM);
-        messagesPanel.add(messagesScrollPane, null);
-        messagesScrollPane.getViewport().add(messagesTextPane, null);
-        jSplitPane2.add(jPanel3, JSplitPane.TOP);
-        jPanel3.add(jScrollPane3, null);
-        jScrollPane3.getViewport().add(pass1TextPane, null);
-        jPanel3.add(jScrollPane4, null);
-        jPanel3.add(jSplitPane3, null);
-        jSplitPane3.add(jScrollPane2, JSplitPane.LEFT);
-        jScrollPane2.getViewport().add(pass3aJList, null);
-        jSplitPane3.add(jScrollPane5, JSplitPane.RIGHT);
-        jScrollPane5.getViewport().add(pass3aTextPane, null);
-        jPanel3.add(jSplitPane4, null);
-        jSplitPane4.add(jScrollPane6, JSplitPane.LEFT);
-        jScrollPane6.getViewport().add(pass3bJList, null);
-        jSplitPane4.add(jScrollPane7, JSplitPane.RIGHT);
-        jScrollPane7.getViewport().add(pass3bTextPane, null);
-        jScrollPane4.getViewport().add(pass2TextPane, null);
-        jSplitPane1.add(jPanel2, JSplitPane.TOP);
-        jPanel2.add(jScrollPane1, null);
-        jSplitPane1.add(jPanel1, JSplitPane.BOTTOM);
-        jPanel1.add(jSplitPane2, null);
-        jScrollPane1.getViewport().add(classNamesJList, null);
-        jMenuBar1.add(jMenu1);
-        jMenuBar1.add(jMenu2);
-        contentPane.add(jSplitPane1, "jSplitPane1");
-        jMenu1.add(newFileMenuItem);
-        jMenu2.add(whatisMenuItem);
-        jMenu2.add(aboutMenuItem);
-        jSplitPane2.setDividerLocation(300);
-        jSplitPane3.setDividerLocation(150);
-        jSplitPane4.setDividerLocation(150);
-    }
-
-
-    /** Overridden to stop the application on a closing window. */
-    @Override
-    protected void processWindowEvent( WindowEvent e ) {
-        super.processWindowEvent(e);
-        if (e.getID() == WindowEvent.WINDOW_CLOSING) {
-            System.exit(0);
-        }
-    }
-
-
-    synchronized void classNamesJList_valueChanged( ListSelectionEvent e ) {
-        if (e.getValueIsAdjusting()) {
-            return;
-        }
-        current_class = classNamesJList.getSelectedValue().toString();
-        try {
-            verify();
-        } catch (ClassNotFoundException ex) {
-            // FIXME: report the error using the GUI
-            ex.printStackTrace();
-        }
-        classNamesJList.setSelectedValue(current_class, true);
-    }
-
-
-    private void verify() throws ClassNotFoundException {
-        setTitle("PLEASE WAIT");
-        Verifier v = VerifierFactory.getVerifier(current_class);
-        v.flush(); // Don't cache the verification result for this class.
-        VerificationResult vr;
-        vr = v.doPass1();
-        if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
-            pass1TextPane.setText(vr.getMessage());
-            pass1TextPane.setBackground(Color.red);
-            pass2TextPane.setText("");
-            pass2TextPane.setBackground(Color.yellow);
-            pass3aTextPane.setText("");
-            pass3aJList.setListData(new String[0]);
-            pass3aTextPane.setBackground(Color.yellow);
-            pass3bTextPane.setText("");
-            pass3bJList.setListData(new String[0]);
-            pass3bTextPane.setBackground(Color.yellow);
-        } else { // Must be VERIFIED_OK, Pass 1 does not know VERIFIED_NOTYET
-            pass1TextPane.setBackground(Color.green);
-            pass1TextPane.setText(vr.getMessage());
-            vr = v.doPass2();
-            if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
-                pass2TextPane.setText(vr.getMessage());
-                pass2TextPane.setBackground(Color.red);
-                pass3aTextPane.setText("");
-                pass3aTextPane.setBackground(Color.yellow);
-                pass3aJList.setListData(new String[0]);
-                pass3bTextPane.setText("");
-                pass3bTextPane.setBackground(Color.yellow);
-                pass3bJList.setListData(new String[0]);
-            } else { // must be Verified_OK, because Pass1 was OK (cannot be Verified_NOTYET).
-                pass2TextPane.setText(vr.getMessage());
-                pass2TextPane.setBackground(Color.green);
-                JavaClass jc = Repository.lookupClass(current_class);
-                /*
-                 boolean all3aok = true;
-                 boolean all3bok = true;
-                 String all3amsg = "";
-                 String all3bmsg = "";
-                 */
-                String[] methodnames = new String[jc.getMethods().length];
-                for (int i = 0; i < jc.getMethods().length; i++) {
-                    methodnames[i] = jc.getMethods()[i].toString().replace('\n', ' ').replace('\t',
-                            ' ');
-                }
-                pass3aJList.setListData(methodnames);
-                pass3aJList.setSelectionInterval(0, jc.getMethods().length - 1);
-                pass3bJList.setListData(methodnames);
-                pass3bJList.setSelectionInterval(0, jc.getMethods().length - 1);
-            }
-        }
-        String[] msgs = v.getMessages();
-        messagesTextPane.setBackground(msgs.length == 0 ? Color.green : Color.yellow);
-        String allmsgs = "";
-        for (int i = 0; i < msgs.length; i++) {
-            msgs[i] = msgs[i].replace('\n', ' ');
-            allmsgs += msgs[i] + "\n\n";
-        }
-        messagesTextPane.setText(allmsgs);
-        setTitle(current_class + " - " + JUSTICE_VERSION);
-    }
-
-
-    void newFileMenuItem_actionPerformed( ActionEvent e ) {
-        String classname = JOptionPane
-                .showInputDialog("Please enter the fully qualified name of a class or interface to verify:");
-        if ((classname == null) || (classname.equals(""))) {
-            return;
-        }
-        VerifierFactory.getVerifier(classname); // let observers do the rest.
-        classNamesJList.setSelectedValue(classname, true);
-    }
-
-
-    synchronized void pass3aJList_valueChanged( ListSelectionEvent e ) {
-        if (e.getValueIsAdjusting()) {
-            return;
-        }
-        Verifier v = VerifierFactory.getVerifier(current_class);
-        String all3amsg = "";
-        boolean all3aok = true;
-        boolean rejected = false;
-        for (int i = 0; i < pass3aJList.getModel().getSize(); i++) {
-            if (pass3aJList.isSelectedIndex(i)) {
-                VerificationResult vr = v.doPass3a(i);
-                if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
-                    all3aok = false;
-                    rejected = true;
-                }
-                JavaClass jc = null;
-                try {
-                    jc = Repository.lookupClass(v.getClassName());
-                    all3amsg += "Method '" + jc.getMethods()[i] + "': "
-                            + vr.getMessage().replace('\n', ' ') + "\n\n";
-                } catch (ClassNotFoundException ex) {
-                    // FIXME: handle the error
-                    ex.printStackTrace();
-                }
-            }
-        }
-        pass3aTextPane.setText(all3amsg);
-        pass3aTextPane.setBackground(all3aok ? Color.green : (rejected ? Color.red : Color.yellow));
-    }
-
-
-    synchronized void pass3bJList_valueChanged( ListSelectionEvent e ) {
-        if (e.getValueIsAdjusting()) {
-            return;
-        }
-        Verifier v = VerifierFactory.getVerifier(current_class);
-        String all3bmsg = "";
-        boolean all3bok = true;
-        boolean rejected = false;
-        for (int i = 0; i < pass3bJList.getModel().getSize(); i++) {
-            if (pass3bJList.isSelectedIndex(i)) {
-                VerificationResult vr = v.doPass3b(i);
-                if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
-                    all3bok = false;
-                    rejected = true;
-                }
-                JavaClass jc = null;
-                try {
-                    jc = Repository.lookupClass(v.getClassName());
-                    all3bmsg += "Method '" + jc.getMethods()[i] + "': "
-                            + vr.getMessage().replace('\n', ' ') + "\n\n";
-                } catch (ClassNotFoundException ex) {
-                    // FIXME: handle the error
-                    ex.printStackTrace();
-                }
-            }
-        }
-        pass3bTextPane.setText(all3bmsg);
-        pass3bTextPane.setBackground(all3bok ? Color.green : (rejected ? Color.red : Color.yellow));
-    }
-
-
-    void aboutMenuItem_actionPerformed( ActionEvent e ) {
-        JOptionPane
-                .showMessageDialog(
-                        this,
-                        "JustIce is a Java class file verifier.\nIt was implemented by Enver Haase in 2001, 2002.\n<http://commons.apache.org/bcel/>",
-                        JUSTICE_VERSION, JOptionPane.INFORMATION_MESSAGE);
-    }
-
-
-    void whatisMenuItem_actionPerformed( ActionEvent e ) {
-        JOptionPane
-                .showMessageDialog(
-                        this,
-                        "The upper four boxes to the right reflect verification passes according to The Java Virtual Machine Specification.\nThese are (in that order): Pass one, Pass two, Pass three (before data flow analysis), Pass three (data flow analysis).\nThe bottom box to the right shows (warning) messages; warnings do not cause a class to be rejected.",
-                        JUSTICE_VERSION, JOptionPane.INFORMATION_MESSAGE);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/VerifierFactory.java b/src/main/java/org/apache/bcel/verifier/VerifierFactory.java
deleted file mode 100644
index 9121825..0000000
--- a/src/main/java/org/apache/bcel/verifier/VerifierFactory.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-/**
- * This class produces instances of the Verifier class. Its purpose is to make
- * sure that they are singleton instances with respect to the class name they
- * operate on. That means, for every class (represented by a unique fully qualified
- * class name) there is exactly one Verifier.
- *
- * @version $Id$
- * @author Enver Haase
- * @see org.apache.bcel.verifier.Verifier
- */
-public class VerifierFactory {
-
-    /**
-     * The HashMap that holds the data about the already-constructed Verifier instances.
-     */
-    private static final Map<String, Verifier> hashMap = new HashMap<String, Verifier>();
-    /**
-     * The VerifierFactoryObserver instances that observe the VerifierFactory.
-     */
-    private static final List<VerifierFactoryObserver> observers = new Vector<VerifierFactoryObserver>();
-
-
-    /**
-     * The VerifierFactory is not instantiable.
-     */
-    private VerifierFactory() {
-    }
-
-
-    /**
-     * Returns the (only) verifier responsible for the class with the given name.
-     * Possibly a new Verifier object is transparently created.
-     * @return the (only) verifier responsible for the class with the given name.
-     */
-    public static Verifier getVerifier( String fully_qualified_classname ) {
-        Verifier v = hashMap.get(fully_qualified_classname);
-        if (v == null) {
-            v = new Verifier(fully_qualified_classname);
-            hashMap.put(fully_qualified_classname, v);
-            notify(fully_qualified_classname);
-        }
-        return v;
-    }
-
-
-    /**
-     * Notifies the observers of a newly generated Verifier.
-     */
-    private static void notify( String fully_qualified_classname ) {
-        // notify the observers
-        for (VerifierFactoryObserver vfo : observers) {
-            vfo.update(fully_qualified_classname);
-        }
-    }
-
-
-    /**
-     * Returns all Verifier instances created so far.
-     * This is useful when a Verifier recursively lets
-     * the VerifierFactory create other Verifier instances
-     * and if you want to verify the transitive hull of
-     * referenced class files.
-     */
-    public static Verifier[] getVerifiers() {
-        Verifier[] vs = new Verifier[hashMap.values().size()];
-        return hashMap.values().toArray(vs); // Because vs is big enough, vs is used to store the values into and returned!
-    }
-
-
-    /**
-     * Adds the VerifierFactoryObserver o to the list of observers.
-     */
-    public static void attach( VerifierFactoryObserver o ) {
-        observers.add(o);
-    }
-
-
-    /**
-     * Removes the VerifierFactoryObserver o from the list of observers.
-     */
-    public static void detach( VerifierFactoryObserver o ) {
-        observers.remove(o);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java b/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java
deleted file mode 100644
index fe9a986..0000000
--- a/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-
-import javax.swing.event.ListDataEvent;
-import javax.swing.event.ListDataListener;
-
-/**
- * This class implements an adapter; it implements both a Swing ListModel and
- * a VerifierFactoryObserver.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class VerifierFactoryListModel implements org.apache.bcel.verifier.VerifierFactoryObserver,
-        javax.swing.ListModel {
-
-    private final List<ListDataListener> listeners = new ArrayList<ListDataListener>();
-    private final Set<String> cache = new TreeSet<String>();
-
-
-    public VerifierFactoryListModel() {
-        VerifierFactory.attach(this);
-        update(null); // fill cache.
-    }
-
-
-    public synchronized void update( String s ) {
-        Verifier[] verifiers = VerifierFactory.getVerifiers();
-        int num_of_verifiers = verifiers.length;
-        cache.clear();
-        for (Verifier verifier : verifiers) {
-            cache.add(verifier.getClassName());
-        }
-        for (ListDataListener listener : listeners) {
-            ListDataEvent e = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, num_of_verifiers - 1);
-            listener.contentsChanged(e);
-        }
-    }
-
-
-    public synchronized void addListDataListener( ListDataListener l ) {
-        listeners.add(l);
-    }
-
-
-    public synchronized void removeListDataListener( javax.swing.event.ListDataListener l ) {
-        listeners.remove(l);
-    }
-
-
-    public synchronized int getSize() {
-        return cache.size();
-    }
-
-
-    public synchronized Object getElementAt( int index ) {
-        return (cache.toArray(new String[cache.size()]))[index];
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/VerifierFactoryObserver.java b/src/main/java/org/apache/bcel/verifier/VerifierFactoryObserver.java
deleted file mode 100644
index 7a0fd29..0000000
--- a/src/main/java/org/apache/bcel/verifier/VerifierFactoryObserver.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier;
-
-/**
- * VerifierFactoryObserver instances are notified when new Verifier
- * instances are created.
- *
- * @version $Id$
- * @author Enver Haase
- *
- * @see VerifierFactory#getVerifier(String)
- * @see VerifierFactory#getVerifiers()
- * @see VerifierFactory#attach(VerifierFactoryObserver)
- * @see VerifierFactory#detach(VerifierFactoryObserver)
- */
-public interface VerifierFactoryObserver {
-
-    /**
-     * VerifierFactoryObserver instances are notified invoking this method.
-     * The String argument is the fully qualified class name of a class a
-     * new Verifier instance created by the VerifierFactory operates on.
-     */
-    void update( String s );
-}
diff --git a/src/main/java/org/apache/bcel/verifier/VerifyDialog.java b/src/main/java/org/apache/bcel/verifier/VerifyDialog.java
deleted file mode 100644
index 93e4804..0000000
--- a/src/main/java/org/apache/bcel/verifier/VerifyDialog.java
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.verifier;
-
-import java.awt.Color;
-
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-
-/**
- * A class for simple graphical class file verification.
- * Use the main(String []) method with fully qualified
- * class names as arguments to use it as a stand-alone
- * application.
- * Use the VerifyDialog(String) constructor to use this
- * class in your application.
- * [This class was created using VisualAge for Java,
- * but it does not work under VAJ itself (Version 3.02 JDK 1.2)]
- * @version $Id$
- * @author Enver Haase
- * @see #main(String[])
- * @see #VerifyDialog(String)
- */
-public class VerifyDialog extends javax.swing.JDialog {
-
-    private static final long serialVersionUID = -6374807677043142313L;
-    /** Machine-generated. */
-    private javax.swing.JPanel ivjJDialogContentPane = null;
-    /** Machine-generated. */
-    private javax.swing.JPanel ivjPass1Panel = null;
-    /** Machine-generated. */
-    private javax.swing.JPanel ivjPass2Panel = null;
-    /** Machine-generated. */
-    private javax.swing.JPanel ivjPass3Panel = null;
-    /** Machine-generated. */
-    private javax.swing.JButton ivjPass1Button = null;
-    /** Machine-generated. */
-    private javax.swing.JButton ivjPass2Button = null;
-    /** Machine-generated. */
-    private javax.swing.JButton ivjPass3Button = null;
-    /** Machine-generated. */
-    IvjEventHandler ivjEventHandler = new IvjEventHandler();
-    /**
-     * The class to verify. Default set to 'java.lang.Object'
-     * in case this class is instantiated via one of the many
-     * machine-generated constructors.
-     */
-    private String class_name = "java.lang.Object";
-    /**
-     * This field is here to count the number of open VerifyDialog
-     * instances so the JVM can be exited afer every Dialog had been
-     * closed.
-     */
-    private static int classes_to_verify;
-
-    /** Machine-generated. */
-    class IvjEventHandler implements java.awt.event.ActionListener {
-
-        public void actionPerformed( java.awt.event.ActionEvent e ) {
-            if (e.getSource() == VerifyDialog.this.getPass1Button()) {
-                connEtoC1(e);
-            }
-            if (e.getSource() == VerifyDialog.this.getPass2Button()) {
-                connEtoC2(e);
-            }
-            if (e.getSource() == VerifyDialog.this.getPass3Button()) {
-                connEtoC3(e);
-            }
-            if (e.getSource() == VerifyDialog.this.getFlushButton()) {
-                connEtoC4(e);
-            }
-        }
-    }
-
-    /** Machine-generated. */
-    private javax.swing.JButton ivjFlushButton = null;
-
-
-    /** Machine-generated. */
-    public VerifyDialog() {
-        super();
-        initialize();
-    }
-
-
-    /** Machine-generated. */
-    public VerifyDialog(java.awt.Dialog owner) {
-        super(owner);
-    }
-
-
-    /** Machine-generated. */
-    public VerifyDialog(java.awt.Dialog owner, String title) {
-        super(owner, title);
-    }
-
-
-    /** Machine-generated. */
-    public VerifyDialog(java.awt.Dialog owner, String title, boolean modal) {
-        super(owner, title, modal);
-    }
-
-
-    /** Machine-generated. */
-    public VerifyDialog(java.awt.Dialog owner, boolean modal) {
-        super(owner, modal);
-    }
-
-
-    /** Machine-generated. */
-    public VerifyDialog(java.awt.Frame owner) {
-        super(owner);
-    }
-
-
-    /** Machine-generated. */
-    public VerifyDialog(java.awt.Frame owner, String title) {
-        super(owner, title);
-    }
-
-
-    /** Machine-generated. */
-    public VerifyDialog(java.awt.Frame owner, String title, boolean modal) {
-        super(owner, title, modal);
-    }
-
-
-    /** Machine-generated. */
-    public VerifyDialog(java.awt.Frame owner, boolean modal) {
-        super(owner, modal);
-    }
-
-
-    /**
-     * Use this constructor if you want a possibility to verify other
-     * class files than java.lang.Object.
-     * @param fully_qualified_class_name java.lang.String
-     */
-    public VerifyDialog(String fully_qualified_class_name) {
-        super();
-        int dotclasspos = fully_qualified_class_name.lastIndexOf(".class");
-        if (dotclasspos != -1) {
-            fully_qualified_class_name = fully_qualified_class_name.substring(0, dotclasspos);
-        }
-        fully_qualified_class_name = fully_qualified_class_name.replace('/', '.');
-        class_name = fully_qualified_class_name;
-        initialize();
-    }
-
-
-    /** Machine-generated. */
-    private void connEtoC1( java.awt.event.ActionEvent arg1 ) {
-        try {
-            // user code begin {1}
-            // user code end
-            this.pass1Button_ActionPerformed(arg1);
-            // user code begin {2}
-            // user code end
-        } catch (java.lang.Throwable ivjExc) {
-            // user code begin {3}
-            // user code end
-            handleException(ivjExc);
-        }
-    }
-
-
-    /** Machine-generated. */
-    private void connEtoC2( java.awt.event.ActionEvent arg1 ) {
-        try {
-            // user code begin {1}
-            // user code end
-            this.pass2Button_ActionPerformed(arg1);
-            // user code begin {2}
-            // user code end
-        } catch (java.lang.Throwable ivjExc) {
-            // user code begin {3}
-            // user code end
-            handleException(ivjExc);
-        }
-    }
-
-
-    /** Machine-generated. */
-    private void connEtoC3( java.awt.event.ActionEvent arg1 ) {
-        try {
-            // user code begin {1}
-            // user code end
-            this.pass4Button_ActionPerformed(arg1);
-            // user code begin {2}
-            // user code end
-        } catch (java.lang.Throwable ivjExc) {
-            // user code begin {3}
-            // user code end
-            handleException(ivjExc);
-        }
-    }
-
-
-    /** Machine-generated. */
-    private void connEtoC4( java.awt.event.ActionEvent arg1 ) {
-        try {
-            // user code begin {1}
-            // user code end
-            this.flushButton_ActionPerformed(arg1);
-            // user code begin {2}
-            // user code end
-        } catch (java.lang.Throwable ivjExc) {
-            // user code begin {3}
-            // user code end
-            handleException(ivjExc);
-        }
-    }
-
-
-    /** Machine-generated. */
-    public void flushButton_ActionPerformed( java.awt.event.ActionEvent actionEvent ) {
-        VerifierFactory.getVerifier(class_name).flush();
-        Repository.removeClass(class_name); // Make sure it will be reloaded.
-        getPass1Panel().setBackground(Color.gray);
-        getPass1Panel().repaint();
-        getPass2Panel().setBackground(Color.gray);
-        getPass2Panel().repaint();
-        getPass3Panel().setBackground(Color.gray);
-        getPass3Panel().repaint();
-    }
-
-
-    /** Machine-generated. */
-    private javax.swing.JButton getFlushButton() {
-        if (ivjFlushButton == null) {
-            try {
-                ivjFlushButton = new javax.swing.JButton();
-                ivjFlushButton.setName("FlushButton");
-                ivjFlushButton.setText("Flush: Forget old verification results");
-                ivjFlushButton.setBackground(java.awt.SystemColor.controlHighlight);
-                ivjFlushButton.setBounds(60, 215, 300, 30);
-                ivjFlushButton.setForeground(java.awt.Color.red);
-                ivjFlushButton.setActionCommand("FlushButton");
-                // user code begin {1}
-                // user code end
-            } catch (java.lang.Throwable ivjExc) {
-                // user code begin {2}
-                // user code end
-                handleException(ivjExc);
-            }
-        }
-        return ivjFlushButton;
-    }
-
-
-    /** Machine-generated. */
-    private javax.swing.JPanel getJDialogContentPane() {
-        if (ivjJDialogContentPane == null) {
-            try {
-                ivjJDialogContentPane = new javax.swing.JPanel();
-                ivjJDialogContentPane.setName("JDialogContentPane");
-                ivjJDialogContentPane.setLayout(null);
-                getJDialogContentPane().add(getPass1Panel(), getPass1Panel().getName());
-                getJDialogContentPane().add(getPass3Panel(), getPass3Panel().getName());
-                getJDialogContentPane().add(getPass2Panel(), getPass2Panel().getName());
-                getJDialogContentPane().add(getPass1Button(), getPass1Button().getName());
-                getJDialogContentPane().add(getPass2Button(), getPass2Button().getName());
-                getJDialogContentPane().add(getPass3Button(), getPass3Button().getName());
-                getJDialogContentPane().add(getFlushButton(), getFlushButton().getName());
-                // user code begin {1}
-                // user code end
-            } catch (java.lang.Throwable ivjExc) {
-                // user code begin {2}
-                // user code end
-                handleException(ivjExc);
-            }
-        }
-        return ivjJDialogContentPane;
-    }
-
-
-    /** Machine-generated. */
-    private javax.swing.JButton getPass1Button() {
-        if (ivjPass1Button == null) {
-            try {
-                ivjPass1Button = new javax.swing.JButton();
-                ivjPass1Button.setName("Pass1Button");
-                ivjPass1Button.setText("Pass1: Verify binary layout of .class file");
-                ivjPass1Button.setBackground(java.awt.SystemColor.controlHighlight);
-                ivjPass1Button.setBounds(100, 40, 300, 30);
-                ivjPass1Button.setActionCommand("Button1");
-                // user code begin {1}
-                // user code end
-            } catch (java.lang.Throwable ivjExc) {
-                // user code begin {2}
-                // user code end
-                handleException(ivjExc);
-            }
-        }
-        return ivjPass1Button;
-    }
-
-
-    /** Machine-generated. */
-    private javax.swing.JPanel getPass1Panel() {
-        if (ivjPass1Panel == null) {
-            try {
-                ivjPass1Panel = new javax.swing.JPanel();
-                ivjPass1Panel.setName("Pass1Panel");
-                ivjPass1Panel.setLayout(null);
-                ivjPass1Panel.setBackground(java.awt.SystemColor.controlShadow);
-                ivjPass1Panel.setBounds(30, 30, 50, 50);
-                // user code begin {1}
-                // user code end
-            } catch (java.lang.Throwable ivjExc) {
-                // user code begin {2}
-                // user code end
-                handleException(ivjExc);
-            }
-        }
-        return ivjPass1Panel;
-    }
-
-
-    /** Machine-generated. */
-    private javax.swing.JButton getPass2Button() {
-        if (ivjPass2Button == null) {
-            try {
-                ivjPass2Button = new javax.swing.JButton();
-                ivjPass2Button.setName("Pass2Button");
-                ivjPass2Button.setText("Pass 2: Verify static .class file constraints");
-                ivjPass2Button.setBackground(java.awt.SystemColor.controlHighlight);
-                ivjPass2Button.setBounds(100, 100, 300, 30);
-                ivjPass2Button.setActionCommand("Button2");
-                // user code begin {1}
-                // user code end
-            } catch (java.lang.Throwable ivjExc) {
-                // user code begin {2}
-                // user code end
-                handleException(ivjExc);
-            }
-        }
-        return ivjPass2Button;
-    }
-
-
-    /** Machine-generated. */
-    private javax.swing.JPanel getPass2Panel() {
-        if (ivjPass2Panel == null) {
-            try {
-                ivjPass2Panel = new javax.swing.JPanel();
-                ivjPass2Panel.setName("Pass2Panel");
-                ivjPass2Panel.setLayout(null);
-                ivjPass2Panel.setBackground(java.awt.SystemColor.controlShadow);
-                ivjPass2Panel.setBounds(30, 90, 50, 50);
-                // user code begin {1}
-                // user code end
-            } catch (java.lang.Throwable ivjExc) {
-                // user code begin {2}
-                // user code end
-                handleException(ivjExc);
-            }
-        }
-        return ivjPass2Panel;
-    }
-
-
-    /** Machine-generated. */
-    private javax.swing.JButton getPass3Button() {
-        if (ivjPass3Button == null) {
-            try {
-                ivjPass3Button = new javax.swing.JButton();
-                ivjPass3Button.setName("Pass3Button");
-                ivjPass3Button.setText("Passes 3a+3b: Verify code arrays");
-                ivjPass3Button.setBackground(java.awt.SystemColor.controlHighlight);
-                ivjPass3Button.setBounds(100, 160, 300, 30);
-                ivjPass3Button.setActionCommand("Button2");
-                // user code begin {1}
-                // user code end
-            } catch (java.lang.Throwable ivjExc) {
-                // user code begin {2}
-                // user code end
-                handleException(ivjExc);
-            }
-        }
-        return ivjPass3Button;
-    }
-
-
-    /** Machine-generated. */
-    private javax.swing.JPanel getPass3Panel() {
-        if (ivjPass3Panel == null) {
-            try {
-                ivjPass3Panel = new javax.swing.JPanel();
-                ivjPass3Panel.setName("Pass3Panel");
-                ivjPass3Panel.setLayout(null);
-                ivjPass3Panel.setBackground(java.awt.SystemColor.controlShadow);
-                ivjPass3Panel.setBounds(30, 150, 50, 50);
-                // user code begin {1}
-                // user code end
-            } catch (java.lang.Throwable ivjExc) {
-                // user code begin {2}
-                // user code end
-                handleException(ivjExc);
-            }
-        }
-        return ivjPass3Panel;
-    }
-
-
-    /** Machine-generated. */
-    private void handleException( java.lang.Throwable exception ) {
-        /* Uncomment the following lines to print uncaught exceptions to stdout */
-        System.out.println("--------- UNCAUGHT EXCEPTION ---------");
-        exception.printStackTrace(System.out);
-    }
-
-
-    /** Machine-generated. */
-    private void initConnections() throws java.lang.Exception {
-        // user code begin {1}
-        // user code end
-        getPass1Button().addActionListener(ivjEventHandler);
-        getPass2Button().addActionListener(ivjEventHandler);
-        getPass3Button().addActionListener(ivjEventHandler);
-        getFlushButton().addActionListener(ivjEventHandler);
-    }
-
-
-    /** Machine-generated. */
-    private void initialize() {
-        try {
-            // user code begin {1}
-            // user code end
-            setName("VerifyDialog");
-            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-            setSize(430, 280);
-            setVisible(true);
-            setModal(true);
-            setResizable(false);
-            setContentPane(getJDialogContentPane());
-            initConnections();
-        } catch (java.lang.Throwable ivjExc) {
-            handleException(ivjExc);
-        }
-        // user code begin {2}
-        setTitle("'" + class_name + "' verification - JustIce / BCEL");
-        // user code end
-    }
-
-
-    /**
-     * Verifies one or more class files.
-     * Verification results are presented graphically: Red means 'rejected',
-     * green means 'passed' while yellow means 'could not be verified yet'.
-     * @param args java.lang.String[] fully qualified names of classes to verify.
-     */
-    public static void main( java.lang.String[] args ) {
-        classes_to_verify = args.length;
-        for (String arg : args) {
-            try {
-                VerifyDialog aVerifyDialog;
-                aVerifyDialog = new VerifyDialog(arg);
-                aVerifyDialog.setModal(true);
-                aVerifyDialog.addWindowListener(new java.awt.event.WindowAdapter() {
-
-                    @Override
-                    public void windowClosing( java.awt.event.WindowEvent e ) {
-                        classes_to_verify--;
-                        if (classes_to_verify == 0) {
-                            System.exit(0);
-                        }
-                    }
-                });
-                aVerifyDialog.setVisible(true);
-            } catch (Throwable exception) {
-                System.err.println("Exception occurred in main() of javax.swing.JDialog");
-                exception.printStackTrace(System.out);
-            }
-        }
-    }
-
-
-    /** Machine-generated. */
-    public void pass1Button_ActionPerformed( java.awt.event.ActionEvent actionEvent ) {
-        Verifier v = VerifierFactory.getVerifier(class_name);
-        VerificationResult vr = v.doPass1();
-        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
-            getPass1Panel().setBackground(Color.green);
-            getPass1Panel().repaint();
-        }
-        if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
-            getPass1Panel().setBackground(Color.red);
-            getPass1Panel().repaint();
-        }
-    }
-
-
-    /** Machine-generated. */
-    public void pass2Button_ActionPerformed( java.awt.event.ActionEvent actionEvent ) {
-        pass1Button_ActionPerformed(actionEvent);
-        Verifier v = VerifierFactory.getVerifier(class_name);
-        VerificationResult vr = v.doPass2();
-        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
-            getPass2Panel().setBackground(Color.green);
-            getPass2Panel().repaint();
-        }
-        if (vr.getStatus() == VerificationResult.VERIFIED_NOTYET) {
-            getPass2Panel().setBackground(Color.yellow);
-            getPass2Panel().repaint();
-        }
-        if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
-            getPass2Panel().setBackground(Color.red);
-            getPass2Panel().repaint();
-        }
-    }
-
-
-    /** Machine-generated. */
-    public void pass4Button_ActionPerformed( java.awt.event.ActionEvent actionEvent ) {
-        pass2Button_ActionPerformed(actionEvent);
-        Color color = Color.green;
-        Verifier v = VerifierFactory.getVerifier(class_name);
-        VerificationResult vr = v.doPass2();
-        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
-            JavaClass jc = null;
-            try {
-                jc = Repository.lookupClass(class_name);
-                int nr = jc.getMethods().length;
-                for (int i = 0; i < nr; i++) {
-                    vr = v.doPass3b(i);
-                    if (vr.getStatus() != VerificationResult.VERIFIED_OK) {
-                        color = Color.red;
-                        break;
-                    }
-                }
-            } catch (ClassNotFoundException ex) {
-                // FIXME: report the error
-                ex.printStackTrace();
-            }
-        } else {
-            color = Color.yellow;
-        }
-        getPass3Panel().setBackground(color);
-        getPass3Panel().repaint();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/AssertionViolatedException.java b/src/main/java/org/apache/bcel/verifier/exc/AssertionViolatedException.java
deleted file mode 100644
index 0cb8da1..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/AssertionViolatedException.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * Instances of this class should never be thrown. When such an instance is thrown,
- * this is due to an INTERNAL ERROR of BCEL's class file verifier &quot;JustIce&quot;.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public final class AssertionViolatedException extends RuntimeException{
-    private static final long serialVersionUID = -129822266349567409L;
-    /** The error message. */
-    private String detailMessage;
-    /** Constructs a new AssertionViolatedException with null as its error message string. */
-    public AssertionViolatedException(){
-        super();
-    }
-    /**
-     * Constructs a new AssertionViolatedException with the specified error message preceded
-     * by &quot;INTERNAL ERROR: &quot;.
-     */
-    public AssertionViolatedException(String message){
-        super(message = "INTERNAL ERROR: "+message); // Thanks to Java, the constructor call here must be first.
-        detailMessage=message;
-    }
-    /**
-     * Constructs a new AssertionViolationException with the specified error message and initial cause
-     */
-    public AssertionViolatedException(String message, Throwable initCause) {
-        super(message = "INTERNAL ERROR: "+message, initCause);
-        detailMessage=message;
-    }    
-    /** Extends the error message with a string before ("pre") and after ("post") the
-        'old' error message. All of these three strings are allowed to be null, and null
-        is always replaced by the empty string (""). In particular, after invoking this
-        method, the error message of this object can no longer be null.
-    */
-    public void extendMessage(String pre, String post){
-        if (pre  == null) {
-            pre="";
-        }
-        if (detailMessage == null) {
-            detailMessage="";
-        }
-        if (post == null) {
-            post="";
-        }
-        detailMessage = pre+detailMessage+post;
-    }
-    /**
-     * Returns the error message string of this AssertionViolatedException object.
-     * @return the error message string of this AssertionViolatedException.
-     */
-    @Override
-    public String getMessage(){
-        return detailMessage;
-    }
-
-    /** 
-     * DO NOT USE. It's for experimental testing during development only.
-     */
-    public static void main(String[] args){
-        AssertionViolatedException ave = new AssertionViolatedException("Oops!");
-        ave.extendMessage("\nFOUND:\n\t","\nExiting!!\n");
-        throw ave;
-    }
-
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/ClassConstraintException.java b/src/main/java/org/apache/bcel/verifier/exc/ClassConstraintException.java
deleted file mode 100644
index d85e4a5..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/ClassConstraintException.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce"
- * when a class file to verify does not pass the verification pass 2 as described
- * in the Java Virtual Machine specification, 2nd edition.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class ClassConstraintException extends VerificationException{
-    private static final long serialVersionUID = -4745598983569128296L;
-
-    /**
-     * Constructs a new ClassConstraintException with null as its error message string.
-     */
-    public ClassConstraintException(){
-        super();
-    }
-
-    /**
-     * Constructs a new ClassConstraintException with the specified error message.
-     */
-    public ClassConstraintException(String message){
-        super (message);
-    }
-
-    /**
-     * Constructs a new ClassConstraintException with the specified error message and cause
-     */
-    public ClassConstraintException(String message, Throwable initCause){
-        super(message, initCause);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/CodeConstraintException.java b/src/main/java/org/apache/bcel/verifier/exc/CodeConstraintException.java
deleted file mode 100644
index 29b1483..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/CodeConstraintException.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
- * a class file does not pass the verification pass 3. Note that the pass 3 used by
- * "JustIce" involves verification that is usually delayed to pass 4.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public abstract class CodeConstraintException extends VerificationException{
-    private static final long serialVersionUID = -7265388214714996640L;
-    /**
-     * Constructs a new CodeConstraintException with null as its error message string.
-     */
-    CodeConstraintException(){
-        super();
-    }
-    /**
-     * Constructs a new CodeConstraintException with the specified error message.
-     */
-    CodeConstraintException(String message){
-        super(message);
-    }    
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/InvalidMethodException.java b/src/main/java/org/apache/bcel/verifier/exc/InvalidMethodException.java
deleted file mode 100644
index 0dad66e..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/InvalidMethodException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce"
- * when the verification of a method is requested that does not exist.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class InvalidMethodException extends RuntimeException{
-
-    private static final long serialVersionUID = -7060302743724808051L;
-
-    /** Constructs an InvalidMethodException with the specified detail message. */
-    public InvalidMethodException(String message){
-        super(message);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/LinkingConstraintException.java b/src/main/java/org/apache/bcel/verifier/exc/LinkingConstraintException.java
deleted file mode 100644
index 0167040..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/LinkingConstraintException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
- * a class file to verify does not pass the verification pass 3 because of a violation
- * of a constraint that is usually only verified at run-time (pass 4).
- * The Java Virtual Machine Specification, 2nd edition, states that certain constraints
- * are usually verified at run-time for performance reasons (the verification of those
- * constraints requires loading in and recursively verifying referenced classes) that
- * conceptually belong to pass 3; to be precise, that conceptually belong to the
- * data flow analysis of pass 3 (called pass 3b in JustIce).
- * These are the checks necessary for resolution: Compare pages 142-143 ("4.9.1 The
- * Verification Process") and pages 50-51 ("2.17.3 Linking: Verification, Preparation,
- * and Resolution") of the above mentioned book.
- * <B>TODO: At this time, this class is not used in JustIce.</B>
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class LinkingConstraintException extends StructuralCodeConstraintException{
-
-    private static final long serialVersionUID = -5239226345026321126L;
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/LoadingException.java b/src/main/java/org/apache/bcel/verifier/exc/LoadingException.java
deleted file mode 100644
index 18256f8..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/LoadingException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * When loading a class file, BCEL will throw an instance of LoadingException if
- * the class file is malformed; so it is not conforming to the "Pass 1" verification
- * process as described in the Java Virtual Machine specification, 2nd. edition.
- * @version $Id$
- * @author Enver Haase
- */
-public class LoadingException extends VerifierConstraintViolatedException{
-
-    private static final long serialVersionUID = -7911901533049018823L;
-
-    /**
-     * Constructs a new LoadingException with null as its error message string.
-     */
-    public LoadingException(){
-        super();
-    }
-
-    /**
-     * Constructs a new LoadingException with the specified error message.
-     */
-    public LoadingException(String message){
-        super (message);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/LocalVariableInfoInconsistentException.java b/src/main/java/org/apache/bcel/verifier/exc/LocalVariableInfoInconsistentException.java
deleted file mode 100644
index 5d39478..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/LocalVariableInfoInconsistentException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * A LocalVariableInfoInconsistentException instance is thrown by
- * the LocalVariableInfo class when it detects that the information
- * it holds is inconsistent; this is normally due to inconsistent
- * LocalVariableTable entries in the Code attribute of a certain
- * Method object.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class LocalVariableInfoInconsistentException extends ClassConstraintException{
-    private static final long serialVersionUID = -2833180480144304190L;
-
-    /**
-     * Constructs a new LocalVariableInfoInconsistentException with null as its error message string.
-     */
-    public LocalVariableInfoInconsistentException(){
-        super();
-    }
-
-    /**
-     * Constructs a new LocalVariableInfoInconsistentException with the specified error message.
-     */
-    public LocalVariableInfoInconsistentException(String message){
-        super (message);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/StaticCodeConstraintException.java b/src/main/java/org/apache/bcel/verifier/exc/StaticCodeConstraintException.java
deleted file mode 100644
index a087e17..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/StaticCodeConstraintException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
- * a class file to verify does not pass the verification pass 3 because of a violation
- * of a static constraint as described in the Java Virtual Machine Specification,
- * 2nd edition, 4.8.1, pages 133-137. The static constraints checking part of pass 3
- * is called pass 3a in JustIce.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public abstract class StaticCodeConstraintException extends CodeConstraintException{
-    private static final long serialVersionUID = 3858523065007725128L;
-
-    public StaticCodeConstraintException(String message){
-        super(message);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/StaticCodeInstructionConstraintException.java b/src/main/java/org/apache/bcel/verifier/exc/StaticCodeInstructionConstraintException.java
deleted file mode 100644
index 894b51b..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/StaticCodeInstructionConstraintException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
- * a class file to verify does not pass the verification pass 3 because of a violation
- * of a static constraint as described in the Java Virtual Machine Specification,
- * Second edition, 4.8.1, pages 133-137. The static constraints checking part of pass 3
- * is called pass 3a in JustIce.
- * Static constraints on the instructions in the code array are checked early in
- * pass 3a and are described on page 134 in the Java Virtual Machine Specification,
- * Second Edition.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class StaticCodeInstructionConstraintException extends StaticCodeConstraintException{
-    private static final long serialVersionUID = 4987255974346614794L;
-
-    public StaticCodeInstructionConstraintException(String message){
-        super(message);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/StaticCodeInstructionOperandConstraintException.java b/src/main/java/org/apache/bcel/verifier/exc/StaticCodeInstructionOperandConstraintException.java
deleted file mode 100644
index 61d0d54..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/StaticCodeInstructionOperandConstraintException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
- * a class file to verify does not pass the verification pass 3 because of a violation
- * of a static constraint as described in the Java Virtual Machine Specification,
- * Second edition, 4.8.1, pages 133-137. The static constraints checking part of pass 3
- * is called pass 3a in JustIce.
- * Static constraints on the operands of instructions in the code array are checked late in
- * pass 3a and are described on page 134-137 in the Java Virtual Machine Specification,
- * Second Edition.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class StaticCodeInstructionOperandConstraintException extends StaticCodeConstraintException{
-    private static final long serialVersionUID = 4780787099381933487L;
-
-    public StaticCodeInstructionOperandConstraintException(String message){
-        super(message);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/StructuralCodeConstraintException.java b/src/main/java/org/apache/bcel/verifier/exc/StructuralCodeConstraintException.java
deleted file mode 100644
index 9b15555..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/StructuralCodeConstraintException.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
- * a class file to verify does not pass the verification pass 3 because of a violation
- * of a structural constraint as described in the Java Virtual Machine Specification,
- * 2nd edition, 4.8.2, pages 137-139.
- * Note that the notion of a "structural" constraint is somewhat misleading. Structural
- * constraints are constraints on relationships between Java virtual machine instructions.
- * These are the constraints where data-flow analysis is needed to verify if they hold.
- * The data flow analysis of pass 3 is called pass 3b in JustIce.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class StructuralCodeConstraintException extends CodeConstraintException{
-    private static final long serialVersionUID = 5406842000007181420L;
-    /**
-     * Constructs a new StructuralCodeConstraintException with the specified error message.
-     */
-    public StructuralCodeConstraintException(String message){
-        super(message);
-    }
-    /**
-     * Constructs a new StructuralCodeConstraintException with null as its error message string.
-     */
-    public StructuralCodeConstraintException(){
-        super();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/Utility.java b/src/main/java/org/apache/bcel/verifier/exc/Utility.java
deleted file mode 100644
index 99a60e2..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/Utility.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
-/**
- * A utility class providing convenience methods concerning Throwable instances.
- * @version $Id$
- * @author Enver Haase
- * @see java.lang.Throwable
- */
-public final class Utility{
-    /** This class is not instantiable. */
-    private Utility(){}
-
-    /** This method returns the stack trace of a Throwable instance as a String. */
-    public static String getStackTrace(Throwable t){
-        StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter(sw);
-        t.printStackTrace(pw);
-        return sw.toString();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/VerificationException.java b/src/main/java/org/apache/bcel/verifier/exc/VerificationException.java
deleted file mode 100644
index 2df00f3..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/VerificationException.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce" when a
- * class file to verify does not pass one of the verification passes 2 or 3.
- * Note that the pass 3 used by "JustIce" involves verification that is usually
- * delayed to pass 4.
- * The name of this class is justified by the Java Virtual Machine Specification, 2nd
- * edition, page 164, 5.4.1 where verification as a part of the linking process is
- * defined to be the verification happening in passes 2 and 3.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public abstract class VerificationException extends VerifierConstraintViolatedException{
-    private static final long serialVersionUID = 8012776320318623652L;
-
-    /**
-     * Constructs a new VerificationException with null as its error message string.
-     */
-    VerificationException(){
-        super();
-    }
-    /**
-     * Constructs a new VerificationException with the specified error message.
-     */
-    VerificationException(String message){
-        super(message);
-    }
-
-    /**
-     * Constructs a new VerificationException with the specified error message and exception
-     */
-    VerificationException(String message, Throwable initCause){
-        super(message, initCause);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/VerifierConstraintViolatedException.java b/src/main/java/org/apache/bcel/verifier/exc/VerifierConstraintViolatedException.java
deleted file mode 100644
index 7a8e2c7..0000000
--- a/src/main/java/org/apache/bcel/verifier/exc/VerifierConstraintViolatedException.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.exc;
-
-
-/**
- * Instances of this class are thrown by BCEL's class file verifier "JustIce"
- * whenever
- * verification proves that some constraint of a class file (as stated in the
- * Java Virtual Machine Specification, Edition 2) is violated.
- * This is roughly equivalent to the VerifyError the JVM-internal verifiers
- * throw.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public abstract class VerifierConstraintViolatedException extends RuntimeException{
-    // /** The name of the offending class that did not pass the verifier. */
-    // String name_of_offending_class;
-
-    private static final long serialVersionUID = 2946136970490179465L;
-    /** The specified error message. */
-    private String detailMessage;
-    /**
-     * Constructs a new VerifierConstraintViolatedException with null as its error message string.
-     */
-    VerifierConstraintViolatedException(){
-        super();
-    }
-    /**
-     * Constructs a new VerifierConstraintViolatedException with the specified error message.
-     */
-    VerifierConstraintViolatedException(String message){
-        super(message); // Not that important
-        detailMessage = message;
-    }
-    /**
-     * Constructs a new VerifierConstraintViolationException with the specified error message and cause
-     */
-    VerifierConstraintViolatedException(String message, Throwable initCause){
-        super(message, initCause);
-        detailMessage = message;
-    }
-
-
-    /** Extends the error message with a string before ("pre") and after ("post") the
-        'old' error message. All of these three strings are allowed to be null, and null
-        is always replaced by the empty string (""). In particular, after invoking this
-        method, the error message of this object can no longer be null.
-    */
-    public void extendMessage(String pre, String post){
-        if (pre  == null) {
-            pre="";
-        }
-        if (detailMessage == null) {
-            detailMessage="";
-        }
-        if (post == null) {
-            post="";
-        }
-        detailMessage = pre+detailMessage+post;
-    }
-    /**
-     * Returns the error message string of this VerifierConstraintViolatedException object.
-     * @return the error message string of this VerifierConstraintViolatedException.
-     */
-    @Override
-    public String getMessage(){
-        return detailMessage;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/DOUBLE_Upper.java b/src/main/java/org/apache/bcel/verifier/statics/DOUBLE_Upper.java
deleted file mode 100644
index ba241e1..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/DOUBLE_Upper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.Type;
-
-/**
- * This class represents the upper half of a DOUBLE variable.
- * @version $Id$
- * @author Enver Haase
- */
-public final class DOUBLE_Upper extends Type{
-
-    private static final long serialVersionUID = -3046888862357818539L;
-    /** The one and only instance of this class. */
-    private static final DOUBLE_Upper singleInstance = new DOUBLE_Upper();
-
-    /** The constructor; this class must not be instantiated from the outside. */
-    private DOUBLE_Upper(){
-        super(Constants.T_UNKNOWN, "Long_Upper");
-    }
-
-    /** Use this method to get the single instance of this class. */
-    public static DOUBLE_Upper theInstance(){
-        return singleInstance;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/IntList.java b/src/main/java/org/apache/bcel/verifier/statics/IntList.java
deleted file mode 100644
index 64c4e46..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/IntList.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A small utility class representing a set of basic int values.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class IntList{
-    /** The int are stored as Integer objects here. */
-    private final List<Integer> theList;
-    /** This constructor creates an empty list. */
-    IntList(){
-        theList = new ArrayList<Integer>();
-    }
-    /** Adds an element to the list. */
-    void add(int i){
-        theList.add(Integer.valueOf(i));
-    }
-    /** Checks if the specified int is already in the list. */
-    boolean contains(int i){
-        Integer[] ints = new Integer[theList.size()];
-        theList.toArray(ints);
-        for (Integer k : ints) {
-            if (i == k.intValue()) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/LONG_Upper.java b/src/main/java/org/apache/bcel/verifier/statics/LONG_Upper.java
deleted file mode 100644
index 7a6190f..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/LONG_Upper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.Type;
-
-/**
- * This class represents the upper half of a LONG variable.
- * @version $Id$
- * @author Enver Haase
- */
-public final class LONG_Upper extends Type{
-
-    private static final long serialVersionUID = 3650377550491597107L;
-    /** The one and only instance of this class. */
-    private static final LONG_Upper singleInstance = new LONG_Upper();
-
-    /** The constructor; this class must not be instantiated from the outside. */
-    private LONG_Upper(){
-        super(Constants.T_UNKNOWN, "Long_Upper");
-    }
-
-    /** Use this method to get the single instance of this class. */
-    public static LONG_Upper theInstance(){
-        return singleInstance;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java b/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java
deleted file mode 100644
index 719b4fc..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import java.util.Hashtable;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.verifier.exc.LocalVariableInfoInconsistentException;
-
-/**
- * A utility class holding the information about
- * the name and the type of a local variable in
- * a given slot (== index). This information
- * often changes in course of byte code offsets.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class LocalVariableInfo{
-
-    /** The types database. KEY: String representing the offset integer. */
-    private final Hashtable<String, Type> types = new Hashtable<String, Type>();
-    /** The names database. KEY: String representing the offset integer. */
-    private final Hashtable<String, String> names = new Hashtable<String, String>();
-
-    /**
-     * Adds a name of a local variable and a certain slot to our 'names'
-     * (Hashtable) database.
-     */
-    private void setName(int offset, String name){
-        names.put( ((Integer.toString(offset))), name);
-    }
-    /**
-     * Adds a type of a local variable and a certain slot to our 'types'
-     * (Hashtable) database.
-     */
-    private void setType(int offset, Type t){
-        types.put( ((Integer.toString(offset))), t);
-    }
-
-    /**
-     * Returns the type of the local variable that uses this local
-     * variable slot at the given bytecode offset.
-     * Care for legal bytecode offsets yourself, otherwise the return value
-     * might be wrong.
-     * May return 'null' if nothing is known about the type of this local
-     * variable slot at the given bytecode offset.
-     */
-    public Type getType(int offset){
-        return types.get(Integer.toString(offset));
-    }
-    /**
-     * Returns the name of the local variable that uses this local
-     * variable slot at the given bytecode offset.
-     * Care for legal bytecode offsets yourself, otherwise the return value
-     * might be wrong.
-     * May return 'null' if nothing is known about the type of this local
-     * variable slot at the given bytecode offset.
-     */
-    public String getName(int offset){
-        return (names.get(Integer.toString(offset)));
-    }
-    /**
-     * Adds some information about this local variable (slot).
-     * @throws LocalVariableInfoInconsistentException if the new information conflicts
-     *         with already gathered information.
-     */
-    public void add(String name, int startpc, int length, Type t) throws LocalVariableInfoInconsistentException{
-        for (int i=startpc; i<=startpc+length; i++){ // incl/incl-notation!
-            add(i,name,t);
-        }
-    }
-
-    /**
-     * Adds information about name and type for a given offset.
-     * @throws LocalVariableInfoInconsistentException if the new information conflicts
-     *         with already gathered information.
-     */
-    private void add(int offset, String name, Type t) throws LocalVariableInfoInconsistentException{
-        if (getName(offset) != null){
-            if (! getName(offset).equals(name)){
-                throw new LocalVariableInfoInconsistentException("At bytecode offset '"+offset+"' a local variable has two different names: '"+getName(offset)+"' and '"+name+"'.");
-            }
-        }
-        if (getType(offset) != null){
-            if (! getType(offset).equals(t)){
-                throw new LocalVariableInfoInconsistentException("At bytecode offset '"+offset+"' a local variable has two different types: '"+getType(offset)+"' and '"+t+"'.");
-            }
-        }
-        setName(offset, name);
-        setType(offset, t);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/LocalVariablesInfo.java b/src/main/java/org/apache/bcel/verifier/statics/LocalVariablesInfo.java
deleted file mode 100644
index 9730007..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/LocalVariablesInfo.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.LocalVariableInfoInconsistentException;
-
-/**
- * A utility class holding the information about
- * the names and the types of the local variables in
- * a given method.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class LocalVariablesInfo{
-
-    /** The information about the local variables is stored here. */
-    private final LocalVariableInfo[] localVariableInfos;
-
-    /** The constructor. */
-    LocalVariablesInfo(int max_locals){
-        localVariableInfos = new LocalVariableInfo[max_locals];
-        for (int i=0; i<max_locals; i++){
-            localVariableInfos[i] = new LocalVariableInfo();
-        }
-    }
-
-    /** Returns the LocalVariableInfo for the given slot. */
-    public LocalVariableInfo getLocalVariableInfo(int slot){
-        if (slot < 0 || slot >= localVariableInfos.length){
-            throw new AssertionViolatedException("Slot number for local variable information out of range.");
-        }
-        return localVariableInfos[slot];
-    }
-
-    /**
-     * Adds information about the local variable in slot 'slot'. Automatically 
-     * adds information for slot+1 if 't' is Type.LONG or Type.DOUBLE.
-     * @throws LocalVariableInfoInconsistentException if the new information conflicts
-     *         with already gathered information.
-     */
-    public void add(int slot, String name, int startpc, int length, Type t) throws LocalVariableInfoInconsistentException{
-        // The add operation on LocalVariableInfo may throw the '...Inconsistent...' exception, we don't throw it explicitely here.
-
-        if (slot < 0 || slot >= localVariableInfos.length){
-            throw new AssertionViolatedException("Slot number for local variable information out of range.");
-        }
-
-        localVariableInfos[slot].add(name, startpc, length, t);
-        if (t == Type.LONG) {
-            localVariableInfos[slot+1].add(name, startpc, length, LONG_Upper.theInstance());
-        }
-        if (t == Type.DOUBLE) {
-            localVariableInfos[slot+1].add(name, startpc, length, DOUBLE_Upper.theInstance());
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java
deleted file mode 100644
index 1d9ba41..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass1Verifier.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.ClassFormatException;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.verifier.PassVerifier;
-import org.apache.bcel.verifier.VerificationResult;
-import org.apache.bcel.verifier.Verifier;
-import org.apache.bcel.verifier.exc.LoadingException;
-import org.apache.bcel.verifier.exc.Utility;
-
-/**
- * This PassVerifier verifies a class file according to pass 1 as
- * described in The Java Virtual Machine Specification, 2nd edition.
- * More detailed information is to be found at the do_verify() method's
- * documentation.
- *
- * @version $Id$
- * @author Enver Haase
- * @see #do_verify()
- */
-public final class Pass1Verifier extends PassVerifier{
-    /**
-     * DON'T USE THIS EVEN PRIVATELY! USE getJavaClass() INSTEAD.
-     * @see #getJavaClass()
-     */
-    private JavaClass jc;
-
-    /**
-     * The Verifier that created this.
-     */
-    private final Verifier myOwner;
-
-    /** Used to load in and return the myOwner-matching JavaClass object when needed. Avoids loading in a class file when it's not really needed! */
-    private JavaClass getJavaClass(){
-        if (jc == null){
-            try {
-                jc = Repository.lookupClass(myOwner.getClassName());
-            } catch (ClassNotFoundException e) {
-                // FIXME: currently, Pass1Verifier treats jc == null as a special
-                // case, so we don't need to do anything here.  A better solution
-                // would be to simply throw the ClassNotFoundException
-                // out of this method.
-            }
-        }
-        return jc;
-    }
-
-    /**
-     * Should only be instantiated by a Verifier.
-     *
-     * @see org.apache.bcel.verifier.Verifier
-     */
-    public Pass1Verifier(Verifier owner){
-        myOwner = owner;
-    }
-
-    /**
-     * Pass-one verification basically means loading in a class file.
-     * The Java Virtual Machine Specification is not too precise about
-     * what makes the difference between passes one and two.
-     * The answer is that only pass one is performed on a class file as
-     * long as its resolution is not requested; whereas pass two and
-     * pass three are performed during the resolution process.
-     * Only four constraints to be checked are explicitely stated by
-     * The Java Virtual Machine Specification, 2nd edition:
-     * <UL>
-     *  <LI>The first four bytes must contain the right magic number (0xCAFEBABE).
-     *  <LI>All recognized attributes must be of the proper length.
-     *  <LI>The class file must not be truncated or have extra bytes at the end.
-     *  <LI>The constant pool must not contain any superficially unrecognizable information.
-     * </UL>
-     * A more in-depth documentation of what pass one should do was written by
-     * <A HREF=mailto:pwfong@cs.sfu.ca>Philip W. L. Fong</A>:
-     * <UL>
-     *  <LI> the file should not be truncated.
-     *  <LI> the file should not have extra bytes at the end.
-     *  <LI> all variable-length structures should be well-formatted:
-     *  <UL>
-     *   <LI> there should only be constant_pool_count-1 many entries in the constant pool.
-     *   <LI> all constant pool entries should have size the same as indicated by their type tag.
-     *   <LI> there are exactly interfaces_count many entries in the interfaces array of the class file.
-     *   <LI> there are exactly fields_count many entries in the fields array of the class file.
-     *   <LI> there are exactly methods_count many entries in the methods array of the class file.
-     *   <LI> there are exactly attributes_count many entries in the attributes array of the class file, fields, methods, and code attribute.
-     *   <LI> there should be exactly attribute_length many bytes in each attribute. Inconsistency between attribute_length and the actually size of the attribute content should be uncovered. For example, in an Exceptions attribute, the actual number of exceptions as required by the number_of_exceptions field might yeild an attribute size that doesn't match the attribute_length. Such an anomaly should be detected.
-     *   <LI> all attributes should have proper length. In particular, under certain context (e.g. while parsing method_info), recognizable attributes (e.g. "Code" attribute) should have correct format (e.g. attribute_length is 2).
-     *  </UL>
-     *  <LI> Also, certain constant values are checked for validity:
-     *  <UL>
-     *   <LI> The magic number should be 0xCAFEBABE.
-     *   <LI> The major and minor version numbers are valid.
-     *   <LI> All the constant pool type tags are recognizable.
-     *   <LI> All undocumented access flags are masked off before use. Strictly speaking, this is not really a check.
-     *   <LI> The field this_class should point to a string that represents a legal non-array class name, and this name should be the same as the class file being loaded.
-     *   <LI> the field super_class should point to a string that represents a legal non-array class name.
-     *   <LI> Because some of the above checks require cross referencing the constant pool entries, guards are set up to make sure that the referenced entries are of the right type and the indices are within the legal range (0 &lt; index &lt; constant_pool_count).
-     *  </UL>
-     *  <LI> Extra checks done in pass 1:
-     *  <UL>
-     *   <LI> the constant values of static fields should have the same type as the fields.
-     *   <LI> the number of words in a parameter list does not exceed 255 and locals_max.
-     *   <LI> the name and signature of fields and methods are verified to be of legal format.
-     *  </UL>
-     * </UL>
-     * (From the Paper <A HREF=http://www.cs.sfu.ca/people/GradStudents/pwfong/personal/JVM/pass1/>The Mysterious Pass One, first draft, September 2, 1997</A>.)
-     * 
-     * <P>However, most of this is done by parsing a class file or generating a class file into BCEL's internal data structure.
-     * <B>Therefore, all that is really done here is look up the class file from BCEL's repository.</B>
-     * This is also motivated by the fact that some omitted things
-     * (like the check for extra bytes at the end of the class file) are handy when actually using BCEL to repair a class file (otherwise you would not be
-     * able to load it into BCEL).</P>
-     *
-     * @see org.apache.bcel.Repository
-     */
-    @Override
-    public VerificationResult do_verify(){
-        JavaClass jc;
-        try{
-            jc = getJavaClass();    //loads in the class file if not already done.
-
-            if (jc != null){
-                /* If we find more constraints to check, we should do this in an own method. */
-                if (! myOwner.getClassName().equals(jc.getClassName())){
-                    // This should maybe caught by BCEL: In case of renamed .class files we get wrong
-                    // JavaClass objects here.
-                    throw new LoadingException("Wrong name: the internal name of the .class file '"+jc.getClassName()+"' does not match the file's name '"+myOwner.getClassName()+"'.");
-                }
-            }
-
-        }
-        catch(LoadingException e){
-            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, e.getMessage());
-        }
-        catch(ClassFormatException e){
-            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, e.getMessage());
-        }
-        catch(RuntimeException e){
-            // BCEL does not catch every possible RuntimeException; e.g. if
-            // a constant pool index is referenced that does not exist.
-            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Parsing via BCEL did not succeed. "+e.getClass().getName()+" occured:\n"+Utility.getStackTrace(e));
-        }
-
-        if (jc != null){
-            return VerificationResult.VR_OK;
-        }
-        //TODO: Maybe change Repository's behaviour to throw a LoadingException instead of just returning "null"
-        //      if a class file cannot be found or in another way be looked up.
-        return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Repository.lookup() failed. FILE NOT FOUND?");
-    }
-
-    /**
-     * Currently this returns an empty array of String.
-     * One could parse the error messages of BCEL
-     * (written to java.lang.System.err) when loading
-     * a class file such as detecting unknown attributes
-     * or trailing garbage at the end of a class file.
-     * However, Markus Dahm does not like the idea so this
-     * method is currently useless and therefore marked as
-     * <B>TODO</B>.
-     */
-    @Override
-    public String[] getMessages(){
-        // This method is only here to override the javadoc-comment.
-        return super.getMessages();
-    }
-
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
deleted file mode 100644
index 3f26997..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
+++ /dev/null
@@ -1,1470 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.ClassFormatException;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.CodeException;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantDouble;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantFloat;
-import org.apache.bcel.classfile.ConstantInteger;
-import org.apache.bcel.classfile.ConstantInterfaceMethodref;
-import org.apache.bcel.classfile.ConstantLong;
-import org.apache.bcel.classfile.ConstantMethodref;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantString;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ConstantValue;
-import org.apache.bcel.classfile.Deprecated;
-import org.apache.bcel.classfile.DescendingVisitor;
-import org.apache.bcel.classfile.EmptyVisitor;
-import org.apache.bcel.classfile.ExceptionTable;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.InnerClass;
-import org.apache.bcel.classfile.InnerClasses;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.LineNumber;
-import org.apache.bcel.classfile.LineNumberTable;
-import org.apache.bcel.classfile.LocalVariable;
-import org.apache.bcel.classfile.LocalVariableTable;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.Node;
-import org.apache.bcel.classfile.SourceFile;
-import org.apache.bcel.classfile.Synthetic;
-import org.apache.bcel.classfile.Unknown;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.verifier.PassVerifier;
-import org.apache.bcel.verifier.VerificationResult;
-import org.apache.bcel.verifier.Verifier;
-import org.apache.bcel.verifier.VerifierFactory;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.ClassConstraintException;
-import org.apache.bcel.verifier.exc.LocalVariableInfoInconsistentException;
-
-/**
- * This PassVerifier verifies a class file according to
- * pass 2 as described in The Java Virtual Machine
- * Specification, 2nd edition.
- * More detailed information is to be found at the do_verify()
- * method's documentation.
- *
- * @version $Id$
- * @author Enver Haase
- * @see #do_verify()
- */
-public final class Pass2Verifier extends PassVerifier implements Constants{
-
-    /**
-     * The LocalVariableInfo instances used by Pass3bVerifier.
-     * localVariablesInfos[i] denotes the information for the
-     * local variables of method number i in the
-     * JavaClass this verifier operates on.
-     */
-    private LocalVariablesInfo[] localVariablesInfos;
-
-    /** The Verifier that created this. */
-    private final Verifier myOwner;
-
-    /**
-     * Should only be instantiated by a Verifier.
-     *
-     * @see Verifier
-     */
-    public Pass2Verifier(Verifier owner){
-        myOwner = owner;
-    }
-
-    /**
-     * Returns a LocalVariablesInfo object containing information
-     * about the usage of the local variables in the Code attribute
-     * of the said method or <B>null</B> if the class file this
-     * Pass2Verifier operates on could not be pass-2-verified correctly.
-     * The method number method_nr is the method you get using
-     * <B>Repository.lookupClass(myOwner.getClassname()).getMethods()[method_nr];</B>.
-     * You should not add own information. Leave that to JustIce.
-     */
-    public LocalVariablesInfo getLocalVariablesInfo(int method_nr){
-        if (this.verify() != VerificationResult.VR_OK) {
-            return null; // It's cached, don't worry.
-        }
-        if (method_nr < 0 || method_nr >= localVariablesInfos.length){
-            throw new AssertionViolatedException("Method number out of range.");
-        }
-        return localVariablesInfos[method_nr];
-    }
-
-    /**
-     * Pass 2 is the pass where static properties of the
-     * class file are checked without looking into "Code"
-     * arrays of methods.
-     * This verification pass is usually invoked when
-     * a class is resolved; and it may be possible that
-     * this verification pass has to load in other classes
-     * such as superclasses or implemented interfaces.
-     * Therefore, Pass 1 is run on them.<BR>
-     * Note that most referenced classes are <B>not</B> loaded
-     * in for verification or for an existance check by this
-     * pass; only the syntactical correctness of their names
-     * and descriptors (a.k.a. signatures) is checked.<BR>
-     * Very few checks that conceptually belong here
-     * are delayed until pass 3a in JustIce. JustIce does
-     * not only check for syntactical correctness but also
-     * for semantical sanity - therefore it needs access to
-     * the "Code" array of methods in a few cases. Please
-     * see the pass 3a documentation, too.
-     *
-     * @see org.apache.bcel.verifier.statics.Pass3aVerifier
-     */
-    @Override
-    public VerificationResult do_verify(){
-        try {
-        VerificationResult vr1 = myOwner.doPass1();
-        if (vr1.equals(VerificationResult.VR_OK)){
-
-            // For every method, we could have information about the local variables out of LocalVariableTable attributes of
-            // the Code attributes.
-            localVariablesInfos = new LocalVariablesInfo[Repository.lookupClass(myOwner.getClassName()).getMethods().length];
-
-            VerificationResult vr = VerificationResult.VR_OK; // default.
-            try{
-                constant_pool_entries_satisfy_static_constraints();
-                field_and_method_refs_are_valid();
-                every_class_has_an_accessible_superclass();
-                final_methods_are_not_overridden();
-            }
-            catch (ClassConstraintException cce){
-                vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage());
-            }
-            return vr;
-        }
-        return VerificationResult.VR_NOTYET;
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: this might not be the best way to handle missing classes.
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures that every class has a super class and that
-     * <B>final</B> classes are not subclassed.
-     * This means, the class this Pass2Verifier operates
-     * on has proper super classes (transitively) up to
-     * java.lang.Object.
-     * The reason for really loading (and Pass1-verifying)
-     * all of those classes here is that we need them in
-     * Pass2 anyway to verify no final methods are overridden
-     * (that could be declared anywhere in the ancestor hierarchy).
-     *
-     * @throws ClassConstraintException otherwise.
-     */
-    private void every_class_has_an_accessible_superclass(){
-        try {
-        Set<String> hs = new HashSet<String>(); // save class names to detect circular inheritance
-        JavaClass jc = Repository.lookupClass(myOwner.getClassName());
-        int supidx = -1;
-
-        while (supidx != 0){
-            supidx = jc.getSuperclassNameIndex();
-
-            if (supidx == 0){
-                if (jc != Repository.lookupClass(Type.OBJECT.getClassName())){
-                    throw new ClassConstraintException("Superclass of '"+jc.getClassName()+"' missing but not "+Type.OBJECT.getClassName()+" itself!");
-                }
-            }
-            else{
-                String supername = jc.getSuperclassName();
-                if (! hs.add(supername)){    // If supername already is in the list
-                    throw new ClassConstraintException("Circular superclass hierarchy detected.");
-                }
-                Verifier v = VerifierFactory.getVerifier(supername);
-                VerificationResult vr = v.doPass1();
-
-                if (vr != VerificationResult.VR_OK){
-                    throw new ClassConstraintException("Could not load in ancestor class '"+supername+"'.");
-                }
-                jc = Repository.lookupClass(supername);
-
-                if (jc.isFinal()){
-                    throw new ClassConstraintException("Ancestor class '"+supername+"' has the FINAL access modifier and must therefore not be subclassed.");
-                }
-            }
-        }
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: this might not be the best way to handle missing classes.
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures that <B>final</B> methods are not overridden.
-     * <B>Precondition to run this method:
-     * constant_pool_entries_satisfy_static_constraints() and
-     * every_class_has_an_accessible_superclass() have to be invoked before
-     * (in that order).</B>
-     *
-     * @throws ClassConstraintException otherwise.
-     * @see #constant_pool_entries_satisfy_static_constraints()
-     * @see #every_class_has_an_accessible_superclass()
-     */
-    private void final_methods_are_not_overridden(){
-        try {
-        Map<String, String> hashmap = new HashMap<String, String>();
-        JavaClass jc = Repository.lookupClass(myOwner.getClassName());
-
-        int supidx = -1;
-        while (supidx != 0){
-            supidx = jc.getSuperclassNameIndex();
-
-            Method[] methods = jc.getMethods();
-            for (Method method : methods) {
-                String name_and_sig = (method.getName() + method.getSignature());
-
-                if (hashmap.containsKey(name_and_sig)) {
-                    if (method.isFinal()) {
-                        if (!(method.isPrivate())) {
-                            throw new ClassConstraintException("Method '" + name_and_sig + "' in class '" + hashmap.get(name_and_sig) + "' overrides the final (not-overridable) definition in class '" + jc.getClassName() + "'.");
-                        }
-                        addMessage("Method '" + name_and_sig + "' in class '" + hashmap.get(name_and_sig) + "' overrides the final (not-overridable) definition in class '" + jc.getClassName() + "'. This is okay, as the original definition was private; however this constraint leverage was introduced by JLS 8.4.6 (not vmspec2) and the behaviour of the Sun verifiers.");
-                    } else {
-                        if (!method.isStatic()) { // static methods don't inherit
-                            hashmap.put(name_and_sig, jc.getClassName());
-                        }
-                    }
-                } else {
-                    if (!method.isStatic()) { // static methods don't inherit
-                        hashmap.put(name_and_sig, jc.getClassName());
-                    }
-                }
-            }
-
-            jc = Repository.lookupClass(jc.getSuperclassName());    // Well, for OBJECT this returns OBJECT so it works (could return anything but must not throw an Exception).
-        }
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: this might not be the best way to handle missing classes.
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-
-    }
-
-    /**
-     * Ensures that the constant pool entries satisfy the static constraints
-     * as described in The Java Virtual Machine Specification, 2nd Edition.
-     *
-     * @throws ClassConstraintException otherwise.
-     */
-    private void constant_pool_entries_satisfy_static_constraints(){
-        try {
-        // Most of the consistency is handled internally by BCEL; here
-        // we only have to verify if the indices of the constants point
-        // to constants of the appropriate type and such.
-        JavaClass jc = Repository.lookupClass(myOwner.getClassName());
-        new CPESSC_Visitor(jc); // constructor implicitly traverses jc
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: this might not be the best way to handle missing classes.
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * A Visitor class that ensures the constant pool satisfies the static
-     * constraints.
-     * The visitXXX() methods throw ClassConstraintException instances otherwise.
-     *
-     * @see #constant_pool_entries_satisfy_static_constraints()
-     */
-    private class CPESSC_Visitor extends org.apache.bcel.classfile.EmptyVisitor{
-        private final Class<?> CONST_Class;
-        /*
-        private Class<?> CONST_Fieldref;
-        private Class<?> CONST_Methodref;
-        private Class<?> CONST_InterfaceMethodref;
-        */
-        private final Class<?> CONST_String;
-        private final Class<?> CONST_Integer;
-        private final Class<?> CONST_Float;
-        private final Class<?> CONST_Long;
-        private final Class<?> CONST_Double;
-        private final Class<?> CONST_NameAndType;
-        private final Class<?> CONST_Utf8;
-
-        private final JavaClass jc;
-        private final ConstantPool cp; // ==jc.getConstantPool() -- only here to save typing work and computing power.
-        private final int cplen; // == cp.getLength() -- to save computing power.
-        private final DescendingVisitor carrier;
-
-        private final Set<String> field_names = new HashSet<String>();
-        private final Set<String> field_names_and_desc = new HashSet<String>();
-        private final Set<String> method_names_and_desc = new HashSet<String>();
-
-        private CPESSC_Visitor(JavaClass _jc){
-            jc = _jc;
-            cp = _jc.getConstantPool();
-            cplen = cp.getLength();
-
-            CONST_Class = org.apache.bcel.classfile.ConstantClass.class;
-            /*
-            CONST_Fieldref = org.apache.bcel.classfile.ConstantFieldref.class;
-            CONST_Methodref = org.apache.bcel.classfile.ConstantMethodref.class;
-            CONST_InterfaceMethodref = org.apache.bcel.classfile.ConstantInterfaceMethodref.class;
-            */
-            CONST_String = org.apache.bcel.classfile.ConstantString.class;
-            CONST_Integer = org.apache.bcel.classfile.ConstantInteger.class;
-            CONST_Float = org.apache.bcel.classfile.ConstantFloat.class;
-            CONST_Long = org.apache.bcel.classfile.ConstantLong.class;
-            CONST_Double = org.apache.bcel.classfile.ConstantDouble.class;
-            CONST_NameAndType = org.apache.bcel.classfile.ConstantNameAndType.class;
-            CONST_Utf8 = org.apache.bcel.classfile.ConstantUtf8.class;
-
-            carrier = new DescendingVisitor(_jc, this);
-            carrier.visit();
-        }
-
-        private void checkIndex(Node referrer, int index, Class<?> shouldbe){
-            if ((index < 0) || (index >= cplen)){
-                throw new ClassConstraintException("Invalid index '"+index+"' used by '"+tostring(referrer)+"'.");
-            }
-            Constant c = cp.getConstant(index);
-            if (! shouldbe.isInstance(c)){
-                /* String isnot = shouldbe.toString().substring(shouldbe.toString().lastIndexOf(".")+1); //Cut all before last "." */
-                throw new ClassCastException("Illegal constant '"+tostring(c)+"' at index '"+index+"'. '"+tostring(referrer)+"' expects a '"+shouldbe+"'.");
-            }
-        }
-        ///////////////////////////////////////
-        // ClassFile structure (vmspec2 4.1) //
-        ///////////////////////////////////////
-        @Override
-        public void visitJavaClass(JavaClass obj){
-            Attribute[] atts = obj.getAttributes();
-            boolean foundSourceFile = false;
-            boolean foundInnerClasses = false;
-
-            // Is there an InnerClass referenced?
-            // This is a costly check; existing verifiers don't do it!
-            boolean hasInnerClass = new InnerClassDetector(jc).innerClassReferenced();
-
-            for (Attribute att : atts) {
-                if ((!(att instanceof SourceFile)) &&
-                        (!(att instanceof Deprecated)) &&
-                        (!(att instanceof InnerClasses)) &&
-                        (!(att instanceof Synthetic))) {
-                    addMessage("Attribute '" + tostring(att) + "' as an attribute of the ClassFile structure '" + tostring(obj) + "' is unknown and will therefore be ignored.");
-                }
-
-                if (att instanceof SourceFile) {
-                    if (foundSourceFile == false) {
-                        foundSourceFile = true;
-                    } else {
-                        throw new ClassConstraintException("A ClassFile structure (like '" + tostring(obj) + "') may have no more than one SourceFile attribute."); //vmspec2 4.7.7
-                    }
-                }
-
-                if (att instanceof InnerClasses) {
-                    if (foundInnerClasses == false) {
-                        foundInnerClasses = true;
-                    } else {
-                        if (hasInnerClass) {
-                            throw new ClassConstraintException("A Classfile structure (like '" + tostring(obj) + "') must have exactly one InnerClasses attribute if at least one Inner Class is referenced (which is the case). More than one InnerClasses attribute was found.");
-                        }
-                    }
-                    if (!hasInnerClass) {
-                        addMessage("No referenced Inner Class found, but InnerClasses attribute '" + tostring(att) + "' found. Strongly suggest removal of that attribute.");
-                    }
-                }
-
-            }
-            if (hasInnerClass && !foundInnerClasses){
-                //throw new ClassConstraintException("A Classfile structure (like '"+tostring(obj)+"') must have exactly one InnerClasses attribute if at least one Inner Class is referenced (which is the case). No InnerClasses attribute was found.");
-                //vmspec2, page 125 says it would be a constraint: but existing verifiers
-                //don't check it and javac doesn't satisfy it when it comes to anonymous
-                //inner classes
-                addMessage("A Classfile structure (like '"+tostring(obj)+"') must have exactly one InnerClasses attribute if at least one Inner Class is referenced (which is the case). No InnerClasses attribute was found.");
-            }
-        }
-        /////////////////////////////
-        // CONSTANTS (vmspec2 4.4) //
-        /////////////////////////////
-        @Override
-        public void visitConstantClass(ConstantClass obj){
-            if (obj.getTag() != Constants.CONSTANT_Class){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-        }
-        @Override
-        public void visitConstantFieldref(ConstantFieldref obj){
-            if (obj.getTag() != Constants.CONSTANT_Fieldref){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            checkIndex(obj, obj.getClassIndex(), CONST_Class);
-            checkIndex(obj, obj.getNameAndTypeIndex(), CONST_NameAndType);
-        }
-        @Override
-        public void visitConstantMethodref(ConstantMethodref obj){
-            if (obj.getTag() != Constants.CONSTANT_Methodref){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            checkIndex(obj, obj.getClassIndex(), CONST_Class);
-            checkIndex(obj, obj.getNameAndTypeIndex(), CONST_NameAndType);
-        }
-        @Override
-        public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj){
-            if (obj.getTag() != Constants.CONSTANT_InterfaceMethodref){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            checkIndex(obj, obj.getClassIndex(), CONST_Class);
-            checkIndex(obj, obj.getNameAndTypeIndex(), CONST_NameAndType);
-        }
-        @Override
-        public void visitConstantString(ConstantString obj){
-            if (obj.getTag() != Constants.CONSTANT_String){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            checkIndex(obj, obj.getStringIndex(), CONST_Utf8);
-        }
-        @Override
-        public void visitConstantInteger(ConstantInteger obj){
-            if (obj.getTag() != Constants.CONSTANT_Integer){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            // no indices to check
-        }
-        @Override
-        public void visitConstantFloat(ConstantFloat obj){
-            if (obj.getTag() != Constants.CONSTANT_Float){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            //no indices to check
-        }
-        @Override
-        public void visitConstantLong(ConstantLong obj){
-            if (obj.getTag() != Constants.CONSTANT_Long){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            //no indices to check
-        }
-        @Override
-        public void visitConstantDouble(ConstantDouble obj){
-            if (obj.getTag() != Constants.CONSTANT_Double){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            //no indices to check
-        }
-        @Override
-        public void visitConstantNameAndType(ConstantNameAndType obj){
-            if (obj.getTag() != Constants.CONSTANT_NameAndType){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-            //checkIndex(obj, obj.getDescriptorIndex(), CONST_Utf8); //inconsistently named in BCEL, see below.
-            checkIndex(obj, obj.getSignatureIndex(), CONST_Utf8);
-        }
-        @Override
-        public void visitConstantUtf8(ConstantUtf8 obj){
-            if (obj.getTag() != Constants.CONSTANT_Utf8){
-                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
-            }
-            //no indices to check
-        }
-        //////////////////////////
-        // FIELDS (vmspec2 4.5) //
-        //////////////////////////
-        @Override
-        public void visitField(Field obj){
-
-            if (jc.isClass()){
-                int maxone=0;
-                if (obj.isPrivate()) {
-                    maxone++;
-                }
-                if (obj.isProtected()) {
-                    maxone++;
-                }
-                if (obj.isPublic()) {
-                    maxone++;
-                }
-                if (maxone > 1){
-                    throw new ClassConstraintException("Field '"+tostring(obj)+"' must only have at most one of its ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC modifiers set.");
-                }
-
-                if (obj.isFinal() && obj.isVolatile()){
-                    throw new ClassConstraintException("Field '"+tostring(obj)+"' must only have at most one of its ACC_FINAL, ACC_VOLATILE modifiers set.");
-                }
-            }
-            else{ // isInterface!
-                if (!obj.isPublic()){
-                    throw new ClassConstraintException("Interface field '"+tostring(obj)+"' must have the ACC_PUBLIC modifier set but hasn't!");
-                }
-                if (!obj.isStatic()){
-                    throw new ClassConstraintException("Interface field '"+tostring(obj)+"' must have the ACC_STATIC modifier set but hasn't!");
-                }
-                if (!obj.isFinal()){
-                    throw new ClassConstraintException("Interface field '"+tostring(obj)+"' must have the ACC_FINAL modifier set but hasn't!");
-                }
-            }
-
-            if ((obj.getAccessFlags() & ~(ACC_PUBLIC|ACC_PRIVATE|ACC_PROTECTED|ACC_STATIC|ACC_FINAL|ACC_VOLATILE|ACC_TRANSIENT)) > 0){
-                addMessage("Field '"+tostring(obj)+"' has access flag(s) other than ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_VOLATILE, ACC_TRANSIENT set (ignored).");
-            }
-
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = obj.getName();
-            if (! validFieldName(name)){
-                throw new ClassConstraintException("Field '"+tostring(obj)+"' has illegal name '"+obj.getName()+"'.");
-            }
-
-            // A descriptor is often named signature in BCEL
-            checkIndex(obj, obj.getSignatureIndex(), CONST_Utf8);
-
-            String sig  = ((ConstantUtf8) (cp.getConstant(obj.getSignatureIndex()))).getBytes(); // Field or Method signature(=descriptor)
-
-            try{
-                Type.getType(sig);  /* Don't need the return value */
-            }
-            catch (ClassFormatException cfe){
-                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
-            }
-
-            String nameanddesc = (name+sig);
-            if (field_names_and_desc.contains(nameanddesc)){
-                throw new ClassConstraintException("No two fields (like '"+tostring(obj)+"') are allowed have same names and descriptors!");
-            }
-            if (field_names.contains(name)){
-                addMessage("More than one field of name '"+name+"' detected (but with different type descriptors). This is very unusual.");
-            }
-            field_names_and_desc.add(nameanddesc);
-            field_names.add(name);
-
-            Attribute[] atts = obj.getAttributes();
-            for (Attribute att : atts) {
-                if ((!(att instanceof ConstantValue)) &&
-                        (!(att instanceof Synthetic)) &&
-                        (!(att instanceof Deprecated))) {
-                    addMessage("Attribute '" + tostring(att) + "' as an attribute of Field '" + tostring(obj) + "' is unknown and will therefore be ignored.");
-                }
-                if (!(att instanceof ConstantValue)) {
-                    addMessage("Attribute '" + tostring(att) + "' as an attribute of Field '" + tostring(obj) + "' is not a ConstantValue and is therefore only of use for debuggers and such.");
-                }
-            }
-        }
-        ///////////////////////////
-        // METHODS (vmspec2 4.6) //
-        ///////////////////////////
-        @Override
-        public void visitMethod(Method obj){
-
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = obj.getName();
-            if (! validMethodName(name, true)){
-                throw new ClassConstraintException("Method '"+tostring(obj)+"' has illegal name '"+name+"'.");
-            }
-
-            // A descriptor is often named signature in BCEL
-            checkIndex(obj, obj.getSignatureIndex(), CONST_Utf8);
-
-            String sig  = ((ConstantUtf8) (cp.getConstant(obj.getSignatureIndex()))).getBytes(); // Method's signature(=descriptor)
-
-            Type t;
-            Type[] ts; // needed below the try block.
-            try{
-                t  = Type.getReturnType(sig);
-                ts = Type.getArgumentTypes(sig);
-            }
-            catch (ClassFormatException cfe){
-                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by Method '"+tostring(obj)+"'.", cfe);
-            }
-
-            // Check if referenced objects exist.
-            Type act = t;
-            if (act instanceof ArrayType) {
-                act = ((ArrayType) act).getBasicType();
-            }
-            if (act instanceof ObjectType){
-                Verifier v = VerifierFactory.getVerifier( ((ObjectType) act).getClassName() );
-                VerificationResult vr = v.doPass1();
-                if (vr != VerificationResult.VR_OK) {
-                    throw new ClassConstraintException("Method '"+tostring(obj)+"' has a return type that does not pass verification pass 1: '"+vr+"'.");
-                }
-            }
-
-            for (Type element : ts) {
-                act = element;
-                if (act instanceof ArrayType) {
-                    act = ((ArrayType) act).getBasicType();
-                }
-                if (act instanceof ObjectType){
-                    Verifier v = VerifierFactory.getVerifier( ((ObjectType) act).getClassName() );
-                    VerificationResult vr = v.doPass1();
-                    if (vr != VerificationResult.VR_OK) {
-                        throw new ClassConstraintException("Method '"+tostring(obj)+"' has an argument type that does not pass verification pass 1: '"+vr+"'.");
-                    }
-                }
-            }
-
-            // Nearly forgot this! Funny return values are allowed, but a non-empty arguments list makes a different method out of it!
-            if (name.equals(STATIC_INITIALIZER_NAME) && (ts.length != 0)){
-                throw new ClassConstraintException("Method '"+tostring(obj)+"' has illegal name '"+name+"'. It's name resembles the class or interface initialization method which it isn't because of its arguments (==descriptor).");
-            }
-
-            if (jc.isClass()){
-                int maxone=0;
-                if (obj.isPrivate()) {
-                    maxone++;
-                }
-                if (obj.isProtected()) {
-                    maxone++;
-                }
-                if (obj.isPublic()) {
-                    maxone++;
-                }
-                if (maxone > 1){
-                    throw new ClassConstraintException("Method '"+tostring(obj)+"' must only have at most one of its ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC modifiers set.");
-                }
-
-                if (obj.isAbstract()){
-                    if (obj.isFinal()) {
-                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_FINAL modifier set.");
-                    }
-                    if (obj.isNative()) {
-                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_NATIVE modifier set.");
-                    }
-                    if (obj.isPrivate()) {
-                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_PRIVATE modifier set.");
-                    }
-                    if (obj.isStatic()) {
-                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_STATIC modifier set.");
-                    }
-                    if (obj.isStrictfp()) {
-                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_STRICT modifier set.");
-                    }
-                    if (obj.isSynchronized()) {
-                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_SYNCHRONIZED modifier set.");
-                    }
-                }
-
-                // A specific instance initialization method... (vmspec2,Page 116).
-                if (name.equals(CONSTRUCTOR_NAME)) {
-                    //..may have at most one of ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC set: is checked above.
-                    //..may also have ACC_STRICT set, but none of the other flags in table 4.5 (vmspec2, page 115)
-                    if (obj.isStatic() ||
-                            obj.isFinal() ||
-                            obj.isSynchronized() ||
-                            obj.isNative() ||
-                            obj.isAbstract()) {
-                        throw new ClassConstraintException("Instance initialization method '" + tostring(obj) + "' must not have any of the ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT modifiers set.");
-                    }
-                }
-            }
-            else{ // isInterface!
-                if (!name.equals(STATIC_INITIALIZER_NAME)){//vmspec2, p.116, 2nd paragraph
-                    if (jc.getMajor() >= MAJOR_1_8) {
-                        if (!(obj.isPublic() ^ obj.isPrivate())) {
-                            throw new ClassConstraintException("Interface method '" + tostring(obj) + "' must have exactly one of its ACC_PUBLIC and ACC_PRIVATE modifiers set.");
-                        }
-                        if (obj.isProtected()
-                                || obj.isFinal()
-                                || obj.isSynchronized()
-                                || obj.isNative()) {
-                            throw new ClassConstraintException("Interface method '"+tostring(obj)+"' must not have any of the ACC_PROTECTED, ACC_FINAL, ACC_SYNCHRONIZED, or ACC_NATIVE modifiers set.");
-                        }
-
-                    } else {
-                        if (!obj.isPublic()){
-                            throw new ClassConstraintException("Interface method '"+tostring(obj)+"' must have the ACC_PUBLIC modifier set but hasn't!");
-                        }
-                        if (!obj.isAbstract()){
-                            throw new ClassConstraintException("Interface method '"+tostring(obj)+"' must have the ACC_ABSTRACT modifier set but hasn't!");
-                        }
-                        if (obj.isPrivate()
-                                || obj.isProtected()
-                                || obj.isStatic()
-                                || obj.isFinal()
-                                || obj.isSynchronized()
-                                || obj.isNative()
-                                || obj.isStrictfp() ) {
-                            throw new ClassConstraintException("Interface method '"+tostring(obj)+"' must not have any of the ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT, ACC_STRICT modifiers set.");
-                        }
-                    }
-                }
-            }
-
-            if ((obj.getAccessFlags() & ~(ACC_PUBLIC|ACC_PRIVATE|ACC_PROTECTED|ACC_STATIC|ACC_FINAL|ACC_SYNCHRONIZED|ACC_NATIVE|ACC_ABSTRACT|ACC_STRICT)) > 0){
-                addMessage("Method '"+tostring(obj)+"' has access flag(s) other than ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT, ACC_STRICT set (ignored).");
-            }
-
-            String nameanddesc = (name+sig);
-            if (method_names_and_desc.contains(nameanddesc)){
-                throw new ClassConstraintException("No two methods (like '"+tostring(obj)+"') are allowed have same names and desciptors!");
-            }
-            method_names_and_desc.add(nameanddesc);
-
-            Attribute[] atts = obj.getAttributes();
-            int num_code_atts = 0;
-            for (Attribute att : atts) {
-                if ((!(att instanceof Code)) &&
-                        (!(att instanceof ExceptionTable)) &&
-                        (!(att instanceof Synthetic)) &&
-                        (!(att instanceof Deprecated))) {
-                    addMessage("Attribute '" + tostring(att) + "' as an attribute of Method '" + tostring(obj) + "' is unknown and will therefore be ignored.");
-                }
-                if ((!(att instanceof Code)) &&
-                        (!(att instanceof ExceptionTable))) {
-                    addMessage("Attribute '" + tostring(att) + "' as an attribute of Method '" + tostring(obj) + "' is neither Code nor Exceptions and is therefore only of use for debuggers and such.");
-                }
-                if ((att instanceof Code) && (obj.isNative() || obj.isAbstract())) {
-                    throw new ClassConstraintException("Native or abstract methods like '" + tostring(obj) + "' must not have a Code attribute like '" + tostring(att) + "'."); //vmspec2 page120, 4.7.3
-                }
-                if (att instanceof Code) {
-                    num_code_atts++;
-                }
-            }
-            if ( !obj.isNative() && !obj.isAbstract() && num_code_atts != 1){
-                throw new ClassConstraintException("Non-native, non-abstract methods like '"+tostring(obj)+"' must have exactly one Code attribute (found: "+num_code_atts+").");
-            }
-        }
-        ///////////////////////////////////////////////////////
-        // ClassFile-structure-ATTRIBUTES (vmspec2 4.1, 4.7) //
-        ///////////////////////////////////////////////////////
-        @Override
-        public void visitSourceFile(SourceFile obj){//vmspec2 4.7.7
-
-            // zero or one SourceFile attr per ClassFile: see visitJavaClass()
-
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
-            if (! name.equals("SourceFile")){
-                throw new ClassConstraintException("The SourceFile attribute '"+tostring(obj)+"' is not correctly named 'SourceFile' but '"+name+"'.");
-            }
-
-            checkIndex(obj, obj.getSourceFileIndex(), CONST_Utf8);
-
-            String sourcefilename = ((ConstantUtf8) cp.getConstant(obj.getSourceFileIndex())).getBytes(); //==obj.getSourceFileName() ?
-            String sourcefilenamelc = sourcefilename.toLowerCase(Locale.ENGLISH);
-
-            if (    (sourcefilename.indexOf('/') != -1) ||
-                        (sourcefilename.indexOf('\\') != -1) ||
-                        (sourcefilename.indexOf(':') != -1) ||
-                        (sourcefilenamelc.lastIndexOf(".java") == -1)    ){
-                addMessage("SourceFile attribute '"+tostring(obj)+"' has a funny name: remember not to confuse certain parsers working on javap's output. Also, this name ('"+sourcefilename+"') is considered an unqualified (simple) file name only.");
-            }
-        }
-        @Override
-        public void visitDeprecated(Deprecated obj){//vmspec2 4.7.10
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
-            if (! name.equals("Deprecated")){
-                throw new ClassConstraintException("The Deprecated attribute '"+tostring(obj)+"' is not correctly named 'Deprecated' but '"+name+"'.");
-            }
-        }
-        @Override
-        public void visitSynthetic(Synthetic obj){//vmspec2 4.7.6
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
-            if (! name.equals("Synthetic")){
-                throw new ClassConstraintException("The Synthetic attribute '"+tostring(obj)+"' is not correctly named 'Synthetic' but '"+name+"'.");
-            }
-        }
-        @Override
-        public void visitInnerClasses(InnerClasses obj){//vmspec2 4.7.5
-
-            // exactly one InnerClasses attr per ClassFile if some inner class is refernced: see visitJavaClass()
-
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
-            if (! name.equals("InnerClasses")){
-                throw new ClassConstraintException("The InnerClasses attribute '"+tostring(obj)+"' is not correctly named 'InnerClasses' but '"+name+"'.");
-            }
-
-            InnerClass[] ics = obj.getInnerClasses();
-
-            for (InnerClass ic : ics) {
-                checkIndex(obj, ic.getInnerClassIndex(), CONST_Class);
-                int outer_idx = ic.getOuterClassIndex();
-                if (outer_idx != 0){
-                    checkIndex(obj, outer_idx, CONST_Class);
-                }
-                int innername_idx = ic.getInnerNameIndex();
-                if (innername_idx != 0){
-                    checkIndex(obj, innername_idx, CONST_Utf8);
-                }
-                int acc = ic.getInnerAccessFlags();
-                acc = acc & (~ (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED | ACC_STATIC | ACC_FINAL | ACC_INTERFACE | ACC_ABSTRACT));
-                if (acc != 0){
-                    addMessage("Unknown access flag for inner class '"+tostring(ic)+"' set (InnerClasses attribute '"+tostring(obj)+"').");
-                }
-            }
-            // Semantical consistency is not yet checked by Sun, see vmspec2 4.7.5.
-            // [marked TODO in JustIce]
-        }
-        ////////////////////////////////////////////////////////
-        // field_info-structure-ATTRIBUTES (vmspec2 4.5, 4.7) //
-        ////////////////////////////////////////////////////////
-        @Override
-        public void visitConstantValue(ConstantValue obj){//vmspec2 4.7.2
-            // Despite its name, this really is an Attribute,
-            // not a constant!
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
-            if (! name.equals("ConstantValue")){
-                throw new ClassConstraintException("The ConstantValue attribute '"+tostring(obj)+"' is not correctly named 'ConstantValue' but '"+name+"'.");
-            }
-
-            Object pred = carrier.predecessor();
-            if (pred instanceof Field){ //ConstantValue attributes are quite senseless if the predecessor is not a field.
-                Field f = (Field) pred;
-                // Field constraints have been checked before -- so we are safe using their type information.
-                Type field_type = Type.getType(((ConstantUtf8) (cp.getConstant(f.getSignatureIndex()))).getBytes());
-
-                int index = obj.getConstantValueIndex();
-                if ((index < 0) || (index >= cplen)){
-                    throw new ClassConstraintException("Invalid index '"+index+"' used by '"+tostring(obj)+"'.");
-                }
-                Constant c = cp.getConstant(index);
-
-                if (CONST_Long.isInstance(c) && field_type.equals(Type.LONG)){
-                    return;
-                }
-                if (CONST_Float.isInstance(c) && field_type.equals(Type.FLOAT)){
-                    return;
-                }
-                if (CONST_Double.isInstance(c) && field_type.equals(Type.DOUBLE)){
-                    return;
-                }
-                if (CONST_Integer.isInstance(c) && (field_type.equals(Type.INT) || field_type.equals(Type.SHORT) || field_type.equals(Type.CHAR) || field_type.equals(Type.BYTE) || field_type.equals(Type.BOOLEAN))){
-                    return;
-                }
-                if (CONST_String.isInstance(c) && field_type.equals(Type.STRING)){
-                    return;
-                }
-
-                throw new ClassConstraintException("Illegal type of ConstantValue '"+obj+"' embedding Constant '"+c+"'. It is referenced by field '"+tostring(f)+"' expecting a different type: '"+field_type+"'.");
-            }
-        }
-        // SYNTHETIC: see above
-        // DEPRECATED: see above
-        /////////////////////////////////////////////////////////
-        // method_info-structure-ATTRIBUTES (vmspec2 4.6, 4.7) //
-        /////////////////////////////////////////////////////////
-        @Override
-        public void visitCode(Code obj){//vmspec2 4.7.3
-            try {
-            // No code attribute allowed for native or abstract methods: see visitMethod(Method).
-            // Code array constraints are checked in Pass3 (3a and 3b).
-
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
-            if (! name.equals("Code")){
-                throw new ClassConstraintException("The Code attribute '"+tostring(obj)+"' is not correctly named 'Code' but '"+name+"'.");
-            }
-
-            Method m = null; // satisfy compiler
-            if (!(carrier.predecessor() instanceof Method)){
-                addMessage("Code attribute '"+tostring(obj)+"' is not declared in a method_info structure but in '"+carrier.predecessor()+"'. Ignored.");
-                return;
-            }
-            m = (Method) carrier.predecessor();    // we can assume this method was visited before;
-                                                                                    // i.e. the data consistency was verified.
-
-            if (obj.getCode().length == 0){
-                throw new ClassConstraintException("Code array of Code attribute '"+tostring(obj)+"' (method '"+m+"') must not be empty.");
-            }
-
-            //In JustIce, the check for correct offsets into the code array is delayed to Pass 3a.
-            CodeException[] exc_table = obj.getExceptionTable();
-            for (CodeException element : exc_table) {
-                int exc_index = element.getCatchType();
-                if (exc_index != 0){ // if 0, it catches all Throwables
-                    checkIndex(obj, exc_index, CONST_Class);
-                    ConstantClass cc = (ConstantClass) (cp.getConstant(exc_index));
-                    checkIndex(cc, cc.getNameIndex(), CONST_Utf8); // cannot be sure this ConstantClass has already been visited (checked)!
-                    String cname = ((ConstantUtf8) cp.getConstant(cc.getNameIndex())).getBytes().replace('/','.');
-
-                    Verifier v = VerifierFactory.getVerifier(cname);
-                    VerificationResult vr = v.doPass1();
-
-                    if (vr != VerificationResult.VR_OK){
-                        throw new ClassConstraintException("Code attribute '"+tostring(obj)+"' (method '"+m+"') has an exception_table entry '"+tostring(element)+"' that references '"+cname+"' as an Exception but it does not pass verification pass 1: "+vr);
-                    }
-                    // We cannot safely trust any other "instanceof" mechanism. We need to transitively verify
-                    // the ancestor hierarchy.
-                    JavaClass e = Repository.lookupClass(cname);
-                    JavaClass t = Repository.lookupClass(Type.THROWABLE.getClassName());
-                    JavaClass o = Repository.lookupClass(Type.OBJECT.getClassName());
-                    while (e != o){
-                        if (e == t) {
-                            break; // It's a subclass of Throwable, OKAY, leave.
-                        }
-
-                        v = VerifierFactory.getVerifier(e.getSuperclassName());
-                        vr = v.doPass1();
-                        if (vr != VerificationResult.VR_OK){
-                            throw new ClassConstraintException("Code attribute '"+tostring(obj)+"' (method '"+m+"') has an exception_table entry '"+tostring(element)+"' that references '"+cname+"' as an Exception but '"+e.getSuperclassName()+"' in the ancestor hierachy does not pass verification pass 1: "+vr);
-                        }
-                        e = Repository.lookupClass(e.getSuperclassName());
-                    }
-                    if (e != t) {
-                        throw new ClassConstraintException("Code attribute '"+tostring(obj)+"' (method '"+m+"') has an exception_table entry '"+tostring(element)+"' that references '"+cname+"' as an Exception but it is not a subclass of '"+t.getClassName()+"'.");
-                    }
-                }
-            }
-
-            // Create object for local variables information
-            // This is highly unelegant due to usage of the Visitor pattern.
-            // TODO: rework it.
-            int method_number = -1;
-            Method[] ms = Repository.lookupClass(myOwner.getClassName()).getMethods();
-            for (int mn=0; mn<ms.length; mn++){
-                if (m == ms[mn]){
-                    method_number = mn;
-                    break;
-                }
-            }
-            if (method_number < 0){ // Mmmmh. Can we be sure BCEL does not sometimes instantiate new objects?
-                throw new AssertionViolatedException("Could not find a known BCEL Method object in the corresponding BCEL JavaClass object.");
-            }
-            localVariablesInfos[method_number] = new LocalVariablesInfo(obj.getMaxLocals());
-
-            int num_of_lvt_attribs = 0;
-            // Now iterate through the attributes the Code attribute has.
-            Attribute[] atts = obj.getAttributes();
-            for (int a=0; a<atts.length; a++){
-                if ((! (atts[a] instanceof LineNumberTable)) &&
-                    (! (atts[a] instanceof LocalVariableTable))){
-                    addMessage("Attribute '"+tostring(atts[a])+"' as an attribute of Code attribute '"+tostring(obj)+"' (method '"+m+"') is unknown and will therefore be ignored.");
-                }
-                else{// LineNumberTable or LocalVariableTable
-                    addMessage("Attribute '"+tostring(atts[a])+"' as an attribute of Code attribute '"+tostring(obj)+"' (method '"+m+"') will effectively be ignored and is only useful for debuggers and such.");
-                }
-
-                //LocalVariableTable check (partially delayed to Pass3a).
-                //Here because its easier to collect the information of the
-                //(possibly more than one) LocalVariableTables belonging to
-                //one certain Code attribute.
-                if (atts[a] instanceof LocalVariableTable){ // checks conforming to vmspec2 4.7.9
-
-                    LocalVariableTable lvt = (LocalVariableTable) atts[a];
-
-                    checkIndex(lvt, lvt.getNameIndex(), CONST_Utf8);
-
-                    String lvtname = ((ConstantUtf8) cp.getConstant(lvt.getNameIndex())).getBytes();
-                    if (! lvtname.equals("LocalVariableTable")){
-                        throw new ClassConstraintException("The LocalVariableTable attribute '"+tostring(lvt)+"' is not correctly named 'LocalVariableTable' but '"+lvtname+"'.");
-                    }
-
-                    Code code = obj;
-
-                    //In JustIce, the check for correct offsets into the code array is delayed to Pass 3a.
-                    LocalVariable[] localvariables = lvt.getLocalVariableTable();
-
-                    for (LocalVariable localvariable : localvariables) {
-                        checkIndex(lvt, localvariable.getNameIndex(), CONST_Utf8);
-                        String localname = ((ConstantUtf8) cp.getConstant(localvariable.getNameIndex())).getBytes();
-                        if (!validJavaIdentifier(localname)){
-                            throw new ClassConstraintException("LocalVariableTable '"+tostring(lvt)+"' references a local variable by the name '"+localname+"' which is not a legal Java simple name.");
-                        }
-
-                        checkIndex(lvt, localvariable.getSignatureIndex(), CONST_Utf8);
-                        String localsig  = ((ConstantUtf8) (cp.getConstant(localvariable.getSignatureIndex()))).getBytes(); // Local signature(=descriptor)
-                        Type t;
-                        try{
-                            t = Type.getType(localsig);
-                        }
-                        catch (ClassFormatException cfe){
-                            throw new ClassConstraintException("Illegal descriptor (==signature) '"+localsig+"' used by LocalVariable '"+tostring(localvariable)+"' referenced by '"+tostring(lvt)+"'.", cfe);
-                        }
-                        int localindex = localvariable.getIndex();
-                        if ( ( (t==Type.LONG || t==Type.DOUBLE)? localindex+1:localindex) >= code.getMaxLocals()){
-                            throw new ClassConstraintException("LocalVariableTable attribute '"+tostring(lvt)+"' references a LocalVariable '"+tostring(localvariable)+"' with an index that exceeds the surrounding Code attribute's max_locals value of '"+code.getMaxLocals()+"'.");
-                        }
-
-                        try{
-                            localVariablesInfos[method_number].add(localindex, localname, localvariable.getStartPC(), localvariable.getLength(), t);
-                        }
-                        catch(LocalVariableInfoInconsistentException lviie){
-                            throw new ClassConstraintException("Conflicting information in LocalVariableTable '"+tostring(lvt)+"' found in Code attribute '"+tostring(obj)+"' (method '"+tostring(m)+"'). "+lviie.getMessage(), lviie);
-                        }
-                    }// for all local variables localvariables[i] in the LocalVariableTable attribute atts[a] END
-
-                    num_of_lvt_attribs++;
-                    if (!m.isStatic() && num_of_lvt_attribs > obj.getMaxLocals()){
-                        throw new ClassConstraintException("Number of LocalVariableTable attributes of Code attribute '"+tostring(obj)+"' (method '"+tostring(m)+"') exceeds number of local variable slots '"+obj.getMaxLocals()+"' ('There may be no more than one LocalVariableTable attribute per local variable in the Code attribute.').");
-                    }
-                }// if atts[a] instanceof LocalVariableTable END
-            }// for all attributes atts[a] END
-
-            } catch (ClassNotFoundException e) {
-            // FIXME: this might not be the best way to handle missing classes.
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-
-        }// visitCode(Code) END
-
-        @Override
-        public void visitExceptionTable(ExceptionTable obj){//vmspec2 4.7.4
-            try {
-            // incorrectly named, it's the Exceptions attribute (vmspec2 4.7.4)
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
-            if (! name.equals("Exceptions")){
-                throw new ClassConstraintException("The Exceptions attribute '"+tostring(obj)+"' is not correctly named 'Exceptions' but '"+name+"'.");
-            }
-
-            int[] exc_indices = obj.getExceptionIndexTable();
-
-            for (int exc_indice : exc_indices) {
-                checkIndex(obj, exc_indice, CONST_Class);
-
-                ConstantClass cc = (ConstantClass) (cp.getConstant(exc_indice));
-                checkIndex(cc, cc.getNameIndex(), CONST_Utf8); // cannot be sure this ConstantClass has already been visited (checked)!
-                String cname = ((ConstantUtf8) cp.getConstant(cc.getNameIndex())).getBytes().replace('/','.'); //convert internal notation on-the-fly to external notation
-
-                Verifier v = VerifierFactory.getVerifier(cname);
-                VerificationResult vr = v.doPass1();
-
-                if (vr != VerificationResult.VR_OK){
-                    throw new ClassConstraintException("Exceptions attribute '"+tostring(obj)+"' references '"+cname+"' as an Exception but it does not pass verification pass 1: "+vr);
-                }
-                else{
-                    // We cannot safely trust any other "instanceof" mechanism. We need to transitively verify
-                    // the ancestor hierarchy.
-                    JavaClass e = Repository.lookupClass(cname);
-                    JavaClass t = Repository.lookupClass(Type.THROWABLE.getClassName());
-                    JavaClass o = Repository.lookupClass(Type.OBJECT.getClassName());
-                    while (e != o){
-                        if (e == t) {
-                            break; // It's a subclass of Throwable, OKAY, leave.
-                        }
-
-                        v = VerifierFactory.getVerifier(e.getSuperclassName());
-                        vr = v.doPass1();
-                        if (vr != VerificationResult.VR_OK){
-                            throw new ClassConstraintException("Exceptions attribute '"+tostring(obj)+"' references '"+cname+"' as an Exception but '"+e.getSuperclassName()+"' in the ancestor hierachy does not pass verification pass 1: "+vr);
-                        }
-                        else{
-                            e = Repository.lookupClass(e.getSuperclassName());
-                        }
-                    }
-                    if (e != t) {
-                        throw new ClassConstraintException("Exceptions attribute '"+tostring(obj)+"' references '"+cname+"' as an Exception but it is not a subclass of '"+t.getClassName()+"'.");
-                    }
-                }
-            }
-
-            } catch (ClassNotFoundException e) {
-            // FIXME: this might not be the best way to handle missing classes.
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-        }
-        // SYNTHETIC: see above
-        // DEPRECATED: see above
-        //////////////////////////////////////////////////////////////
-        // code_attribute-structure-ATTRIBUTES (vmspec2 4.7.3, 4.7) //
-        //////////////////////////////////////////////////////////////
-        @Override
-        public void visitLineNumberTable(LineNumberTable obj){//vmspec2 4.7.8
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
-            if (! name.equals("LineNumberTable")){
-                throw new ClassConstraintException("The LineNumberTable attribute '"+tostring(obj)+"' is not correctly named 'LineNumberTable' but '"+name+"'.");
-            }
-
-            //In JustIce,this check is delayed to Pass 3a.
-            //LineNumber[] linenumbers = obj.getLineNumberTable();
-            // ...validity check...
-
-        }
-        @Override
-        public void visitLocalVariableTable(LocalVariableTable obj){//vmspec2 4.7.9
-            //In JustIce,this check is partially delayed to Pass 3a.
-            //The other part can be found in the visitCode(Code) method.
-        }
-        ////////////////////////////////////////////////////
-        // MISC-structure-ATTRIBUTES (vmspec2 4.7.1, 4.7) //
-        ////////////////////////////////////////////////////
-        @Override
-        public void visitUnknown(Unknown obj){//vmspec2 4.7.1
-            // Represents an unknown attribute.
-            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
-
-            // Maybe only misnamed? Give a (warning) message.
-            addMessage("Unknown attribute '"+tostring(obj)+"'. This attribute is not known in any context!");
-        }
-        //////////
-        // BCEL //
-        //////////
-        @Override
-        public void visitLocalVariable(LocalVariable obj){
-            // This does not represent an Attribute but is only
-            // related to internal BCEL data representation.
-
-            // see visitLocalVariableTable(LocalVariableTable)
-        }
-        @Override
-        public void visitCodeException(CodeException obj){
-            // Code constraints are checked in Pass3 (3a and 3b).
-            // This does not represent an Attribute but is only
-            // related to internal BCEL data representation.
-
-            // see visitCode(Code)
-        }
-        @Override
-        public void visitConstantPool(ConstantPool obj){
-            // No need to. We're piggybacked by the DescendingVisitor.
-            // This does not represent an Attribute but is only
-            // related to internal BCEL data representation.
-        }
-        @Override
-        public void visitInnerClass(InnerClass obj){
-            // This does not represent an Attribute but is only
-            // related to internal BCEL data representation.
-        }
-        @Override
-        public void visitLineNumber(LineNumber obj){
-            // This does not represent an Attribute but is only
-            // related to internal BCEL data representation.
-
-            // see visitLineNumberTable(LineNumberTable)
-        }
-    }
-
-    /**
-     * Ensures that the ConstantCP-subclassed entries of the constant
-     * pool are valid. According to "Yellin: Low Level Security in Java",
-     * this method does not verify the existence of referenced entities
-     * (such as classes) but only the formal correctness (such as well-formed
-     * signatures).
-     * The visitXXX() methods throw ClassConstraintException instances otherwise.
-     * <B>Precondition: index-style cross referencing in the constant
-     * pool must be valid. Simply invoke constant_pool_entries_satisfy_static_constraints()
-     * before.</B>
-     *
-     * @throws ClassConstraintException otherwise.
-     * @see #constant_pool_entries_satisfy_static_constraints()
-     */
-    private void field_and_method_refs_are_valid(){
-        try {
-        JavaClass jc = Repository.lookupClass(myOwner.getClassName());
-        DescendingVisitor v = new DescendingVisitor(jc, new FAMRAV_Visitor(jc));
-        v.visit();
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: this might not be the best way to handle missing classes.
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * A Visitor class that ensures the ConstantCP-subclassed entries
-     * of the constant pool are valid.
-     * <B>Precondition: index-style cross referencing in the constant
-     * pool must be valid.</B>
-     *
-     * @see #constant_pool_entries_satisfy_static_constraints()
-     * @see org.apache.bcel.classfile.ConstantCP
-     */
-    private class FAMRAV_Visitor extends EmptyVisitor{
-        private final ConstantPool cp; // ==jc.getConstantPool() -- only here to save typing work.
-        private FAMRAV_Visitor(JavaClass _jc){
-            cp = _jc.getConstantPool();
-        }
-
-        @Override
-        public void visitConstantFieldref(ConstantFieldref obj){
-            if (obj.getTag() != Constants.CONSTANT_Fieldref){
-                throw new ClassConstraintException("ConstantFieldref '"+tostring(obj)+"' has wrong tag!");
-            }
-            int name_and_type_index = obj.getNameAndTypeIndex();
-            ConstantNameAndType cnat = (ConstantNameAndType) (cp.getConstant(name_and_type_index));
-            String name = ((ConstantUtf8) (cp.getConstant(cnat.getNameIndex()))).getBytes(); // Field or Method name
-            if (!validFieldName(name)){
-                throw new ClassConstraintException("Invalid field name '"+name+"' referenced by '"+tostring(obj)+"'.");
-            }
-
-            int class_index = obj.getClassIndex();
-            ConstantClass cc = (ConstantClass) (cp.getConstant(class_index));
-            String className = ((ConstantUtf8) (cp.getConstant(cc.getNameIndex()))).getBytes(); // Class Name in internal form
-            if (! validClassName(className)){
-                throw new ClassConstraintException("Illegal class name '"+className+"' used by '"+tostring(obj)+"'.");
-            }
-
-            String sig  = ((ConstantUtf8) (cp.getConstant(cnat.getSignatureIndex()))).getBytes(); // Field or Method signature(=descriptor)
-
-            try{
-                Type.getType(sig); /* Don't need the return value */
-            }
-            catch (ClassFormatException cfe){
-                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
-            }
-        }
-
-        @Override
-        public void visitConstantMethodref(ConstantMethodref obj){
-            if (obj.getTag() != Constants.CONSTANT_Methodref){
-                throw new ClassConstraintException("ConstantMethodref '"+tostring(obj)+"' has wrong tag!");
-            }
-            int name_and_type_index = obj.getNameAndTypeIndex();
-            ConstantNameAndType cnat = (ConstantNameAndType) (cp.getConstant(name_and_type_index));
-            String name = ((ConstantUtf8) (cp.getConstant(cnat.getNameIndex()))).getBytes(); // Field or Method name
-            if (!validClassMethodName(name)){
-                throw new ClassConstraintException("Invalid (non-interface) method name '"+name+"' referenced by '"+tostring(obj)+"'.");
-            }
-
-            int class_index = obj.getClassIndex();
-            ConstantClass cc = (ConstantClass) (cp.getConstant(class_index));
-            String className = ((ConstantUtf8) (cp.getConstant(cc.getNameIndex()))).getBytes(); // Class Name in internal form
-            if (! validClassName(className)){
-                throw new ClassConstraintException("Illegal class name '"+className+"' used by '"+tostring(obj)+"'.");
-            }
-
-            String sig  = ((ConstantUtf8) (cp.getConstant(cnat.getSignatureIndex()))).getBytes(); // Field or Method signature(=descriptor)
-
-            try{
-                Type   t  = Type.getReturnType(sig);
-                if ( name.equals(CONSTRUCTOR_NAME) && (t != Type.VOID) ){
-                    throw new ClassConstraintException("Instance initialization method must have VOID return type.");
-                }
-            }
-            catch (ClassFormatException cfe){
-                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
-            }
-        }
-
-        @Override
-        public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj){
-            if (obj.getTag() != Constants.CONSTANT_InterfaceMethodref){
-                throw new ClassConstraintException("ConstantInterfaceMethodref '"+tostring(obj)+"' has wrong tag!");
-            }
-            int name_and_type_index = obj.getNameAndTypeIndex();
-            ConstantNameAndType cnat = (ConstantNameAndType) (cp.getConstant(name_and_type_index));
-            String name = ((ConstantUtf8) (cp.getConstant(cnat.getNameIndex()))).getBytes(); // Field or Method name
-            if (!validInterfaceMethodName(name)){
-                throw new ClassConstraintException("Invalid (interface) method name '"+name+"' referenced by '"+tostring(obj)+"'.");
-            }
-
-            int class_index = obj.getClassIndex();
-            ConstantClass cc = (ConstantClass) (cp.getConstant(class_index));
-            String className = ((ConstantUtf8) (cp.getConstant(cc.getNameIndex()))).getBytes(); // Class Name in internal form
-            if (! validClassName(className)){
-                throw new ClassConstraintException("Illegal class name '"+className+"' used by '"+tostring(obj)+"'.");
-            }
-
-            String sig  = ((ConstantUtf8) (cp.getConstant(cnat.getSignatureIndex()))).getBytes(); // Field or Method signature(=descriptor)
-
-            try{
-                Type   t  = Type.getReturnType(sig);
-                if ( name.equals(STATIC_INITIALIZER_NAME) && (t != Type.VOID) ){
-                    addMessage("Class or interface initialization method '"+STATIC_INITIALIZER_NAME+"' usually has VOID return type instead of '"+t+"'. Note this is really not a requirement of The Java Virtual Machine Specification, Second Edition.");
-                }
-            }
-            catch (ClassFormatException cfe){
-                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
-            }
-
-        }
-
-    }
-
-    /**
-     * This method returns true if and only if the supplied String
-     * represents a valid Java class name.
-     */
-    private static boolean validClassName(String name){
-        /*
-         * TODO: implement.
-         * Are there any restrictions?
-         */
-        return true;
-    }
-    /**
-     * This method returns true if and only if the supplied String
-     * represents a valid method name.
-     * This is basically the same as a valid identifier name in the
-     * Java programming language, but the special name for
-     * the instance initialization method is allowed and the special name
-     * for the class/interface initialization method may be allowed.
-     */
-    private static boolean validMethodName(String name, boolean allowStaticInit){
-        if (validJavaLangMethodName(name)) {
-            return true;
-        }
-
-        if (allowStaticInit){
-            return (name.equals(CONSTRUCTOR_NAME) || name.equals(STATIC_INITIALIZER_NAME));
-        }
-        else{
-            return name.equals(CONSTRUCTOR_NAME);
-        }
-    }
-
-    /**
-     * This method returns true if and only if the supplied String
-     * represents a valid method name that may be referenced by
-     * ConstantMethodref objects.
-     */
-    private static boolean validClassMethodName(String name){
-        return validMethodName(name, false);
-    }
-
-    /**
-     * This method returns true if and only if the supplied String
-     * represents a valid Java programming language method name stored as a simple
-     * (non-qualified) name.
-     * Conforming to: The Java Virtual Machine Specification, Second Edition, �2.7, �2.7.1, �2.2.
-     */
-    private static boolean validJavaLangMethodName(String name){
-        if (!Character.isJavaIdentifierStart(name.charAt(0))) {
-            return false;
-        }
-
-        for (int i=1; i<name.length(); i++){
-            if (!Character.isJavaIdentifierPart(name.charAt(i))) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * This method returns true if and only if the supplied String
-     * represents a valid Java interface method name that may be
-     * referenced by ConstantInterfaceMethodref objects.
-     */
-    private static boolean validInterfaceMethodName(String name){
-        // I guess we should assume special names forbidden here.
-        if (name.startsWith("<")) {
-            return false;
-        }
-        return validJavaLangMethodName(name);
-    }
-
-    /**
-     * This method returns true if and only if the supplied String
-     * represents a valid Java identifier (so-called simple name).
-     */
-    private static boolean validJavaIdentifier(String name){
-    if  (name.length() == 0) {
-        return false; // must not be empty, reported by <francis.andre@easynet.fr>, thanks!
-    }
-
-        // vmspec2 2.7, vmspec2 2.2
-        if (!Character.isJavaIdentifierStart(name.charAt(0))) {
-            return false;
-        }
-
-        for (int i=1; i<name.length(); i++){
-            if (!Character.isJavaIdentifierPart(name.charAt(i))) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * This method returns true if and only if the supplied String
-     * represents a valid Java field name.
-     */
-    private static boolean validFieldName(String name){
-        // vmspec2 2.7, vmspec2 2.2
-        return validJavaIdentifier(name);
-    }
-
-    /**
-     * This class serves for finding out if a given JavaClass' ConstantPool
-     * references an Inner Class.
-     * The Java Virtual Machine Specification, Second Edition is not very precise
-     * about when an "InnerClasses" attribute has to appear. However, it states that
-     * there has to be exactly one InnerClasses attribute in the ClassFile structure
-     * if the constant pool of a class or interface refers to any class or interface
-     * "that is not a member of a package". Sun does not mean "member of the default
-     * package". In "Inner Classes Specification" they point out how a "bytecode name"
-     * is derived so one has to deduce what a class name of a class "that is not a
-     * member of a package" looks like: there is at least one character in the byte-
-     * code name that cannot be part of a legal Java Language Class name (and not equal
-     * to '/'). This assumption is wrong as the delimiter is '$' for which
-     * Character.isJavaIdentifierPart() == true.
-     * Hence, you really run into trouble if you have a toplevel class called
-     * "A$XXX" and another toplevel class called "A" with in inner class called "XXX".
-     * JustIce cannot repair this; please note that existing verifiers at this
-     * time even fail to detect missing InnerClasses attributes in pass 2.
-     */
-    private static class InnerClassDetector extends EmptyVisitor{
-        private boolean hasInnerClass = false;
-        private final JavaClass jc;
-        private final ConstantPool cp;
-
-        /** Constructs an InnerClassDetector working on the JavaClass _jc. */
-        public InnerClassDetector(JavaClass _jc){
-            jc = _jc;
-            cp = jc.getConstantPool();
-            (new DescendingVisitor(jc, this)).visit();
-        }
-        /**
-         * Returns if the JavaClass this InnerClassDetector is working on
-         * has an Inner Class reference in its constant pool.
-         */
-        public boolean innerClassReferenced(){
-            return hasInnerClass;
-        }
-        /** This method casually visits ConstantClass references. */
-        @Override
-        public void visitConstantClass(ConstantClass obj){
-            Constant c = cp.getConstant(obj.getNameIndex());
-            if (c instanceof ConstantUtf8){ //Ignore the case where it's not a ConstantUtf8 here, we'll find out later.
-                String classname = ((ConstantUtf8) c).getBytes();
-                if (classname.startsWith(jc.getClassName().replace('.','/')+"$")){
-                    hasInnerClass = true;
-                }
-            }
-        }
-    }
-
-    /**
-     * This method is here to save typing work and improve code readability.
-     */
-    private static String tostring(Node n){
-        return new StringRepresentation(n).toString();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java b/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
deleted file mode 100644
index dab8e7b..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/Pass3aVerifier.java
+++ /dev/null
@@ -1,1283 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.CodeException;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantDouble;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantFloat;
-import org.apache.bcel.classfile.ConstantInteger;
-import org.apache.bcel.classfile.ConstantInterfaceMethodref;
-import org.apache.bcel.classfile.ConstantLong;
-import org.apache.bcel.classfile.ConstantMethodref;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantString;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.LineNumber;
-import org.apache.bcel.classfile.LineNumberTable;
-import org.apache.bcel.classfile.LocalVariable;
-import org.apache.bcel.classfile.LocalVariableTable;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ALOAD;
-import org.apache.bcel.generic.ANEWARRAY;
-import org.apache.bcel.generic.ASTORE;
-import org.apache.bcel.generic.ATHROW;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.BREAKPOINT;
-import org.apache.bcel.generic.CHECKCAST;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.DLOAD;
-import org.apache.bcel.generic.DSTORE;
-import org.apache.bcel.generic.FLOAD;
-import org.apache.bcel.generic.FSTORE;
-import org.apache.bcel.generic.FieldInstruction;
-import org.apache.bcel.generic.GETSTATIC;
-import org.apache.bcel.generic.GotoInstruction;
-import org.apache.bcel.generic.IINC;
-import org.apache.bcel.generic.ILOAD;
-import org.apache.bcel.generic.IMPDEP1;
-import org.apache.bcel.generic.IMPDEP2;
-import org.apache.bcel.generic.INSTANCEOF;
-import org.apache.bcel.generic.INVOKEDYNAMIC;
-import org.apache.bcel.generic.INVOKEINTERFACE;
-import org.apache.bcel.generic.INVOKESPECIAL;
-import org.apache.bcel.generic.INVOKESTATIC;
-import org.apache.bcel.generic.INVOKEVIRTUAL;
-import org.apache.bcel.generic.ISTORE;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.InvokeInstruction;
-import org.apache.bcel.generic.JsrInstruction;
-import org.apache.bcel.generic.LDC;
-import org.apache.bcel.generic.LDC2_W;
-import org.apache.bcel.generic.LLOAD;
-import org.apache.bcel.generic.LOOKUPSWITCH;
-import org.apache.bcel.generic.LSTORE;
-import org.apache.bcel.generic.LoadClass;
-import org.apache.bcel.generic.MULTIANEWARRAY;
-import org.apache.bcel.generic.NEW;
-import org.apache.bcel.generic.NEWARRAY;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.PUTSTATIC;
-import org.apache.bcel.generic.RET;
-import org.apache.bcel.generic.ReturnInstruction;
-import org.apache.bcel.generic.TABLESWITCH;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.verifier.PassVerifier;
-import org.apache.bcel.verifier.VerificationResult;
-import org.apache.bcel.verifier.Verifier;
-import org.apache.bcel.verifier.VerifierFactory;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.ClassConstraintException;
-import org.apache.bcel.verifier.exc.InvalidMethodException;
-import org.apache.bcel.verifier.exc.StaticCodeConstraintException;
-import org.apache.bcel.verifier.exc.StaticCodeInstructionConstraintException;
-import org.apache.bcel.verifier.exc.StaticCodeInstructionOperandConstraintException;
-
-/**
- * This PassVerifier verifies a class file according to
- * pass 3, static part as described in The Java Virtual
- * Machine Specification, 2nd edition.
- * More detailed information is to be found at the do_verify()
- * method's documentation. 
- *
- * @version $Id$
- * @author Enver Haase
- * @see #do_verify()
- */
-public final class Pass3aVerifier extends PassVerifier{
-
-    /** The Verifier that created this. */
-    private final Verifier myOwner;
-
-    /** 
-     * The method number to verify.
-     * This is the index in the array returned
-     * by JavaClass.getMethods().
-     */
-    private final int method_no;
-
-    /** The one and only InstructionList object used by an instance of this class. It's here for performance reasons by do_verify() and its callees. */    
-    InstructionList instructionList;
-    /** The one and only Code object used by an instance of this class. It's here for performance reasons by do_verify() and its callees. */    
-    Code code;
-
-    /** Should only be instantiated by a Verifier. */
-    public Pass3aVerifier(Verifier owner, int method_no){
-        myOwner = owner;
-        this.method_no = method_no;
-    }
-
-    /**
-     * Pass 3a is the verification of static constraints of
-     * JVM code (such as legal targets of branch instructions).
-     * This is the part of pass 3 where you do not need data
-     * flow analysis.
-     * JustIce also delays the checks for a correct exception
-     * table of a Code attribute and correct line number entries
-     * in a LineNumberTable attribute of a Code attribute (which
-     * conceptually belong to pass 2) to this pass. Also, most
-     * of the check for valid local variable entries in a
-     * LocalVariableTable attribute of a Code attribute is
-     * delayed until this pass.
-     * All these checks need access to the code array of the
-     * Code attribute.
-     *
-     * @throws InvalidMethodException if the method to verify does not exist.
-     */
-    @Override
-    public VerificationResult do_verify(){
-        try {
-        if (myOwner.doPass2().equals(VerificationResult.VR_OK)){
-            // Okay, class file was loaded correctly by Pass 1
-            // and satisfies static constraints of Pass 2.
-            JavaClass jc = Repository.lookupClass(myOwner.getClassName());
-            Method[] methods = jc.getMethods();
-            if (method_no >= methods.length){
-                throw new InvalidMethodException("METHOD DOES NOT EXIST!");
-            }
-            Method method = methods[method_no];
-            code = method.getCode();
-
-            // No Code? Nothing to verify!
-            if ( method.isAbstract() || method.isNative() ){ // IF mg HAS NO CODE (static constraint of Pass 2)
-                return VerificationResult.VR_OK;
-            }
-
-            // TODO:
-            // We want a very sophisticated code examination here with good explanations
-            // on where to look for an illegal instruction or such.
-            // Only after that we should try to build an InstructionList and throw an
-            // AssertionViolatedException if after our examination InstructionList building
-            // still fails.
-            // That examination should be implemented in a byte-oriented way, i.e. look for
-            // an instruction, make sure its validity, count its length, find the next
-            // instruction and so on.
-            try{
-                instructionList = new InstructionList(method.getCode().getCode());
-            }
-            catch(RuntimeException re){
-                return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Bad bytecode in the code array of the Code attribute of method '"+method+"'.");
-            }
-
-            instructionList.setPositions(true);
-
-            // Start verification.
-            VerificationResult vr = VerificationResult.VR_OK; //default
-            try{
-                delayedPass2Checks();
-            }
-            catch(ClassConstraintException cce){
-                vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage());
-                return vr;
-            }
-            try{
-                pass3StaticInstructionChecks();
-                pass3StaticInstructionOperandsChecks();
-            }
-            catch(StaticCodeConstraintException scce){
-                vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, scce.getMessage());
-            }
-            catch(ClassCastException cce){
-                vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Class Cast Exception: " + cce.getMessage());
-            }
-            return vr;
-        }
-        //did not pass Pass 2.
-        return VerificationResult.VR_NOTYET;
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * These are the checks that could be done in pass 2 but are delayed to pass 3
-     * for performance reasons. Also, these checks need access to the code array
-     * of the Code attribute of a Method so it's okay to perform them here.
-     * Also see the description of the do_verify() method.
-     *
-     * @throws ClassConstraintException if the verification fails.
-     * @see #do_verify()
-     */
-    private void delayedPass2Checks(){
-
-        int[] instructionPositions = instructionList.getInstructionPositions();
-        int codeLength = code.getCode().length;
-
-        /////////////////////
-        // LineNumberTable //
-        /////////////////////
-        LineNumberTable lnt = code.getLineNumberTable();
-        if (lnt != null){
-            LineNumber[] lineNumbers = lnt.getLineNumberTable();
-            IntList offsets = new IntList();
-            lineNumber_loop:
-            for (LineNumber lineNumber : lineNumbers) { // may appear in any order.
-                for (int instructionPosition : instructionPositions) {
-                    // TODO: Make this a binary search! The instructionPositions array is naturally ordered!
-                    int offset = lineNumber.getStartPC();
-                    if (instructionPosition == offset) {
-                        if (offsets.contains(offset)) {
-                            addMessage("LineNumberTable attribute '" + code.getLineNumberTable() + "' refers to the same code offset ('" + offset + "') more than once which is violating the semantics [but is sometimes produced by IBM's 'jikes' compiler].");
-                        } else {
-                            offsets.add(offset);
-                        }
-                        continue lineNumber_loop;
-                    }
-                }
-                throw new ClassConstraintException("Code attribute '" + code + "' has a LineNumberTable attribute '" + code.getLineNumberTable() + "' referring to a code offset ('" + lineNumber.getStartPC() + "') that does not exist.");
-            }
-        }
-
-        ///////////////////////////
-        // LocalVariableTable(s) //
-        ///////////////////////////
-        /* We cannot use code.getLocalVariableTable() because there could be more
-           than only one. This is a bug in BCEL. */
-        Attribute[] atts = code.getAttributes();
-        for (Attribute att : atts) {
-            if (att instanceof LocalVariableTable) {
-                LocalVariableTable lvt = (LocalVariableTable) att;
-                LocalVariable[] localVariables = lvt.getLocalVariableTable();
-                for (LocalVariable localVariable : localVariables) {
-                    int startpc = localVariable.getStartPC();
-                    int length = localVariable.getLength();
-
-                    if (!contains(instructionPositions, startpc)) {
-                        throw new ClassConstraintException("Code attribute '" + code
-                                + "' has a LocalVariableTable attribute '" + code.getLocalVariableTable()
-                                + "' referring to a code offset ('" + startpc + "') that does not exist.");
-                    }
-                    if ((!contains(instructionPositions, startpc + length)) && (startpc + length != codeLength)) {
-                        throw new ClassConstraintException("Code attribute '" + code
-                                + "' has a LocalVariableTable attribute '" + code.getLocalVariableTable()
-                                + "' referring to a code offset start_pc+length ('" + (startpc + length)
-                                + "') that does not exist.");
-                    }
-                }
-            }
-        }
-
-        ////////////////////
-        // ExceptionTable //
-        ////////////////////
-        // In BCEL's "classfile" API, the startPC/endPC-notation is
-        // inclusive/exclusive as in the Java Virtual Machine Specification.
-        // WARNING: This is not true for BCEL's "generic" API.
-        CodeException[] exceptionTable = code.getExceptionTable();
-        for (CodeException element : exceptionTable) {
-            int startpc = element.getStartPC();
-            int endpc = element.getEndPC();
-            int handlerpc = element.getHandlerPC();
-            if (startpc >= endpc){
-                throw new ClassConstraintException("Code attribute '"+code+"' has an exception_table entry '"+element+"' that has its start_pc ('"+startpc+"') not smaller than its end_pc ('"+endpc+"').");
-            }
-            if (!contains(instructionPositions, startpc)){
-                throw new ClassConstraintException("Code attribute '"+code+"' has an exception_table entry '"+element+"' that has a non-existant bytecode offset as its start_pc ('"+startpc+"').");
-            }
-            if ( (!contains(instructionPositions, endpc)) && (endpc != codeLength)){
-                throw new ClassConstraintException("Code attribute '"+code+"' has an exception_table entry '"+element+"' that has a non-existant bytecode offset as its end_pc ('"+startpc+"') [that is also not equal to code_length ('"+codeLength+"')].");
-            }
-            if (!contains(instructionPositions, handlerpc)){
-                throw new ClassConstraintException("Code attribute '"+code+"' has an exception_table entry '"+element+"' that has a non-existant bytecode offset as its handler_pc ('"+handlerpc+"').");
-            }
-        }
-    }
-
-    /**
-     * These are the checks if constraints are satisfied which are described in the
-     * Java Virtual Machine Specification, Second Edition as Static Constraints on
-     * the instructions of Java Virtual Machine Code (chapter 4.8.1).
-     *
-     * @throws StaticCodeConstraintException if the verification fails.
-     */
-    private void pass3StaticInstructionChecks(){
-
-        // Code array must not be empty:
-        // Enforced in pass 2 (also stated in the static constraints of the Code
-        // array in vmspec2), together with pass 1 (reading code_length bytes and
-        // interpreting them as code[]). So this must not be checked again here.
-
-        if (! (code.getCode().length < 65536)){// contradicts vmspec2 page 152 ("Limitations"), but is on page 134.
-            throw new StaticCodeInstructionConstraintException("Code array in code attribute '"+code+"' too big: must be smaller than 65536 bytes.");
-        }
-
-        // First opcode at offset 0: okay, that's clear. Nothing to do.
-
-        // Only instances of the instructions documented in Section 6.4 may appear in
-        // the code array.
-
-        // For BCEL's sake, we cannot handle WIDE stuff, but hopefully BCEL does its job right :)
-
-        // The last byte of the last instruction in the code array must be the byte at index
-        // code_length-1 : See the do_verify() comments. We actually don't iterate through the
-        // byte array, but use an InstructionList so we cannot check for this. But BCEL does
-        // things right, so it's implicitly okay.
-
-        // TODO: Check how BCEL handles (and will handle) instructions like IMPDEP1, IMPDEP2,
-        //       BREAKPOINT... that BCEL knows about but which are illegal anyway.
-        //       We currently go the safe way here.
-        InstructionHandle ih = instructionList.getStart();
-        while (ih != null){
-            Instruction i = ih.getInstruction();
-            if (i instanceof IMPDEP1){
-                throw new StaticCodeInstructionConstraintException("IMPDEP1 must not be in the code, it is an illegal instruction for _internal_ JVM use!");
-            }
-            if (i instanceof IMPDEP2){
-                throw new StaticCodeInstructionConstraintException("IMPDEP2 must not be in the code, it is an illegal instruction for _internal_ JVM use!");
-            }
-            if (i instanceof BREAKPOINT){
-                throw new StaticCodeInstructionConstraintException("BREAKPOINT must not be in the code, it is an illegal instruction for _internal_ JVM use!");
-            }
-            ih = ih.getNext();
-        }
-
-        // The original verifier seems to do this check here, too.
-        // An unreachable last instruction may also not fall through the
-        // end of the code, which is stupid -- but with the original
-        // verifier's subroutine semantics one cannot predict reachability.
-        Instruction last = instructionList.getEnd().getInstruction();
-        if (! ((last instanceof ReturnInstruction)    ||
-                    (last instanceof RET)                                ||
-                    (last instanceof GotoInstruction)            ||
-                    (last instanceof ATHROW) )) {
-            throw new StaticCodeInstructionConstraintException("Execution must not fall off the bottom of the code array. This constraint is enforced statically as some existing verifiers do - so it may be a false alarm if the last instruction is not reachable.");
-        }
-    }
-
-    /**
-     * These are the checks for the satisfaction of constraints which are described in the
-     * Java Virtual Machine Specification, Second Edition as Static Constraints on
-     * the operands of instructions of Java Virtual Machine Code (chapter 4.8.1).
-     * BCEL parses the code array to create an InstructionList and therefore has to check
-     * some of these constraints. Additional checks are also implemented here.
-     *
-     * @throws StaticCodeConstraintException if the verification fails.
-     */
-    private void pass3StaticInstructionOperandsChecks(){
-        try {
-        // When building up the InstructionList, BCEL has already done all those checks
-        // mentioned in The Java Virtual Machine Specification, Second Edition, as
-        // "static constraints on the operands of instructions in the code array".
-        // TODO: see the do_verify() comments. Maybe we should really work on the
-        //       byte array first to give more comprehensive messages.
-        // TODO: Review Exception API, possibly build in some "offending instruction" thing
-        //       when we're ready to insulate the offending instruction by doing the
-        //       above thing.
-
-        // TODO: Implement as much as possible here. BCEL does _not_ check everything.
-
-        ConstantPoolGen cpg = new ConstantPoolGen(Repository.lookupClass(myOwner.getClassName()).getConstantPool());
-        InstOperandConstraintVisitor v = new InstOperandConstraintVisitor(cpg);
-
-        // Checks for the things BCEL does _not_ handle itself.
-        InstructionHandle ih = instructionList.getStart();
-        while (ih != null){
-            Instruction i = ih.getInstruction();
-
-            // An "own" constraint, due to JustIce's new definition of what "subroutine" means.
-            if (i instanceof JsrInstruction){
-                InstructionHandle target = ((JsrInstruction) i).getTarget();
-                if (target == instructionList.getStart()){
-                    throw new StaticCodeInstructionOperandConstraintException("Due to JustIce's clear definition of subroutines, no JSR or JSR_W may have a top-level instruction (such as the very first instruction, which is targeted by instruction '"+ih+"' as its target.");
-                }
-                if (!(target.getInstruction() instanceof ASTORE)){
-                    throw new StaticCodeInstructionOperandConstraintException("Due to JustIce's clear definition of subroutines, no JSR or JSR_W may target anything else than an ASTORE instruction. Instruction '"+ih+"' targets '"+target+"'.");
-                }
-            }
-
-            // vmspec2, page 134-137
-            ih.accept(v);
-
-            ih = ih.getNext();
-        }
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /** A small utility method returning if a given int i is in the given int[] ints. */
-    private static boolean contains(int[] ints, int i){
-        for (int k : ints) {
-            if (k==i) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /** Returns the method number as supplied when instantiating. */
-    public int getMethodNo(){
-        return method_no;
-    }
-
-    /**
-     * This visitor class does the actual checking for the instruction
-     * operand's constraints.
-     */
-    private class InstOperandConstraintVisitor extends org.apache.bcel.generic.EmptyVisitor{
-        /** The ConstantPoolGen instance this Visitor operates on. */
-        private final ConstantPoolGen cpg;
-
-        /** The only Constructor. */
-        InstOperandConstraintVisitor(ConstantPoolGen cpg){
-            this.cpg = cpg;
-        }
-
-        /**
-         * Utility method to return the max_locals value of the method verified
-         * by the surrounding Pass3aVerifier instance.
-         */
-        private int max_locals(){
-           try {
-            return Repository.lookupClass(myOwner.getClassName()).getMethods()[method_no].getCode().getMaxLocals();
-            } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-        }
-
-        /**
-         * A utility method to always raise an exeption.
-         */
-        private void constraintViolated(Instruction i, String message) {
-            throw new StaticCodeInstructionOperandConstraintException("Instruction "+i+" constraint violated: "+message);
-        }
-
-        /**
-         * A utility method to raise an exception if the index is not
-         * a valid constant pool index.
-         */
-        private void indexValid(Instruction i, int idx){
-            if (idx < 0 || idx >= cpg.getSize()){
-                constraintViolated(i, "Illegal constant pool index '"+idx+"'.");
-            }
-        }
-
-        ///////////////////////////////////////////////////////////
-        // The Java Virtual Machine Specification, pages 134-137 //
-        ///////////////////////////////////////////////////////////
-        /**
-         * Assures the generic preconditions of a LoadClass instance.
-         * The referenced class is loaded and pass2-verified.
-         */
-        @Override
-        public void visitLoadClass(LoadClass o){
-            ObjectType t = o.getLoadClassType(cpg);
-            if (t != null){// null means "no class is loaded"
-                Verifier v = VerifierFactory.getVerifier(t.getClassName());
-                VerificationResult vr = v.doPass1();
-                if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                    constraintViolated((Instruction) o, "Class '"+o.getLoadClassType(cpg).getClassName()+"' is referenced, but cannot be loaded: '"+vr+"'.");
-                }
-            }
-        }
-
-        // The target of each jump and branch instruction [...] must be the opcode [...]
-        // BCEL _DOES_ handle this.
-
-        // tableswitch: BCEL will do it, supposedly.
-
-        // lookupswitch: BCEL will do it, supposedly.
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        // LDC and LDC_W (LDC_W is a subclass of LDC in BCEL's model)
-        @Override
-        public void visitLDC(LDC o){
-            indexValid(o, o.getIndex());
-            Constant c = cpg.getConstant(o.getIndex());
-            if (c instanceof ConstantClass){
-              addMessage("Operand of LDC or LDC_W is CONSTANT_Class '"+c+"' - this is only supported in JDK 1.5 and higher.");
-            }
-            else{
-              if (! ( (c instanceof ConstantInteger)    ||
-                      (c instanceof ConstantFloat)         ||
-                (c instanceof ConstantString) ) ){
-            constraintViolated(o, "Operand of LDC or LDC_W must be one of CONSTANT_Integer, CONSTANT_Float or CONSTANT_String, but is '"+c+"'.");
-              }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        // LDC2_W
-        @Override
-        public void visitLDC2_W(LDC2_W o){
-            indexValid(o, o.getIndex());
-            Constant c = cpg.getConstant(o.getIndex());
-            if (! ( (c instanceof ConstantLong)    ||
-                            (c instanceof ConstantDouble) ) ){
-                constraintViolated(o, "Operand of LDC2_W must be CONSTANT_Long or CONSTANT_Double, but is '"+c+"'.");
-            }
-            try{
-                indexValid(o, o.getIndex()+1);
-            }
-            catch(StaticCodeInstructionOperandConstraintException e){
-                throw new AssertionViolatedException("OOPS: Does not BCEL handle that? LDC2_W operand has a problem.", e);
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-         //getfield, putfield, getstatic, putstatic
-         @Override
-        public void visitFieldInstruction(FieldInstruction o){
-           try {
-            indexValid(o, o.getIndex());
-            Constant c = cpg.getConstant(o.getIndex());
-            if (! (c instanceof ConstantFieldref)){
-                constraintViolated(o, "Indexing a constant that's not a CONSTANT_Fieldref but a '"+c+"'.");
-            }
-
-            String field_name = o.getFieldName(cpg);
-
-            JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
-            Field[] fields = jc.getFields();
-            Field f = null;
-            for (Field field : fields) {
-                if (field.getName().equals(field_name)){
-                  Type f_type = Type.getType(field.getSignature());
-                  Type o_type = o.getType(cpg);
-                    /* TODO: Check if assignment compatibility is sufficient.
-                   * What does Sun do?
-                   */
-                  if (f_type.equals(o_type)){
-                        f = field;
-                        break;
-                    }
-                }
-            }
-            if (f == null){
-                JavaClass[] superclasses = jc.getSuperClasses();
-                outer:
-                for (JavaClass superclass : superclasses) {
-                    fields = superclass.getFields();
-                    for (Field field : fields) {
-                        if (field.getName().equals(field_name)) {
-                            Type f_type = Type.getType(field.getSignature());
-                            Type o_type = o.getType(cpg);
-                            if (f_type.equals(o_type)) {
-                                f = field;
-                                if ((f.getAccessFlags() & (Constants.ACC_PUBLIC | Constants.ACC_PROTECTED)) == 0) {
-                                    f = null;
-                                }
-                                break outer;
-                            }
-                        }
-                    }
-                }
-                if (f == null) {
-                    constraintViolated(o, "Referenced field '"+field_name+"' does not exist in class '"+jc.getClassName()+"'.");
-                }
-            }
-            else{
-                /* TODO: Check if assignment compatibility is sufficient.
-                   What does Sun do? */
-                Type.getType(f.getSignature());
-                o.getType(cpg);
-//                Type f_type = Type.getType(f.getSignature());
-//                Type o_type = o.getType(cpg);
-
-                // Argh. Sun's implementation allows us to have multiple fields of
-                // the same name but with a different signature.
-                //if (! f_type.equals(o_type)){
-                //    constraintViolated(o, "Referenced field '"+field_name+"' has type '"+f_type+"' instead of '"+o_type+"' as expected.");
-                //}
-
-                /* TODO: Check for access modifiers here. */
-            }
-            } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-        }    
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitInvokeInstruction(InvokeInstruction o){
-            indexValid(o, o.getIndex());
-            if (    (o instanceof INVOKEVIRTUAL)    ||
-                        (o instanceof INVOKESPECIAL)    ||
-                        (o instanceof INVOKESTATIC)    ){
-                Constant c = cpg.getConstant(o.getIndex());
-                if (! (c instanceof ConstantMethodref)){
-                    constraintViolated(o, "Indexing a constant that's not a CONSTANT_Methodref but a '"+c+"'.");
-                }
-                else{
-                    // Constants are okay due to pass2.
-                    ConstantNameAndType cnat = (ConstantNameAndType) (cpg.getConstant(((ConstantMethodref) c).getNameAndTypeIndex()));
-                    ConstantUtf8 cutf8 = (ConstantUtf8) (cpg.getConstant(cnat.getNameIndex()));
-                    if (cutf8.getBytes().equals(Constants.CONSTRUCTOR_NAME) && (!(o instanceof INVOKESPECIAL)) ){
-                        constraintViolated(o, "Only INVOKESPECIAL is allowed to invoke instance initialization methods.");
-                    }
-                    if ( (! (cutf8.getBytes().equals(Constants.CONSTRUCTOR_NAME)) ) && (cutf8.getBytes().startsWith("<")) ){
-                        constraintViolated(o, "No method with a name beginning with '<' other than the instance initialization methods may be called by the method invocation instructions.");
-                    }
-                }
-            }
-            else{ //if (o instanceof INVOKEINTERFACE){
-                Constant c = cpg.getConstant(o.getIndex());
-                if (! (c instanceof ConstantInterfaceMethodref)){
-                    constraintViolated(o, "Indexing a constant that's not a CONSTANT_InterfaceMethodref but a '"+c+"'.");
-                }
-                // TODO: From time to time check if BCEL allows to detect if the
-                // 'count' operand is consistent with the information in the
-                // CONSTANT_InterfaceMethodref and if the last operand is zero.
-                // By now, BCEL hides those two operands because they're superfluous.
-
-                // Invoked method must not be <init> or <clinit>
-                ConstantNameAndType cnat = (ConstantNameAndType) (cpg.getConstant(((ConstantInterfaceMethodref)c).getNameAndTypeIndex()));
-                String name = ((ConstantUtf8) (cpg.getConstant(cnat.getNameIndex()))).getBytes();
-                if (name.equals(Constants.CONSTRUCTOR_NAME)){
-                    constraintViolated(o, "Method to invoke must not be '"+Constants.CONSTRUCTOR_NAME+"'.");
-                }
-                if (name.equals(Constants.STATIC_INITIALIZER_NAME)){
-                    constraintViolated(o, "Method to invoke must not be '"+Constants.STATIC_INITIALIZER_NAME+"'.");
-                }
-            }
-
-            // The LoadClassType is the method-declaring class, so we have to check the other types.
-
-            Type t = o.getReturnType(cpg);
-            if (t instanceof ArrayType){
-                t = ((ArrayType) t).getBasicType();
-            }
-            if (t instanceof ObjectType){
-                Verifier v = VerifierFactory.getVerifier(((ObjectType) t).getClassName());
-                VerificationResult vr = v.doPass2();
-                if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                    constraintViolated(o, "Return type class/interface could not be verified successfully: '"+vr.getMessage()+"'.");
-                }
-            }
-
-            Type[] ts = o.getArgumentTypes(cpg);
-            for (Type element : ts) {
-                t = element;
-                if (t instanceof ArrayType){
-                    t = ((ArrayType) t).getBasicType();
-                }
-                if (t instanceof ObjectType){
-                    Verifier v = VerifierFactory.getVerifier(((ObjectType) t).getClassName());
-                    VerificationResult vr = v.doPass2();
-                    if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                        constraintViolated(o, "Argument type class/interface could not be verified successfully: '"+vr.getMessage()+"'.");
-                    }
-                }
-            }
-
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitINSTANCEOF(INSTANCEOF o){
-            indexValid(o, o.getIndex());
-            Constant c = cpg.getConstant(o.getIndex());
-            if (!    (c instanceof ConstantClass)){
-                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitCHECKCAST(CHECKCAST o){
-            indexValid(o, o.getIndex());
-            Constant c = cpg.getConstant(o.getIndex());
-            if (!    (c instanceof ConstantClass)){
-                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitNEW(NEW o){
-            indexValid(o, o.getIndex());
-            Constant c = cpg.getConstant(o.getIndex());
-            if (!    (c instanceof ConstantClass)){
-                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
-            }
-            else{
-                ConstantUtf8 cutf8 = (ConstantUtf8) (cpg.getConstant( ((ConstantClass) c).getNameIndex() ));
-                Type t = Type.getType("L"+cutf8.getBytes()+";");
-                if (t instanceof ArrayType){
-                    constraintViolated(o, "NEW must not be used to create an array.");
-                }
-            }
-
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitMULTIANEWARRAY(MULTIANEWARRAY o){
-            indexValid(o, o.getIndex());
-            Constant c = cpg.getConstant(o.getIndex());
-            if (!    (c instanceof ConstantClass)){
-                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
-            }
-            int dimensions2create = o.getDimensions();
-            if (dimensions2create < 1){
-                constraintViolated(o, "Number of dimensions to create must be greater than zero.");
-            }
-            Type t = o.getType(cpg);
-            if (t instanceof ArrayType){
-                int dimensions = ((ArrayType) t).getDimensions();
-                if (dimensions < dimensions2create){
-                    constraintViolated(o, "Not allowed to create array with more dimensions ('+dimensions2create+') than the one referenced by the CONSTANT_Class '"+t+"'.");
-                }
-            }
-            else{
-                constraintViolated(o, "Expecting a CONSTANT_Class referencing an array type. [Constraint not found in The Java Virtual Machine Specification, Second Edition, 4.8.1]");
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitANEWARRAY(ANEWARRAY o){
-            indexValid(o, o.getIndex());
-            Constant c = cpg.getConstant(o.getIndex());
-            if (!    (c instanceof ConstantClass)){
-                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
-            }
-            Type t = o.getType(cpg);
-            if (t instanceof ArrayType){
-                int dimensions = ((ArrayType) t).getDimensions();
-                if (dimensions >= 255){
-                    constraintViolated(o, "Not allowed to create an array with more than 255 dimensions.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitNEWARRAY(NEWARRAY o){
-            byte t = o.getTypecode();
-            if (!    (    (t == Constants.T_BOOLEAN)    ||
-                            (t == Constants.T_CHAR)            ||
-                            (t == Constants.T_FLOAT)        ||
-                            (t == Constants.T_DOUBLE)        ||
-                            (t == Constants.T_BYTE)            ||
-                            (t == Constants.T_SHORT)        ||
-                            (t == Constants.T_INT)            ||
-                            (t == Constants.T_LONG)    )    ){
-                constraintViolated(o, "Illegal type code '+t+' for 'atype' operand.");
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitILOAD(ILOAD o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
-            }
-            else{
-                int maxminus1 =  max_locals()-1;
-                if (idx > maxminus1){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitFLOAD(FLOAD o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
-            }
-            else{
-                int maxminus1 =  max_locals()-1;
-                if (idx > maxminus1){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitALOAD(ALOAD o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
-            }
-            else{
-                int maxminus1 =  max_locals()-1;
-                if (idx > maxminus1){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitISTORE(ISTORE o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
-            }
-            else{
-                int maxminus1 =  max_locals()-1;
-                if (idx > maxminus1){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitFSTORE(FSTORE o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
-            }
-            else{
-                int maxminus1 =  max_locals()-1;
-                if (idx > maxminus1){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitASTORE(ASTORE o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
-            }
-            else{
-                int maxminus1 =  max_locals()-1;
-                if (idx > maxminus1){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitIINC(IINC o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
-            }
-            else{
-                int maxminus1 =  max_locals()-1;
-                if (idx > maxminus1){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitRET(RET o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
-            }
-            else{
-                int maxminus1 =  max_locals()-1;
-                if (idx > maxminus1){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitLLOAD(LLOAD o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative. [Constraint by JustIce as an analogon to the single-slot xLOAD/xSTORE instructions; may not happen anyway.]");
-            }
-            else{
-                int maxminus2 =  max_locals()-2;
-                if (idx > maxminus2){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-2 '"+maxminus2+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitDLOAD(DLOAD o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative. [Constraint by JustIce as an analogon to the single-slot xLOAD/xSTORE instructions; may not happen anyway.]");
-            }
-            else{
-                int maxminus2 =  max_locals()-2;
-                if (idx > maxminus2){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-2 '"+maxminus2+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitLSTORE(LSTORE o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative. [Constraint by JustIce as an analogon to the single-slot xLOAD/xSTORE instructions; may not happen anyway.]");
-            }
-            else{
-                int maxminus2 =  max_locals()-2;
-                if (idx > maxminus2){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-2 '"+maxminus2+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitDSTORE(DSTORE o){
-            int idx = o.getIndex();
-            if (idx < 0){
-                constraintViolated(o, "Index '"+idx+"' must be non-negative. [Constraint by JustIce as an analogon to the single-slot xLOAD/xSTORE instructions; may not happen anyway.]");
-            }
-            else{
-                int maxminus2 =  max_locals()-2;
-                if (idx > maxminus2){
-                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-2 '"+maxminus2+"'.");
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitLOOKUPSWITCH(LOOKUPSWITCH o){
-            int[] matchs = o.getMatchs();
-            int max = Integer.MIN_VALUE;
-            for (int i=0; i<matchs.length; i++){
-                if (matchs[i] == max && i != 0){
-                    constraintViolated(o, "Match '"+matchs[i]+"' occurs more than once.");
-                }
-                if (matchs[i] < max){
-                    constraintViolated(o, "Lookup table must be sorted but isn't.");
-                }
-                else{
-                    max = matchs[i];
-                }
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitTABLESWITCH(TABLESWITCH o){     
-            // "high" must be >= "low". We cannot check this, as BCEL hides
-            // it from us.
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitPUTSTATIC(PUTSTATIC o){
-            try {
-            String field_name = o.getFieldName(cpg);
-            JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
-            Field[] fields = jc.getFields();
-            Field f = null;
-            for (Field field : fields) {
-                if (field.getName().equals(field_name)){
-                    f = field;
-                    break;
-                }
-            }
-            if (f == null){
-                throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
-            }
-
-            if (f.isFinal()){
-                if (!(myOwner.getClassName().equals(o.getClassType(cpg).getClassName()))){
-                    constraintViolated(o, "Referenced field '"+f+"' is final and must therefore be declared in the current class '"+myOwner.getClassName()+"' which is not the case: it is declared in '"+o.getClassType(cpg).getClassName()+"'.");
-                }
-            }
-
-            if (! (f.isStatic())){
-                constraintViolated(o, "Referenced field '"+f+"' is not static which it should be.");
-            }
-
-            String meth_name = Repository.lookupClass(myOwner.getClassName()).getMethods()[method_no].getName();
-
-            // If it's an interface, it can be set only in <clinit>.
-            if ((!(jc.isClass())) && (!(meth_name.equals(Constants.STATIC_INITIALIZER_NAME)))){
-                constraintViolated(o, "Interface field '"+f+"' must be set in a '"+Constants.STATIC_INITIALIZER_NAME+"' method.");
-            }
-            } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitGETSTATIC(GETSTATIC o){
-            try {
-            String field_name = o.getFieldName(cpg);
-            JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
-            Field[] fields = jc.getFields();
-            Field f = null;
-            for (Field field : fields) {
-                if (field.getName().equals(field_name)){
-                    f = field;
-                    break;
-                }
-            }
-            if (f == null){
-                throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
-            }
-
-            if (! (f.isStatic())){
-                constraintViolated(o, "Referenced field '"+f+"' is not static which it should be.");
-            }
-            } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-        }
-
-        /* Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        //public void visitPUTFIELD(PUTFIELD o){
-            // for performance reasons done in Pass 3b
-        //}
-
-        /* Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        //public void visitGETFIELD(GETFIELD o){
-            // for performance reasons done in Pass 3b
-        //}
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitINVOKEDYNAMIC(INVOKEDYNAMIC o){
-            throw new RuntimeException("INVOKEDYNAMIC instruction is not supported at this time");
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitINVOKEINTERFACE(INVOKEINTERFACE o){
-            try {
-            // INVOKEINTERFACE is a LoadClass; the Class where the referenced method is declared in,
-            // is therefore resolved/verified.
-            // INVOKEINTERFACE is an InvokeInstruction, the argument and return types are resolved/verified,
-            // too. So are the allowed method names.
-            String classname = o.getClassName(cpg);
-            JavaClass jc = Repository.lookupClass(classname);
-            Method m = getMethodRecursive(jc, o);
-            if (m == null){
-                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature '"+o.getSignature(cpg)+"' not found in class '"+jc.getClassName()+"'.");
-            }
-            if (jc.isClass()){
-                constraintViolated(o, "Referenced class '"+jc.getClassName()+"' is a class, but not an interface as expected.");
-            }
-            } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-        }
-
-        /**
-         * Looks for the method referenced by the given invoke instruction in the given class or its super classes and super interfaces.
-         * @param jc the class that defines the referenced method
-         * @param invoke the instruction that references the method
-         * @return the referenced method or null if not found.
-         */
-        private Method getMethodRecursive(JavaClass jc, InvokeInstruction invoke) throws ClassNotFoundException{
-            Method m;
-            //look in the given class
-            m = getMethod(jc, invoke);
-            if(m != null){
-                //method found in given class
-                return m;
-            }
-            //method not found, look in super classes
-            for(JavaClass superclass : jc.getSuperClasses()){
-                m = getMethod(superclass, invoke);
-                if(m != null){
-                    //method found in super class
-                    return m;
-                }
-            }
-            //method not found, look in super interfaces
-            for(JavaClass superclass : jc.getInterfaces()){
-                m = getMethod(superclass, invoke);
-                if(m != null){
-                    //method found in super interface
-                    return m;
-                }
-            }
-            //method not found in the hierarchy
-            return null;
-        }
-        /**
-         * Looks for the method referenced by the given invoke instruction in the given class.
-         * @param jc the class that defines the referenced method
-         * @param invoke the instruction that references the method
-         * @return the referenced method or null if not found.
-         */
-        private Method getMethod(JavaClass jc, InvokeInstruction invoke){
-            Method[] ms = jc.getMethods();
-            Method m = null;
-            for (Method element : ms) {
-                if ( (element.getName().equals(invoke.getMethodName(cpg))) &&
-                     (Type.getReturnType(element.getSignature()).equals(invoke.getReturnType(cpg))) &&
-                     (objarrayequals(Type.getArgumentTypes(element.getSignature()), invoke.getArgumentTypes(cpg))) ){
-                    return element;
-                }
-            }
-            
-            return null;
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitINVOKESPECIAL(INVOKESPECIAL o){
-            try {
-            // INVOKESPECIAL is a LoadClass; the Class where the referenced method is declared in,
-            // is therefore resolved/verified.
-            // INVOKESPECIAL is an InvokeInstruction, the argument and return types are resolved/verified,
-            // too. So are the allowed method names.
-            String classname = o.getClassName(cpg);
-            JavaClass jc = Repository.lookupClass(classname);
-            Method m = getMethodRecursive(jc, o);
-            if (m == null){
-                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature '"+o.getSignature(cpg)+"' not found in class '"+jc.getClassName()+"'.");
-            }
-
-            JavaClass current = Repository.lookupClass(myOwner.getClassName());
-            if (current.isSuper()){
-
-                if ((Repository.instanceOf( current, jc )) && (!current.equals(jc))){
-
-                    if (! (o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME) )){
-                        // Special lookup procedure for ACC_SUPER classes.
-
-                        int supidx = -1;
-
-                        Method meth = null;
-                        while (supidx != 0){
-                            supidx = current.getSuperclassNameIndex();
-                            current = Repository.lookupClass(current.getSuperclassName());
-
-                            Method[] meths = current.getMethods();
-                            for (Method meth2 : meths) {
-                                if    ( (meth2.getName().equals(o.getMethodName(cpg))) &&
-                                     (Type.getReturnType(meth2.getSignature()).equals(o.getReturnType(cpg))) &&
-                                     (objarrayequals(Type.getArgumentTypes(meth2.getSignature()), o.getArgumentTypes(cpg))) ){
-                                    meth = meth2;
-                                    break;
-                                }
-                            }
-                            if (meth != null) {
-                                break;
-                            }
-                        }
-                        if (meth == null){
-                            constraintViolated(o, "ACC_SUPER special lookup procedure not successful: method '"+o.getMethodName(cpg)+"' with proper signature not declared in superclass hierarchy.");
-                        }                        
-                    }
-                }
-            }
-
-            } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-
-        }
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitINVOKESTATIC(INVOKESTATIC o){
-            try {
-            // INVOKESTATIC is a LoadClass; the Class where the referenced method is declared in,
-            // is therefore resolved/verified.
-            // INVOKESTATIC is an InvokeInstruction, the argument and return types are resolved/verified,
-            // too. So are the allowed method names.
-            String classname = o.getClassName(cpg);
-            JavaClass jc = Repository.lookupClass(classname);
-            Method m = getMethodRecursive(jc, o);
-            if (m == null){
-                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature '"+o.getSignature(cpg) +"' not found in class '"+jc.getClassName()+"'.");
-            } else if (! (m.isStatic())){ // implies it's not abstract, verified in pass 2.
-                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' has ACC_STATIC unset.");
-            }
-
-            } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-        }
-
-
-        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
-        @Override
-        public void visitINVOKEVIRTUAL(INVOKEVIRTUAL o){
-            try {
-            // INVOKEVIRTUAL is a LoadClass; the Class where the referenced method is declared in,
-            // is therefore resolved/verified.
-            // INVOKEVIRTUAL is an InvokeInstruction, the argument and return types are resolved/verified,
-            // too. So are the allowed method names.
-            String classname = o.getClassName(cpg);
-            JavaClass jc = Repository.lookupClass(classname);
-            Method m = getMethodRecursive(jc, o);
-            if (m == null){
-                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature '"+o.getSignature(cpg)+"' not found in class '"+jc.getClassName()+"'.");
-            }
-            if (! (jc.isClass())){
-                constraintViolated(o, "Referenced class '"+jc.getClassName()+"' is an interface, but not a class as expected.");
-            }
-
-            } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-            }
-        }
-
-
-        // WIDE stuff is BCEL-internal and cannot be checked here.
-
-        /**
-         * A utility method like equals(Object) for arrays.
-         * The equality of the elements is based on their equals(Object)
-         * method instead of their object identity.
-         */ 
-        private boolean objarrayequals(Object[] o, Object[] p){
-            if (o.length != p.length){
-                return false;
-            }
-
-            for (int i=0; i<o.length; i++){
-                if (! (o[i].equals(p[i])) ){
-                    return false;
-                }
-            }
-
-            return true;
-        }
-
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java b/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java
deleted file mode 100644
index 0476180..0000000
--- a/src/main/java/org/apache/bcel/verifier/statics/StringRepresentation.java
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.statics;
-
-
-import org.apache.bcel.classfile.Annotations;
-import org.apache.bcel.classfile.BootstrapMethods;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.CodeException;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantDouble;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantFloat;
-import org.apache.bcel.classfile.ConstantInteger;
-import org.apache.bcel.classfile.ConstantInterfaceMethodref;
-import org.apache.bcel.classfile.ConstantLong;
-import org.apache.bcel.classfile.ConstantMethodref;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantString;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ConstantValue;
-import org.apache.bcel.classfile.Deprecated;
-import org.apache.bcel.classfile.EnclosingMethod;
-import org.apache.bcel.classfile.ExceptionTable;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.InnerClass;
-import org.apache.bcel.classfile.InnerClasses;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.LineNumber;
-import org.apache.bcel.classfile.LineNumberTable;
-import org.apache.bcel.classfile.LocalVariable;
-import org.apache.bcel.classfile.LocalVariableTable;
-import org.apache.bcel.classfile.LocalVariableTypeTable;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.MethodParameters;
-import org.apache.bcel.classfile.Node;
-import org.apache.bcel.classfile.Signature;
-import org.apache.bcel.classfile.SourceFile;
-import org.apache.bcel.classfile.StackMap;
-import org.apache.bcel.classfile.StackMapTable;
-import org.apache.bcel.classfile.Synthetic;
-import org.apache.bcel.classfile.Unknown;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-
-/**
- * BCEL's Node classes (those from the classfile API that <B>accept()</B> Visitor
- * instances) have <B>toString()</B> methods that were not designed to be robust,
- * this gap is closed by this class.
- * When performing class file verification, it may be useful to output which
- * entity (e.g. a <B>Code</B> instance) is not satisfying the verifier's
- * constraints, but in this case it could be possible for the <B>toString()</B>
- * method to throw a RuntimeException.
- * A (new StringRepresentation(Node n)).toString() never throws any exception.
- * Note that this class also serves as a placeholder for more sophisticated message
- * handling in future versions of JustIce.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class StringRepresentation extends org.apache.bcel.classfile.EmptyVisitor {
-    /** The string representation, created by a visitXXX() method, output by toString(). */
-    private String tostring;
-    /** The node we ask for its string representation. Not really needed; only for debug output. */
-    private final Node n;
-
-    /**
-     * Creates a new StringRepresentation object which is the representation of n.
-     *
-     * @see #toString()
-     */
-    public StringRepresentation(Node n) {
-        this.n = n;
-        n.accept(this); // assign a string representation to field 'tostring' if we know n's class.
-    }
-
-    /**
-     * Returns the String representation.
-     */
-    @Override
-    public String toString() {
-// The run-time check below is needed because we don't want to omit inheritance
-// of "EmptyVisitor" and provide a thousand empty methods.
-// However, in terms of performance this would be a better idea.
-// If some new "Node" is defined in BCEL (such as some concrete "Attribute"), we
-// want to know that this class has also to be adapted.
-        if (tostring == null) {
-            throw new AssertionViolatedException("Please adapt '" + getClass() + "' to deal with objects of class '" + n.getClass() + "'.");
-        }
-        return tostring;
-    }
-
-    /**
-     * Returns the String representation of the Node object obj;
-     * this is obj.toString() if it does not throw any RuntimeException,
-     * or else it is a string derived only from obj's class name.
-     */
-    private String toString(Node obj) {
-        String ret;
-        try {
-            ret = obj.toString();
-        }
-        catch (RuntimeException e) { // including ClassFormatException, trying to convert the "signature" of a ReturnaddressType LocalVariable (shouldn't occur, but people do crazy things)
-            String s = obj.getClass().getName();
-            s = s.substring(s.lastIndexOf(".") + 1);
-            ret = "<<" + s + ">>";
-        }
-        return ret;
-    }
-
-    ////////////////////////////////
-    // Visitor methods start here //
-    ////////////////////////////////
-    // We don't of course need to call some default implementation:
-    // e.g. we could also simply output "Code" instead of a possibly
-    // lengthy Code attribute's toString().
-    @Override
-    public void visitCode(Code obj) {
-        //tostring = toString(obj);
-        tostring = "<CODE>"; // We don't need real code outputs.
-    }
-
-    @Override
-    public void visitAnnotation(Annotations obj)
-    {
-        //this is invoked whenever an annotation is found
-        //when verifier is passed over a class
-        tostring = toString(obj);
-    }
-    
-    @Override
-    public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
-    {
-        //this is invoked whenever a local variable type is found
-        //when verifier is passed over a class
-        tostring = toString(obj);
-    }
-    
-    @Override
-    public void visitCodeException(CodeException obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantClass(ConstantClass obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantDouble(ConstantDouble obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantFieldref(ConstantFieldref obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantFloat(ConstantFloat obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantInteger(ConstantInteger obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantLong(ConstantLong obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantMethodref(ConstantMethodref obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantNameAndType(ConstantNameAndType obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantPool(ConstantPool obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantString(ConstantString obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantUtf8(ConstantUtf8 obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitConstantValue(ConstantValue obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitDeprecated(Deprecated obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitExceptionTable(ExceptionTable obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitField(Field obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitInnerClass(InnerClass obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitInnerClasses(InnerClasses obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitJavaClass(JavaClass obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitLineNumber(LineNumber obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitLineNumberTable(LineNumberTable obj) {
-        tostring = "<LineNumberTable: " + toString(obj) + ">";
-    }
-
-    @Override
-    public void visitLocalVariable(LocalVariable obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitLocalVariableTable(LocalVariableTable obj) {
-        tostring = "<LocalVariableTable: " + toString(obj) + ">";
-    }
-
-    @Override
-    public void visitMethod(Method obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitSignature(Signature obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitSourceFile(SourceFile obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitStackMap(StackMap obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitStackMapTable(StackMapTable obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitSynthetic(Synthetic obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitUnknown(Unknown obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitEnclosingMethod(EnclosingMethod obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitBootstrapMethods(BootstrapMethods obj) {
-        tostring = toString(obj);
-    }
-
-    @Override
-    public void visitMethodParameters(MethodParameters obj) {
-        tostring = toString(obj);
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java b/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
deleted file mode 100644
index 3d28b05..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
+++ /dev/null
@@ -1,455 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.bcel.generic.ATHROW;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.GotoInstruction;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.JsrInstruction;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.RET;
-import org.apache.bcel.generic.ReturnInstruction;
-import org.apache.bcel.generic.Select;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
-
-/**
- * This class represents a control flow graph of a method.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class ControlFlowGraph{
-
-    /**
-     * Objects of this class represent a node in a ControlFlowGraph.
-     * These nodes are instructions, not basic blocks.
-     */
-    private class InstructionContextImpl implements InstructionContext{
-
-        /**
-         * The TAG field is here for external temporary flagging, such
-         * as graph colouring.
-         *
-         * @see #getTag()
-         * @see #setTag(int)
-         */
-        private int TAG;
-
-        /**
-         * The InstructionHandle this InstructionContext is wrapped around.
-         */
-        private final InstructionHandle instruction;
-
-        /**
-         * The 'incoming' execution Frames.
-         */
-        private final Map<InstructionContext, Frame> inFrames;    // key: the last-executed JSR
-
-        /**
-         * The 'outgoing' execution Frames.
-         */
-        private final Map<InstructionContext, Frame> outFrames; // key: the last-executed JSR 
-
-        /**
-         * The 'execution predecessors' - a list of type InstructionContext 
-         * of those instances that have been execute()d before in that order.
-         */
-        private List<InstructionContext> executionPredecessors = null; // Type: InstructionContext
-
-        /**
-         * Creates an InstructionHandleImpl object from an InstructionHandle.
-         * Creation of one per InstructionHandle suffices. Don't create more.
-         */
-        public InstructionContextImpl(InstructionHandle inst){
-            if (inst == null) {
-                throw new AssertionViolatedException("Cannot instantiate InstructionContextImpl from NULL.");
-            }
-
-            instruction = inst;
-            inFrames = new HashMap<InstructionContext, Frame>();
-            outFrames = new HashMap<InstructionContext, Frame>();
-        }
-
-        /* Satisfies InstructionContext.getTag(). */
-        public int getTag(){
-            return TAG;
-        }
-
-        /* Satisfies InstructionContext.setTag(int). */
-        public void setTag(int tag){
-            TAG = tag;
-        }
-
-        /**
-         * Returns the exception handlers of this instruction.
-         */
-        public ExceptionHandler[] getExceptionHandlers(){
-            return exceptionhandlers.getExceptionHandlers(getInstruction());
-        }
-
-        /**
-         * Returns a clone of the "outgoing" frame situation with respect to the given ExecutionChain.
-         */    
-        public Frame getOutFrame(ArrayList<InstructionContext> execChain){
-            executionPredecessors = execChain;
-
-            Frame org;
-
-            InstructionContext jsr = lastExecutionJSR();
-
-            org = outFrames.get(jsr);
-
-            if (org == null){
-                throw new AssertionViolatedException("outFrame not set! This:\n"+this+"\nExecutionChain: "+getExecutionChain()+"\nOutFrames: '"+outFrames+"'.");
-            }
-            return org.getClone();
-        }
-
-    public Frame getInFrame() {
-          Frame org;
-
-            InstructionContext jsr = lastExecutionJSR();
-
-            org = inFrames.get(jsr);
-
-            if (org == null){
-                throw new AssertionViolatedException("inFrame not set! This:\n"+this+"\nInFrames: '"+inFrames+"'.");
-      }
-      return org.getClone();
-    }
-
-        /**
-         * "Merges in" (vmspec2, page 146) the "incoming" frame situation;
-         * executes the instructions symbolically
-         * and therefore calculates the "outgoing" frame situation.
-         * Returns: True iff the "incoming" frame situation changed after
-         * merging with "inFrame".
-         * The execPreds ArrayList must contain the InstructionContext
-         * objects executed so far in the correct order. This is just
-         * one execution path [out of many]. This is needed to correctly
-         * "merge" in the special case of a RET's successor.
-         * <B>The InstConstraintVisitor and ExecutionVisitor instances
-         * must be set up correctly.</B>
-         * @return true - if and only if the "outgoing" frame situation
-         * changed from the one before execute()ing.
-         */
-        public boolean execute(Frame inFrame, ArrayList<InstructionContext> execPreds, InstConstraintVisitor icv, ExecutionVisitor ev){
-
-            executionPredecessors = (List<InstructionContext>) execPreds.clone();
-
-            //sanity check
-            if ( (lastExecutionJSR() == null) && (subroutines.subroutineOf(getInstruction()) != subroutines.getTopLevel() ) ){
-                throw new AssertionViolatedException("Huh?! Am I '"+this+"' part of a subroutine or not?");
-            }
-            if ( (lastExecutionJSR() != null) && (subroutines.subroutineOf(getInstruction()) == subroutines.getTopLevel() ) ){
-                throw new AssertionViolatedException("Huh?! Am I '"+this+"' part of a subroutine or not?");
-            }
-
-            Frame inF = inFrames.get(lastExecutionJSR());
-            if (inF == null){// no incoming frame was set, so set it.
-                inFrames.put(lastExecutionJSR(), inFrame);
-                inF = inFrame;
-            }
-            else{// if there was an "old" inFrame
-                if (inF.equals(inFrame)){ //shortcut: no need to merge equal frames.
-                    return false;
-                }
-                if (! mergeInFrames(inFrame)){
-                    return false;
-                }
-            }
-
-            // Now we're sure the inFrame has changed!
-
-            // new inFrame is already merged in, see above.        
-            Frame workingFrame = inF.getClone();
-
-            try{
-                // This verifies the InstructionConstraint for the current
-                // instruction, but does not modify the workingFrame object.
-//InstConstraintVisitor icv = InstConstraintVisitor.getInstance(VerifierFactory.getVerifier(method_gen.getClassName()));
-                icv.setFrame(workingFrame);
-                getInstruction().accept(icv);
-            }
-            catch(StructuralCodeConstraintException ce){
-                ce.extendMessage("","\nInstructionHandle: "+getInstruction()+"\n");
-                ce.extendMessage("","\nExecution Frame:\n"+workingFrame);
-                extendMessageWithFlow(ce);
-                throw ce;
-            }
-
-            // This executes the Instruction.
-            // Therefore the workingFrame object is modified.
-//ExecutionVisitor ev = ExecutionVisitor.getInstance(VerifierFactory.getVerifier(method_gen.getClassName()));
-            ev.setFrame(workingFrame);
-            getInstruction().accept(ev);
-            //getInstruction().accept(ExecutionVisitor.withFrame(workingFrame));
-            outFrames.put(lastExecutionJSR(), workingFrame);
-
-            return true;    // new inFrame was different from old inFrame so merging them
-                                        // yielded a different this.inFrame.
-        }
-
-        /**
-         * Returns a simple String representation of this InstructionContext.
-         */
-        @Override
-        public String toString(){
-        //TODO: Put information in the brackets, e.g.
-        //      Is this an ExceptionHandler? Is this a RET? Is this the start of
-        //      a subroutine?
-            String ret = getInstruction().toString(false)+"\t[InstructionContext]";
-            return ret;
-        }
-
-        /**
-         * Does the actual merging (vmspec2, page 146).
-         * Returns true IFF this.inFrame was changed in course of merging with inFrame.
-         */
-        private boolean mergeInFrames(Frame inFrame) {
-            // TODO: Can be performance-improved.
-            Frame inF = inFrames.get(lastExecutionJSR());
-            OperandStack oldstack = inF.getStack().getClone();
-            LocalVariables oldlocals = inF.getLocals().getClone();
-            try {
-                inF.getStack().merge(inFrame.getStack());
-                inF.getLocals().merge(inFrame.getLocals());
-            } catch (StructuralCodeConstraintException sce) {
-                extendMessageWithFlow(sce);
-                throw sce;
-            }
-            return !(oldstack.equals(inF.getStack()) && oldlocals.equals(inF.getLocals()));
-        }
-
-        /**
-         * Returns the control flow execution chain. This is built
-         * while execute(Frame, ArrayList)-ing the code represented
-         * by the surrounding ControlFlowGraph.
-         */
-        private String getExecutionChain(){
-            String s = this.toString();
-            for (int i=executionPredecessors.size()-1; i>=0; i--){
-                s = executionPredecessors.get(i)+"\n" + s;
-            }
-            return s;
-        }
-
-
-        /**
-         * Extends the StructuralCodeConstraintException ("e") object with an at-the-end-extended message.
-         * This extended message will then reflect the execution flow needed to get to the constraint
-         * violation that triggered the throwing of the "e" object.
-         */
-        private void extendMessageWithFlow(StructuralCodeConstraintException e){
-            String s = "Execution flow:\n";
-            e.extendMessage("", s+getExecutionChain());
-        }
-
-        /*
-         * Fulfils the contract of InstructionContext.getInstruction().
-         */
-        public InstructionHandle getInstruction(){
-            return instruction;
-        }
-
-        /**
-         * Returns the InstructionContextImpl with an JSR/JSR_W
-         * that was last in the ExecutionChain, without
-         * a corresponding RET, i.e.
-         * we were called by this one.
-         * Returns null if we were called from the top level.
-         */
-        private InstructionContextImpl lastExecutionJSR(){
-
-            int size = executionPredecessors.size();
-            int retcount = 0;
-
-            for (int i=size-1; i>=0; i--){
-                InstructionContextImpl current = (InstructionContextImpl) (executionPredecessors.get(i));
-                Instruction currentlast = current.getInstruction().getInstruction();
-                if (currentlast instanceof RET) {
-                    retcount++;
-                }
-                if (currentlast instanceof JsrInstruction){
-                    retcount--;
-                    if (retcount == -1) {
-                        return current;
-                    }
-                }
-            }
-            return null;
-        }
-
-        /* Satisfies InstructionContext.getSuccessors(). */
-        public InstructionContext[] getSuccessors(){
-            return contextsOf(_getSuccessors());
-        }
-
-        /**
-         * A utility method that calculates the successors of a given InstructionHandle
-         * That means, a RET does have successors as defined here.
-         * A JsrInstruction has its target as its successor
-         * (opposed to its physical successor) as defined here.
-         */
-// TODO: implement caching!
-        private InstructionHandle[] _getSuccessors(){
-            final InstructionHandle[] empty = new InstructionHandle[0];
-            final InstructionHandle[] single = new InstructionHandle[1];
-
-            Instruction inst = getInstruction().getInstruction();
-
-            if (inst instanceof RET){
-                Subroutine s = subroutines.subroutineOf(getInstruction());
-                if (s==null){ //return empty; // RET in dead code. "empty" would be the correct answer, but we know something about the surrounding project...
-                    throw new AssertionViolatedException("Asking for successors of a RET in dead code?!");
-                }
-
-//TODO: remove. Only JustIce must not use it, but foreign users of the ControlFlowGraph
-//      will want it. Thanks Johannes Wust.
-//throw new AssertionViolatedException("DID YOU REALLY WANT TO ASK FOR RET'S SUCCS?");
-
-                InstructionHandle[] jsrs = s.getEnteringJsrInstructions();
-                InstructionHandle[] ret = new InstructionHandle[jsrs.length];
-                for (int i=0; i<jsrs.length; i++){
-                    ret[i] = jsrs[i].getNext();
-                }
-                return ret;
-            }
-
-            // Terminates method normally.
-            if (inst instanceof ReturnInstruction){
-                return empty;
-            }
-
-            // Terminates method abnormally, because JustIce mandates
-            // subroutines not to be protected by exception handlers.
-            if (inst instanceof ATHROW){
-                return empty;
-            }
-
-            // See method comment.
-            if (inst instanceof JsrInstruction){
-                single[0] = ((JsrInstruction) inst).getTarget();
-                return single;
-            }
-
-            if (inst instanceof GotoInstruction){
-                single[0] = ((GotoInstruction) inst).getTarget();
-                return single;
-            }
-
-            if (inst instanceof BranchInstruction){
-                if (inst instanceof Select){
-                    // BCEL's getTargets() returns only the non-default targets,
-                    // thanks to Eli Tilevich for reporting.
-                    InstructionHandle[] matchTargets = ((Select) inst).getTargets();
-                    InstructionHandle[] ret = new InstructionHandle[matchTargets.length+1];
-                    ret[0] = ((Select) inst).getTarget();
-                    System.arraycopy(matchTargets, 0, ret, 1, matchTargets.length);
-                    return ret;
-                }
-                final InstructionHandle[] pair = new InstructionHandle[2];
-                pair[0] = getInstruction().getNext();
-                pair[1] = ((BranchInstruction) inst).getTarget();
-                return pair;
-            }
-
-            // default case: Fall through.        
-            single[0] = getInstruction().getNext();
-            return single;
-        }
-
-    } // End Inner InstructionContextImpl Class.
-
-    ///** The MethodGen object we're working on. */
-    //private final MethodGen method_gen;
-
-    /** The Subroutines object for the method whose control flow is represented by this ControlFlowGraph. */
-    private final Subroutines subroutines;
-
-    /** The ExceptionHandlers object for the method whose control flow is represented by this ControlFlowGraph. */
-    private final ExceptionHandlers exceptionhandlers;
-
-    /** All InstructionContext instances of this ControlFlowGraph. */
-    private final Map<InstructionHandle, InstructionContext> instructionContexts = new HashMap<InstructionHandle, InstructionContext>(); //keys: InstructionHandle, values: InstructionContextImpl
-
-    /** 
-     * A Control Flow Graph.
-     */
-    public ControlFlowGraph(MethodGen method_gen){
-        subroutines = new Subroutines(method_gen);
-        exceptionhandlers = new ExceptionHandlers(method_gen);
-
-        InstructionHandle[] instructionhandles = method_gen.getInstructionList().getInstructionHandles();
-        for (InstructionHandle instructionhandle : instructionhandles) {
-            instructionContexts.put(instructionhandle, new InstructionContextImpl(instructionhandle));
-        }
-
-        //this.method_gen = method_gen;
-    }
-
-    /**
-     * Returns the InstructionContext of a given instruction.
-     */
-    public InstructionContext contextOf(InstructionHandle inst){
-        InstructionContext ic = instructionContexts.get(inst);
-        if (ic == null){
-            throw new AssertionViolatedException("InstructionContext requested for an InstructionHandle that's not known!");
-        }
-        return ic;
-    }
-
-    /**
-     * Returns the InstructionContext[] of a given InstructionHandle[],
-     * in a naturally ordered manner.
-     */
-    public InstructionContext[] contextsOf(InstructionHandle[] insts){
-        InstructionContext[] ret = new InstructionContext[insts.length];
-        for (int i=0; i<insts.length; i++){
-            ret[i] = contextOf(insts[i]);
-        }
-        return ret;
-    }
-
-    /**
-     * Returns an InstructionContext[] with all the InstructionContext instances
-     * for the method whose control flow is represented by this ControlFlowGraph
-     * <B>(NOT ORDERED!)</B>.
-     */
-    public InstructionContext[] getInstructionContexts(){
-        InstructionContext[] ret = new InstructionContext[instructionContexts.values().size()];
-        return instructionContexts.values().toArray(ret);
-    }
-
-    /**
-     * Returns true, if and only if the said instruction is not reachable; that means,
-     * if it is not part of this ControlFlowGraph.
-     */
-    public boolean isDead(InstructionHandle i){
-        return subroutines.subroutineOf(i) == null;
-    }     
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandler.java b/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandler.java
deleted file mode 100644
index 75dbb12..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandler.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.ObjectType;
-
-/**
- * This class represents an exception handler; that is, an ObjectType
- * representing a subclass of java.lang.Throwable and the instruction
- * the handler starts off (represented by an InstructionContext).
- * 
- * @version $Id$
- * @author Enver Haase
- */
-public class ExceptionHandler{
-    /** The type of the exception to catch. NULL means ANY. */
-    private final ObjectType catchtype;
-
-    /** The InstructionHandle where the handling begins. */
-    private final InstructionHandle handlerpc;
-
-    /** Leave instance creation to JustIce. */
-    ExceptionHandler(ObjectType catch_type, InstructionHandle handler_pc){
-        catchtype = catch_type;
-        handlerpc = handler_pc;
-    }
-
-    /**
-     * Returns the type of the exception that's handled. <B>'null' means 'ANY'.</B>
-     */
-    public ObjectType getExceptionType(){
-        return catchtype;
-    }
-
-    /**
-     * Returns the InstructionHandle where the handler starts off.
-     */
-    public InstructionHandle getHandlerStart(){
-        return handlerpc;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java b/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
deleted file mode 100644
index 22bab05..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.bcel.generic.CodeExceptionGen;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.MethodGen;
-
-/**
- * This class allows easy access to ExceptionHandler objects.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class ExceptionHandlers{
-    /**
-     * The ExceptionHandler instances.
-     * Key: InstructionHandle objects, Values: HashSet<ExceptionHandler> instances.
-     */
-    private final Map<InstructionHandle, Set<ExceptionHandler>> exceptionhandlers;
-
-    /**
-     * Constructor. Creates a new ExceptionHandlers instance.
-     */
-    public ExceptionHandlers(MethodGen mg){
-        exceptionhandlers = new HashMap<InstructionHandle, Set<ExceptionHandler>>();
-        CodeExceptionGen[] cegs = mg.getExceptionHandlers();
-        for (CodeExceptionGen ceg : cegs) {
-            ExceptionHandler eh = new ExceptionHandler(ceg.getCatchType(), ceg.getHandlerPC());
-            for (InstructionHandle ih=ceg.getStartPC(); ih != ceg.getEndPC().getNext(); ih=ih.getNext()){
-                Set<ExceptionHandler> hs;
-                hs = exceptionhandlers.get(ih);
-                if (hs == null){
-                    hs = new HashSet<ExceptionHandler>();
-                    exceptionhandlers.put(ih, hs);
-                }
-                hs.add(eh);
-            }
-        }
-    }
-
-    /**
-     * Returns all the ExceptionHandler instances representing exception
-     * handlers that protect the instruction ih.
-     */
-    public ExceptionHandler[] getExceptionHandlers(InstructionHandle ih){
-        Set<ExceptionHandler> hsSet = exceptionhandlers.get(ih);
-        if (hsSet == null) {
-            return new ExceptionHandler[0];
-        }
-        return hsSet.toArray(new ExceptionHandler[hsSet.size()]);
-    }
-
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/ExecutionVisitor.java b/src/main/java/org/apache/bcel/verifier/structurals/ExecutionVisitor.java
deleted file mode 100644
index ff2b001..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/ExecutionVisitor.java
+++ /dev/null
@@ -1,1270 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantDouble;
-import org.apache.bcel.classfile.ConstantFloat;
-import org.apache.bcel.classfile.ConstantInteger;
-import org.apache.bcel.classfile.ConstantLong;
-import org.apache.bcel.classfile.ConstantString;
-import org.apache.bcel.generic.*;
-
-/**
- * This Visitor class may be used for a type-based Java Virtual Machine
- * simulation.
- * 
- * <p>It does not check for correct types on the OperandStack or in the
- * LocalVariables; nor does it check their sizes are sufficiently big.
- * Thus, to use this Visitor for bytecode verifying, you have to make sure
- * externally that the type constraints of the Java Virtual Machine instructions
- * are satisfied. An InstConstraintVisitor may be used for this.
- * Anyway, this Visitor does not mandate it. For example, when you
- * visitIADD(IADD o), then there are two stack slots popped and one
- * stack slot containing a Type.INT is pushed (where you could also
- * pop only one slot if you know there are two Type.INT on top of the
- * stack). Monitor-specific behaviour is not simulated.</p>
- * 
- * <b>Conventions:</b>
- *
- * <p>Type.VOID will never be pushed onto the stack. Type.DOUBLE and Type.LONG
- * that would normally take up two stack slots (like Double_HIGH and
- * Double_LOW) are represented by a simple single Type.DOUBLE or Type.LONG
- * object on the stack here.</p>
- * 
- * <p>If a two-slot type is stored into a local variable, the next variable
- * is given the type Type.UNKNOWN.</p>
- *
- * @version $Id$
- * @author Enver Haase
- * @see #visitDSTORE(DSTORE o)
- * @see InstConstraintVisitor
- */
-public class ExecutionVisitor extends EmptyVisitor{
-
-    /**
-     * The executionframe we're operating on.
-     */
-    private Frame frame = null;
-
-    /**
-     * The ConstantPoolGen we're working with.
-     * @see #setConstantPoolGen(ConstantPoolGen)
-     */
-    private ConstantPoolGen cpg = null;
-
-    /**
-     * Constructor. Constructs a new instance of this class.
-     */
-    public ExecutionVisitor(){}
-
-    /**
-     * The OperandStack from the current Frame we're operating on.
-     * @see #setFrame(Frame)
-     */
-    private OperandStack stack(){
-        return frame.getStack();
-    }
-
-    /**
-     * The LocalVariables from the current Frame we're operating on.
-     * @see #setFrame(Frame)
-     */
-    private LocalVariables locals(){
-        return frame.getLocals();
-    }
-
-    /**
-     * Sets the ConstantPoolGen needed for symbolic execution.
-     */
-    public void setConstantPoolGen(ConstantPoolGen cpg){
-        this.cpg = cpg;
-    }
-
-    /**
-     * The only method granting access to the single instance of
-     * the ExecutionVisitor class. Before actively using this
-     * instance, <B>SET THE ConstantPoolGen FIRST</B>.
-     * @see #setConstantPoolGen(ConstantPoolGen)
-     */
-    public void setFrame(Frame f){
-        this.frame = f;
-    }
-
-    ///** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    //public void visitWIDE(WIDE o){
-    // The WIDE instruction is modelled as a flag
-    // of the embedded instructions in BCEL.
-    // Therefore BCEL checks for possible errors
-    // when parsing in the .class file: We don't
-    // have even the possibilty to care for WIDE
-    // here.
-    //}
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitAALOAD(AALOAD o){
-        stack().pop();                                                        // pop the index int
-//System.out.print(stack().peek());
-        Type t = stack().pop(); // Pop Array type
-        if (t == Type.NULL){
-            stack().push(Type.NULL);
-        }    // Do nothing stackwise --- a NullPointerException is thrown at Run-Time
-        else{
-            ArrayType at = (ArrayType) t;    
-            stack().push(at.getElementType());
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitAASTORE(AASTORE o){
-        stack().pop();
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitACONST_NULL(ACONST_NULL o){
-        stack().push(Type.NULL);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitALOAD(ALOAD o){
-        stack().push(locals().get(o.getIndex()));
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitANEWARRAY(ANEWARRAY o){
-        stack().pop(); //count
-        stack().push( new ArrayType(o.getType(cpg), 1) );
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitARETURN(ARETURN o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitARRAYLENGTH(ARRAYLENGTH o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitASTORE(ASTORE o){
-        locals().set(o.getIndex(), stack().pop());
-        //System.err.println("TODO-DEBUG:    set LV '"+o.getIndex()+"' to '"+locals().get(o.getIndex())+"'.");
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitATHROW(ATHROW o){
-        Type t = stack().pop();
-        stack().clear();
-        if (t.equals(Type.NULL)) {
-            stack().push(Type.getType("Ljava/lang/NullPointerException;"));
-        } else {
-            stack().push(t);
-        }
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitBALOAD(BALOAD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitBASTORE(BASTORE o){
-        stack().pop();
-        stack().pop();
-        stack().pop();
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitBIPUSH(BIPUSH o){
-        stack().push(Type.INT);
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitCALOAD(CALOAD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitCASTORE(CASTORE o){
-        stack().pop();
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitCHECKCAST(CHECKCAST o){
-        // It's possibly wrong to do so, but SUN's
-        // ByteCode verifier seems to do (only) this, too.
-        // TODO: One could use a sophisticated analysis here to check
-        //       if a type cannot possibly be cated to another and by
-        //       so doing predict the ClassCastException at run-time.
-        stack().pop();
-        stack().push(o.getType(cpg));
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitD2F(D2F o){
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitD2I(D2I o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitD2L(D2L o){
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDADD(DADD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDALOAD(DALOAD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDASTORE(DASTORE o){
-        stack().pop();
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDCMPG(DCMPG o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDCMPL(DCMPL o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDCONST(DCONST o){
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDDIV(DDIV o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDLOAD(DLOAD o){
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDMUL(DMUL o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDNEG(DNEG o){
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDREM(DREM o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDRETURN(DRETURN o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDSTORE(DSTORE o){
-        locals().set(o.getIndex(), stack().pop());
-        locals().set(o.getIndex()+1, Type.UNKNOWN);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDSUB(DSUB o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDUP(DUP o){
-        Type t = stack().pop();
-        stack().push(t);
-        stack().push(t);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDUP_X1(DUP_X1 o){
-        Type w1 = stack().pop();
-        Type w2 = stack().pop();
-        stack().push(w1);
-        stack().push(w2);
-        stack().push(w1);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDUP_X2(DUP_X2 o){
-        Type w1 = stack().pop();
-        Type w2 = stack().pop();
-        if (w2.getSize() == 2){
-            stack().push(w1);
-            stack().push(w2);
-            stack().push(w1);
-        }
-        else{
-            Type w3 = stack().pop();
-            stack().push(w1);
-            stack().push(w3);
-            stack().push(w2);
-            stack().push(w1);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDUP2(DUP2 o){
-        Type t = stack().pop();
-        if (t.getSize() == 2){
-            stack().push(t);
-            stack().push(t);
-        }
-        else{ // t.getSize() is 1
-            Type u = stack().pop();
-            stack().push(u);
-            stack().push(t);
-            stack().push(u);
-            stack().push(t);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDUP2_X1(DUP2_X1 o){
-        Type t = stack().pop();
-        if (t.getSize() == 2){
-            Type u = stack().pop();
-            stack().push(t);
-            stack().push(u);
-            stack().push(t);
-        }
-        else{ //t.getSize() is1
-            Type u = stack().pop();
-            Type v = stack().pop();
-            stack().push(u);
-            stack().push(t);
-            stack().push(v);
-            stack().push(u);
-            stack().push(t);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitDUP2_X2(DUP2_X2 o){
-        Type t = stack().pop();
-        if (t.getSize() == 2){
-            Type u = stack().pop();
-            if (u.getSize() == 2){
-                stack().push(t);
-                stack().push(u);
-                stack().push(t);
-            }else{
-                Type v = stack().pop();
-                stack().push(t);
-                stack().push(v);
-                stack().push(u);
-                stack().push(t);
-            }
-        }
-        else{ //t.getSize() is 1
-            Type u = stack().pop();
-            Type v = stack().pop();
-            if (v.getSize() == 2){
-                stack().push(u);
-                stack().push(t);
-                stack().push(v);
-                stack().push(u);
-                stack().push(t);
-            }else{
-                Type w = stack().pop();
-                stack().push(u);
-                stack().push(t);
-                stack().push(w);
-                stack().push(v);
-                stack().push(u);
-                stack().push(t);
-            }
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitF2D(F2D o){
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitF2I(F2I o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitF2L(F2L o){
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFADD(FADD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFALOAD(FALOAD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFASTORE(FASTORE o){
-        stack().pop();
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFCMPG(FCMPG o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFCMPL(FCMPL o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFCONST(FCONST o){
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFDIV(FDIV o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFLOAD(FLOAD o){
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFMUL(FMUL o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFNEG(FNEG o){
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFREM(FREM o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFRETURN(FRETURN o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFSTORE(FSTORE o){
-        locals().set(o.getIndex(), stack().pop());
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitFSUB(FSUB o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitGETFIELD(GETFIELD o){
-        stack().pop();
-        Type t = o.getFieldType(cpg);
-        if (    t.equals(Type.BOOLEAN)    ||
-                    t.equals(Type.CHAR)            ||
-                    t.equals(Type.BYTE)         ||
-                    t.equals(Type.SHORT)        ) {
-            t = Type.INT;
-        }
-        stack().push(t);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitGETSTATIC(GETSTATIC o){
-        Type t = o.getFieldType(cpg);
-        if (    t.equals(Type.BOOLEAN)    ||
-                    t.equals(Type.CHAR)            ||
-                    t.equals(Type.BYTE)         ||
-                    t.equals(Type.SHORT)        ) {
-            t = Type.INT;
-        }
-        stack().push(t);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitGOTO(GOTO o){
-        // no stack changes.
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitGOTO_W(GOTO_W o){
-        // no stack changes.
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitI2B(I2B o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitI2C(I2C o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitI2D(I2D o){
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitI2F(I2F o){
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitI2L(I2L o){
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitI2S(I2S o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIADD(IADD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIALOAD(IALOAD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIAND(IAND o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIASTORE(IASTORE o){
-        stack().pop();
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitICONST(ICONST o){
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIDIV(IDIV o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIF_ACMPEQ(IF_ACMPEQ o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIF_ACMPNE(IF_ACMPNE o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIF_ICMPEQ(IF_ICMPEQ o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIF_ICMPGE(IF_ICMPGE o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIF_ICMPGT(IF_ICMPGT o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIF_ICMPLE(IF_ICMPLE o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIF_ICMPLT(IF_ICMPLT o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIF_ICMPNE(IF_ICMPNE o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIFEQ(IFEQ o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIFGE(IFGE o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIFGT(IFGT o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIFLE(IFLE o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIFLT(IFLT o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIFNE(IFNE o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIFNONNULL(IFNONNULL o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIFNULL(IFNULL o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIINC(IINC o){
-        // stack is not changed.
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitILOAD(ILOAD o){
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIMUL(IMUL o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitINEG(INEG o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitINSTANCEOF(INSTANCEOF o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitINVOKEDYNAMIC(INVOKEDYNAMIC o){
-        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
-            stack().pop();
-        }
-        // We are sure the invoked method will xRETURN eventually
-        // We simulate xRETURNs functionality here because we
-        // don't really "jump into" and simulate the invoked
-        // method.
-        if (o.getReturnType(cpg) != Type.VOID){
-            Type t = o.getReturnType(cpg);
-            if (    t.equals(Type.BOOLEAN)    ||
-                        t.equals(Type.CHAR)            ||
-                        t.equals(Type.BYTE)         ||
-                        t.equals(Type.SHORT)        ) {
-                t = Type.INT;
-            }
-            stack().push(t);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitINVOKEINTERFACE(INVOKEINTERFACE o){
-        stack().pop();    //objectref
-        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
-            stack().pop();
-        }
-        // We are sure the invoked method will xRETURN eventually
-        // We simulate xRETURNs functionality here because we
-        // don't really "jump into" and simulate the invoked
-        // method.
-        if (o.getReturnType(cpg) != Type.VOID){
-            Type t = o.getReturnType(cpg);
-            if (    t.equals(Type.BOOLEAN)    ||
-                        t.equals(Type.CHAR)            ||
-                        t.equals(Type.BYTE)         ||
-                        t.equals(Type.SHORT)        ) {
-                t = Type.INT;
-            }
-            stack().push(t);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitINVOKESPECIAL(INVOKESPECIAL o){
-        if (o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME)){
-            UninitializedObjectType t = (UninitializedObjectType) stack().peek(o.getArgumentTypes(cpg).length);
-            if (t == Frame._this){    
-                Frame._this = null;
-            }
-            stack().initializeObject(t);
-            locals().initializeObject(t);
-        }
-        stack().pop();    //objectref
-        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
-            stack().pop();
-        }
-        // We are sure the invoked method will xRETURN eventually
-        // We simulate xRETURNs functionality here because we
-        // don't really "jump into" and simulate the invoked
-        // method.
-        if (o.getReturnType(cpg) != Type.VOID){
-            Type t = o.getReturnType(cpg);
-            if (    t.equals(Type.BOOLEAN)    ||
-                        t.equals(Type.CHAR)            ||
-                        t.equals(Type.BYTE)         ||
-                        t.equals(Type.SHORT)        ) {
-                t = Type.INT;
-            }
-            stack().push(t);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitINVOKESTATIC(INVOKESTATIC o){
-        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
-            stack().pop();
-        }
-        // We are sure the invoked method will xRETURN eventually
-        // We simulate xRETURNs functionality here because we
-        // don't really "jump into" and simulate the invoked
-        // method.
-        if (o.getReturnType(cpg) != Type.VOID){
-            Type t = o.getReturnType(cpg);
-            if (    t.equals(Type.BOOLEAN)    ||
-                        t.equals(Type.CHAR)            ||
-                        t.equals(Type.BYTE)         ||
-                        t.equals(Type.SHORT)        ) {
-                t = Type.INT;
-            }
-            stack().push(t);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitINVOKEVIRTUAL(INVOKEVIRTUAL o){
-        stack().pop(); //objectref
-        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
-            stack().pop();
-        }
-        // We are sure the invoked method will xRETURN eventually
-        // We simulate xRETURNs functionality here because we
-        // don't really "jump into" and simulate the invoked
-        // method.
-        if (o.getReturnType(cpg) != Type.VOID){
-            Type t = o.getReturnType(cpg);
-            if (    t.equals(Type.BOOLEAN)    ||
-                        t.equals(Type.CHAR)            ||
-                        t.equals(Type.BYTE)         ||
-                        t.equals(Type.SHORT)        ) {
-                t = Type.INT;
-            }
-            stack().push(t);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIOR(IOR o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIREM(IREM o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIRETURN(IRETURN o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitISHL(ISHL o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitISHR(ISHR o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitISTORE(ISTORE o){
-        locals().set(o.getIndex(), stack().pop());
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitISUB(ISUB o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIUSHR(IUSHR o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitIXOR(IXOR o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitJSR(JSR o){
-        stack().push(new ReturnaddressType(o.physicalSuccessor()));
-//System.err.println("TODO-----------:"+o.physicalSuccessor());
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitJSR_W(JSR_W o){
-        stack().push(new ReturnaddressType(o.physicalSuccessor()));
-    }
-
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitL2D(L2D o){
-        stack().pop();
-        stack().push(Type.DOUBLE);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitL2F(L2F o){
-        stack().pop();
-        stack().push(Type.FLOAT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitL2I(L2I o){
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLADD(LADD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLALOAD(LALOAD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLAND(LAND o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLASTORE(LASTORE o){
-        stack().pop();
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLCMP(LCMP o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLCONST(LCONST o){
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLDC(LDC o){
-        Constant c = cpg.getConstant(o.getIndex());
-        if (c instanceof ConstantInteger){
-            stack().push(Type.INT);
-        }
-        if (c instanceof ConstantFloat){
-            stack().push(Type.FLOAT);
-        }
-        if (c instanceof ConstantString){
-            stack().push(Type.STRING);
-        }
-        if (c instanceof ConstantClass){
-            stack().push(Type.CLASS);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    public void visitLDC_W(LDC_W o){
-        Constant c = cpg.getConstant(o.getIndex());
-        if (c instanceof ConstantInteger){
-            stack().push(Type.INT);
-        }
-        if (c instanceof ConstantFloat){
-            stack().push(Type.FLOAT);
-        }
-        if (c instanceof ConstantString){
-            stack().push(Type.STRING);
-        }
-        if (c instanceof ConstantClass){
-            stack().push(Type.CLASS);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLDC2_W(LDC2_W o){
-        Constant c = cpg.getConstant(o.getIndex());
-        if (c instanceof ConstantLong){
-            stack().push(Type.LONG);
-        }
-        if (c instanceof ConstantDouble){
-            stack().push(Type.DOUBLE);
-        }
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLDIV(LDIV o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLLOAD(LLOAD o){
-        stack().push(locals().get(o.getIndex()));
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLMUL(LMUL o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLNEG(LNEG o){
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLOOKUPSWITCH(LOOKUPSWITCH o){
-        stack().pop(); //key
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLOR(LOR o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLREM(LREM o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLRETURN(LRETURN o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLSHL(LSHL o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLSHR(LSHR o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLSTORE(LSTORE o){
-        locals().set(o.getIndex(), stack().pop());
-        locals().set(o.getIndex()+1, Type.UNKNOWN);        
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLSUB(LSUB o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLUSHR(LUSHR o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitLXOR(LXOR o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.LONG);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitMONITORENTER(MONITORENTER o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitMONITOREXIT(MONITOREXIT o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitMULTIANEWARRAY(MULTIANEWARRAY o){
-        for (int i=0; i<o.getDimensions(); i++){
-            stack().pop();
-        }
-        stack().push(o.getType(cpg));
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitNEW(NEW o){
-        stack().push(new UninitializedObjectType((ObjectType) (o.getType(cpg))));
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitNEWARRAY(NEWARRAY o){
-        stack().pop();
-        stack().push(o.getType());
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitNOP(NOP o){
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitPOP(POP o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitPOP2(POP2 o){
-        Type t = stack().pop();
-        if (t.getSize() == 1){
-            stack().pop();
-        }        
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitPUTFIELD(PUTFIELD o){
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitPUTSTATIC(PUTSTATIC o){
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitRET(RET o){
-        // do nothing, return address
-        // is in in the local variables.
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitRETURN(RETURN o){
-        // do nothing.
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitSALOAD(SALOAD o){
-        stack().pop();
-        stack().pop();
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitSASTORE(SASTORE o){
-        stack().pop();
-        stack().pop();
-        stack().pop();
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitSIPUSH(SIPUSH o){
-        stack().push(Type.INT);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitSWAP(SWAP o){
-        Type t = stack().pop();
-        Type u = stack().pop();
-        stack().push(t);
-        stack().push(u);
-    }
-    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
-    @Override
-    public void visitTABLESWITCH(TABLESWITCH o){
-        stack().pop();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/Frame.java b/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
deleted file mode 100644
index 953f099..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/Frame.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-
-/**
- * This class represents a JVM execution frame; that means,
- * a local variable array and an operand stack.
- *
- * @version $Id$
- * @author Enver Haase
- */
-
-public class Frame{
-
-    /**
-     * For instance initialization methods, it is important to remember
-     * which instance it is that is not initialized yet. It will be
-     * initialized invoking another constructor later.
-     * NULL means the instance already *is* initialized.
-     */
-    protected static UninitializedObjectType _this;
-
-    /**
-     *
-     */
-    private final LocalVariables locals;
-
-    /**
-     *
-     */
-    private final OperandStack stack;
-
-    /**
-     *
-     */
-    public Frame(int maxLocals, int maxStack){
-        locals = new LocalVariables(maxLocals);
-        stack = new OperandStack(maxStack);
-    }
-
-    /**
-     *
-     */
-    public Frame(LocalVariables locals, OperandStack stack){
-        this.locals = locals;
-        this.stack = stack;
-    }
-
-    /**
-     *
-     */
-    @Override
-    protected Object clone(){
-        Frame f = new Frame(locals.getClone(), stack.getClone());
-        return f;
-    }
-
-    /**
-     *
-     */
-    public Frame getClone(){
-        return (Frame) clone();
-    }
-
-    /**
-     *
-     */
-    public LocalVariables getLocals(){
-        return locals;
-    }
-
-    /**
-     *
-     */
-    public OperandStack getStack(){
-        return stack;
-    }
-
-    /** @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() { return stack.hashCode() ^ locals.hashCode(); }
-
-    /**
-     *
-     */
-    @Override
-    public boolean equals(Object o){
-        if (!(o instanceof Frame)) {
-            return false; // implies "null" is non-equal.
-        }
-        Frame f = (Frame) o;
-        return this.stack.equals(f.stack) && this.locals.equals(f.locals);
-    }
-
-    /**
-     * Returns a String representation of the Frame instance.
-     */
-    @Override
-    public String toString(){
-        String s="Local Variables:\n";
-        s += locals;
-        s += "OperandStack:\n";
-        s += stack;
-        return s;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/GenericArray.java b/src/main/java/org/apache/bcel/verifier/structurals/GenericArray.java
deleted file mode 100644
index 24b3a87..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/GenericArray.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-/**
- * A placeholder class that can be used to create an ObjectType of which
- * has some of the properties arrays have. They implement java.lang.Cloneable
- * and java.io.Serializable and they extend java.lang.Object.
- *
- * @version $Id$
- * @author Enver Haase
- */ 
-public class GenericArray extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable{
-
-    private static final long serialVersionUID = 1991183963515237894L;
-
-    @Override
-    protected Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java b/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
deleted file mode 100644
index 6556d33..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/InstConstraintVisitor.java
+++ /dev/null
@@ -1,2881 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier.structurals;
-
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.Constant;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantDouble;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantFloat;
-import org.apache.bcel.classfile.ConstantInteger;
-import org.apache.bcel.classfile.ConstantLong;
-import org.apache.bcel.classfile.ConstantString;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.generic.*;
-import org.apache.bcel.verifier.VerificationResult;
-import org.apache.bcel.verifier.Verifier;
-import org.apache.bcel.verifier.VerifierFactory;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
-
-
-/**
- * A Visitor class testing for valid preconditions of JVM instructions.
- * The instance of this class will throw a StructuralCodeConstraintException
- * instance if an instruction is visitXXX()ed which has preconditions that are
- * not satisfied.
- * TODO: Currently, the JVM's behaviour concerning monitors (MONITORENTER,
- * MONITOREXIT) is not modeled in JustIce.
- *
- * @version $Id$
- * @author Enver Haase
- * @see org.apache.bcel.verifier.exc.StructuralCodeConstraintException
- * @see org.apache.bcel.verifier.exc.LinkingConstraintException
- */
-public class InstConstraintVisitor extends EmptyVisitor{
-
-    private static final ObjectType GENERIC_ARRAY = ObjectType.getInstance("org.apache.bcel.verifier.structurals.GenericArray");
-
-    /**
-     * The constructor. Constructs a new instance of this class.
-     */
-    public InstConstraintVisitor(){}
-
-    /**
-     * The Execution Frame we're working on.
-     *
-     * @see #setFrame(Frame f)
-     * @see #locals()
-     * @see #stack()
-     */
-    private Frame frame = null;
-
-    /**
-     * The ConstantPoolGen we're working on.
-     *
-     * @see #setConstantPoolGen(ConstantPoolGen cpg)
-     */
-    private ConstantPoolGen cpg = null;
-
-    /**
-     * The MethodGen we're working on.
-     *
-     * @see #setMethodGen(MethodGen mg)
-     */
-    private MethodGen mg = null;
-
-    /**
-     * The OperandStack we're working on.
-     *
-     * @see #setFrame(Frame f)
-     */
-    private OperandStack stack(){
-        return frame.getStack();
-    }
-
-    /**
-     * The LocalVariables we're working on.
-     *
-     * @see #setFrame(Frame f)
-     */
-    private LocalVariables locals(){
-        return frame.getLocals();
-    }
-
-    /**
-   * This method is called by the visitXXX() to notify the acceptor of this InstConstraintVisitor
-   * that a constraint violation has occured. This is done by throwing an instance of a
-   * StructuralCodeConstraintException.
-   * @throws org.apache.bcel.verifier.exc.StructuralCodeConstraintException always.
-   */
-    private void constraintViolated(Instruction violator, String description){
-        String fq_classname = violator.getClass().getName();
-        throw new StructuralCodeConstraintException("Instruction "+ fq_classname.substring(fq_classname.lastIndexOf('.')+1) +" constraint violated: " + description);
-    }
-
-    /**
-     * This returns the single instance of the InstConstraintVisitor class.
-     * To operate correctly, other values must have been set before actually
-     * using the instance.
-     * Use this method for performance reasons.
-     *
-     * @see #setConstantPoolGen(ConstantPoolGen cpg)
-     * @see #setMethodGen(MethodGen mg)
-     */
-    public void setFrame(Frame f){
-        this.frame = f;
-        //if (singleInstance.mg == null || singleInstance.cpg == null) throw new AssertionViolatedException("Forgot to set important values first.");
-    }
-
-    /**
-     * Sets the ConstantPoolGen instance needed for constraint
-     * checking prior to execution.
-     */
-    public void setConstantPoolGen(ConstantPoolGen cpg){
-        this.cpg = cpg;
-    }
-
-    /**
-     * Sets the MethodGen instance needed for constraint
-     * checking prior to execution.
-     */
-    public void setMethodGen(MethodGen mg){
-        this.mg = mg;
-    }
-
-    /**
-     * Assures index is of type INT.
-     * @throws org.apache.bcel.verifier.exc.StructuralCodeConstraintException if the above constraint is not satisfied.
-     */
-    private void indexOfInt(Instruction o, Type index){
-        if (! index.equals(Type.INT)) {
-            constraintViolated(o, "The 'index' is not of type int but of type "+index+".");
-        }
-    }
-
-    /**
-     * Assures the ReferenceType r is initialized (or Type.NULL).
-     * Formally, this means (!(r instanceof UninitializedObjectType)), because
-     * there are no uninitialized array types.
-     * @throws org.apache.bcel.verifier.exc.StructuralCodeConstraintException if the above constraint is not satisfied.
-     */
-    private void referenceTypeIsInitialized(Instruction o, ReferenceType r){
-        if (r instanceof UninitializedObjectType){
-            constraintViolated(o, "Working on an uninitialized object '"+r+"'.");
-        }
-    }
-
-    /** Assures value is of type INT. */
-    private void valueOfInt(Instruction o, Type value){
-        if (! value.equals(Type.INT)) {
-            constraintViolated(o, "The 'value' is not of type int but of type "+value+".");
-        }
-    }
-
-    /**
-     * Assures arrayref is of ArrayType or NULL;
-     * returns true if and only if arrayref is non-NULL.
-     * @throws org.apache.bcel.verifier.exc.StructuralCodeConstraintException if the above constraint is violated.
-      */
-    private boolean arrayrefOfArrayType(Instruction o, Type arrayref){
-        if (! ((arrayref instanceof ArrayType) || arrayref.equals(Type.NULL)) ) {
-            constraintViolated(o, "The 'arrayref' does not refer to an array but is of type "+arrayref+".");
-        }
-        return (arrayref instanceof ArrayType);
-    }
-
-    /***************************************************************/
-    /* MISC                                                        */
-    /***************************************************************/
-    /**
-     * Ensures the general preconditions of an instruction that accesses the stack.
-     * This method is here because BCEL has no such superinterface for the stack
-     * accessing instructions; and there are funny unexpected exceptions in the
-     * semantices of the superinterfaces and superclasses provided.
-     * E.g. SWAP is a StackConsumer, but DUP_X1 is not a StackProducer.
-     * Therefore, this method is called by all StackProducer, StackConsumer,
-     * and StackInstruction instances via their visitXXX() method.
-     * Unfortunately, as the superclasses and superinterfaces overlap, some instructions
-     * cause this method to be called two or three times. [TODO: Fix this.]
-     *
-     * @see #visitStackConsumer(StackConsumer o)
-     * @see #visitStackProducer(StackProducer o)
-     * @see #visitStackInstruction(StackInstruction o)
-     */
-    private void _visitStackAccessor(Instruction o){
-        int consume = o.consumeStack(cpg); // Stack values are always consumed first; then produced.
-        if (consume > stack().slotsUsed()){
-            constraintViolated(o, "Cannot consume "+consume+" stack slots: only "+stack().slotsUsed()+" slot(s) left on stack!\nStack:\n"+stack());
-        }
-
-        int produce = o.produceStack(cpg) - o.consumeStack(cpg); // Stack values are always consumed first; then produced.
-        if ( produce + stack().slotsUsed() > stack().maxStack() ){
-            constraintViolated(o, "Cannot produce "+produce+" stack slots: only "+(stack().maxStack()-stack().slotsUsed())+" free stack slot(s) left.\nStack:\n"+stack());
-        }
-    }
-
-    /***************************************************************/
-    /* "generic"visitXXXX methods where XXXX is an interface       */
-    /* therefore, we don't know the order of visiting; but we know */
-    /* these methods are called before the visitYYYY methods below */
-    /***************************************************************/
-
-    /**
-     * Assures the generic preconditions of a LoadClass instance.
-     * The referenced class is loaded and pass2-verified.
-     */
-    @Override
-    public void visitLoadClass(LoadClass o){
-        ObjectType t = o.getLoadClassType(cpg);
-        if (t != null){// null means "no class is loaded"
-            Verifier v = VerifierFactory.getVerifier(t.getClassName());
-            VerificationResult vr = v.doPass2();
-            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                constraintViolated((Instruction) o, "Class '"+o.getLoadClassType(cpg).getClassName()+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
-            }
-        }
-    }
-
-    /**
-     * Ensures the general preconditions of a StackConsumer instance.
-     */
-    @Override
-    public void visitStackConsumer(StackConsumer o){
-        _visitStackAccessor((Instruction) o);
-    }
-
-    /**
-     * Ensures the general preconditions of a StackProducer instance.
-     */
-    @Override
-    public void visitStackProducer(StackProducer o){
-        _visitStackAccessor((Instruction) o);
-    }
-
-
-    /***************************************************************/
-    /* "generic" visitYYYY methods where YYYY is a superclass.     */
-    /* therefore, we know the order of visiting; we know           */
-    /* these methods are called after the visitXXXX methods above. */
-    /***************************************************************/
-    /**
-     * Ensures the general preconditions of a CPInstruction instance.
-     */
-    @Override
-    public void visitCPInstruction(CPInstruction o){
-        int idx = o.getIndex();
-        if ((idx < 0) || (idx >= cpg.getSize())){
-            throw new AssertionViolatedException("Huh?! Constant pool index of instruction '"+o+"' illegal? Pass 3a should have checked this!");
-        }
-    }
-
-    /**
-     * Ensures the general preconditions of a FieldInstruction instance.
-     */
-     @Override
-    public void visitFieldInstruction(FieldInstruction o){
-         // visitLoadClass(o) has been called before: Every FieldOrMethod
-         // implements LoadClass.
-         // visitCPInstruction(o) has been called before.
-        // A FieldInstruction may be: GETFIELD, GETSTATIC, PUTFIELD, PUTSTATIC
-            Constant c = cpg.getConstant(o.getIndex());
-            if (!(c instanceof ConstantFieldref)){
-                constraintViolated(o, "Index '"+o.getIndex()+"' should refer to a CONSTANT_Fieldref_info structure, but refers to '"+c+"'.");
-            }
-            // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
-            Type t = o.getType(cpg);
-            if (t instanceof ObjectType){
-                String name = ((ObjectType)t).getClassName();
-                Verifier v = VerifierFactory.getVerifier( name );
-                VerificationResult vr = v.doPass2();
-                if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                    constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
-                }
-            }
-     }
-
-    /**
-     * Ensures the general preconditions of an InvokeInstruction instance.
-     */
-     @Override
-    public void visitInvokeInstruction(InvokeInstruction o){
-         // visitLoadClass(o) has been called before: Every FieldOrMethod
-         // implements LoadClass.
-         // visitCPInstruction(o) has been called before.
-        //TODO
-     }
-
-    /**
-     * Ensures the general preconditions of a StackInstruction instance.
-     */
-    @Override
-    public void visitStackInstruction(StackInstruction o){
-        _visitStackAccessor(o);
-    }
-
-    /**
-     * Assures the generic preconditions of a LocalVariableInstruction instance.
-     * That is, the index of the local variable must be valid.
-     */
-    @Override
-    public void visitLocalVariableInstruction(LocalVariableInstruction o){
-        if (locals().maxLocals() <= (o.getType(cpg).getSize()==1? o.getIndex() : o.getIndex()+1) ){
-            constraintViolated(o, "The 'index' is not a valid index into the local variable array.");
-        }
-    }
-
-    /**
-     * Assures the generic preconditions of a LoadInstruction instance.
-     */
-    @Override
-    public void visitLoadInstruction(LoadInstruction o){
-        //visitLocalVariableInstruction(o) is called before, because it is more generic.
-
-        // LOAD instructions must not read Type.UNKNOWN
-        if (locals().get(o.getIndex()) == Type.UNKNOWN){
-            constraintViolated(o, "Read-Access on local variable "+o.getIndex()+" with unknown content.");
-        }
-
-        // LOAD instructions, two-slot-values at index N must have Type.UNKNOWN
-        // as a symbol for the higher halve at index N+1
-        // [suppose some instruction put an int at N+1--- our double at N is defective]
-        if (o.getType(cpg).getSize() == 2){
-            if (locals().get(o.getIndex()+1) != Type.UNKNOWN){
-                constraintViolated(o, "Reading a two-locals value from local variables "+o.getIndex()+" and "+(o.getIndex()+1)+" where the latter one is destroyed.");
-            }
-        }
-
-        // LOAD instructions must read the correct type.
-        if (!(o instanceof ALOAD)){
-            if (locals().get(o.getIndex()) != o.getType(cpg) ){
-                constraintViolated(o, "Local Variable type and LOADing Instruction type mismatch: Local Variable: '"+locals().get(o.getIndex())+"'; Instruction type: '"+o.getType(cpg)+"'.");
-            }
-        }
-        else{ // we deal with an ALOAD
-            if (!(locals().get(o.getIndex()) instanceof ReferenceType)){
-                constraintViolated(o, "Local Variable type and LOADing Instruction type mismatch: Local Variable: '"+locals().get(o.getIndex())+"'; Instruction expects a ReferenceType.");
-            }
-            // ALOAD __IS ALLOWED__ to put uninitialized objects onto the stack!
-            //referenceTypeIsInitialized(o, (ReferenceType) (locals().get(o.getIndex())));
-        }
-
-        // LOAD instructions must have enough free stack slots.
-        if ((stack().maxStack() - stack().slotsUsed()) < o.getType(cpg).getSize()){
-            constraintViolated(o, "Not enough free stack slots to load a '"+o.getType(cpg)+"' onto the OperandStack.");
-        }
-    }
-
-    /**
-     * Assures the generic preconditions of a StoreInstruction instance.
-     */
-    @Override
-    public void visitStoreInstruction(StoreInstruction o){
-        //visitLocalVariableInstruction(o) is called before, because it is more generic.
-
-        if (stack().isEmpty()){ // Don't bother about 1 or 2 stack slots used. This check is implicitely done below while type checking.
-            constraintViolated(o, "Cannot STORE: Stack to read from is empty.");
-        }
-
-        if ( (!(o instanceof ASTORE)) ){
-            if (! (stack().peek() == o.getType(cpg)) ){// the other xSTORE types are singletons in BCEL.
-                constraintViolated(o, "Stack top type and STOREing Instruction type mismatch: Stack top: '"+stack().peek()+"'; Instruction type: '"+o.getType(cpg)+"'.");
-            }
-        }
-        else{ // we deal with ASTORE
-            Type stacktop = stack().peek();
-            if ( (!(stacktop instanceof ReferenceType)) && (!(stacktop instanceof ReturnaddressType)) ){
-                constraintViolated(o, "Stack top type and STOREing Instruction type mismatch: Stack top: '"+stack().peek()+"'; Instruction expects a ReferenceType or a ReturnadressType.");
-            }
-            //if (stacktop instanceof ReferenceType){
-            //    referenceTypeIsInitialized(o, (ReferenceType) stacktop);
-            //}
-        }
-    }
-
-    /**
-     * Assures the generic preconditions of a ReturnInstruction instance.
-     */
-    @Override
-    public void visitReturnInstruction(ReturnInstruction o){
-        Type method_type = mg.getType();
-        if (method_type == Type.BOOLEAN ||
-            method_type == Type.BYTE ||
-            method_type == Type.SHORT ||
-            method_type == Type.CHAR){
-                method_type = Type.INT;
-            }
-
-        if (o instanceof RETURN){
-            if (method_type != Type.VOID){
-                constraintViolated(o, "RETURN instruction in non-void method.");
-            }
-            else{
-                return;
-            }
-        }
-        if (o instanceof ARETURN){
-            if (method_type == Type.VOID){
-                constraintViolated(o, "ARETURN instruction in void method.");
-            }
-            if (stack().peek() == Type.NULL){
-                return;
-            }
-            if (! (stack().peek() instanceof ReferenceType)){
-                constraintViolated(o, "Reference type expected on top of stack, but is: '"+stack().peek()+"'.");
-            }
-            referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()));
-            //ReferenceType objectref = (ReferenceType) (stack().peek());
-            // TODO: This can only be checked if using Staerk-et-al's "set of object types" instead of a
-            // "wider cast object type" created during verification.
-            //if (! (objectref.isAssignmentCompatibleWith(mg.getType())) ){
-            //    constraintViolated(o, "Type on stack top which should be returned is a '"+stack().peek()+"' which is not assignment compatible with the return type of this method, '"+mg.getType()+"'.");
-            //}
-        }
-        else{
-            if (! ( method_type.equals( stack().peek() ))){
-                constraintViolated(o, "Current method has return type of '"+mg.getType()+"' expecting a '"+method_type+"' on top of the stack. But stack top is a '"+stack().peek()+"'.");
-            }
-        }
-    }
-
-    /***************************************************************/
-    /* "special"visitXXXX methods for one type of instruction each */
-    /***************************************************************/
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitAALOAD(AALOAD o){
-        Type arrayref = stack().peek(1);
-        Type index    = stack().peek(0);
-
-        indexOfInt(o, index);
-        if (arrayrefOfArrayType(o, arrayref)){
-            if (! (((ArrayType) arrayref).getElementType() instanceof ReferenceType)){
-                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of a ReferenceType but to an array of "+((ArrayType) arrayref).getElementType()+".");
-            }
-            //referenceTypeIsInitialized(o, (ReferenceType) (((ArrayType) arrayref).getElementType()));
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitAASTORE(AASTORE o){
-        Type arrayref = stack().peek(2);
-        Type index    = stack().peek(1);
-        Type value    = stack().peek(0);
-
-        indexOfInt(o, index);
-        if (!(value instanceof ReferenceType)){
-            constraintViolated(o, "The 'value' is not of a ReferenceType but of type "+value+".");
-        }else{
-            //referenceTypeIsInitialized(o, (ReferenceType) value);
-        }
-        // Don't bother further with "referenceTypeIsInitialized()", there are no arrays
-        // of an uninitialized object type.
-        if (arrayrefOfArrayType(o, arrayref)){
-            if (! (((ArrayType) arrayref).getElementType() instanceof ReferenceType)){
-                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of a ReferenceType but to an array of "+((ArrayType) arrayref).getElementType()+".");
-            }
-            // No check for array element assignment compatibility. This is done at runtime.
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitACONST_NULL(ACONST_NULL o){
-        // Nothing needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitALOAD(ALOAD o){
-        //visitLoadInstruction(LoadInstruction) is called before.
-
-        // Nothing else needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitANEWARRAY(ANEWARRAY o){
-        if (!stack().peek().equals(Type.INT)) {
-            constraintViolated(o, "The 'count' at the stack top is not of type '"+Type.INT+"' but of type '"+stack().peek()+"'.");
-        // The runtime constant pool item at that index must be a symbolic reference to a class,
-        // array, or interface type. See Pass 3a.
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitARETURN(ARETURN o){
-        if (! (stack().peek() instanceof ReferenceType) ){
-            constraintViolated(o, "The 'objectref' at the stack top is not of a ReferenceType but of type '"+stack().peek()+"'.");
-        }
-        ReferenceType objectref = (ReferenceType) (stack().peek());
-        referenceTypeIsInitialized(o, objectref);
-
-        // The check below should already done via visitReturnInstruction(ReturnInstruction), see there.
-        // It cannot be done using Staerk-et-al's "set of object types" instead of a
-        // "wider cast object type", anyway.
-        //if (! objectref.isAssignmentCompatibleWith(mg.getReturnType() )){
-        //    constraintViolated(o, "The 'objectref' type "+objectref+" at the stack top is not assignment compatible with the return type '"+mg.getReturnType()+"' of the method.");
-        //}
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitARRAYLENGTH(ARRAYLENGTH o){
-        Type arrayref = stack().peek(0);
-        arrayrefOfArrayType(o, arrayref);
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitASTORE(ASTORE o){
-        if (! ( (stack().peek() instanceof ReferenceType) || (stack().peek() instanceof ReturnaddressType) ) ){
-            constraintViolated(o, "The 'objectref' is not of a ReferenceType or of ReturnaddressType but of "+stack().peek()+".");
-        }
-        //if (stack().peek() instanceof ReferenceType){
-        //    referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
-        //}
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitATHROW(ATHROW o){
-        try {
-        // It's stated that 'objectref' must be of a ReferenceType --- but since Throwable is
-        // not derived from an ArrayType, it follows that 'objectref' must be of an ObjectType or Type.NULL.
-        if (! ((stack().peek() instanceof ObjectType) || (stack().peek().equals(Type.NULL))) ){
-            constraintViolated(o, "The 'objectref' is not of an (initialized) ObjectType but of type "+stack().peek()+".");
-        }
-
-        // NULL is a subclass of every class, so to speak.
-        if (stack().peek().equals(Type.NULL)) {
-            return;
-        }
-
-        ObjectType exc = (ObjectType) (stack().peek());
-        ObjectType throwable = (ObjectType) (Type.getType("Ljava/lang/Throwable;"));
-        if ( (! (exc.subclassOf(throwable)) ) && (! (exc.equals(throwable))) ){
-            constraintViolated(o, "The 'objectref' is not of class Throwable or of a subclass of Throwable, but of '"+stack().peek()+"'.");
-        }
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitBALOAD(BALOAD o){
-        Type arrayref = stack().peek(1);
-        Type index    = stack().peek(0);
-        indexOfInt(o, index);
-        if (arrayrefOfArrayType(o, arrayref)){
-            if (! ( (((ArrayType) arrayref).getElementType().equals(Type.BOOLEAN)) ||
-                    (((ArrayType) arrayref).getElementType().equals(Type.BYTE)) ) ){
-                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of a Type.BYTE or Type.BOOLEAN but to an array of '"+((ArrayType) arrayref).getElementType()+"'.");
-            }
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitBASTORE(BASTORE o){
-        Type arrayref = stack().peek(2);
-        Type index    = stack().peek(1);
-        Type value    = stack().peek(0);
-
-        indexOfInt(o, index);
-        valueOfInt(o, value);
-        if (arrayrefOfArrayType(o, arrayref)){
-            if (! ( (((ArrayType) arrayref).getElementType().equals(Type.BOOLEAN)) ||
-                    (((ArrayType) arrayref).getElementType().equals(Type.BYTE)) ) ) {
-                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of a Type.BYTE or Type.BOOLEAN but to an array of '"+((ArrayType) arrayref).getElementType()+"'.");
-            }
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitBIPUSH(BIPUSH o){
-        // Nothing to do...
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitBREAKPOINT(BREAKPOINT o){
-        throw new AssertionViolatedException("In this JustIce verification pass there should not occur an illegal instruction such as BREAKPOINT.");
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitCALOAD(CALOAD o){
-        Type arrayref = stack().peek(1);
-        Type index = stack().peek(0);
-
-        indexOfInt(o, index);
-        arrayrefOfArrayType(o, arrayref);
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitCASTORE(CASTORE o){
-        Type arrayref = stack().peek(2);
-        Type index = stack().peek(1);
-        Type value = stack().peek(0);
-
-        indexOfInt(o, index);
-        valueOfInt(o, value);
-        if (arrayrefOfArrayType(o, arrayref)){
-            if (! ((ArrayType) arrayref).getElementType().equals(Type.CHAR) ){
-                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of type char but to an array of type "+((ArrayType) arrayref).getElementType()+".");
-            }
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitCHECKCAST(CHECKCAST o){
-        // The objectref must be of type reference.
-        Type objectref = stack().peek(0);
-        if (!(objectref instanceof ReferenceType)){
-            constraintViolated(o, "The 'objectref' is not of a ReferenceType but of type "+objectref+".");
-        }
-        //else{
-        //    referenceTypeIsInitialized(o, (ReferenceType) objectref);
-        //}
-        // The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the
-        // current class (�3.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant
-        // pool item at the index must be a symbolic reference to a class, array, or interface type.
-        Constant c = cpg.getConstant(o.getIndex());
-        if (! (c instanceof ConstantClass)){
-            constraintViolated(o, "The Constant at 'index' is not a ConstantClass, but '"+c+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitD2F(D2F o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitD2I(D2I o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitD2L(D2L o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDADD(DADD o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDALOAD(DALOAD o){
-        indexOfInt(o, stack().peek());
-        if (stack().peek(1) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(1) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-top must be of type double[] but is '"+stack().peek(1)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
-        if (t != Type.DOUBLE){
-            constraintViolated(o, "Stack next-to-top must be of type double[] but is '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDASTORE(DASTORE o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-        indexOfInt(o, stack().peek(1));
-        if (stack().peek(2) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(2) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type double[] but is '"+stack().peek(2)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
-        if (t != Type.DOUBLE){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type double[] but is '"+stack().peek(2)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDCMPG(DCMPG o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDCMPL(DCMPL o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDCONST(DCONST o){
-        // There's nothing to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDDIV(DDIV o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDLOAD(DLOAD o){
-        //visitLoadInstruction(LoadInstruction) is called before.
-
-        // Nothing else needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDMUL(DMUL o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDNEG(DNEG o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDREM(DREM o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDRETURN(DRETURN o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDSTORE(DSTORE o){
-        //visitStoreInstruction(StoreInstruction) is called before.
-
-        // Nothing else needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDSUB(DSUB o){
-        if (stack().peek() != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.DOUBLE){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDUP(DUP o){
-        if (stack().peek().getSize() != 1){
-            constraintViolated(o, "Won't DUP type on stack top '"+stack().peek()+"' because it must occupy exactly one slot, not '"+stack().peek().getSize()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDUP_X1(DUP_X1 o){
-        if (stack().peek().getSize() != 1){
-            constraintViolated(o, "Type on stack top '"+stack().peek()+"' should occupy exactly one slot, not '"+stack().peek().getSize()+"'.");
-        }
-        if (stack().peek(1).getSize() != 1){
-            constraintViolated(o, "Type on stack next-to-top '"+stack().peek(1)+"' should occupy exactly one slot, not '"+stack().peek(1).getSize()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDUP_X2(DUP_X2 o){
-        if (stack().peek().getSize() != 1){
-            constraintViolated(o, "Stack top type must be of size 1, but is '"+stack().peek()+"' of size '"+stack().peek().getSize()+"'.");
-        }
-        if (stack().peek(1).getSize() == 2){
-            return; // Form 2, okay.
-        }
-        //stack().peek(1).getSize == 1.
-        if (stack().peek(2).getSize() != 1){
-            constraintViolated(o, "If stack top's size is 1 and stack next-to-top's size is 1, stack next-to-next-to-top's size must also be 1, but is: '"+stack().peek(2)+"' of size '"+stack().peek(2).getSize()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDUP2(DUP2 o){
-        if (stack().peek().getSize() == 2){
-            return; // Form 2, okay.
-        }
-        //stack().peek().getSize() == 1.
-        if (stack().peek(1).getSize() != 1){
-            constraintViolated(o, "If stack top's size is 1, then stack next-to-top's size must also be 1. But it is '"+stack().peek(1)+"' of size '"+stack().peek(1).getSize()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDUP2_X1(DUP2_X1 o){
-        if (stack().peek().getSize() == 2){
-            if (stack().peek(1).getSize() != 1){
-                constraintViolated(o, "If stack top's size is 2, then stack next-to-top's size must be 1. But it is '"+stack().peek(1)+"' of size '"+stack().peek(1).getSize()+"'.");
-            }
-            else{
-                return; // Form 2
-            }
-        }
-        else{ // stack top is of size 1
-            if ( stack().peek(1).getSize() != 1 ){
-                constraintViolated(o, "If stack top's size is 1, then stack next-to-top's size must also be 1. But it is '"+stack().peek(1)+"' of size '"+stack().peek(1).getSize()+"'.");
-            }
-            if ( stack().peek(2).getSize() != 1 ){
-                constraintViolated(o, "If stack top's size is 1, then stack next-to-next-to-top's size must also be 1. But it is '"+stack().peek(2)+"' of size '"+stack().peek(2).getSize()+"'.");
-            }
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitDUP2_X2(DUP2_X2 o){
-
-        if (stack().peek(0).getSize() == 2){
-             if (stack().peek(1).getSize() == 2){
-                return; // Form 4
-            }
-            // stack top size is 2, next-to-top's size is 1
-            if ( stack().peek(2).getSize() != 1 ){
-                constraintViolated(o, "If stack top's size is 2 and stack-next-to-top's size is 1, then stack next-to-next-to-top's size must also be 1. But it is '"+stack().peek(2)+"' of size '"+stack().peek(2).getSize()+"'.");
-            }
-            else{
-                return; // Form 2
-            }
-        }
-        else{// stack top is of size 1
-            if (stack().peek(1).getSize() == 1){
-                if ( stack().peek(2).getSize() == 2 ){
-                    return; // Form 3
-                }
-                if ( stack().peek(3).getSize() == 1){
-                    return; // Form 1
-                }
-            }
-        }
-        constraintViolated(o, "The operand sizes on the stack do not match any of the four forms of usage of this instruction.");
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitF2D(F2D o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitF2I(F2I o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitF2L(F2L o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFADD(FADD o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.FLOAT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFALOAD(FALOAD o){
-        indexOfInt(o, stack().peek());
-        if (stack().peek(1) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(1) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-top must be of type float[] but is '"+stack().peek(1)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
-        if (t != Type.FLOAT){
-            constraintViolated(o, "Stack next-to-top must be of type float[] but is '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFASTORE(FASTORE o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-        indexOfInt(o, stack().peek(1));
-        if (stack().peek(2) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(2) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type float[] but is '"+stack().peek(2)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
-        if (t != Type.FLOAT){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type float[] but is '"+stack().peek(2)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFCMPG(FCMPG o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.FLOAT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFCMPL(FCMPL o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.FLOAT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFCONST(FCONST o){
-        // nothing to do here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFDIV(FDIV o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.FLOAT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFLOAD(FLOAD o){
-        //visitLoadInstruction(LoadInstruction) is called before.
-
-        // Nothing else needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFMUL(FMUL o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.FLOAT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFNEG(FNEG o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFREM(FREM o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.FLOAT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFRETURN(FRETURN o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFSTORE(FSTORE o){
-        //visitStoreInstruction(StoreInstruction) is called before.
-
-        // Nothing else needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitFSUB(FSUB o){
-        if (stack().peek() != Type.FLOAT){
-            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.FLOAT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitGETFIELD(GETFIELD o){
-        try {
-        Type objectref = stack().peek();
-        if (! ( (objectref instanceof ObjectType) || (objectref == Type.NULL) ) ){
-            constraintViolated(o, "Stack top should be an object reference that's not an array reference, but is '"+objectref+"'.");
-        }
-
-        String field_name = o.getFieldName(cpg);
-
-        JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
-        Field[] fields = jc.getFields();
-        Field f = null;
-        for (Field field : fields) {
-            if (field.getName().equals(field_name)){
-                  Type f_type = Type.getType(field.getSignature());
-                  Type o_type = o.getType(cpg);
-                    /* TODO: Check if assignment compatibility is sufficient.
-                   * What does Sun do?
-                   */
-                  if (f_type.equals(o_type)){
-                        f = field;
-                        break;
-                    }
-            }
-        }
-
-        if (f == null){
-            JavaClass[] superclasses = jc.getSuperClasses();
-            outer:
-            for (JavaClass superclass : superclasses) {
-                fields = superclass.getFields();
-                for (Field field : fields) {
-                    if (field.getName().equals(field_name)) {
-                        Type f_type = Type.getType(field.getSignature());
-                        Type o_type = o.getType(cpg);
-                        if (f_type.equals(o_type)) {
-                            f = field;
-                            if ((f.getAccessFlags() & (Constants.ACC_PUBLIC | Constants.ACC_PROTECTED)) == 0) {
-                                f = null;
-                            }
-                            break outer;
-                        }
-                    }
-                }
-            }
-            if (f == null) {
-                throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
-            }
-        }
-
-        if (f.isProtected()){
-            ObjectType classtype = o.getClassType(cpg);
-            ObjectType curr = ObjectType.getInstance(mg.getClassName());
-
-            if (    classtype.equals(curr) ||
-                        curr.subclassOf(classtype)    ){
-                Type t = stack().peek();
-                if (t == Type.NULL){
-                    return;
-                }
-                if (! (t instanceof ObjectType) ){
-                    constraintViolated(o, "The 'objectref' must refer to an object that's not an array. Found instead: '"+t+"'.");
-                }
-                ObjectType objreftype = (ObjectType) t;
-                if (! ( objreftype.equals(curr) ||
-                            objreftype.subclassOf(curr) ) ){
-                    //TODO: One day move to Staerk-et-al's "Set of object types" instead of "wider" object types
-                    //      created during the verification.
-                    //      "Wider" object types don't allow us to check for things like that below.
-                    //constraintViolated(o, "The referenced field has the ACC_PROTECTED modifier, and it's a member of the current class or a superclass of the current class. However, the referenced object type '"+stack().peek()+"' is not the current class or a subclass of the current class.");
-                }
-            }
-        }
-
-        // TODO: Could go into Pass 3a.
-        if (f.isStatic()){
-            constraintViolated(o, "Referenced field '"+f+"' is static which it shouldn't be.");
-        }
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitGETSTATIC(GETSTATIC o){
-        // Field must be static: see Pass 3a.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitGOTO(GOTO o){
-        // nothing to do here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitGOTO_W(GOTO_W o){
-        // nothing to do here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitI2B(I2B o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitI2C(I2C o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitI2D(I2D o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitI2F(I2F o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitI2L(I2L o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitI2S(I2S o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIADD(IADD o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIALOAD(IALOAD o){
-        indexOfInt(o, stack().peek());
-        if (stack().peek(1) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(1) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-top must be of type int[] but is '"+stack().peek(1)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
-        if (t != Type.INT){
-            constraintViolated(o, "Stack next-to-top must be of type int[] but is '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIAND(IAND o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIASTORE(IASTORE o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        indexOfInt(o, stack().peek(1));
-        if (stack().peek(2) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(2) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type int[] but is '"+stack().peek(2)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
-        if (t != Type.INT){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type int[] but is '"+stack().peek(2)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitICONST(ICONST o){
-        //nothing to do here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIDIV(IDIV o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIF_ACMPEQ(IF_ACMPEQ o){
-        if (!(stack().peek() instanceof ReferenceType)){
-            constraintViolated(o, "The value at the stack top is not of a ReferenceType, but of type '"+stack().peek()+"'.");
-        }
-        //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
-
-        if (!(stack().peek(1) instanceof ReferenceType)){
-            constraintViolated(o, "The value at the stack next-to-top is not of a ReferenceType, but of type '"+stack().peek(1)+"'.");
-        }
-        //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek(1)) );
-
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIF_ACMPNE(IF_ACMPNE o){
-        if (!(stack().peek() instanceof ReferenceType)){
-            constraintViolated(o, "The value at the stack top is not of a ReferenceType, but of type '"+stack().peek()+"'.");
-            //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
-        }
-        if (!(stack().peek(1) instanceof ReferenceType)){
-            constraintViolated(o, "The value at the stack next-to-top is not of a ReferenceType, but of type '"+stack().peek(1)+"'.");
-            //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek(1)) );
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIF_ICMPEQ(IF_ICMPEQ o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIF_ICMPGE(IF_ICMPGE o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIF_ICMPGT(IF_ICMPGT o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIF_ICMPLE(IF_ICMPLE o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIF_ICMPLT(IF_ICMPLT o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIF_ICMPNE(IF_ICMPNE o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIFEQ(IFEQ o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIFGE(IFGE o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIFGT(IFGT o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIFLE(IFLE o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIFLT(IFLT o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIFNE(IFNE o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIFNONNULL(IFNONNULL o){
-        if (!(stack().peek() instanceof ReferenceType)){
-            constraintViolated(o, "The value at the stack top is not of a ReferenceType, but of type '"+stack().peek()+"'.");
-        }
-        referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIFNULL(IFNULL o){
-        if (!(stack().peek() instanceof ReferenceType)){
-            constraintViolated(o, "The value at the stack top is not of a ReferenceType, but of type '"+stack().peek()+"'.");
-        }
-        referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIINC(IINC o){
-        // Mhhh. In BCEL, at this time "IINC" is not a LocalVariableInstruction.
-        if (locals().maxLocals() <= (o.getType(cpg).getSize()==1? o.getIndex() : o.getIndex()+1) ){
-            constraintViolated(o, "The 'index' is not a valid index into the local variable array.");
-        }
-
-        indexOfInt(o, locals().get(o.getIndex()));
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitILOAD(ILOAD o){
-        // All done by visitLocalVariableInstruction(), visitLoadInstruction()
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIMPDEP1(IMPDEP1 o){
-        throw new AssertionViolatedException("In this JustIce verification pass there should not occur an illegal instruction such as IMPDEP1.");
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIMPDEP2(IMPDEP2 o){
-        throw new AssertionViolatedException("In this JustIce verification pass there should not occur an illegal instruction such as IMPDEP2.");
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIMUL(IMUL o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitINEG(INEG o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitINSTANCEOF(INSTANCEOF o){
-        // The objectref must be of type reference.
-        Type objectref = stack().peek(0);
-        if (!(objectref instanceof ReferenceType)){
-            constraintViolated(o, "The 'objectref' is not of a ReferenceType but of type "+objectref+".");
-        }
-        //else{
-        //    referenceTypeIsInitialized(o, (ReferenceType) objectref);
-        //}
-        // The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the
-        // current class (�3.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant
-        // pool item at the index must be a symbolic reference to a class, array, or interface type.
-        Constant c = cpg.getConstant(o.getIndex());
-        if (! (c instanceof ConstantClass)){
-            constraintViolated(o, "The Constant at 'index' is not a ConstantClass, but '"+c+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitINVOKEDYNAMIC(INVOKEDYNAMIC o){
-        throw new RuntimeException("INVOKEDYNAMIC instruction is not supported at this time");
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitINVOKEINTERFACE(INVOKEINTERFACE o){
-        // Method is not native, otherwise pass 3 would not happen.
-
-        int count = o.getCount();
-        if (count == 0){
-            constraintViolated(o, "The 'count' argument must not be 0.");
-        }
-        // It is a ConstantInterfaceMethodref, Pass 3a made it sure.
-        // TODO: Do we want to do anything with it?
-        //ConstantInterfaceMethodref cimr = (ConstantInterfaceMethodref) (cpg.getConstant(o.getIndex()));
-
-        // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
-
-        Type t = o.getType(cpg);
-        if (t instanceof ObjectType){
-            String name = ((ObjectType)t).getClassName();
-            Verifier v = VerifierFactory.getVerifier( name );
-            VerificationResult vr = v.doPass2();
-            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
-            }
-        }
-
-
-        Type[] argtypes = o.getArgumentTypes(cpg);
-        int nargs = argtypes.length;
-
-        for (int i=nargs-1; i>=0; i--){
-            Type fromStack = stack().peek( (nargs-1) - i );    // 0 to nargs-1
-            Type fromDesc = argtypes[i];
-            if (fromDesc == Type.BOOLEAN ||
-                    fromDesc == Type.BYTE ||
-                    fromDesc == Type.CHAR ||
-                    fromDesc == Type.SHORT){
-                fromDesc = Type.INT;
-            }
-            if (! fromStack.equals(fromDesc)){
-                if (fromStack instanceof ReferenceType && fromDesc instanceof ReferenceType){
-                    ReferenceType rFromStack = (ReferenceType) fromStack;
-                    //ReferenceType rFromDesc = (ReferenceType) fromDesc;
-                    // TODO: This can only be checked when using Staerk-et-al's "set of object types"
-                    // instead of a "wider cast object type" created during verification.
-                    //if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ){
-                    //    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack (which is not assignment compatible).");
-                    //}
-                    referenceTypeIsInitialized(o, rFromStack);
-                }
-                else{
-                    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack.");
-                }
-            }
-        }
-
-        Type objref = stack().peek(nargs);
-        if (objref == Type.NULL){
-            return;
-        }
-        if (! (objref instanceof ReferenceType) ){
-            constraintViolated(o, "Expecting a reference type as 'objectref' on the stack, not a '"+objref+"'.");
-        }
-        referenceTypeIsInitialized(o, (ReferenceType) objref);
-        if (!(objref instanceof ObjectType)){
-            if (!(objref instanceof ArrayType)){
-                constraintViolated(o, "Expecting an ObjectType as 'objectref' on the stack, not a '"+objref+"'."); // could be a ReturnaddressType
-            }
-            else{
-                objref = GENERIC_ARRAY;
-            }
-        }
-
-        // String objref_classname = ((ObjectType) objref).getClassName();
-        // String theInterface = o.getClassName(cpg);
-        // TODO: This can only be checked if we're using Staerk-et-al's "set of object types"
-        //       instead of "wider cast object types" generated during verification.
-        //if ( ! Repository.implementationOf(objref_classname, theInterface) ){
-        //    constraintViolated(o, "The 'objref' item '"+objref+"' does not implement '"+theInterface+"' as expected.");
-        //}
-
-        int counted_count = 1; // 1 for the objectref
-        for (int i=0; i<nargs; i++){
-            counted_count += argtypes[i].getSize();
-        }
-        if (count != counted_count){
-            constraintViolated(o, "The 'count' argument should probably read '"+counted_count+"' but is '"+count+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitINVOKESPECIAL(INVOKESPECIAL o){
-        try {
-        // Don't init an object twice.
-        if ( (o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME)) && (!(stack().peek(o.getArgumentTypes(cpg).length) instanceof UninitializedObjectType)) ){
-            constraintViolated(o, "Possibly initializing object twice. A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler. Please see The Java Virtual Machine Specification, Second Edition, 4.9.4 (pages 147 and 148) for details.");
-        }
-
-        // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
-
-        Type t = o.getType(cpg);
-        if (t instanceof ObjectType){
-            String name = ((ObjectType)t).getClassName();
-            Verifier v = VerifierFactory.getVerifier( name );
-            VerificationResult vr = v.doPass2();
-            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
-            }
-        }
-
-
-        Type[] argtypes = o.getArgumentTypes(cpg);
-        int nargs = argtypes.length;
-
-        for (int i=nargs-1; i>=0; i--){
-            Type fromStack = stack().peek( (nargs-1) - i );    // 0 to nargs-1
-            Type fromDesc = argtypes[i];
-            if (fromDesc == Type.BOOLEAN ||
-                    fromDesc == Type.BYTE ||
-                    fromDesc == Type.CHAR ||
-                    fromDesc == Type.SHORT){
-                fromDesc = Type.INT;
-            }
-            if (! fromStack.equals(fromDesc)){
-                if (fromStack instanceof ReferenceType && fromDesc instanceof ReferenceType){
-                    ReferenceType rFromStack = (ReferenceType) fromStack;
-                    ReferenceType rFromDesc = (ReferenceType) fromDesc;
-                    // TODO: This can only be checked using Staerk-et-al's "set of object types", not
-                    // using a "wider cast object type".
-                    if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ){
-                        constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack (which is not assignment compatible).");
-                    }
-                    referenceTypeIsInitialized(o, rFromStack);
-                }
-                else{
-                    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack.");
-                }
-            }
-        }
-
-        Type objref = stack().peek(nargs);
-        if (objref == Type.NULL){
-            return;
-        }
-        if (! (objref instanceof ReferenceType) ){
-            constraintViolated(o, "Expecting a reference type as 'objectref' on the stack, not a '"+objref+"'.");
-        }
-        String objref_classname = null;
-        if ( !(o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME))){
-            referenceTypeIsInitialized(o, (ReferenceType) objref);
-            if (!(objref instanceof ObjectType)){
-                if (!(objref instanceof ArrayType)){
-                    constraintViolated(o, "Expecting an ObjectType as 'objectref' on the stack, not a '"+objref+"'."); // could be a ReturnaddressType
-                }
-                else{
-                    objref = GENERIC_ARRAY;
-                }
-            }
-
-            objref_classname = ((ObjectType) objref).getClassName();
-        }
-        else{
-            if (!(objref instanceof UninitializedObjectType)){
-                constraintViolated(o, "Expecting an UninitializedObjectType as 'objectref' on the stack, not a '"+objref+"'. Otherwise, you couldn't invoke a method since an array has no methods (not to speak of a return address).");
-            }
-            objref_classname = ((UninitializedObjectType) objref).getInitialized().getClassName();
-        }
-
-
-        String theClass = o.getClassName(cpg);
-        if ( ! Repository.instanceOf(objref_classname, theClass) ){
-            constraintViolated(o, "The 'objref' item '"+objref+"' does not implement '"+theClass+"' as expected.");
-        }
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitINVOKESTATIC(INVOKESTATIC o){
-        try {
-        // Method is not native, otherwise pass 3 would not happen.
-
-        Type t = o.getType(cpg);
-        if (t instanceof ObjectType){
-            String name = ((ObjectType)t).getClassName();
-            Verifier v = VerifierFactory.getVerifier( name );
-            VerificationResult vr = v.doPass2();
-            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
-            }
-        }
-
-        Type[] argtypes = o.getArgumentTypes(cpg);
-        int nargs = argtypes.length;
-
-        for (int i=nargs-1; i>=0; i--){
-            Type fromStack = stack().peek( (nargs-1) - i );    // 0 to nargs-1
-            Type fromDesc = argtypes[i];
-            if (fromDesc == Type.BOOLEAN ||
-                    fromDesc == Type.BYTE ||
-                    fromDesc == Type.CHAR ||
-                    fromDesc == Type.SHORT){
-                fromDesc = Type.INT;
-            }
-            if (! fromStack.equals(fromDesc)){
-                if (fromStack instanceof ReferenceType && fromDesc instanceof ReferenceType){
-                    ReferenceType rFromStack = (ReferenceType) fromStack;
-                    ReferenceType rFromDesc = (ReferenceType) fromDesc;
-                    // TODO: This check can possibly only be done using Staerk-et-al's "set of object types"
-                    // instead of a "wider cast object type" created during verification.
-                    if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ){
-                        constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack (which is not assignment compatible).");
-                    }
-                    referenceTypeIsInitialized(o, rFromStack);
-                }
-                else{
-                    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack.");
-                }
-            }
-        }
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitINVOKEVIRTUAL(INVOKEVIRTUAL o){
-        try {
-        // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
-
-        Type t = o.getType(cpg);
-        if (t instanceof ObjectType){
-            String name = ((ObjectType)t).getClassName();
-            Verifier v = VerifierFactory.getVerifier( name );
-            VerificationResult vr = v.doPass2();
-            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
-                constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
-            }
-        }
-
-
-        Type[] argtypes = o.getArgumentTypes(cpg);
-        int nargs = argtypes.length;
-
-        for (int i=nargs-1; i>=0; i--){
-            Type fromStack = stack().peek( (nargs-1) - i );    // 0 to nargs-1
-            Type fromDesc = argtypes[i];
-            if (fromDesc == Type.BOOLEAN ||
-                    fromDesc == Type.BYTE ||
-                    fromDesc == Type.CHAR ||
-                    fromDesc == Type.SHORT){
-                fromDesc = Type.INT;
-            }
-            if (! fromStack.equals(fromDesc)){
-                if (fromStack instanceof ReferenceType && fromDesc instanceof ReferenceType){
-                    ReferenceType rFromStack = (ReferenceType) fromStack;
-                    ReferenceType rFromDesc = (ReferenceType) fromDesc;
-                    // TODO: This can possibly only be checked when using Staerk-et-al's "set of object types" instead
-                    // of a single "wider cast object type" created during verification.
-                    if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ){
-                        constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack (which is not assignment compatible).");
-                    }
-                    referenceTypeIsInitialized(o, rFromStack);
-                }
-                else{
-                    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack.");
-                }
-            }
-        }
-
-        Type objref = stack().peek(nargs);
-        if (objref == Type.NULL){
-            return;
-        }
-        if (! (objref instanceof ReferenceType) ){
-            constraintViolated(o, "Expecting a reference type as 'objectref' on the stack, not a '"+objref+"'.");
-        }
-        referenceTypeIsInitialized(o, (ReferenceType) objref);
-        if (!(objref instanceof ObjectType)){
-            if (!(objref instanceof ArrayType)){
-                constraintViolated(o, "Expecting an ObjectType as 'objectref' on the stack, not a '"+objref+"'."); // could be a ReturnaddressType
-            }
-            else{
-                objref = GENERIC_ARRAY;
-            }
-        }
-
-        String objref_classname = ((ObjectType) objref).getClassName();
-
-        String theClass = o.getClassName(cpg);
-
-        if ( ! Repository.instanceOf(objref_classname, theClass) ){
-            constraintViolated(o, "The 'objref' item '"+objref+"' does not implement '"+theClass+"' as expected.");
-        }
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIOR(IOR o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIREM(IREM o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIRETURN(IRETURN o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitISHL(ISHL o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitISHR(ISHR o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitISTORE(ISTORE o){
-        //visitStoreInstruction(StoreInstruction) is called before.
-
-        // Nothing else needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitISUB(ISUB o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIUSHR(IUSHR o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitIXOR(IXOR o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.INT){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitJSR(JSR o){
-        // nothing to do here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitJSR_W(JSR_W o){
-        // nothing to do here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitL2D(L2D o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitL2F(L2F o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitL2I(L2I o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLADD(LADD o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLALOAD(LALOAD o){
-        indexOfInt(o, stack().peek());
-        if (stack().peek(1) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(1) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-top must be of type long[] but is '"+stack().peek(1)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
-        if (t != Type.LONG){
-            constraintViolated(o, "Stack next-to-top must be of type long[] but is '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLAND(LAND o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLASTORE(LASTORE o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        indexOfInt(o, stack().peek(1));
-        if (stack().peek(2) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(2) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type long[] but is '"+stack().peek(2)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
-        if (t != Type.LONG){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type long[] but is '"+stack().peek(2)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLCMP(LCMP o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLCONST(LCONST o){
-        // Nothing to do here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLDC(LDC o){
-        // visitCPInstruction is called first.
-
-        Constant c = cpg.getConstant(o.getIndex());
-        if     (!    (    ( c instanceof ConstantInteger) ||
-                    ( c instanceof ConstantFloat    )    ||
-                    ( c instanceof ConstantString    )    ||
-                    ( c instanceof ConstantClass    ) )    ){
-            constraintViolated(o, "Referenced constant should be a CONSTANT_Integer, a CONSTANT_Float, a CONSTANT_String or a CONSTANT_Class, but is '"+c+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    public void visitLDC_W(LDC_W o){
-        // visitCPInstruction is called first.
-
-        Constant c = cpg.getConstant(o.getIndex());
-        if     (!    (    ( c instanceof ConstantInteger) ||
-                    ( c instanceof ConstantFloat    )    ||
-                    ( c instanceof ConstantString    )    ||
-                    ( c instanceof ConstantClass    ) )    ){
-            constraintViolated(o, "Referenced constant should be a CONSTANT_Integer, a CONSTANT_Float, a CONSTANT_String or a CONSTANT_Class, but is '"+c+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLDC2_W(LDC2_W o){
-        // visitCPInstruction is called first.
-
-        Constant c = cpg.getConstant(o.getIndex());
-        if     (!    (    ( c instanceof ConstantLong) ||
-                            ( c instanceof ConstantDouble )    )    ){
-            constraintViolated(o, "Referenced constant should be a CONSTANT_Integer, a CONSTANT_Float or a CONSTANT_String, but is '"+c+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLDIV(LDIV o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLLOAD(LLOAD o){
-        //visitLoadInstruction(LoadInstruction) is called before.
-
-        // Nothing else needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLMUL(LMUL o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLNEG(LNEG o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLOOKUPSWITCH(LOOKUPSWITCH o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        // See also pass 3a.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLOR(LOR o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLREM(LREM o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLRETURN(LRETURN o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLSHL(LSHL o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLSHR(LSHR o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLSTORE(LSTORE o){
-        //visitStoreInstruction(StoreInstruction) is called before.
-
-        // Nothing else needs to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLSUB(LSUB o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLUSHR(LUSHR o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitLXOR(LXOR o){
-        if (stack().peek() != Type.LONG){
-            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
-        }
-        if (stack().peek(1) != Type.LONG){
-            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitMONITORENTER(MONITORENTER o){
-        if (! ((stack().peek()) instanceof ReferenceType)){
-            constraintViolated(o, "The stack top should be of a ReferenceType, but is '"+stack().peek()+"'.");
-        }
-        //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitMONITOREXIT(MONITOREXIT o){
-        if (! ((stack().peek()) instanceof ReferenceType)){
-            constraintViolated(o, "The stack top should be of a ReferenceType, but is '"+stack().peek()+"'.");
-        }
-        //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitMULTIANEWARRAY(MULTIANEWARRAY o){
-        int dimensions = o.getDimensions();
-        // Dimensions argument is okay: see Pass 3a.
-        for (int i=0; i<dimensions; i++){
-            if (stack().peek(i) != Type.INT){
-                constraintViolated(o, "The '"+dimensions+"' upper stack types should be 'int' but aren't.");
-            }
-        }
-        // The runtime constant pool item at that index must be a symbolic reference to a class,
-        // array, or interface type. See Pass 3a.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitNEW(NEW o){
-        //visitCPInstruction(CPInstruction) has been called before.
-        //visitLoadClass(LoadClass) has been called before.
-
-        Type t = o.getType(cpg);
-        if (! (t instanceof ReferenceType)){
-            throw new AssertionViolatedException("NEW.getType() returning a non-reference type?!");
-        }
-        if (! (t instanceof ObjectType)){
-            constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+t+"'.");
-        }
-        ObjectType obj = (ObjectType) t;
-
-        //e.g.: Don't instantiate interfaces
-        if (! obj.referencesClass()){
-            constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+obj+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitNEWARRAY(NEWARRAY o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitNOP(NOP o){
-        // nothing is to be done here.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitPOP(POP o){
-        if (stack().peek().getSize() != 1){
-            constraintViolated(o, "Stack top size should be 1 but stack top is '"+stack().peek()+"' of size '"+stack().peek().getSize()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitPOP2(POP2 o){
-        if (stack().peek().getSize() != 2){
-            constraintViolated(o, "Stack top size should be 2 but stack top is '"+stack().peek()+"' of size '"+stack().peek().getSize()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitPUTFIELD(PUTFIELD o){
-        try {
-
-        Type objectref = stack().peek(1);
-        if (! ( (objectref instanceof ObjectType) || (objectref == Type.NULL) ) ){
-            constraintViolated(o, "Stack next-to-top should be an object reference that's not an array reference, but is '"+objectref+"'.");
-        }
-
-        String field_name = o.getFieldName(cpg);
-
-        JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
-        Field[] fields = jc.getFields();
-        Field f = null;
-        for (Field field : fields) {
-            if (field.getName().equals(field_name)){
-                  Type f_type = Type.getType(field.getSignature());
-                  Type o_type = o.getType(cpg);
-                    /* TODO: Check if assignment compatibility is sufficient.
-                   * What does Sun do?
-                   */
-                  if (f_type.equals(o_type)){
-                        f = field;
-                        break;
-                    }
-            }
-        }
-        if (f == null){
-            throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
-        }
-
-        Type value = stack().peek();
-        Type t = Type.getType(f.getSignature());
-        Type shouldbe = t;
-        if (shouldbe == Type.BOOLEAN ||
-                shouldbe == Type.BYTE ||
-                shouldbe == Type.CHAR ||
-                shouldbe == Type.SHORT){
-            shouldbe = Type.INT;
-        }
-        if (t instanceof ReferenceType){
-            ReferenceType rvalue = null;
-            if (value instanceof ReferenceType){
-                rvalue = (ReferenceType) value;
-                referenceTypeIsInitialized(o, rvalue);
-            }
-            else{
-                constraintViolated(o, "The stack top type '"+value+"' is not of a reference type as expected.");
-            }
-            // TODO: This can possibly only be checked using Staerk-et-al's "set-of-object types", not
-            // using "wider cast object types" created during verification.
-            // Comment it out if you encounter problems. See also the analogon at visitPUTSTATIC.
-            if (!(rvalue.isAssignmentCompatibleWith(shouldbe))){
-                constraintViolated(o, "The stack top type '"+value+"' is not assignment compatible with '"+shouldbe+"'.");
-            }
-        }
-        else{
-            if (shouldbe != value){
-                constraintViolated(o, "The stack top type '"+value+"' is not of type '"+shouldbe+"' as expected.");
-            }
-        }
-
-        if (f.isProtected()){
-            ObjectType classtype = o.getClassType(cpg);
-            ObjectType curr = ObjectType.getInstance(mg.getClassName());
-
-            if (    classtype.equals(curr) ||
-                        curr.subclassOf(classtype)    ){
-                Type tp = stack().peek(1);
-                if (tp == Type.NULL){
-                    return;
-                }
-                if (! (tp instanceof ObjectType) ){
-                    constraintViolated(o, "The 'objectref' must refer to an object that's not an array. Found instead: '"+tp+"'.");
-                }
-                ObjectType objreftype = (ObjectType) tp;
-                if (! ( objreftype.equals(curr) ||
-                            objreftype.subclassOf(curr) ) ){
-                    constraintViolated(o, "The referenced field has the ACC_PROTECTED modifier, and it's a member of the current class or a superclass of the current class. However, the referenced object type '"+stack().peek()+"' is not the current class or a subclass of the current class.");
-                }
-            }
-        }
-
-        // TODO: Could go into Pass 3a.
-        if (f.isStatic()){
-            constraintViolated(o, "Referenced field '"+f+"' is static which it shouldn't be.");
-        }
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitPUTSTATIC(PUTSTATIC o){
-        try {
-        String field_name = o.getFieldName(cpg);
-        JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
-        Field[] fields = jc.getFields();
-        Field f = null;
-        for (Field field : fields) {
-            if (field.getName().equals(field_name)){
-                    Type f_type = Type.getType(field.getSignature());
-                  Type o_type = o.getType(cpg);
-                    /* TODO: Check if assignment compatibility is sufficient.
-                   * What does Sun do?
-                   */
-                  if (f_type.equals(o_type)){
-                        f = field;
-                        break;
-                    }
-            }
-        }
-        if (f == null){
-            throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
-        }
-        Type value = stack().peek();
-        Type t = Type.getType(f.getSignature());
-        Type shouldbe = t;
-        if (shouldbe == Type.BOOLEAN ||
-                shouldbe == Type.BYTE ||
-                shouldbe == Type.CHAR ||
-                shouldbe == Type.SHORT){
-            shouldbe = Type.INT;
-        }
-        if (t instanceof ReferenceType){
-            ReferenceType rvalue = null;
-            if (value instanceof ReferenceType){
-                rvalue = (ReferenceType) value;
-                referenceTypeIsInitialized(o, rvalue);
-            }
-            else{
-                constraintViolated(o, "The stack top type '"+value+"' is not of a reference type as expected.");
-            }
-            // TODO: This can possibly only be checked using Staerk-et-al's "set-of-object types", not
-            // using "wider cast object types" created during verification.
-            // Comment it out if you encounter problems. See also the analogon at visitPUTFIELD.
-            if (!(rvalue.isAssignmentCompatibleWith(shouldbe))){
-                constraintViolated(o, "The stack top type '"+value+"' is not assignment compatible with '"+shouldbe+"'.");
-            }
-        }
-        else{
-            if (shouldbe != value){
-                constraintViolated(o, "The stack top type '"+value+"' is not of type '"+shouldbe+"' as expected.");
-            }
-        }
-        // TODO: Interface fields may be assigned to only once. (Hard to implement in
-        //       JustIce's execution model). This may only happen in <clinit>, see Pass 3a.
-
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitRET(RET o){
-        if (! (locals().get(o.getIndex()) instanceof ReturnaddressType)){
-            constraintViolated(o, "Expecting a ReturnaddressType in local variable "+o.getIndex()+".");
-        }
-        if (locals().get(o.getIndex()) == ReturnaddressType.NO_TARGET){
-            throw new AssertionViolatedException("Oops: RET expecting a target!");
-        }
-        // Other constraints such as non-allowed overlapping subroutines are enforced
-        // while building the Subroutines data structure.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitRETURN(RETURN o){
-        if (mg.getName().equals(Constants.CONSTRUCTOR_NAME)){// If we leave an <init> method
-            if ((Frame._this != null) && (!(mg.getClassName().equals(Type.OBJECT.getClassName()))) ) {
-                constraintViolated(o, "Leaving a constructor that itself did not call a constructor.");
-            }
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitSALOAD(SALOAD o){
-        indexOfInt(o, stack().peek());
-        if (stack().peek(1) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(1) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-top must be of type short[] but is '"+stack().peek(1)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
-        if (t != Type.SHORT){
-            constraintViolated(o, "Stack next-to-top must be of type short[] but is '"+stack().peek(1)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitSASTORE(SASTORE o){
-        if (stack().peek() != Type.INT){
-            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
-        }
-        indexOfInt(o, stack().peek(1));
-        if (stack().peek(2) == Type.NULL){
-            return;
-        }
-        if (! (stack().peek(2) instanceof ArrayType)){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type short[] but is '"+stack().peek(2)+"'.");
-        }
-        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
-        if (t != Type.SHORT){
-            constraintViolated(o, "Stack next-to-next-to-top must be of type short[] but is '"+stack().peek(2)+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitSIPUSH(SIPUSH o){
-        // nothing to do here. Generic visitXXX() methods did the trick before.
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitSWAP(SWAP o){
-        if (stack().peek().getSize() != 1){
-            constraintViolated(o, "The value at the stack top is not of size '1', but of size '"+stack().peek().getSize()+"'.");
-        }
-        if (stack().peek(1).getSize() != 1){
-            constraintViolated(o, "The value at the stack next-to-top is not of size '1', but of size '"+stack().peek(1).getSize()+"'.");
-        }
-    }
-
-    /**
-     * Ensures the specific preconditions of the said instruction.
-     */
-    @Override
-    public void visitTABLESWITCH(TABLESWITCH o){
-        indexOfInt(o, stack().peek());
-        // See Pass 3a.
-    }
-
-}
-
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/InstructionContext.java b/src/main/java/org/apache/bcel/verifier/structurals/InstructionContext.java
deleted file mode 100644
index 6842fc0..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/InstructionContext.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import java.util.ArrayList;
-import org.apache.bcel.generic.InstructionHandle;
-
-/**
- * An InstructionContext offers convenient access
- * to information like control flow successors and
- * such.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public interface InstructionContext{
-
-    /**
-     * The getTag and setTag methods may be used for
-     * temporary flagging, such as graph colouring.
-     * Nothing in the InstructionContext object depends
-     * on the value of the tag. JustIce does not use it.
-     * 
-     * @see #setTag(int tag)
-     */
-    int getTag();
-
-    /**
-     * The getTag and setTag methods may be used for
-     * temporary flagging, such as graph colouring.
-     * Nothing in the InstructionContext object depends
-     * on the value of the tag. JustIce does not use it.
-     * 
-     * @see #getTag()
-     */
-    void setTag(int tag);
-
-    /**
-     * This method symbolically executes the Instruction
-     * held in the InstructionContext.
-     * It "merges in" the incoming execution frame situation
-     * (see The Java Virtual Machine Specification, 2nd
-     * edition, page 146).
-     * By so doing, the outgoing execution frame situation
-     * is calculated.
-     *
-     * This method is JustIce-specific and is usually of
-     * no sense for users of the ControlFlowGraph class.
-     * They should use getInstruction().accept(Visitor),
-     * possibly in conjunction with the ExecutionVisitor.
-     * 
-     *
-     * @see ControlFlowGraph
-     * @see ExecutionVisitor
-     * @see #getOutFrame(ArrayList)
-     * @return true -  if and only if the "outgoing" frame situation
-     * changed from the one before execute()ing.
-     */
-    boolean execute(Frame inFrame, ArrayList<InstructionContext> executionPredecessors, InstConstraintVisitor icv, ExecutionVisitor ev);
-
-    Frame getInFrame();
-
-    /**
-     * This method returns the outgoing execution frame situation;
-     * therefore <B>it has to be calculated by execute(Frame, ArrayList)
-     * first.</B>
-     *
-     * @see #execute(Frame, ArrayList, InstConstraintVisitor, ExecutionVisitor)
-     */
-    Frame getOutFrame(ArrayList<InstructionContext> executionPredecessors);
-
-    /**
-     * Returns the InstructionHandle this InstructionContext is wrapped around.
-     *
-     * @return The InstructionHandle this InstructionContext is wrapped around.
-     */
-    InstructionHandle getInstruction();
-
-    /**
-     * Returns the usual control flow successors.
-     * @see #getExceptionHandlers()
-     */
-    InstructionContext[] getSuccessors();
-
-    /**
-     * Returns the exception handlers that protect this instruction.
-     * They are special control flow successors.
-     */
-    ExceptionHandler[] getExceptionHandlers();
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java b/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
deleted file mode 100644
index c1e4a08..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import org.apache.bcel.generic.ReferenceType;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
-
-/**
- * This class implements an array of local variables used for symbolic JVM
- * simulation.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class LocalVariables{
-    /** The Type[] containing the local variable slots. */
-    private final Type[] locals;
-
-    /**
-     * Creates a new LocalVariables object.
-     */
-    public LocalVariables(int maxLocals){
-        locals = new Type[maxLocals];
-        for (int i=0; i<maxLocals; i++){
-            locals[i] = Type.UNKNOWN;
-        }
-    }
-
-    /**
-     * Returns a deep copy of this object; i.e. the clone
-     * operates on a new local variable array.
-     * However, the Type objects in the array are shared.
-     */
-    @Override
-    protected Object clone(){
-        LocalVariables lvs = new LocalVariables(locals.length);
-        for (int i=0; i<locals.length; i++){
-            lvs.locals[i] = this.locals[i];
-        }
-        return lvs;
-    }
-
-    /**
-     * Returns the type of the local variable slot i.
-     */
-    public Type get(int i){
-        return locals[i];
-    }
-
-    /**
-     * Returns a (correctly typed) clone of this object.
-     * This is equivalent to ((LocalVariables) this.clone()).
-     */
-    public LocalVariables getClone(){
-        return (LocalVariables) this.clone();
-    }
-
-    /**
-     * Returns the number of local variable slots this
-     * LocalVariables instance has.
-     */
-    public int maxLocals(){
-        return locals.length;
-    }
-
-    /**
-     * Sets a new Type for the given local variable slot.
-     */
-    public void set(int i, Type type){
-        if (type == Type.BYTE || type == Type.SHORT || type == Type.BOOLEAN || type == Type.CHAR){
-            throw new AssertionViolatedException("LocalVariables do not know about '"+type+"'. Use Type.INT instead.");
-        }
-        locals[i] = type;
-    }
-
-    /** @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() { return locals.length; }
-
-    /*
-     * Fulfills the general contract of Object.equals().
-     */
-    @Override
-    public boolean equals(Object o){
-        if (!(o instanceof LocalVariables)) {
-            return false;
-        }
-        LocalVariables lv = (LocalVariables) o;
-        if (this.locals.length != lv.locals.length) {
-            return false;
-        }
-        for (int i=0; i<this.locals.length; i++){
-            if (!this.locals[i].equals(lv.locals[i])){
-                //System.out.println(this.locals[i]+" is not "+lv.locals[i]);
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Merges two local variables sets as described in the Java Virtual Machine Specification,
-     * Second Edition, section 4.9.2, page 146.
-     */
-    public void merge(LocalVariables lv){
-
-        if (this.locals.length != lv.locals.length){
-            throw new AssertionViolatedException("Merging LocalVariables of different size?!? From different methods or what?!?");
-        }
-
-        for (int i=0; i<locals.length; i++){
-            merge(lv, i);
-        }
-    }
-
-    /**
-     * Merges a single local variable.
-     *
-     * @see #merge(LocalVariables)
-     */
-    private void merge(LocalVariables lv, int i){
-        try {
-
-        // We won't accept an unitialized object if we know it was initialized;
-        // compare vmspec2, 4.9.4, last paragraph.
-        if ( (!(locals[i] instanceof UninitializedObjectType)) && (lv.locals[i] instanceof UninitializedObjectType) ){
-            throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object in the local variables detected.");
-        }
-        // Even harder, what about _different_ uninitialized object types?!
-        if ( (!(locals[i].equals(lv.locals[i]))) && (locals[i] instanceof UninitializedObjectType) && (lv.locals[i] instanceof UninitializedObjectType) ){
-            throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object in the local variables detected.");
-        }
-        // If we just didn't know that it was initialized, we have now learned.
-        if (locals[i] instanceof UninitializedObjectType){
-            if (! (lv.locals[i] instanceof UninitializedObjectType)){
-                locals[i] = ((UninitializedObjectType) locals[i]).getInitialized();
-            }
-        }
-        if ((locals[i] instanceof ReferenceType) && (lv.locals[i] instanceof ReferenceType)){
-            if (! locals[i].equals(lv.locals[i])){ // needed in case of two UninitializedObjectType instances
-                Type sup = ((ReferenceType) locals[i]).getFirstCommonSuperclass((ReferenceType) (lv.locals[i]));
-
-                if (sup != null){
-                    locals[i] = sup;
-                }
-                else{
-                    // We should have checked this in Pass2!
-                    throw new AssertionViolatedException("Could not load all the super classes of '"+locals[i]+"' and '"+lv.locals[i]+"'.");
-                }
-            }
-        }
-        else{
-            if (! (locals[i].equals(lv.locals[i])) ){
-/*TODO
-                if ((locals[i] instanceof org.apache.bcel.generic.ReturnaddressType) && (lv.locals[i] instanceof org.apache.bcel.generic.ReturnaddressType)){
-                    //System.err.println("merging "+locals[i]+" and "+lv.locals[i]);
-                    throw new AssertionViolatedException("Merging different ReturnAddresses: '"+locals[i]+"' and '"+lv.locals[i]+"'.");
-                }
-*/
-                locals[i] = Type.UNKNOWN;
-            }
-        }
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Returns a String representation of this object.
-     */
-    @Override
-    public String toString(){
-        StringBuilder sb = new StringBuilder();
-        for (int i=0; i<locals.length; i++){
-            sb.append(Integer.toString(i));
-            sb.append(": ");
-            sb.append(locals[i]);
-            sb.append("\n");
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Replaces all occurences of u in this local variables set
-     * with an "initialized" ObjectType.
-     */
-    public void initializeObject(UninitializedObjectType u){
-        for (int i=0; i<locals.length; i++){
-            if (locals[i] == u){
-                locals[i] = u.getInitialized();
-            }
-        }
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java b/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
deleted file mode 100644
index 155d303..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import java.util.ArrayList;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.ReferenceType;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
-
-/**
- * This class implements a stack used for symbolic JVM stack simulation.
- * [It's used an an operand stack substitute.]
- * Elements of this stack are org.apache.bcel.generic.Type objects.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class OperandStack{
-
-    /** We hold the stack information here. */
-    private ArrayList<Type> stack = new ArrayList<Type>();
-
-    /** The maximum number of stack slots this OperandStack instance may hold. */
-    private final int maxStack;
-
-    /**
-     * Creates an empty stack with a maximum of maxStack slots.
-     */
-    public OperandStack(int maxStack){
-        this.maxStack = maxStack;
-    }
-
-    /**
-     * Creates an otherwise empty stack with a maximum of maxStack slots and
-     * the ObjectType 'obj' at the top.
-     */
-    public OperandStack(int maxStack, ObjectType obj){
-        this.maxStack = maxStack;
-        this.push(obj);
-    }    
-    /**
-     * Returns a deep copy of this object; that means, the clone operates
-     * on a new stack. However, the Type objects on the stack are
-     * shared.
-     */
-    @Override
-    protected Object clone(){
-        OperandStack newstack = new OperandStack(this.maxStack);
-        newstack.stack = (ArrayList<Type>) this.stack.clone();
-        return newstack;
-    }
-
-    /**
-     * Clears the stack.
-     */
-    public void clear(){
-        stack = new ArrayList<Type>();
-    }
-
-    /** @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() { return stack.hashCode(); }
-
-    /**
-     * Returns true if and only if this OperandStack
-     * equals another, meaning equal lengths and equal
-     * objects on the stacks.
-     */
-    @Override
-    public boolean equals(Object o){
-        if (!(o instanceof OperandStack)) {
-            return false;
-        }
-        OperandStack s = (OperandStack) o;
-        return this.stack.equals(s.stack);
-    }
-
-    /**
-     * Returns a (typed!) clone of this.
-     *
-     * @see #clone()
-     */
-    public OperandStack getClone(){
-        return (OperandStack) this.clone();
-    }
-
-    /**
-     * Returns true IFF this OperandStack is empty.
-   */
-    public boolean isEmpty(){
-        return stack.isEmpty();
-    }
-
-    /**
-     * Returns the number of stack slots this stack can hold.
-     */
-    public int maxStack(){
-        return this.maxStack;
-    }
-
-    /**
-     * Returns the element on top of the stack. The element is not popped off the stack!
-     */
-    public Type peek(){
-        return peek(0);
-    }
-
-    /**
-   * Returns the element that's i elements below the top element; that means,
-   * iff i==0 the top element is returned. The element is not popped off the stack!
-   */
-    public Type peek(int i){
-        return stack.get(size()-i-1);
-    }
-
-    /**
-     * Returns the element on top of the stack. The element is popped off the stack.
-     */
-    public Type pop(){
-        Type e = stack.remove(size()-1);
-        return e;
-    }
-
-    /**
-     * Pops i elements off the stack. ALWAYS RETURNS "null"!!!
-     */
-    public Type pop(int i){
-        for (int j=0; j<i; j++){
-            pop();
-        }
-        return null;
-    }
-
-    /**
-     * Pushes a Type object onto the stack.
-     */
-    public void push(Type type){
-        if (type == null) {
-            throw new AssertionViolatedException("Cannot push NULL onto OperandStack.");
-        }
-        if (type == Type.BOOLEAN || type == Type.CHAR || type == Type.BYTE || type == Type.SHORT){
-            throw new AssertionViolatedException("The OperandStack does not know about '"+type+"'; use Type.INT instead.");
-        }
-        if (slotsUsed() >= maxStack){
-            throw new AssertionViolatedException("OperandStack too small, should have thrown proper Exception elsewhere. Stack: "+this);
-        }
-        stack.add(type);
-    }
-
-    /**
-     * Returns the size of this OperandStack; that means, how many Type objects there are.
-     */
-    public int size(){
-        return stack.size();
-    }
-
-    /**
-     * Returns the number of stack slots used.
-     * @see #maxStack()
-     */    
-    public int slotsUsed(){
-        /*  XXX change this to a better implementation using a variable
-            that keeps track of the actual slotsUsed()-value monitoring
-            all push()es and pop()s.
-        */
-        int slots = 0;
-        for (int i=0; i<stack.size(); i++){
-            slots += peek(i).getSize();
-        }
-        return slots;
-    }
-
-    /**
-     * Returns a String representation of this OperandStack instance.
-     */
-    @Override
-    public String toString(){
-        StringBuilder sb = new StringBuilder();
-        sb.append("Slots used: ");
-        sb.append(slotsUsed());
-        sb.append(" MaxStack: ");
-        sb.append(maxStack);
-        sb.append(".\n");
-        for (int i=0; i<size(); i++){
-            sb.append(peek(i));
-            sb.append(" (Size: ");
-            sb.append(String.valueOf(peek(i).getSize()));
-            sb.append(")\n");
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Merges another stack state into this instance's stack state.
-     * See the Java Virtual Machine Specification, Second Edition, page 146: 4.9.2
-     * for details.
-     */
-    public void merge(OperandStack s){
-        try {
-        if ( (slotsUsed() != s.slotsUsed()) || (size() != s.size()) ) {
-            throw new StructuralCodeConstraintException("Cannot merge stacks of different size:\nOperandStack A:\n"+this+"\nOperandStack B:\n"+s);
-        }
-
-        for (int i=0; i<size(); i++){
-            // If the object _was_ initialized and we're supposed to merge
-            // in some uninitialized object, we reject the code (see vmspec2, 4.9.4, last paragraph).
-            if ( (! (stack.get(i) instanceof UninitializedObjectType)) && (s.stack.get(i) instanceof UninitializedObjectType) ){
-                throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object on the stack detected.");
-            }
-            // Even harder, we're not initialized but are supposed to broaden
-            // the known object type
-            if ( (!(stack.get(i).equals(s.stack.get(i)))) && (stack.get(i) instanceof UninitializedObjectType) && (!(s.stack.get(i) instanceof UninitializedObjectType))){
-                throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object on the stack detected.");
-            }
-            // on the other hand...
-            if (stack.get(i) instanceof UninitializedObjectType){ //if we have an uninitialized object here
-                if (! (s.stack.get(i) instanceof UninitializedObjectType)){ //that has been initialized by now
-                    stack.set(i, ((UninitializedObjectType) (stack.get(i))).getInitialized() ); //note that.
-                }
-            }
-            if (! stack.get(i).equals(s.stack.get(i))){
-                if (    (stack.get(i) instanceof ReferenceType) &&
-                            (s.stack.get(i) instanceof ReferenceType)  ){
-                    stack.set(i, ((ReferenceType) stack.get(i)).getFirstCommonSuperclass((ReferenceType) (s.stack.get(i))));
-                }
-                else{
-                    throw new StructuralCodeConstraintException("Cannot merge stacks of different types:\nStack A:\n"+this+"\nStack B:\n"+s);
-                }
-            }
-        }
-        } catch (ClassNotFoundException e) {
-        // FIXME: maybe not the best way to handle this
-        throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-    }
-
-    /**
-     * Replaces all occurences of u in this OperandStack instance
-     * with an "initialized" ObjectType.
-     */
-    public void initializeObject(UninitializedObjectType u){
-        for (int i=0; i<stack.size(); i++){
-            if (stack.get(i) == u){
-                stack.set(i, u.getInitialized());
-            }
-        }
-    }
-
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java b/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
deleted file mode 100644
index 6d8940e..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */
-package org.apache.bcel.verifier.structurals;
-
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-import java.util.Vector;
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.JsrInstruction;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.RET;
-import org.apache.bcel.generic.ReferenceType;
-import org.apache.bcel.generic.ReturnInstruction;
-import org.apache.bcel.generic.ReturnaddressType;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.verifier.PassVerifier;
-import org.apache.bcel.verifier.VerificationResult;
-import org.apache.bcel.verifier.Verifier;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
-import org.apache.bcel.verifier.exc.VerifierConstraintViolatedException;
-
-/**
- * This PassVerifier verifies a method of class file according to pass 3,
- * so-called structural verification as described in The Java Virtual Machine
- * Specification, 2nd edition.
- * More detailed information is to be found at the do_verify() method's
- * documentation.
- *
- * @version $Id$
- * @author Enver Haase
- * @see #do_verify()
- */
-
-public final class Pass3bVerifier extends PassVerifier{
-    /* TODO:    Throughout pass 3b, upper halves of LONG and DOUBLE
-                        are represented by Type.UNKNOWN. This should be changed
-                        in favour of LONG_Upper and DOUBLE_Upper as in pass 2. */
-
-    /**
-     * An InstructionContextQueue is a utility class that holds
-     * (InstructionContext, ArrayList) pairs in a Queue data structure.
-     * This is used to hold information about InstructionContext objects
-     * externally --- i.e. that information is not saved inside the
-     * InstructionContext object itself. This is useful to save the
-     * execution path of the symbolic execution of the
-     * Pass3bVerifier - this is not information
-     * that belongs into the InstructionContext object itself.
-     * Only at "execute()"ing
-     * time, an InstructionContext object will get the current information
-     * we have about its symbolic execution predecessors.
-     */
-    private static final class InstructionContextQueue{
-        private final List<InstructionContext> ics = new Vector<InstructionContext>();
-        private final List<ArrayList<InstructionContext>> ecs = new Vector<ArrayList<InstructionContext>>();
-        public void add(InstructionContext ic, ArrayList<InstructionContext> executionChain){
-            ics.add(ic);
-            ecs.add(executionChain);
-        }
-        public boolean isEmpty(){
-            return ics.isEmpty();
-        }
-        public void remove(int i){
-            ics.remove(i);
-            ecs.remove(i);
-        }
-        public InstructionContext getIC(int i){
-            return ics.get(i);
-        }
-        public ArrayList<InstructionContext> getEC(int i){
-            return ecs.get(i);
-        }
-        public int size(){
-            return ics.size();
-        }
-    } // end Inner Class InstructionContextQueue
-
-    /** In DEBUG mode, the verification algorithm is not randomized. */
-    private static final boolean DEBUG = true;
-
-    /** The Verifier that created this. */
-    private final Verifier myOwner;
-
-    /** The method number to verify. */
-    private final int method_no;
-
-    /**
-     * This class should only be instantiated by a Verifier.
-     *
-     * @see org.apache.bcel.verifier.Verifier
-     */
-    public Pass3bVerifier(Verifier owner, int method_no){
-        myOwner = owner;
-        this.method_no = method_no;
-    }
-
-    /**
-     * Whenever the outgoing frame
-     * situation of an InstructionContext changes, all its successors are
-     * put [back] into the queue [as if they were unvisited].
-   * The proof of termination is about the existence of a
-   * fix point of frame merging.
-     */
-    private void circulationPump(MethodGen m,ControlFlowGraph cfg, InstructionContext start, Frame vanillaFrame, InstConstraintVisitor icv, ExecutionVisitor ev){
-        final Random random = new Random();
-        InstructionContextQueue icq = new InstructionContextQueue();
-
-        start.execute(vanillaFrame, new ArrayList<InstructionContext>(), icv, ev);    // new ArrayList() <=>    no Instruction was executed before
-                                                                                                    //                                    => Top-Level routine (no jsr call before)
-        icq.add(start, new ArrayList<InstructionContext>());
-
-        // LOOP!
-        while (!icq.isEmpty()){
-            InstructionContext u;
-            ArrayList<InstructionContext> ec;
-            if (!DEBUG){
-                int r = random.nextInt(icq.size());
-                u = icq.getIC(r);
-                ec = icq.getEC(r);
-                icq.remove(r);
-            }
-            else{
-                u  = icq.getIC(0);
-                ec = icq.getEC(0);
-                icq.remove(0);
-            }
-
-            @SuppressWarnings("unchecked") // ec is of type ArrayList<InstructionContext>
-            ArrayList<InstructionContext> oldchain = (ArrayList<InstructionContext>) (ec.clone());
-            @SuppressWarnings("unchecked") // ec is of type ArrayList<InstructionContext>
-            ArrayList<InstructionContext> newchain = (ArrayList<InstructionContext>) (ec.clone());
-            newchain.add(u);
-
-            if ((u.getInstruction().getInstruction()) instanceof RET){
-//System.err.println(u);
-                // We can only follow _one_ successor, the one after the
-                // JSR that was recently executed.
-                RET ret = (RET) (u.getInstruction().getInstruction());
-                ReturnaddressType t = (ReturnaddressType) u.getOutFrame(oldchain).getLocals().get(ret.getIndex());
-                InstructionContext theSuccessor = cfg.contextOf(t.getTarget());
-
-                // Sanity check
-                InstructionContext lastJSR = null;
-                int skip_jsr = 0;
-                for (int ss=oldchain.size()-1; ss >= 0; ss--){
-                    if (skip_jsr < 0){
-                        throw new AssertionViolatedException("More RET than JSR in execution chain?!");
-                    }
-//System.err.println("+"+oldchain.get(ss));
-                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof JsrInstruction){
-                        if (skip_jsr == 0){
-                            lastJSR = oldchain.get(ss);
-                            break;
-                        }
-                        skip_jsr--;
-                    }
-                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof RET){
-                        skip_jsr++;
-                    }
-                }
-                if (lastJSR == null){
-                    throw new AssertionViolatedException("RET without a JSR before in ExecutionChain?! EC: '"+oldchain+"'.");
-                }
-                JsrInstruction jsr = (JsrInstruction) (lastJSR.getInstruction().getInstruction());
-                if ( theSuccessor != (cfg.contextOf(jsr.physicalSuccessor())) ){
-                    throw new AssertionViolatedException("RET '"+u.getInstruction()+"' info inconsistent: jump back to '"+theSuccessor+"' or '"+cfg.contextOf(jsr.physicalSuccessor())+"'?");
-                }
-
-                if (theSuccessor.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
-                    @SuppressWarnings("unchecked") // newchain is already of type ArrayList<InstructionContext>
-                    ArrayList<InstructionContext> newchainClone = (ArrayList<InstructionContext>) newchain.clone();
-                    icq.add(theSuccessor, newchainClone);
-                }
-            }
-            else{// "not a ret"
-
-                // Normal successors. Add them to the queue of successors.
-                InstructionContext[] succs = u.getSuccessors();
-                for (InstructionContext v : succs) {
-                    if (v.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
-                        @SuppressWarnings("unchecked") // newchain is already of type ArrayList<InstructionContext>
-                        ArrayList<InstructionContext> newchainClone = (ArrayList<InstructionContext>) newchain.clone();
-                        icq.add(v, newchainClone);
-                    }
-                }
-            }// end "not a ret"
-
-            // Exception Handlers. Add them to the queue of successors.
-            // [subroutines are never protected; mandated by JustIce]
-            ExceptionHandler[] exc_hds = u.getExceptionHandlers();
-            for (ExceptionHandler exc_hd : exc_hds) {
-                InstructionContext v = cfg.contextOf(exc_hd.getHandlerStart());
-                // TODO: the "oldchain" and "newchain" is used to determine the subroutine
-                // we're in (by searching for the last JSR) by the InstructionContext
-                // implementation. Therefore, we should not use this chain mechanism
-                // when dealing with exception handlers.
-                // Example: a JSR with an exception handler as its successor does not
-                // mean we're in a subroutine if we go to the exception handler.
-                // We should address this problem later; by now we simply "cut" the chain
-                // by using an empty chain for the exception handlers.
-                //if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(), new OperandStack (u.getOutFrame().getStack().maxStack(), (exc_hds[s].getExceptionType()==null? Type.THROWABLE : exc_hds[s].getExceptionType())) ), newchain), icv, ev){
-                    //icq.add(v, (ArrayList) newchain.clone());
-                if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(), new OperandStack (u.getOutFrame(oldchain).getStack().maxStack(), (exc_hd.getExceptionType()==null? Type.THROWABLE : exc_hd.getExceptionType())) ), new ArrayList<InstructionContext>(), icv, ev)){
-                    icq.add(v, new ArrayList<InstructionContext>());
-                }
-            }
-
-        }// while (!icq.isEmpty()) END
-
-        InstructionHandle ih = start.getInstruction();
-        do{
-            if ((ih.getInstruction() instanceof ReturnInstruction) && (!(cfg.isDead(ih)))) {
-                InstructionContext ic = cfg.contextOf(ih);
-                Frame f = ic.getOutFrame(new ArrayList<InstructionContext>()); // TODO: This is buggy, we check only the top-level return instructions this way. Maybe some maniac returns from a method when in a subroutine?
-                LocalVariables lvs = f.getLocals();
-                for (int i=0; i<lvs.maxLocals(); i++){
-                    if (lvs.get(i) instanceof UninitializedObjectType){
-                        this.addMessage("Warning: ReturnInstruction '"+ic+"' may leave method with an uninitialized object in the local variables array '"+lvs+"'.");
-                    }
-                }
-                OperandStack os = f.getStack();
-                for (int i=0; i<os.size(); i++){
-                    if (os.peek(i) instanceof UninitializedObjectType){
-                        this.addMessage("Warning: ReturnInstruction '"+ic+"' may leave method with an uninitialized object on the operand stack '"+os+"'.");
-                    }
-                }
-                //see JVM $4.8.2
-                Type returnedType = null;
-                OperandStack inStack = ic.getInFrame().getStack();
-                if (inStack.size() >= 1) {
-                    returnedType = inStack.peek();
-                } else {
-                    returnedType = Type.VOID;
-                }
-
-                if (returnedType != null) {
-                    if (returnedType instanceof ReferenceType) {
-                        try {
-                            if (!((ReferenceType) returnedType).isCastableTo(m.getReturnType())) {
-                                invalidReturnTypeError(returnedType, m);
-                            }
-                        } catch (ClassNotFoundException e) {
-                            // Don't know what do do now, so raise RuntimeException
-                            throw new RuntimeException(e);
-                        }
-                    } else if (!returnedType.equals(m.getReturnType().normalizeForStackOrLocal())) {
-                        invalidReturnTypeError(returnedType, m);
-                    }
-                }
-            }
-        } while ((ih = ih.getNext()) != null);
-
-     }
-
-    /**
-     * Throws an exception indicating the returned type is not compatible with the return type of the given method
-     * @throws StructuralCodeConstraintException always
-     */
-    public void invalidReturnTypeError(Type returnedType, MethodGen m){
-        throw new StructuralCodeConstraintException("Returned type "+returnedType+" does not match Method's return type "+m.getReturnType());
-    }
-
-    /**
-     * Pass 3b implements the data flow analysis as described in the Java Virtual
-     * Machine Specification, Second Edition.
-      * Later versions will use LocalVariablesInfo objects to verify if the
-      * verifier-inferred types and the class file's debug information (LocalVariables
-      * attributes) match [TODO].
-      *
-      * @see org.apache.bcel.verifier.statics.LocalVariablesInfo
-      * @see org.apache.bcel.verifier.statics.Pass2Verifier#getLocalVariablesInfo(int)
-      */
-    @Override
-    public VerificationResult do_verify(){
-        if (! myOwner.doPass3a(method_no).equals(VerificationResult.VR_OK)){
-            return VerificationResult.VR_NOTYET;
-        }
-
-        // Pass 3a ran before, so it's safe to assume the JavaClass object is
-        // in the BCEL repository.
-        JavaClass jc;
-        try {
-            jc = Repository.lookupClass(myOwner.getClassName());
-        } catch (ClassNotFoundException e) {
-            // FIXME: maybe not the best way to handle this
-            throw new AssertionViolatedException("Missing class: " + e, e);
-        }
-
-        ConstantPoolGen constantPoolGen = new ConstantPoolGen(jc.getConstantPool());
-        // Init Visitors
-        InstConstraintVisitor icv = new InstConstraintVisitor();
-        icv.setConstantPoolGen(constantPoolGen);
-
-        ExecutionVisitor ev = new ExecutionVisitor();
-        ev.setConstantPoolGen(constantPoolGen);
-
-        Method[] methods = jc.getMethods(); // Method no "method_no" exists, we ran Pass3a before on it!
-
-        try{
-
-            MethodGen mg = new MethodGen(methods[method_no], myOwner.getClassName(), constantPoolGen);
-
-            icv.setMethodGen(mg);
-
-            ////////////// DFA BEGINS HERE ////////////////
-            if (! (mg.isAbstract() || mg.isNative()) ){ // IF mg HAS CODE (See pass 2)
-
-                ControlFlowGraph cfg = new ControlFlowGraph(mg);
-
-                // Build the initial frame situation for this method.
-                Frame f = new Frame(mg.getMaxLocals(),mg.getMaxStack());
-                if ( !mg.isStatic() ){
-                    if (mg.getName().equals(Constants.CONSTRUCTOR_NAME)){
-                        Frame._this = new UninitializedObjectType(ObjectType.getInstance(jc.getClassName()));
-                        f.getLocals().set(0, Frame._this);
-                    }
-                    else{
-                        Frame._this = null;
-                        f.getLocals().set(0, ObjectType.getInstance(jc.getClassName()));
-                    }
-                }
-                Type[] argtypes = mg.getArgumentTypes();
-                int twoslotoffset = 0;
-                for (int j=0; j<argtypes.length; j++){
-                    if (argtypes[j] == Type.SHORT || argtypes[j] == Type.BYTE || argtypes[j] == Type.CHAR || argtypes[j] == Type.BOOLEAN){
-                        argtypes[j] = Type.INT;
-                    }
-                    f.getLocals().set(twoslotoffset + j + (mg.isStatic()?0:1), argtypes[j]);
-                    if (argtypes[j].getSize() == 2){
-                        twoslotoffset++;
-                        f.getLocals().set(twoslotoffset + j + (mg.isStatic()?0:1), Type.UNKNOWN);
-                    }
-                }
-                circulationPump(mg,cfg, cfg.contextOf(mg.getInstructionList().getStart()), f, icv, ev);
-            }
-        }
-        catch (VerifierConstraintViolatedException ce){
-            ce.extendMessage("Constraint violated in method '"+methods[method_no]+"':\n","");
-            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, ce.getMessage());
-        }
-        catch (RuntimeException re){
-            // These are internal errors
-
-            StringWriter sw = new StringWriter();
-            PrintWriter pw = new PrintWriter(sw);
-            re.printStackTrace(pw);
-
-            throw new AssertionViolatedException("Some RuntimeException occured while verify()ing class '"+jc.getClassName()+"', method '"+methods[method_no]+"'. Original RuntimeException's stack trace:\n---\n"+sw+"---\n", re);
-        }
-        return VerificationResult.VR_OK;
-    }
-
-    /** Returns the method number as supplied when instantiating. */
-    public int getMethodNo(){
-        return method_no;
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/Subroutine.java b/src/main/java/org/apache/bcel/verifier/structurals/Subroutine.java
deleted file mode 100644
index c6dac02..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/Subroutine.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import org.apache.bcel.generic.InstructionHandle;
-
-/**
- * This interface defines properties of JVM bytecode subroutines.
- * Note that it is 'abused' to maintain the top-level code in a
- * consistent fashion, too.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public interface Subroutine{
-    /**
-     * Returns all the JsrInstructions that have the
-     * first instruction of this subroutine as their target.
-     * <B>Must not be invoked on the 'top-level subroutine'.</B>
-     */
-    InstructionHandle[] getEnteringJsrInstructions();
-
-    /**
-     * Returns the one and only RET that leaves the subroutine.
-     * Note that JustIce has a pretty rigid notion of a subroutine.
-     * <B>Must not be invoked on the 'top-level subroutine'.</B>
-     *
-     * @see org.apache.bcel.verifier.structurals.Subroutines
-     */
-    InstructionHandle getLeavingRET();
-
-    /**
-     * Returns all instructions that together form this subroutine.
-     * Note that an instruction is part of exactly one subroutine
-     * (the top-level code is considered to be a special subroutine) -
-     * else it is not reachable at all (dead code).
-     */
-    InstructionHandle[] getInstructions();
-
-    /**
-     * Returns if the given InstructionHandle refers to an instruction
-     * that is part of this subroutine. This is a convenience method
-     * that saves iteration over the InstructionHandle objects returned
-     * by getInstructions().
-     *
-     * @see #getInstructions()
-     */
-    boolean contains(InstructionHandle inst);
-
-    /**
-     * Returns an int[] containing the indices of the local variable slots
-     * accessed by this Subroutine (read-accessed, write-accessed or both);
-     * local variables referenced by subroutines of this subroutine are
-     * not included.
-     *
-     * @see #getRecursivelyAccessedLocalsIndices()
-     */
-    int[] getAccessedLocalsIndices();
-
-    /**
-     * Returns an int[] containing the indices of the local variable slots
-     * accessed by this Subroutine (read-accessed, write-accessed or both);
-     * local variables referenced by subroutines of this subroutine are
-     * included.
-     *
-     * @see #getAccessedLocalsIndices()
-     */
-    int[] getRecursivelyAccessedLocalsIndices();
-
-    /**
-     * Returns the subroutines that are directly called from this subroutine.
-     */
-    Subroutine[] subSubs();
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java b/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
deleted file mode 100644
index 2927749..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
+++ /dev/null
@@ -1,637 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.bcel.generic.ASTORE;
-import org.apache.bcel.generic.ATHROW;
-import org.apache.bcel.generic.BranchInstruction;
-import org.apache.bcel.generic.CodeExceptionGen;
-import org.apache.bcel.generic.GotoInstruction;
-import org.apache.bcel.generic.IndexedInstruction;
-import org.apache.bcel.generic.Instruction;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.JsrInstruction;
-import org.apache.bcel.generic.LocalVariableInstruction;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.RET;
-import org.apache.bcel.generic.ReturnInstruction;
-import org.apache.bcel.generic.Select;
-import org.apache.bcel.verifier.exc.AssertionViolatedException;
-import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
-
-    /**
-     * Instances of this class contain information about the subroutines
-     * found in a code array of a method.
-     * This implementation considers the top-level (the instructions
-     * reachable without a JSR or JSR_W starting off from the first
-     * instruction in a code array of a method) being a special subroutine;
-     * see getTopLevel() for that.
-     * Please note that the definition of subroutines in the Java Virtual
-     * Machine Specification, Second Edition is somewhat incomplete.
-     * Therefore, JustIce uses an own, more rigid notion.
-     * Basically, a subroutine is a piece of code that starts at the target
-     * of a JSR of JSR_W instruction and ends at a corresponding RET
-     * instruction. Note also that the control flow of a subroutine
-     * may be complex and non-linear; and that subroutines may be nested.
-     * JustIce also mandates subroutines not to be protected by exception
-     * handling code (for the sake of control flow predictability).
-     * To understand JustIce's notion of subroutines, please read
-   *
-     * TODO: refer to the paper.
-     *
-     * @version $Id$
-     * @author Enver Haase
-     * @see #getTopLevel()
-     */
-public class Subroutines{
-    /**
-     * This inner class implements the Subroutine interface.
-     */
-    private class SubroutineImpl implements Subroutine{
-        /**
-         * UNSET, a symbol for an uninitialized localVariable
-         * field. This is used for the "top-level" Subroutine;
-         * i.e. no subroutine.
-         */
-        private static final int UNSET = -1;
-
-        /**
-         * The Local Variable slot where the first
-         * instruction of this subroutine (an ASTORE) stores
-         * the JsrInstruction's ReturnAddress in and
-         * the RET of this subroutine operates on.
-         */
-        private int localVariable = UNSET;
-
-        /** The instructions that belong to this subroutine. */
-        private final Set<InstructionHandle> instructions = new HashSet<InstructionHandle>(); // Elements: InstructionHandle
-
-        /*
-         * Refer to the Subroutine interface for documentation.
-         */
-        public boolean contains(InstructionHandle inst){
-            return instructions.contains(inst);
-        }
-
-        /**
-         * The JSR or JSR_W instructions that define this
-         * subroutine by targeting it.
-         */
-        private final Set<InstructionHandle> theJSRs = new HashSet<InstructionHandle>();
-
-        /**
-         * The RET instruction that leaves this subroutine.
-         */
-        private InstructionHandle theRET;
-
-        /**
-         * Returns a String representation of this object, merely
-         * for debugging purposes.
-         * (Internal) Warning: Verbosity on a problematic subroutine may cause
-         * stack overflow errors due to recursive subSubs() calls.
-         * Don't use this, then.
-         */
-        @Override
-        public String toString(){
-            String ret = "Subroutine: Local variable is '"+localVariable+"', JSRs are '"+theJSRs+"', RET is '"+theRET+"', Instructions: '"+instructions+"'.";
-
-            ret += " Accessed local variable slots: '";
-            int[] alv = getAccessedLocalsIndices();
-            for (int element : alv) {
-                ret += element+" ";
-            }
-            ret+="'.";
-
-            ret += " Recursively (via subsub...routines) accessed local variable slots: '";
-            alv = getRecursivelyAccessedLocalsIndices();
-            for (int element : alv) {
-                ret += element+" ";
-            }
-            ret+="'.";
-
-            return ret;
-        }
-
-        /**
-         * Sets the leaving RET instruction. Must be invoked after all instructions are added.
-         * Must not be invoked for top-level 'subroutine'.
-         */
-        void setLeavingRET(){
-            if (localVariable == UNSET){
-                throw new AssertionViolatedException("setLeavingRET() called for top-level 'subroutine' or forgot to set local variable first.");
-            }
-            InstructionHandle ret = null;
-            for (InstructionHandle actual : instructions) {
-                if (actual.getInstruction() instanceof RET){
-                    if (ret != null){
-                        throw new StructuralCodeConstraintException("Subroutine with more then one RET detected: '"+ret+"' and '"+actual+"'.");
-                    }
-                    ret = actual;
-                }
-            }
-            if (ret == null){
-                throw new StructuralCodeConstraintException("Subroutine without a RET detected.");
-            }
-            if (((RET) ret.getInstruction()).getIndex() != localVariable){
-                throw new StructuralCodeConstraintException("Subroutine uses '"+ret+"' which does not match the correct local variable '"+localVariable+"'.");
-            }
-            theRET = ret;
-        }
-
-        /*
-         * Refer to the Subroutine interface for documentation.
-         */
-        public InstructionHandle[] getEnteringJsrInstructions(){
-            if (this == TOPLEVEL) {
-                throw new AssertionViolatedException("getLeavingRET() called on top level pseudo-subroutine.");
-            }
-            InstructionHandle[] jsrs = new InstructionHandle[theJSRs.size()];
-            return theJSRs.toArray(jsrs);
-        }
-
-        /**
-         * Adds a new JSR or JSR_W that has this subroutine as its target.
-         */
-        public void addEnteringJsrInstruction(InstructionHandle jsrInst){
-            if ( (jsrInst == null) || (! (jsrInst.getInstruction() instanceof JsrInstruction))){
-                throw new AssertionViolatedException("Expecting JsrInstruction InstructionHandle.");
-            }
-            if (localVariable == UNSET){
-                throw new AssertionViolatedException("Set the localVariable first!");
-            }
-            // Something is wrong when an ASTORE is targeted that does not operate on the same local variable than the rest of the
-            // JsrInstruction-targets and the RET.
-            // (We don't know out leader here so we cannot check if we're really targeted!)
-            if (localVariable != ((ASTORE) (((JsrInstruction) jsrInst.getInstruction()).getTarget().getInstruction())).getIndex()){
-                throw new AssertionViolatedException("Setting a wrong JsrInstruction.");
-            }
-            theJSRs.add(jsrInst);
-        }
-
-        /*
-         * Refer to the Subroutine interface for documentation.
-         */
-        public InstructionHandle getLeavingRET(){
-            if (this == TOPLEVEL) {
-                throw new AssertionViolatedException("getLeavingRET() called on top level pseudo-subroutine.");
-            }
-            return theRET;
-        }
-
-        /*
-         * Refer to the Subroutine interface for documentation.
-         */
-        public InstructionHandle[] getInstructions(){
-            InstructionHandle[] ret = new InstructionHandle[instructions.size()];
-            return instructions.toArray(ret);
-        }
-
-        /*
-         * Adds an instruction to this subroutine.
-         * All instructions must have been added before invoking setLeavingRET().
-         * @see #setLeavingRET
-         */
-        void addInstruction(InstructionHandle ih){
-            if (theRET != null){
-                throw new AssertionViolatedException("All instructions must have been added before invoking setLeavingRET().");
-            }
-            instructions.add(ih);
-        }
-
-        /* Satisfies Subroutine.getRecursivelyAccessedLocalsIndices(). */
-        public int[] getRecursivelyAccessedLocalsIndices(){
-            Set<Integer> s = new HashSet<Integer>();
-            int[] lvs = getAccessedLocalsIndices();
-            for (int lv : lvs) {
-                s.add(Integer.valueOf(lv));
-            }
-            _getRecursivelyAccessedLocalsIndicesHelper(s, this.subSubs());
-            int[] ret = new int[s.size()];
-            int j=-1;
-            for (Integer index : s) {
-                j++;
-                ret[j] = index.intValue();
-            }
-            return ret;
-        }
-
-        /**
-         * A recursive helper method for getRecursivelyAccessedLocalsIndices().
-         * @see #getRecursivelyAccessedLocalsIndices()
-         */
-        private void _getRecursivelyAccessedLocalsIndicesHelper(Set<Integer> s, Subroutine[] subs){
-            for (Subroutine sub : subs) {
-                int[] lvs = sub.getAccessedLocalsIndices();
-                for (int lv : lvs) {
-                    s.add(Integer.valueOf(lv));
-                }
-                if(sub.subSubs().length != 0){
-                    _getRecursivelyAccessedLocalsIndicesHelper(s, sub.subSubs());
-                }
-            }
-        }
-
-        /*
-         * Satisfies Subroutine.getAccessedLocalIndices().
-         */
-        public int[] getAccessedLocalsIndices(){
-            //TODO: Implement caching.
-            Set<Integer> acc = new HashSet<Integer>();
-            if (theRET == null && this != TOPLEVEL){
-                throw new AssertionViolatedException("This subroutine object must be built up completely before calculating accessed locals.");
-            }
-            {
-                for (InstructionHandle ih : instructions) {
-                    // RET is not a LocalVariableInstruction in the current version of BCEL.
-                    if (ih.getInstruction() instanceof LocalVariableInstruction || ih.getInstruction() instanceof RET){
-                        int idx = ((IndexedInstruction) (ih.getInstruction())).getIndex();
-                        acc.add(Integer.valueOf(idx));
-                        // LONG? DOUBLE?.
-                        try{
-                            // LocalVariableInstruction instances are typed without the need to look into
-                            // the constant pool.
-                            if (ih.getInstruction() instanceof LocalVariableInstruction){
-                                int s = ((LocalVariableInstruction) ih.getInstruction()).getType(null).getSize();
-                                if (s==2) {
-                                    acc.add(Integer.valueOf(idx+1));
-                                }
-                            }
-                        }
-                        catch(RuntimeException re){
-                            throw new AssertionViolatedException("Oops. BCEL did not like NULL as a ConstantPoolGen object.", re);
-                        }
-                    }
-                }
-            }
-
-            {
-                int[] ret = new int[acc.size()];
-                int j=-1;
-                for (Integer accessedLocal : acc) {
-                    j++;
-                    ret[j] = accessedLocal.intValue();
-                }
-                return ret;
-            }
-        }
-
-        /*
-         * Satisfies Subroutine.subSubs().
-         */
-        public Subroutine[] subSubs(){
-            Set<Subroutine> h = new HashSet<Subroutine>();
-
-            for (InstructionHandle ih : instructions) {
-                Instruction inst = ih.getInstruction();
-                if (inst instanceof JsrInstruction){
-                    InstructionHandle targ = ((JsrInstruction) inst).getTarget();
-                    h.add(getSubroutine(targ));
-                }
-            }
-            Subroutine[] ret = new Subroutine[h.size()];
-            return h.toArray(ret);
-        }
-
-        /*
-         * Sets the local variable slot the ASTORE that is targeted
-         * by the JsrInstructions of this subroutine operates on.
-         * This subroutine's RET operates on that same local variable
-         * slot, of course.
-         */
-        void setLocalVariable(int i){
-            if (localVariable != UNSET){
-                throw new AssertionViolatedException("localVariable set twice.");
-            }
-            localVariable = i;
-        }
-
-        /**
-         * The default constructor.
-         */
-        public SubroutineImpl(){
-        }
-
-    }// end Inner Class SubrouteImpl
-
-    //Node coloring constants
-    private static final Integer WHITE = Integer.valueOf(0);
-    private static final Integer GRAY = Integer.valueOf(1);
-    private static final Integer BLACK = Integer.valueOf(2);
-
-    /**
-     * The map containing the subroutines found.
-     * Key: InstructionHandle of the leader of the subroutine.
-     * Elements: SubroutineImpl objects.
-     */
-    private final Map<InstructionHandle, Subroutine> subroutines = new HashMap<InstructionHandle, Subroutine>();
-
-    /**
-     * This is referring to a special subroutine, namely the
-     * top level. This is not really a subroutine but we use
-     * it to distinguish between top level instructions and
-     * unreachable instructions.
-     */
-    public final Subroutine TOPLEVEL;
-
-    /**
-     * Constructor.
-     * @param mg A MethodGen object representing method to
-     * create the Subroutine objects of.
-     */
-    public Subroutines(MethodGen mg){
-
-        InstructionHandle[] all = mg.getInstructionList().getInstructionHandles();
-        CodeExceptionGen[] handlers = mg.getExceptionHandlers();
-
-        // Define our "Toplevel" fake subroutine.
-        TOPLEVEL = new SubroutineImpl();
-
-        // Calculate "real" subroutines.
-        Set<InstructionHandle> sub_leaders = new HashSet<InstructionHandle>(); // Elements: InstructionHandle
-        for (InstructionHandle element : all) {
-            Instruction inst = element.getInstruction();
-            if (inst instanceof JsrInstruction){
-                sub_leaders.add(((JsrInstruction) inst).getTarget());
-            }
-        }
-
-        // Build up the database.
-        for (InstructionHandle astore : sub_leaders) {
-            SubroutineImpl sr = new SubroutineImpl();
-            sr.setLocalVariable( ((ASTORE) (astore.getInstruction())).getIndex() );
-            subroutines.put(astore, sr);
-        }
-
-        // Fake it a bit. We want a virtual "TopLevel" subroutine.
-        subroutines.put(all[0], TOPLEVEL);
-        sub_leaders.add(all[0]);
-
-        // Tell the subroutines about their JsrInstructions.
-        // Note that there cannot be a JSR targeting the top-level
-        // since "Jsr 0" is disallowed in Pass 3a.
-        // Instructions shared by a subroutine and the toplevel are
-        // disallowed and checked below, after the BFS.
-        for (InstructionHandle element : all) {
-            Instruction inst = element.getInstruction();
-            if (inst instanceof JsrInstruction){
-                InstructionHandle leader = ((JsrInstruction) inst).getTarget();
-                ((SubroutineImpl) getSubroutine(leader)).addEnteringJsrInstruction(element);
-            }
-        }
-
-        // Now do a BFS from every subroutine leader to find all the
-        // instructions that belong to a subroutine.
-        Set<InstructionHandle> instructions_assigned = new HashSet<InstructionHandle>(); // we don't want to assign an instruction to two or more Subroutine objects.
-
-        Map<InstructionHandle, Integer> colors = new HashMap<InstructionHandle, Integer>(); //Graph colouring. Key: InstructionHandle, Value: Integer .
-
-        List<InstructionHandle> Q = new ArrayList<InstructionHandle>();        
-        for (InstructionHandle actual : sub_leaders) {
-            // Do some BFS with "actual" as the root of the graph.
-            // Init colors
-            for (InstructionHandle element : all) {
-                colors.put(element, WHITE);
-            }
-            colors.put(actual, GRAY);
-            // Init Queue
-
-            Q.clear();
-            Q.add(actual); // add(Obj) adds to the end, remove(0) removes from the start.
-
-            /* BFS ALGORITHM MODIFICATION: Start out with multiple "root" nodes, as exception handlers are starting points of top-level code, too. [why top-level? TODO: Refer to the special JustIce notion of subroutines.]*/
-            if (actual == all[0]){
-                for (CodeExceptionGen handler : handlers) {
-                    colors.put(handler.getHandlerPC(), GRAY);
-                    Q.add(handler.getHandlerPC());
-                }
-            }
-            /* CONTINUE NORMAL BFS ALGORITHM */
-
-            // Loop until Queue is empty
-            while (Q.size() != 0){
-                InstructionHandle u = Q.remove(0);
-                InstructionHandle[] successors = getSuccessors(u);
-                for (InstructionHandle successor : successors) {
-                    if (colors.get(successor) == WHITE){
-                        colors.put(successor, GRAY);
-                        Q.add(successor);
-                    }
-                }
-                colors.put(u, BLACK);
-            }
-            // BFS ended above.
-            for (InstructionHandle element : all) {
-                if (colors.get(element) == BLACK){
-                    ((SubroutineImpl) (actual==all[0]?getTopLevel():getSubroutine(actual))).addInstruction(element);
-                    if (instructions_assigned.contains(element)){
-                        throw new StructuralCodeConstraintException("Instruction '"+element+"' is part of more than one subroutine (or of the top level and a subroutine).");
-                    }
-                    instructions_assigned.add(element);
-                }
-            }
-            if (actual != all[0]){// If we don't deal with the top-level 'subroutine'
-                ((SubroutineImpl) getSubroutine(actual)).setLeavingRET();
-            }
-        }
-
-        // Now make sure no instruction of a Subroutine is protected by exception handling code
-        // as is mandated by JustIces notion of subroutines.
-        for (CodeExceptionGen handler : handlers) {
-            InstructionHandle _protected = handler.getStartPC();
-            while (_protected != handler.getEndPC().getNext()){// Note the inclusive/inclusive notation of "generic API" exception handlers!
-                for (Subroutine sub : subroutines.values()) {
-                    if (sub != subroutines.get(all[0])){    // We don't want to forbid top-level exception handlers.
-                        if (sub.contains(_protected)){
-                            throw new StructuralCodeConstraintException("Subroutine instruction '"+_protected+"' is protected by an exception handler, '"+handler+"'. This is forbidden by the JustIce verifier due to its clear definition of subroutines.");
-                        }
-                    }
-                }
-                _protected = _protected.getNext();
-            }
-        }
-
-        // Now make sure no subroutine is calling a subroutine
-        // that uses the same local variable for the RET as themselves
-        // (recursively).
-        // This includes that subroutines may not call themselves
-        // recursively, even not through intermediate calls to other
-        // subroutines.
-        noRecursiveCalls(getTopLevel(), new HashSet<Integer>());
-
-    }
-
-    /**
-     * This (recursive) utility method makes sure that
-     * no subroutine is calling a subroutine
-     * that uses the same local variable for the RET as themselves
-     * (recursively).
-     * This includes that subroutines may not call themselves
-     * recursively, even not through intermediate calls to other
-     * subroutines.
-     *
-     * @throws StructuralCodeConstraintException if the above constraint is not satisfied.
-     */
-    private void noRecursiveCalls(Subroutine sub, Set<Integer> set){
-        Subroutine[] subs = sub.subSubs();
-
-        for (Subroutine sub2 : subs) {
-            int index = ((RET) (sub2.getLeavingRET().getInstruction())).getIndex();
-
-            if (!set.add(Integer.valueOf(index))){
-                // Don't use toString() here because of possibly infinite recursive subSubs() calls then.
-                SubroutineImpl si = (SubroutineImpl) sub2;
-                throw new StructuralCodeConstraintException("Subroutine with local variable '"+si.localVariable+"', JSRs '"+si.theJSRs+"', RET '"+si.theRET+"' is called by a subroutine which uses the same local variable index as itself; maybe even a recursive call? JustIce's clean definition of a subroutine forbids both.");
-            }
-
-            noRecursiveCalls(sub2, set);
-
-            set.remove(Integer.valueOf(index));
-        }
-    } 
-
-    /**
-     * Returns the Subroutine object associated with the given
-     * leader (that is, the first instruction of the subroutine).
-     * You must not use this to get the top-level instructions
-     * modeled as a Subroutine object.
-     *
-     * @see #getTopLevel()
-     */
-    public Subroutine getSubroutine(InstructionHandle leader){
-        Subroutine ret = subroutines.get(leader);
-
-        if (ret == null){
-            throw new AssertionViolatedException("Subroutine requested for an InstructionHandle that is not a leader of a subroutine.");
-        }
-
-        if (ret == TOPLEVEL){
-            throw new AssertionViolatedException("TOPLEVEL special subroutine requested; use getTopLevel().");
-        }
-
-        return ret;
-    }
-
-    /**
-     * Returns the subroutine object associated with the
-     * given instruction. This is a costly operation, you
-     * should consider using getSubroutine(InstructionHandle).
-     * Returns 'null' if the given InstructionHandle lies
-     * in so-called 'dead code', i.e. code that can never
-     * be executed.
-     *
-     * @see #getSubroutine(InstructionHandle)
-     * @see #getTopLevel()
-     */
-    public Subroutine subroutineOf(InstructionHandle any){
-        for (Subroutine s : subroutines.values()) {
-            if (s.contains(any)) {
-                return s;
-            }
-        }
-System.err.println("DEBUG: Please verify '"+any.toString(true)+"' lies in dead code.");
-        return null;
-        //throw new AssertionViolatedException("No subroutine for InstructionHandle found (DEAD CODE?).");
-    }
-
-    /**
-     * For easy handling, the piece of code that is <B>not</B> a
-     * subroutine, the top-level, is also modeled as a Subroutine
-     * object.
-     * It is a special Subroutine object where <B>you must not invoke
-     * getEnteringJsrInstructions() or getLeavingRET()</B>.
-     *
-     * @see Subroutine#getEnteringJsrInstructions()
-     * @see Subroutine#getLeavingRET()
-     */
-    public Subroutine getTopLevel(){
-        return TOPLEVEL;
-    }
-    /**
-     * A utility method that calculates the successors of a given InstructionHandle
-     * <B>in the same subroutine</B>. That means, a RET does not have any successors
-     * as defined here. A JsrInstruction has its physical successor as its successor
-     * (opposed to its target) as defined here.
-     */
-    private static InstructionHandle[] getSuccessors(InstructionHandle instruction){
-        final InstructionHandle[] empty = new InstructionHandle[0];
-        final InstructionHandle[] single = new InstructionHandle[1];
-
-        Instruction inst = instruction.getInstruction();
-
-        if (inst instanceof RET){
-            return empty;
-        }
-
-        // Terminates method normally.
-        if (inst instanceof ReturnInstruction){
-            return empty;
-        }
-
-        // Terminates method abnormally, because JustIce mandates
-        // subroutines not to be protected by exception handlers.
-        if (inst instanceof ATHROW){
-            return empty;
-        }
-
-        // See method comment.
-        if (inst instanceof JsrInstruction){
-            single[0] = instruction.getNext();
-            return single;
-        }
-
-        if (inst instanceof GotoInstruction){
-            single[0] = ((GotoInstruction) inst).getTarget();
-            return single;
-        }
-
-        if (inst instanceof BranchInstruction){
-            if (inst instanceof Select){
-                // BCEL's getTargets() returns only the non-default targets,
-                // thanks to Eli Tilevich for reporting.
-                InstructionHandle[] matchTargets = ((Select) inst).getTargets();
-                InstructionHandle[] ret = new InstructionHandle[matchTargets.length+1];
-                ret[0] = ((Select) inst).getTarget();
-                System.arraycopy(matchTargets, 0, ret, 1, matchTargets.length);
-                return ret;
-            }
-            final InstructionHandle[] pair = new InstructionHandle[2];
-            pair[0] = instruction.getNext();
-            pair[1] = ((BranchInstruction) inst).getTarget();
-            return pair;
-        }
-
-        // default case: Fall through.        
-        single[0] = instruction.getNext();
-        return single;
-    }
-
-    /**
-     * Returns a String representation of this object; merely for debugging puposes.
-     */
-    @Override
-    public String toString(){
-        return "---\n"+subroutines+"\n---\n";
-    }
-}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java b/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java
deleted file mode 100644
index da203cd..0000000
--- a/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- *
- */ 
-package org.apache.bcel.verifier.structurals;
-
-
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.ReferenceType;
-
-/**
- * This class represents an uninitialized object type; see The Java
- * Virtual Machine Specification, Second Edition, page 147: 4.9.4 for
- * more details.
- *
- * @version $Id$
- * @author Enver Haase
- */
-public class UninitializedObjectType extends ReferenceType implements Constants{
-
-    private static final long serialVersionUID = -1228341777713117641L;
-    /** The "initialized" version. */
-    private final ObjectType initialized;
-
-    /** Creates a new instance. */
-    public UninitializedObjectType(ObjectType t){
-        super(T_UNKNOWN, "<UNINITIALIZED OBJECT OF TYPE '"+t.getClassName()+"'>");
-        initialized = t;
-    }
-
-    /**
-     * Returns the ObjectType of the same class as the one of the uninitialized object
-     * represented by this UninitializedObjectType instance.
-     */
-    public ObjectType getInitialized(){
-        return initialized;
-    }
-
-    /** @return a hash code value for the object.
-     */
-    @Override
-    public int hashCode() { return initialized.hashCode(); }
-
-    /**
-     * Returns true on equality of this and o.
-     * Equality means the ObjectType instances of "initialized"
-     * equal one another in this and the o instance.
-     *
-     */
-    @Override
-    public boolean equals(Object o){
-        if (! (o instanceof UninitializedObjectType)) {
-            return false;
-        }
-        return initialized.equals(((UninitializedObjectType)o).initialized);
-    }
-}
diff --git a/src/main/java/org/apache/commons/bcel6/Constants.java b/src/main/java/org/apache/commons/bcel6/Constants.java
new file mode 100644
index 0000000..4ddd46c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/Constants.java
@@ -0,0 +1,1533 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6;
+
+/**
+ * Constants for the project, mostly defined in the JVM specification.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface Constants {
+
+  /** Major version number of class files for Java 1.1.
+   *  @see #MINOR_1_1
+   *  */
+  public final static short MAJOR_1_1 = 45;
+
+  /** Minor version number of class files for Java 1.1.
+   *  @see #MAJOR_1_1
+   *  */
+  public final static short MINOR_1_1 = 3;
+
+  /** Major version number of class files for Java 1.2.
+   *  @see #MINOR_1_2
+   *  */
+  public final static short MAJOR_1_2 = 46;
+
+  /** Minor version number of class files for Java 1.2.
+   *  @see #MAJOR_1_2
+   *  */
+  public final static short MINOR_1_2 = 0;
+
+  /** Major version number of class files for Java 1.2.
+   *  @see #MINOR_1_2
+   *  */
+  public final static short MAJOR_1_3 = 47;
+
+  /** Minor version number of class files for Java 1.3.
+   *  @see #MAJOR_1_3
+   *  */
+  public final static short MINOR_1_3 = 0;
+
+  /** Major version number of class files for Java 1.3.
+   *  @see #MINOR_1_3
+   *  */
+  public final static short MAJOR_1_4 = 48;
+
+  /** Minor version number of class files for Java 1.4.
+   *  @see #MAJOR_1_4
+   *  */
+  public final static short MINOR_1_4 = 0;
+
+  /** Major version number of class files for Java 1.4.
+   *  @see #MINOR_1_4
+   *  */
+  public final static short MAJOR_1_5 = 49;
+
+  /** Minor version number of class files for Java 1.5.
+   *  @see #MAJOR_1_5
+   *  */
+  public final static short MINOR_1_5 = 0;
+
+  /** Major version number of class files for Java 1.6.
+   *  @see #MINOR_1_6
+   *  */
+  public final static short MAJOR_1_6 = 50;
+
+  /** Minor version number of class files for Java 1.6.
+   *  @see #MAJOR_1_6
+   *  */
+  public final static short MINOR_1_6 = 0;
+
+  /** Major version number of class files for Java 1.7.
+   *  @see #MINOR_1_7
+   *  */
+  public final static short MAJOR_1_7 = 51;
+
+  /** Minor version number of class files for Java 1.7.
+   *  @see #MAJOR_1_7
+   *  */
+  public final static short MINOR_1_7 = 0;
+
+  /** Major version number of class files for Java 1.8.
+   *  @see #MINOR_1_8
+   *  */
+  public final static short MAJOR_1_8 = 52;
+
+  /** Minor version number of class files for Java 1.8.
+   *  @see #MAJOR_1_8
+   *  */
+  public final static short MINOR_1_8 = 0;
+
+  /** Default major version number.  Class file is for Java 1.1.
+   *  @see #MAJOR_1_1
+   *  */
+  public final static short MAJOR = MAJOR_1_1;
+
+  /** Default major version number.  Class file is for Java 1.1.
+   *  @see #MAJOR_1_1
+   *  */
+  public final static short MINOR     = MINOR_1_1;
+
+  /** Maximum value for an unsigned short.
+   */
+  public final static int MAX_SHORT = 65535; // 2^16 - 1
+
+  /** Maximum value for an unsigned byte.
+   */
+  public final static int MAX_BYTE  = 255; // 2^8 - 1
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see "<a href='http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.5'>Flag definitions for Fields in the Java Virtual Machine Specification (Java SE 8 Edition).</a>"
+   *  @see "<a href='http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.6'>Flag definitions for Methods in the Java Virtual Machine Specification (Java SE 8 Edition).</a>"
+   *  @see "<a href='http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.6-300-D.1-D.1'>Flag definitions for Classes in the Java Virtual Machine Specification (Java SE 8 Edition).</a>"
+   */
+  public final static short ACC_PUBLIC       = 0x0001;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_PRIVATE      = 0x0002;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_PROTECTED    = 0x0004;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_STATIC       = 0x0008;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_FINAL        = 0x0010;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_SYNCHRONIZED = 0x0020;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_VOLATILE     = 0x0040;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_BRIDGE       = 0x0040;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_TRANSIENT    = 0x0080;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_VARARGS      = 0x0080;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_NATIVE       = 0x0100;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_INTERFACE    = 0x0200;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_ABSTRACT     = 0x0400;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_STRICT       = 0x0800;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_SYNTHETIC    = 0x1000;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_ANNOTATION   = 0x2000;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_ENUM         = 0x4000;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_MANDATED     = (short) 0x8000;
+
+  // Applies to classes compiled by new compilers only
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short ACC_SUPER        = 0x0020;
+
+  /** One of the access flags for fields, methods, or classes.
+   *  @see #ACC_PUBLIC
+   */
+  public final static short MAX_ACC_FLAG     = ACC_ENUM;
+
+  /** The names of the access flags. */
+  public final static String[] ACCESS_NAMES = {
+    "public", "private", "protected", "static", "final", "synchronized",
+    "volatile", "transient", "native", "interface", "abstract", "strictfp",
+    "synthetic", "annotation", "enum"
+  };
+
+  /** Marks a constant pool entry as type UTF-8.  */
+  public final static byte CONSTANT_Utf8               = 1;
+
+  /** Marks a constant pool entry as type Integer.  */
+  public final static byte CONSTANT_Integer            = 3;
+
+  /** Marks a constant pool entry as type Float.  */
+  public final static byte CONSTANT_Float              = 4;
+
+  /** Marks a constant pool entry as type Long.  */
+  public final static byte CONSTANT_Long               = 5;
+
+  /** Marks a constant pool entry as type Double.  */
+  public final static byte CONSTANT_Double             = 6;
+
+  /** Marks a constant pool entry as a Class.  */
+  public final static byte CONSTANT_Class              = 7;
+
+  /** Marks a constant pool entry as a Field Reference.  */
+  public final static byte CONSTANT_Fieldref           = 9;
+
+  /** Marks a constant pool entry as type String.  */
+  public final static byte CONSTANT_String             = 8;
+
+  /** Marks a constant pool entry as a Method Reference.  */
+  public final static byte CONSTANT_Methodref          = 10;
+
+  /** Marks a constant pool entry as an Interface Method Reference.  */
+  public final static byte CONSTANT_InterfaceMethodref = 11;
+
+  /** Marks a constant pool entry as a name and type.  */
+  public final static byte CONSTANT_NameAndType        = 12;
+
+  /** Marks a constant pool entry as a Method Handle.  */
+  public static final byte CONSTANT_MethodHandle       = 15;
+
+  /** Marks a constant pool entry as a Method Type.    */
+  public static final byte CONSTANT_MethodType         = 16;
+
+  /** Marks a constant pool entry as an Invoke Dynamic */
+  public static final byte CONSTANT_InvokeDynamic      = 18;
+
+  /** The names of the types of entries in a constant pool. */
+  public static final String[] CONSTANT_NAMES = {
+    "", "CONSTANT_Utf8", "", "CONSTANT_Integer",
+    "CONSTANT_Float", "CONSTANT_Long", "CONSTANT_Double",
+    "CONSTANT_Class", "CONSTANT_String", "CONSTANT_Fieldref",
+    "CONSTANT_Methodref", "CONSTANT_InterfaceMethodref",
+    "CONSTANT_NameAndType", "", "", "CONSTANT_MethodHandle",
+    "CONSTANT_MethodType", "", "CONSTANT_InvokeDynamic" };
+
+  /** The name of the static initializer, also called &quot;class
+   *  initialization method&quot; or &quot;interface initialization
+   *   method&quot;. This is &quot;&lt;clinit&gt;&quot;.
+   */
+  public final static String STATIC_INITIALIZER_NAME = "<clinit>";
+
+  /** The name of every constructor method in a class, also called
+   * &quot;instance initialization method&quot;. This is &quot;&lt;init&gt;&quot;.
+   */
+  public final static String CONSTRUCTOR_NAME = "<init>";
+
+  /** The names of the interfaces implemented by arrays */
+  public final static String[] INTERFACES_IMPLEMENTED_BY_ARRAYS = {"java.lang.Cloneable", "java.io.Serializable"};
+
+  /**
+   * One of the limitations of the Java Virtual Machine.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.11"> The Java Virtual Machine Specification, Second Edition, page 152, chapter 4.10.</a>
+   */
+  public static final int MAX_CP_ENTRIES     = 65535;
+
+  /**
+   * One of the limitations of the Java Virtual Machine.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.11"> The Java Virtual Machine Specification, Second Edition, page 152, chapter 4.10.</a>
+   */
+  public static final int MAX_CODE_SIZE      = 65536; //bytes
+
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short NOP              = 0;
+
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ACONST_NULL      = 1;
+
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ICONST_M1        = 2;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ICONST_0         = 3;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ICONST_1         = 4;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ICONST_2         = 5;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ICONST_3         = 6;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ICONST_4         = 7;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ICONST_5         = 8;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LCONST_0         = 9;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LCONST_1         = 10;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FCONST_0         = 11;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FCONST_1         = 12;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FCONST_2         = 13;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DCONST_0         = 14;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DCONST_1         = 15;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short BIPUSH           = 16;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short SIPUSH           = 17;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LDC              = 18;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LDC_W            = 19;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LDC2_W           = 20;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ILOAD            = 21;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LLOAD            = 22;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FLOAD            = 23;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DLOAD            = 24;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ALOAD            = 25;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ILOAD_0          = 26;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ILOAD_1          = 27;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ILOAD_2          = 28;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ILOAD_3          = 29;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LLOAD_0          = 30;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LLOAD_1          = 31;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LLOAD_2          = 32;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LLOAD_3          = 33;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FLOAD_0          = 34;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FLOAD_1          = 35;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FLOAD_2          = 36;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FLOAD_3          = 37;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DLOAD_0          = 38;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DLOAD_1          = 39;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DLOAD_2          = 40;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DLOAD_3          = 41;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ALOAD_0          = 42;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ALOAD_1          = 43;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ALOAD_2          = 44;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ALOAD_3          = 45;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IALOAD           = 46;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LALOAD           = 47;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FALOAD           = 48;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DALOAD           = 49;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short AALOAD           = 50;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short BALOAD           = 51;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short CALOAD           = 52;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short SALOAD           = 53;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ISTORE           = 54;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LSTORE           = 55;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FSTORE           = 56;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DSTORE           = 57;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ASTORE           = 58;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ISTORE_0         = 59;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ISTORE_1         = 60;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ISTORE_2         = 61;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ISTORE_3         = 62;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LSTORE_0         = 63;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LSTORE_1         = 64;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LSTORE_2         = 65;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LSTORE_3         = 66;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FSTORE_0         = 67;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FSTORE_1         = 68;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FSTORE_2         = 69;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FSTORE_3         = 70;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DSTORE_0         = 71;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DSTORE_1         = 72;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DSTORE_2         = 73;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DSTORE_3         = 74;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ASTORE_0         = 75;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ASTORE_1         = 76;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ASTORE_2         = 77;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ASTORE_3         = 78;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IASTORE          = 79;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LASTORE          = 80;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FASTORE          = 81;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DASTORE          = 82;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short AASTORE          = 83;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short BASTORE          = 84;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short CASTORE          = 85;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short SASTORE          = 86;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short POP              = 87;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short POP2             = 88;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DUP              = 89;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DUP_X1           = 90;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DUP_X2           = 91;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DUP2             = 92;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DUP2_X1          = 93;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DUP2_X2          = 94;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short SWAP             = 95;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IADD             = 96;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LADD             = 97;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FADD             = 98;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DADD             = 99;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ISUB             = 100;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LSUB             = 101;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FSUB             = 102;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DSUB             = 103;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IMUL             = 104;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LMUL             = 105;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FMUL             = 106;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DMUL             = 107;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IDIV             = 108;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LDIV             = 109;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FDIV             = 110;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DDIV             = 111;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IREM             = 112;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LREM             = 113;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FREM             = 114;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DREM             = 115;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INEG             = 116;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LNEG             = 117;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FNEG             = 118;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DNEG             = 119;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ISHL             = 120;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LSHL             = 121;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ISHR             = 122;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LSHR             = 123;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IUSHR            = 124;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LUSHR            = 125;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IAND             = 126;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LAND             = 127;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IOR              = 128;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LOR              = 129;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IXOR             = 130;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LXOR             = 131;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IINC             = 132;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short I2L              = 133;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short I2F              = 134;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short I2D              = 135;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short L2I              = 136;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short L2F              = 137;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short L2D              = 138;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short F2I              = 139;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short F2L              = 140;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short F2D              = 141;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short D2I              = 142;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short D2L              = 143;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short D2F              = 144;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short I2B              = 145;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INT2BYTE         = 145; // Old notion
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short I2C              = 146;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INT2CHAR         = 146; // Old notion
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short I2S              = 147;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INT2SHORT        = 147; // Old notion
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LCMP             = 148;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FCMPL            = 149;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FCMPG            = 150;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DCMPL            = 151;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DCMPG            = 152;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IFEQ             = 153;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IFNE             = 154;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IFLT             = 155;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IFGE             = 156;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IFGT             = 157;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IFLE             = 158;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IF_ICMPEQ        = 159;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IF_ICMPNE        = 160;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IF_ICMPLT        = 161;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IF_ICMPGE        = 162;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IF_ICMPGT        = 163;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IF_ICMPLE        = 164;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IF_ACMPEQ        = 165;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IF_ACMPNE        = 166;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short GOTO             = 167;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short JSR              = 168;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short RET              = 169;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short TABLESWITCH      = 170;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LOOKUPSWITCH     = 171;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IRETURN          = 172;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short LRETURN          = 173;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short FRETURN          = 174;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short DRETURN          = 175;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ARETURN          = 176;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short RETURN           = 177;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short GETSTATIC        = 178;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short PUTSTATIC        = 179;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short GETFIELD         = 180;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short PUTFIELD         = 181;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INVOKEVIRTUAL    = 182;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INVOKESPECIAL    = 183;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INVOKENONVIRTUAL = 183; // Old name in JDK 1.0
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INVOKESTATIC     = 184;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INVOKEINTERFACE  = 185;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INVOKEDYNAMIC    = 186;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short NEW              = 187;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short NEWARRAY         = 188;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ANEWARRAY        = 189;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ARRAYLENGTH      = 190;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short ATHROW           = 191;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short CHECKCAST        = 192;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short INSTANCEOF       = 193;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short MONITORENTER     = 194;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short MONITOREXIT      = 195;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short WIDE             = 196;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short MULTIANEWARRAY   = 197;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IFNULL           = 198;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short IFNONNULL        = 199;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short GOTO_W           = 200;
+  /** Java VM opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5">Opcode definitions in The Java Virtual Machine Specification</a> */
+  public static final short JSR_W            = 201;
+
+  /** JVM internal opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2">Reserved opcodes in the Java Virtual Machine Specification</a> */
+  public static final short BREAKPOINT                = 202;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short LDC_QUICK                 = 203;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short LDC_W_QUICK               = 204;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short LDC2_W_QUICK              = 205;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short GETFIELD_QUICK            = 206;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short PUTFIELD_QUICK            = 207;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short GETFIELD2_QUICK           = 208;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short PUTFIELD2_QUICK           = 209;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short GETSTATIC_QUICK           = 210;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short PUTSTATIC_QUICK           = 211;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short GETSTATIC2_QUICK          = 212;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short PUTSTATIC2_QUICK          = 213;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short INVOKEVIRTUAL_QUICK       = 214;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short INVOKENONVIRTUAL_QUICK    = 215;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short INVOKESUPER_QUICK         = 216;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short INVOKESTATIC_QUICK        = 217;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short INVOKEINTERFACE_QUICK     = 218;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short INVOKEVIRTUALOBJECT_QUICK = 219;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short NEW_QUICK                 = 221;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short ANEWARRAY_QUICK           = 222;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short MULTIANEWARRAY_QUICK      = 223;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short CHECKCAST_QUICK           = 224;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short INSTANCEOF_QUICK          = 225;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short INVOKEVIRTUAL_QUICK_W     = 226;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short GETFIELD_QUICK_W          = 227;
+  /** JVM internal opcode.
+   * @see <a href="https://web.archive.org/web/20120108031230/http://java.sun.com/docs/books/jvms/first_edition/html/Quick.doc.html">Specification of _quick opcodes in the Java Virtual Machine Specification (version 1)</a>
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se5.0/html/ChangesAppendix.doc.html#448885">Why the _quick opcodes were removed from the second version of the Java Virtual Machine Specification.</a> */
+  public static final short PUTFIELD_QUICK_W          = 228;
+  /** JVM internal opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2">Reserved opcodes in the Java Virtual Machine Specification</a> */
+  public static final short IMPDEP1                   = 254;
+  /** JVM internal opcode.
+   * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.2">Reserved opcodes in the Java Virtual Machine Specification</a> */
+  public static final short IMPDEP2                   = 255;
+
+  /**
+   * BCEL virtual instruction for pushing an arbitrary data type onto the stack.  Will be converted to the appropriate JVM
+   * opcode when the class is dumped.
+   */
+  public static final short PUSH             = 4711;
+  /**
+   * BCEL virtual instruction for either LOOKUPSWITCH or TABLESWITCH.  Will be converted to the appropriate JVM
+   * opcode when the class is dumped.
+   */
+  public static final short SWITCH           = 4712;
+
+  /** Illegal opcode. */
+  public static final short  UNDEFINED      = -1;
+  /** Illegal opcode. */
+  public static final short  UNPREDICTABLE  = -2;
+  /** Illegal opcode. */
+  public static final short  RESERVED       = -3;
+  /** Mnemonic for an illegal opcode. */
+  public static final String ILLEGAL_OPCODE = "<illegal opcode>";
+  /** Mnemonic for an illegal type. */
+  public static final String ILLEGAL_TYPE   = "<illegal type>";
+
+  /** Boolean data type. */
+  public static final byte T_BOOLEAN = 4;
+  /** Char data type. */
+  public static final byte T_CHAR    = 5;
+  /** Float data type. */
+  public static final byte T_FLOAT   = 6;
+  /** Double data type. */
+  public static final byte T_DOUBLE  = 7;
+  /** Byte data type. */
+  public static final byte T_BYTE    = 8;
+  /** Short data type. */
+  public static final byte T_SHORT   = 9;
+  /** Int data type. */
+  public static final byte T_INT     = 10;
+  /** Long data type. */
+  public static final byte T_LONG    = 11;
+
+  /** Void data type (non-standard). */
+  public static final byte T_VOID      = 12; // Non-standard
+  /** Array data type. */
+  public static final byte T_ARRAY     = 13;
+  /** Object data type. */
+  public static final byte T_OBJECT    = 14;
+  /** Reference data type (deprecated). */
+  public static final byte T_REFERENCE = 14; // Deprecated
+  /** Unknown data type. */
+  public static final byte T_UNKNOWN   = 15;
+  /** Address data type. */
+  public static final byte T_ADDRESS   = 16;
+
+  /** The primitive type names corresponding to the T_XX constants,
+   * e.g., TYPE_NAMES[T_INT] = "int"
+   */
+  public static final String[] TYPE_NAMES = {
+    ILLEGAL_TYPE, ILLEGAL_TYPE,  ILLEGAL_TYPE, ILLEGAL_TYPE,
+    "boolean", "char", "float", "double", "byte", "short", "int", "long",
+    "void", "array", "object", "unknown", "address"
+  };
+
+  /** The primitive class names corresponding to the T_XX constants,
+   * e.g., CLASS_TYPE_NAMES[T_INT] = "java.lang.Integer"
+   */
+  public static final String[] CLASS_TYPE_NAMES = {
+    ILLEGAL_TYPE, ILLEGAL_TYPE,  ILLEGAL_TYPE, ILLEGAL_TYPE,
+    "java.lang.Boolean", "java.lang.Character", "java.lang.Float",
+    "java.lang.Double", "java.lang.Byte", "java.lang.Short",
+    "java.lang.Integer", "java.lang.Long", "java.lang.Void",
+    ILLEGAL_TYPE, ILLEGAL_TYPE,  ILLEGAL_TYPE,  ILLEGAL_TYPE
+  };
+
+  /** The signature characters corresponding to primitive types,
+   * e.g., SHORT_TYPE_NAMES[T_INT] = "I"
+   */
+  public static final String[] SHORT_TYPE_NAMES = {
+    ILLEGAL_TYPE, ILLEGAL_TYPE,  ILLEGAL_TYPE, ILLEGAL_TYPE,
+    "Z", "C", "F", "D", "B", "S", "I", "J",
+    "V", ILLEGAL_TYPE, ILLEGAL_TYPE, ILLEGAL_TYPE
+  };
+
+  /**
+   * Number of byte code operands for each opcode, i.e., number of bytes after the tag byte
+   * itself.  Indexed by opcode, so NO_OF_OPERANDS[BIPUSH] = the number of operands for a bipush
+   * instruction.
+   */
+  public static final short[] NO_OF_OPERANDS = {
+    0/*nop*/, 0/*aconst_null*/, 0/*iconst_m1*/, 0/*iconst_0*/,
+    0/*iconst_1*/, 0/*iconst_2*/, 0/*iconst_3*/, 0/*iconst_4*/,
+    0/*iconst_5*/, 0/*lconst_0*/, 0/*lconst_1*/, 0/*fconst_0*/,
+    0/*fconst_1*/, 0/*fconst_2*/, 0/*dconst_0*/, 0/*dconst_1*/,
+    1/*bipush*/, 2/*sipush*/, 1/*ldc*/, 2/*ldc_w*/, 2/*ldc2_w*/,
+    1/*iload*/, 1/*lload*/, 1/*fload*/, 1/*dload*/, 1/*aload*/,
+    0/*iload_0*/, 0/*iload_1*/, 0/*iload_2*/, 0/*iload_3*/,
+    0/*lload_0*/, 0/*lload_1*/, 0/*lload_2*/, 0/*lload_3*/,
+    0/*fload_0*/, 0/*fload_1*/, 0/*fload_2*/, 0/*fload_3*/,
+    0/*dload_0*/, 0/*dload_1*/, 0/*dload_2*/, 0/*dload_3*/,
+    0/*aload_0*/, 0/*aload_1*/, 0/*aload_2*/, 0/*aload_3*/,
+    0/*iaload*/, 0/*laload*/, 0/*faload*/, 0/*daload*/,
+    0/*aaload*/, 0/*baload*/, 0/*caload*/, 0/*saload*/,
+    1/*istore*/, 1/*lstore*/, 1/*fstore*/, 1/*dstore*/,
+    1/*astore*/, 0/*istore_0*/, 0/*istore_1*/, 0/*istore_2*/,
+    0/*istore_3*/, 0/*lstore_0*/, 0/*lstore_1*/, 0/*lstore_2*/,
+    0/*lstore_3*/, 0/*fstore_0*/, 0/*fstore_1*/, 0/*fstore_2*/,
+    0/*fstore_3*/, 0/*dstore_0*/, 0/*dstore_1*/, 0/*dstore_2*/,
+    0/*dstore_3*/, 0/*astore_0*/, 0/*astore_1*/, 0/*astore_2*/,
+    0/*astore_3*/, 0/*iastore*/, 0/*lastore*/, 0/*fastore*/,
+    0/*dastore*/, 0/*aastore*/, 0/*bastore*/, 0/*castore*/,
+    0/*sastore*/, 0/*pop*/, 0/*pop2*/, 0/*dup*/, 0/*dup_x1*/,
+    0/*dup_x2*/, 0/*dup2*/, 0/*dup2_x1*/, 0/*dup2_x2*/, 0/*swap*/,
+    0/*iadd*/, 0/*ladd*/, 0/*fadd*/, 0/*dadd*/, 0/*isub*/,
+    0/*lsub*/, 0/*fsub*/, 0/*dsub*/, 0/*imul*/, 0/*lmul*/,
+    0/*fmul*/, 0/*dmul*/, 0/*idiv*/, 0/*ldiv*/, 0/*fdiv*/,
+    0/*ddiv*/, 0/*irem*/, 0/*lrem*/, 0/*frem*/, 0/*drem*/,
+    0/*ineg*/, 0/*lneg*/, 0/*fneg*/, 0/*dneg*/, 0/*ishl*/,
+    0/*lshl*/, 0/*ishr*/, 0/*lshr*/, 0/*iushr*/, 0/*lushr*/,
+    0/*iand*/, 0/*land*/, 0/*ior*/, 0/*lor*/, 0/*ixor*/, 0/*lxor*/,
+    2/*iinc*/, 0/*i2l*/, 0/*i2f*/, 0/*i2d*/, 0/*l2i*/, 0/*l2f*/,
+    0/*l2d*/, 0/*f2i*/, 0/*f2l*/, 0/*f2d*/, 0/*d2i*/, 0/*d2l*/,
+    0/*d2f*/, 0/*i2b*/, 0/*i2c*/, 0/*i2s*/, 0/*lcmp*/, 0/*fcmpl*/,
+    0/*fcmpg*/, 0/*dcmpl*/, 0/*dcmpg*/, 2/*ifeq*/, 2/*ifne*/,
+    2/*iflt*/, 2/*ifge*/, 2/*ifgt*/, 2/*ifle*/, 2/*if_icmpeq*/,
+    2/*if_icmpne*/, 2/*if_icmplt*/, 2/*if_icmpge*/, 2/*if_icmpgt*/,
+    2/*if_icmple*/, 2/*if_acmpeq*/, 2/*if_acmpne*/, 2/*goto*/,
+    2/*jsr*/, 1/*ret*/, UNPREDICTABLE/*tableswitch*/, UNPREDICTABLE/*lookupswitch*/,
+    0/*ireturn*/, 0/*lreturn*/, 0/*freturn*/,
+    0/*dreturn*/, 0/*areturn*/, 0/*return*/,
+    2/*getstatic*/, 2/*putstatic*/, 2/*getfield*/,
+    2/*putfield*/, 2/*invokevirtual*/, 2/*invokespecial*/, 2/*invokestatic*/,
+    4/*invokeinterface*/, 4/*invokedynamic*/, 2/*new*/,
+    1/*newarray*/, 2/*anewarray*/,
+    0/*arraylength*/, 0/*athrow*/, 2/*checkcast*/,
+    2/*instanceof*/, 0/*monitorenter*/,
+    0/*monitorexit*/, UNPREDICTABLE/*wide*/, 3/*multianewarray*/,
+    2/*ifnull*/, 2/*ifnonnull*/, 4/*goto_w*/,
+    4/*jsr_w*/, 0/*breakpoint*/, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, RESERVED/*impdep1*/, RESERVED/*impdep2*/
+  };
+
+  /**
+   * How the byte code operands are to be interpreted for each opcode.
+   * Indexed by opcode.  TYPE_OF_OPERANDS[ILOAD] = an array of shorts
+   * describing the data types for the instruction.
+   */
+  public static final short[][] TYPE_OF_OPERANDS = {
+    {}/*nop*/, {}/*aconst_null*/, {}/*iconst_m1*/, {}/*iconst_0*/,
+    {}/*iconst_1*/, {}/*iconst_2*/, {}/*iconst_3*/, {}/*iconst_4*/,
+    {}/*iconst_5*/, {}/*lconst_0*/, {}/*lconst_1*/, {}/*fconst_0*/,
+    {}/*fconst_1*/, {}/*fconst_2*/, {}/*dconst_0*/, {}/*dconst_1*/,
+    {T_BYTE}/*bipush*/, {T_SHORT}/*sipush*/, {T_BYTE}/*ldc*/,
+    {T_SHORT}/*ldc_w*/, {T_SHORT}/*ldc2_w*/,
+    {T_BYTE}/*iload*/, {T_BYTE}/*lload*/, {T_BYTE}/*fload*/,
+    {T_BYTE}/*dload*/, {T_BYTE}/*aload*/, {}/*iload_0*/,
+    {}/*iload_1*/, {}/*iload_2*/, {}/*iload_3*/, {}/*lload_0*/,
+    {}/*lload_1*/, {}/*lload_2*/, {}/*lload_3*/, {}/*fload_0*/,
+    {}/*fload_1*/, {}/*fload_2*/, {}/*fload_3*/, {}/*dload_0*/,
+    {}/*dload_1*/, {}/*dload_2*/, {}/*dload_3*/, {}/*aload_0*/,
+    {}/*aload_1*/, {}/*aload_2*/, {}/*aload_3*/, {}/*iaload*/,
+    {}/*laload*/, {}/*faload*/, {}/*daload*/, {}/*aaload*/,
+    {}/*baload*/, {}/*caload*/, {}/*saload*/, {T_BYTE}/*istore*/,
+    {T_BYTE}/*lstore*/, {T_BYTE}/*fstore*/, {T_BYTE}/*dstore*/,
+    {T_BYTE}/*astore*/, {}/*istore_0*/, {}/*istore_1*/,
+    {}/*istore_2*/, {}/*istore_3*/, {}/*lstore_0*/, {}/*lstore_1*/,
+    {}/*lstore_2*/, {}/*lstore_3*/, {}/*fstore_0*/, {}/*fstore_1*/,
+    {}/*fstore_2*/, {}/*fstore_3*/, {}/*dstore_0*/, {}/*dstore_1*/,
+    {}/*dstore_2*/, {}/*dstore_3*/, {}/*astore_0*/, {}/*astore_1*/,
+    {}/*astore_2*/, {}/*astore_3*/, {}/*iastore*/, {}/*lastore*/,
+    {}/*fastore*/, {}/*dastore*/, {}/*aastore*/, {}/*bastore*/,
+    {}/*castore*/, {}/*sastore*/, {}/*pop*/, {}/*pop2*/, {}/*dup*/,
+    {}/*dup_x1*/, {}/*dup_x2*/, {}/*dup2*/, {}/*dup2_x1*/,
+    {}/*dup2_x2*/, {}/*swap*/, {}/*iadd*/, {}/*ladd*/, {}/*fadd*/,
+    {}/*dadd*/, {}/*isub*/, {}/*lsub*/, {}/*fsub*/, {}/*dsub*/,
+    {}/*imul*/, {}/*lmul*/, {}/*fmul*/, {}/*dmul*/, {}/*idiv*/,
+    {}/*ldiv*/, {}/*fdiv*/, {}/*ddiv*/, {}/*irem*/, {}/*lrem*/,
+    {}/*frem*/, {}/*drem*/, {}/*ineg*/, {}/*lneg*/, {}/*fneg*/,
+    {}/*dneg*/, {}/*ishl*/, {}/*lshl*/, {}/*ishr*/, {}/*lshr*/,
+    {}/*iushr*/, {}/*lushr*/, {}/*iand*/, {}/*land*/, {}/*ior*/,
+    {}/*lor*/, {}/*ixor*/, {}/*lxor*/, {T_BYTE, T_BYTE}/*iinc*/,
+    {}/*i2l*/, {}/*i2f*/, {}/*i2d*/, {}/*l2i*/, {}/*l2f*/, {}/*l2d*/,
+    {}/*f2i*/, {}/*f2l*/, {}/*f2d*/, {}/*d2i*/, {}/*d2l*/, {}/*d2f*/,
+    {}/*i2b*/, {}/*i2c*/,{}/*i2s*/, {}/*lcmp*/, {}/*fcmpl*/,
+    {}/*fcmpg*/, {}/*dcmpl*/, {}/*dcmpg*/, {T_SHORT}/*ifeq*/,
+    {T_SHORT}/*ifne*/, {T_SHORT}/*iflt*/, {T_SHORT}/*ifge*/,
+    {T_SHORT}/*ifgt*/, {T_SHORT}/*ifle*/, {T_SHORT}/*if_icmpeq*/,
+    {T_SHORT}/*if_icmpne*/, {T_SHORT}/*if_icmplt*/,
+    {T_SHORT}/*if_icmpge*/, {T_SHORT}/*if_icmpgt*/,
+    {T_SHORT}/*if_icmple*/, {T_SHORT}/*if_acmpeq*/,
+    {T_SHORT}/*if_acmpne*/, {T_SHORT}/*goto*/, {T_SHORT}/*jsr*/,
+    {T_BYTE}/*ret*/, {}/*tableswitch*/, {}/*lookupswitch*/,
+    {}/*ireturn*/, {}/*lreturn*/, {}/*freturn*/, {}/*dreturn*/,
+    {}/*areturn*/, {}/*return*/, {T_SHORT}/*getstatic*/,
+    {T_SHORT}/*putstatic*/, {T_SHORT}/*getfield*/,
+    {T_SHORT}/*putfield*/, {T_SHORT}/*invokevirtual*/,
+    {T_SHORT}/*invokespecial*/, {T_SHORT}/*invokestatic*/,
+    {T_SHORT, T_BYTE, T_BYTE}/*invokeinterface*/, {T_SHORT, T_BYTE, T_BYTE}/*invokedynamic*/,
+    {T_SHORT}/*new*/, {T_BYTE}/*newarray*/,
+    {T_SHORT}/*anewarray*/, {}/*arraylength*/, {}/*athrow*/,
+    {T_SHORT}/*checkcast*/, {T_SHORT}/*instanceof*/,
+    {}/*monitorenter*/, {}/*monitorexit*/, {T_BYTE}/*wide*/,
+    {T_SHORT, T_BYTE}/*multianewarray*/, {T_SHORT}/*ifnull*/,
+    {T_SHORT}/*ifnonnull*/, {T_INT}/*goto_w*/, {T_INT}/*jsr_w*/,
+    {}/*breakpoint*/, {}, {}, {}, {}, {}, {}, {},
+    {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
+    {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
+    {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {},
+    {}/*impdep1*/, {}/*impdep2*/
+  };
+
+  /**
+   * Names of opcodes.  Indexed by opcode.  OPCODE_NAMES[ALOAD] = "aload".
+   */
+  public static final String[] OPCODE_NAMES = {
+    "nop", "aconst_null", "iconst_m1", "iconst_0", "iconst_1",
+    "iconst_2", "iconst_3", "iconst_4", "iconst_5", "lconst_0",
+    "lconst_1", "fconst_0", "fconst_1", "fconst_2", "dconst_0",
+    "dconst_1", "bipush", "sipush", "ldc", "ldc_w", "ldc2_w", "iload",
+    "lload", "fload", "dload", "aload", "iload_0", "iload_1", "iload_2",
+    "iload_3", "lload_0", "lload_1", "lload_2", "lload_3", "fload_0",
+    "fload_1", "fload_2", "fload_3", "dload_0", "dload_1", "dload_2",
+    "dload_3", "aload_0", "aload_1", "aload_2", "aload_3", "iaload",
+    "laload", "faload", "daload", "aaload", "baload", "caload", "saload",
+    "istore", "lstore", "fstore", "dstore", "astore", "istore_0",
+    "istore_1", "istore_2", "istore_3", "lstore_0", "lstore_1",
+    "lstore_2", "lstore_3", "fstore_0", "fstore_1", "fstore_2",
+    "fstore_3", "dstore_0", "dstore_1", "dstore_2", "dstore_3",
+    "astore_0", "astore_1", "astore_2", "astore_3", "iastore", "lastore",
+    "fastore", "dastore", "aastore", "bastore", "castore", "sastore",
+    "pop", "pop2", "dup", "dup_x1", "dup_x2", "dup2", "dup2_x1",
+    "dup2_x2", "swap", "iadd", "ladd", "fadd", "dadd", "isub", "lsub",
+    "fsub", "dsub", "imul", "lmul", "fmul", "dmul", "idiv", "ldiv",
+    "fdiv", "ddiv", "irem", "lrem", "frem", "drem", "ineg", "lneg",
+    "fneg", "dneg", "ishl", "lshl", "ishr", "lshr", "iushr", "lushr",
+    "iand", "land", "ior", "lor", "ixor", "lxor", "iinc", "i2l", "i2f",
+    "i2d", "l2i", "l2f", "l2d", "f2i", "f2l", "f2d", "d2i", "d2l", "d2f",
+    "i2b", "i2c", "i2s", "lcmp", "fcmpl", "fcmpg",
+    "dcmpl", "dcmpg", "ifeq", "ifne", "iflt", "ifge", "ifgt", "ifle",
+    "if_icmpeq", "if_icmpne", "if_icmplt", "if_icmpge", "if_icmpgt",
+    "if_icmple", "if_acmpeq", "if_acmpne", "goto", "jsr", "ret",
+    "tableswitch", "lookupswitch", "ireturn", "lreturn", "freturn",
+    "dreturn", "areturn", "return", "getstatic", "putstatic", "getfield",
+    "putfield", "invokevirtual", "invokespecial", "invokestatic",
+    "invokeinterface", "invokedynamic", "new", "newarray", "anewarray",
+    "arraylength", "athrow", "checkcast", "instanceof", "monitorenter",
+    "monitorexit", "wide", "multianewarray", "ifnull", "ifnonnull",
+    "goto_w", "jsr_w", "breakpoint", ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE, ILLEGAL_OPCODE,
+    ILLEGAL_OPCODE, "impdep1", "impdep2"
+  };
+
+  /**
+   * Number of words consumed on operand stack by instructions.
+   * Indexed by opcode.  CONSUME_STACK[FALOAD] = number of words
+   * consumed from the stack by a faload instruction.
+   */
+  public static final int[] CONSUME_STACK = {
+    0/*nop*/, 0/*aconst_null*/, 0/*iconst_m1*/, 0/*iconst_0*/, 0/*iconst_1*/,
+    0/*iconst_2*/, 0/*iconst_3*/, 0/*iconst_4*/, 0/*iconst_5*/, 0/*lconst_0*/,
+    0/*lconst_1*/, 0/*fconst_0*/, 0/*fconst_1*/, 0/*fconst_2*/, 0/*dconst_0*/,
+    0/*dconst_1*/, 0/*bipush*/, 0/*sipush*/, 0/*ldc*/, 0/*ldc_w*/, 0/*ldc2_w*/, 0/*iload*/,
+    0/*lload*/, 0/*fload*/, 0/*dload*/, 0/*aload*/, 0/*iload_0*/, 0/*iload_1*/, 0/*iload_2*/,
+    0/*iload_3*/, 0/*lload_0*/, 0/*lload_1*/, 0/*lload_2*/, 0/*lload_3*/, 0/*fload_0*/,
+    0/*fload_1*/, 0/*fload_2*/, 0/*fload_3*/, 0/*dload_0*/, 0/*dload_1*/, 0/*dload_2*/,
+    0/*dload_3*/, 0/*aload_0*/, 0/*aload_1*/, 0/*aload_2*/, 0/*aload_3*/, 2/*iaload*/,
+    2/*laload*/, 2/*faload*/, 2/*daload*/, 2/*aaload*/, 2/*baload*/, 2/*caload*/, 2/*saload*/,
+    1/*istore*/, 2/*lstore*/, 1/*fstore*/, 2/*dstore*/, 1/*astore*/, 1/*istore_0*/,
+    1/*istore_1*/, 1/*istore_2*/, 1/*istore_3*/, 2/*lstore_0*/, 2/*lstore_1*/,
+    2/*lstore_2*/, 2/*lstore_3*/, 1/*fstore_0*/, 1/*fstore_1*/, 1/*fstore_2*/,
+    1/*fstore_3*/, 2/*dstore_0*/, 2/*dstore_1*/, 2/*dstore_2*/, 2/*dstore_3*/,
+    1/*astore_0*/, 1/*astore_1*/, 1/*astore_2*/, 1/*astore_3*/, 3/*iastore*/, 4/*lastore*/,
+    3/*fastore*/, 4/*dastore*/, 3/*aastore*/, 3/*bastore*/, 3/*castore*/, 3/*sastore*/,
+    1/*pop*/, 2/*pop2*/, 1/*dup*/, 2/*dup_x1*/, 3/*dup_x2*/, 2/*dup2*/, 3/*dup2_x1*/,
+    4/*dup2_x2*/, 2/*swap*/, 2/*iadd*/, 4/*ladd*/, 2/*fadd*/, 4/*dadd*/, 2/*isub*/, 4/*lsub*/,
+    2/*fsub*/, 4/*dsub*/, 2/*imul*/, 4/*lmul*/, 2/*fmul*/, 4/*dmul*/, 2/*idiv*/, 4/*ldiv*/,
+    2/*fdiv*/, 4/*ddiv*/, 2/*irem*/, 4/*lrem*/, 2/*frem*/, 4/*drem*/, 1/*ineg*/, 2/*lneg*/,
+    1/*fneg*/, 2/*dneg*/, 2/*ishl*/, 3/*lshl*/, 2/*ishr*/, 3/*lshr*/, 2/*iushr*/, 3/*lushr*/,
+    2/*iand*/, 4/*land*/, 2/*ior*/, 4/*lor*/, 2/*ixor*/, 4/*lxor*/, 0/*iinc*/,
+    1/*i2l*/, 1/*i2f*/, 1/*i2d*/, 2/*l2i*/, 2/*l2f*/, 2/*l2d*/, 1/*f2i*/, 1/*f2l*/,
+    1/*f2d*/, 2/*d2i*/, 2/*d2l*/, 2/*d2f*/, 1/*i2b*/, 1/*i2c*/, 1/*i2s*/,
+    4/*lcmp*/, 2/*fcmpl*/, 2/*fcmpg*/, 4/*dcmpl*/, 4/*dcmpg*/, 1/*ifeq*/, 1/*ifne*/,
+    1/*iflt*/, 1/*ifge*/, 1/*ifgt*/, 1/*ifle*/, 2/*if_icmpeq*/, 2/*if_icmpne*/, 2/*if_icmplt*/,
+    2 /*if_icmpge*/, 2/*if_icmpgt*/, 2/*if_icmple*/, 2/*if_acmpeq*/, 2/*if_acmpne*/,
+    0/*goto*/, 0/*jsr*/, 0/*ret*/, 1/*tableswitch*/, 1/*lookupswitch*/, 1/*ireturn*/,
+    2/*lreturn*/, 1/*freturn*/, 2/*dreturn*/, 1/*areturn*/, 0/*return*/, 0/*getstatic*/,
+    UNPREDICTABLE/*putstatic*/, 1/*getfield*/, UNPREDICTABLE/*putfield*/,
+    UNPREDICTABLE/*invokevirtual*/, UNPREDICTABLE/*invokespecial*/,
+    UNPREDICTABLE/*invokestatic*/,
+    UNPREDICTABLE/*invokeinterface*/, UNPREDICTABLE/*invokedynamic*/, 0/*new*/, 1/*newarray*/, 1/*anewarray*/,
+    1/*arraylength*/, 1/*athrow*/, 1/*checkcast*/, 1/*instanceof*/, 1/*monitorenter*/,
+    1/*monitorexit*/, 0/*wide*/, UNPREDICTABLE/*multianewarray*/, 1/*ifnull*/, 1/*ifnonnull*/,
+    0/*goto_w*/, 0/*jsr_w*/, 0/*breakpoint*/, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNPREDICTABLE/*impdep1*/, UNPREDICTABLE/*impdep2*/
+  };
+
+  /**
+   * Number of words produced onto operand stack by instructions.
+   * Indexed by opcode.  CONSUME_STACK[DALOAD] = number of words
+   * consumed from the stack by a daload instruction.
+   */
+  public static final int[] PRODUCE_STACK = {
+    0/*nop*/, 1/*aconst_null*/, 1/*iconst_m1*/, 1/*iconst_0*/, 1/*iconst_1*/,
+    1/*iconst_2*/, 1/*iconst_3*/, 1/*iconst_4*/, 1/*iconst_5*/, 2/*lconst_0*/,
+    2/*lconst_1*/, 1/*fconst_0*/, 1/*fconst_1*/, 1/*fconst_2*/, 2/*dconst_0*/,
+    2/*dconst_1*/, 1/*bipush*/, 1/*sipush*/, 1/*ldc*/, 1/*ldc_w*/, 2/*ldc2_w*/, 1/*iload*/,
+    2/*lload*/, 1/*fload*/, 2/*dload*/, 1/*aload*/, 1/*iload_0*/, 1/*iload_1*/, 1/*iload_2*/,
+    1/*iload_3*/, 2/*lload_0*/, 2/*lload_1*/, 2/*lload_2*/, 2/*lload_3*/, 1/*fload_0*/,
+    1/*fload_1*/, 1/*fload_2*/, 1/*fload_3*/, 2/*dload_0*/, 2/*dload_1*/, 2/*dload_2*/,
+    2/*dload_3*/, 1/*aload_0*/, 1/*aload_1*/, 1/*aload_2*/, 1/*aload_3*/, 1/*iaload*/,
+    2/*laload*/, 1/*faload*/, 2/*daload*/, 1/*aaload*/, 1/*baload*/, 1/*caload*/, 1/*saload*/,
+    0/*istore*/, 0/*lstore*/, 0/*fstore*/, 0/*dstore*/, 0/*astore*/, 0/*istore_0*/,
+    0/*istore_1*/, 0/*istore_2*/, 0/*istore_3*/, 0/*lstore_0*/, 0/*lstore_1*/,
+    0/*lstore_2*/, 0/*lstore_3*/, 0/*fstore_0*/, 0/*fstore_1*/, 0/*fstore_2*/,
+    0/*fstore_3*/, 0/*dstore_0*/, 0/*dstore_1*/, 0/*dstore_2*/, 0/*dstore_3*/,
+    0/*astore_0*/, 0/*astore_1*/, 0/*astore_2*/, 0/*astore_3*/, 0/*iastore*/, 0/*lastore*/,
+    0/*fastore*/, 0/*dastore*/, 0/*aastore*/, 0/*bastore*/, 0/*castore*/, 0/*sastore*/,
+    0/*pop*/, 0/*pop2*/, 2/*dup*/, 3/*dup_x1*/, 4/*dup_x2*/, 4/*dup2*/, 5/*dup2_x1*/,
+    6/*dup2_x2*/, 2/*swap*/, 1/*iadd*/, 2/*ladd*/, 1/*fadd*/, 2/*dadd*/, 1/*isub*/, 2/*lsub*/,
+    1/*fsub*/, 2/*dsub*/, 1/*imul*/, 2/*lmul*/, 1/*fmul*/, 2/*dmul*/, 1/*idiv*/, 2/*ldiv*/,
+    1/*fdiv*/, 2/*ddiv*/, 1/*irem*/, 2/*lrem*/, 1/*frem*/, 2/*drem*/, 1/*ineg*/, 2/*lneg*/,
+    1/*fneg*/, 2/*dneg*/, 1/*ishl*/, 2/*lshl*/, 1/*ishr*/, 2/*lshr*/, 1/*iushr*/, 2/*lushr*/,
+    1/*iand*/, 2/*land*/, 1/*ior*/, 2/*lor*/, 1/*ixor*/, 2/*lxor*/,
+    0/*iinc*/, 2/*i2l*/, 1/*i2f*/, 2/*i2d*/, 1/*l2i*/, 1/*l2f*/, 2/*l2d*/, 1/*f2i*/,
+    2/*f2l*/, 2/*f2d*/, 1/*d2i*/, 2/*d2l*/, 1/*d2f*/,
+    1/*i2b*/, 1/*i2c*/, 1/*i2s*/, 1/*lcmp*/, 1/*fcmpl*/, 1/*fcmpg*/,
+    1/*dcmpl*/, 1/*dcmpg*/, 0/*ifeq*/, 0/*ifne*/, 0/*iflt*/, 0/*ifge*/, 0/*ifgt*/, 0/*ifle*/,
+    0/*if_icmpeq*/, 0/*if_icmpne*/, 0/*if_icmplt*/, 0/*if_icmpge*/, 0/*if_icmpgt*/,
+    0/*if_icmple*/, 0/*if_acmpeq*/, 0/*if_acmpne*/, 0/*goto*/, 1/*jsr*/, 0/*ret*/,
+    0/*tableswitch*/, 0/*lookupswitch*/, 0/*ireturn*/, 0/*lreturn*/, 0/*freturn*/,
+    0/*dreturn*/, 0/*areturn*/, 0/*return*/, UNPREDICTABLE/*getstatic*/, 0/*putstatic*/,
+    UNPREDICTABLE/*getfield*/, 0/*putfield*/, UNPREDICTABLE/*invokevirtual*/,
+    UNPREDICTABLE/*invokespecial*/, UNPREDICTABLE/*invokestatic*/,
+    UNPREDICTABLE/*invokeinterface*/, UNPREDICTABLE/*invokedynamic*/, 1/*new*/, 1/*newarray*/, 1/*anewarray*/,
+    1/*arraylength*/, 1/*athrow*/, 1/*checkcast*/, 1/*instanceof*/, 0/*monitorenter*/,
+    0/*monitorexit*/, 0/*wide*/, 1/*multianewarray*/, 0/*ifnull*/, 0/*ifnonnull*/,
+    0/*goto_w*/, 1/*jsr_w*/, 0/*breakpoint*/, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNDEFINED, UNDEFINED, UNDEFINED,
+    UNDEFINED, UNPREDICTABLE/*impdep1*/, UNPREDICTABLE/*impdep2*/
+  };
+
+  /** Attributes and their corresponding names.
+   */
+  public static final byte ATTR_UNKNOWN                                 = -1;
+  public static final byte ATTR_SOURCE_FILE                             = 0;
+  public static final byte ATTR_CONSTANT_VALUE                          = 1;
+  public static final byte ATTR_CODE                                    = 2;
+  public static final byte ATTR_EXCEPTIONS                              = 3;
+  public static final byte ATTR_LINE_NUMBER_TABLE                       = 4;
+  public static final byte ATTR_LOCAL_VARIABLE_TABLE                    = 5;
+  public static final byte ATTR_INNER_CLASSES                           = 6;
+  public static final byte ATTR_SYNTHETIC                               = 7;
+  public static final byte ATTR_DEPRECATED                              = 8;
+  public static final byte ATTR_PMG                                     = 9;
+  public static final byte ATTR_SIGNATURE                               = 10;
+  public static final byte ATTR_STACK_MAP                               = 11;
+  public static final byte ATTR_RUNTIME_VISIBLE_ANNOTATIONS             = 12;
+  public static final byte ATTR_RUNTIME_INVISIBLE_ANNOTATIONS           = 13;
+  public static final byte ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS   = 14;
+  public static final byte ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS = 15;
+  public static final byte ATTR_ANNOTATION_DEFAULT                      = 16;
+  public static final byte ATTR_LOCAL_VARIABLE_TYPE_TABLE               = 17;
+  public static final byte ATTR_ENCLOSING_METHOD                        = 18;
+  public static final byte ATTR_STACK_MAP_TABLE                         = 19;
+  public static final byte ATTR_BOOTSTRAP_METHODS                       = 20;
+  public static final byte ATTR_METHOD_PARAMETERS                       = 21;
+
+  public static final short KNOWN_ATTRIBUTES = 22; // count of attributes
+
+  /** @deprecated Use {@link #ATTR_RUNTIME_VISIBLE_ANNOTATIONS} instead */
+  @Deprecated
+public static final byte ATTR_RUNTIMEVISIBLE_ANNOTATIONS              = ATTR_RUNTIME_VISIBLE_ANNOTATIONS;
+  /** @deprecated Use {@link #ATTR_RUNTIME_INVISIBLE_ANNOTATIONS} instead */
+  @Deprecated
+public static final byte ATTR_RUNTIMEINVISIBLE_ANNOTATIONS            = ATTR_RUNTIME_INVISIBLE_ANNOTATIONS;
+  /** @deprecated Use {@link #ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS} instead */
+  @Deprecated
+public static final byte ATTR_RUNTIMEVISIBLE_PARAMETER_ANNOTATIONS    = ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS;
+  /** @deprecated Use {@link #ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS} instead */
+  @Deprecated
+public static final byte ATTR_RUNTIMEINVISIBLE_PARAMETER_ANNOTATIONS  = ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS;
+
+  // TODO: mutable public array!!
+  public static final String[] ATTRIBUTE_NAMES = {
+    "SourceFile", "ConstantValue", "Code", "Exceptions",
+    "LineNumberTable", "LocalVariableTable",
+    "InnerClasses", "Synthetic", "Deprecated",
+    "PMGClass", "Signature", "StackMap",
+    "RuntimeVisibleAnnotations", "RuntimeInvisibleAnnotations",
+    "RuntimeVisibleParameterAnnotations", "RuntimeInvisibleParameterAnnotations",
+    "AnnotationDefault", "LocalVariableTypeTable", "EnclosingMethod", "StackMapTable",
+    "BootstrapMethods", "MethodParameters"
+  };
+
+  /** Constants used in the StackMap attribute.
+   */
+  public static final byte ITEM_Bogus      = 0;
+  public static final byte ITEM_Integer    = 1;
+  public static final byte ITEM_Float      = 2;
+  public static final byte ITEM_Double     = 3;
+  public static final byte ITEM_Long       = 4;
+  public static final byte ITEM_Null       = 5;
+  public static final byte ITEM_InitObject = 6;
+  public static final byte ITEM_Object     = 7;
+  public static final byte ITEM_NewObject  = 8;
+
+  public static final String[] ITEM_NAMES = {
+    "Bogus", "Integer", "Float", "Double", "Long",
+    "Null", "InitObject", "Object", "NewObject"
+  };
+
+  /** Constants used to identify StackMapEntry types.
+   *
+   * For those types which can specify a range, the
+   * constant names the lowest value.
+   */
+  public static final int SAME_FRAME = 0;
+  public static final int SAME_LOCALS_1_STACK_ITEM_FRAME = 64;
+  public static final int SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED = 247;
+  public static final int CHOP_FRAME = 248;
+  public static final int SAME_FRAME_EXTENDED = 251;
+  public static final int APPEND_FRAME = 252;
+  public static final int FULL_FRAME = 255;
+
+  /** Constants that define the maximum value of
+   * those constants which store ranges. */
+
+  public static final int SAME_FRAME_MAX = 63;
+  public static final int SAME_LOCALS_1_STACK_ITEM_FRAME_MAX = 127;
+  public static final int CHOP_FRAME_MAX = 250;
+  public static final int APPEND_FRAME_MAX = 254;
+
+
+  // Constants defining the behavior of the Method Handles (JVMS �5.4.3.5)
+  
+  public static final byte REF_getField         = 1;
+  public static final byte REF_getStatic        = 2;
+  public static final byte REF_putField         = 3;
+  public static final byte REF_putStatic        = 4;
+  public static final byte REF_invokeVirtual    = 5;
+  public static final byte REF_invokeStatic     = 6;
+  public static final byte REF_invokeSpecial    = 7;
+  public static final byte REF_newInvokeSpecial = 8;
+  public static final byte REF_invokeInterface  = 9;
+  
+  /** The names of the referencd_kinds of a CONSTANT_MethodHandle_info. */
+  public static final String[] METHODHANDLE_NAMES = {
+      "", "getField", "getStatic", "putField", "putStatic", "invokeVirtual",
+      "invokeStatic", "invokeSpecial", "newInvokeSpecial", "invokeInterface" };
+
+}
diff --git a/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java b/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
new file mode 100644
index 0000000..1034793
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/ExceptionConstants.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6;
+
+/**
+ * Exception constants.
+ *
+ * @version $Id$
+ * @author  E. Haase
+ */
+public interface ExceptionConstants {
+
+    /** The mother of all exceptions
+     */
+    public static final Class<Throwable> THROWABLE = Throwable.class;
+    /** Super class of any run-time exception
+     */
+    public static final Class<RuntimeException> RUNTIME_EXCEPTION = RuntimeException.class;
+    /** Super class of any linking exception (aka Linkage Error)
+     */
+    public static final Class<LinkageError> LINKING_EXCEPTION = LinkageError.class;
+    /** Linking Exceptions
+     */
+    public static final Class<ClassCircularityError> CLASS_CIRCULARITY_ERROR = ClassCircularityError.class;
+    public static final Class<ClassFormatError> CLASS_FORMAT_ERROR = ClassFormatError.class;
+    public static final Class<ExceptionInInitializerError> EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError.class;
+    public static final Class<IncompatibleClassChangeError> INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError.class;
+    public static final Class<AbstractMethodError> ABSTRACT_METHOD_ERROR = AbstractMethodError.class;
+    public static final Class<IllegalAccessError> ILLEGAL_ACCESS_ERROR = IllegalAccessError.class;
+    public static final Class<InstantiationError> INSTANTIATION_ERROR = InstantiationError.class;
+    public static final Class<NoSuchFieldError> NO_SUCH_FIELD_ERROR = NoSuchFieldError.class;
+    public static final Class<NoSuchMethodError> NO_SUCH_METHOD_ERROR = NoSuchMethodError.class;
+    public static final Class<NoClassDefFoundError> NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class;
+    public static final Class<UnsatisfiedLinkError> UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class;
+    public static final Class<VerifyError> VERIFY_ERROR = VerifyError.class;
+    /* UnsupportedClassVersionError is new in JDK 1.2 */
+    //public static final Class UnsupportedClassVersionError = UnsupportedClassVersionError.class;
+    /** Run-Time Exceptions 
+     */
+    public static final Class<NullPointerException> NULL_POINTER_EXCEPTION = NullPointerException.class;
+    public static final Class<ArrayIndexOutOfBoundsException> ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException.class;
+    public static final Class<ArithmeticException> ARITHMETIC_EXCEPTION = ArithmeticException.class;
+    public static final Class<NegativeArraySizeException> NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException.class;
+    public static final Class<ClassCastException> CLASS_CAST_EXCEPTION = ClassCastException.class;
+    public static final Class<IllegalMonitorStateException> ILLEGAL_MONITOR_STATE = IllegalMonitorStateException.class;
+    /** Pre-defined exception arrays according to chapters 5.1-5.4 of the Java Virtual
+     * Machine Specification 
+     */
+    public static final Class<?>[] EXCS_CLASS_AND_INTERFACE_RESOLUTION = {
+            NO_CLASS_DEF_FOUND_ERROR, CLASS_FORMAT_ERROR, VERIFY_ERROR, ABSTRACT_METHOD_ERROR,
+            EXCEPTION_IN_INITIALIZER_ERROR, ILLEGAL_ACCESS_ERROR
+    }; // Chapter 5.1
+    public static final Class<?>[] EXCS_FIELD_AND_METHOD_RESOLUTION = {
+            NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR
+    }; // Chapter 5.2
+    public static final Class<?>[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0]; // Chapter 5.3 (as below)
+    public static final Class<?>[] EXCS_STRING_RESOLUTION = new Class[0];
+    // Chapter 5.4 (no errors but the ones that _always_ could happen! How stupid.)
+    public static final Class<?>[] EXCS_ARRAY_EXCEPTION = {
+            NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
+    };
+}
diff --git a/src/main/java/org/apache/commons/bcel6/Repository.java b/src/main/java/org/apache/commons/bcel6/Repository.java
new file mode 100644
index 0000000..572b909
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/Repository.java
@@ -0,0 +1,263 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6;
+
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.util.ClassPath;
+import org.apache.commons.bcel6.util.SyntheticRepository;
+
+/**
+ * The repository maintains informations about class interdependencies, e.g.,
+ * whether a class is a sub-class of another. Delegates actual class loading
+ * to SyntheticRepository with current class path by default.
+ *
+ * @see org.apache.commons.bcel6.util.Repository
+ * @see org.apache.commons.bcel6.util.SyntheticRepository
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class Repository {
+
+    private static org.apache.commons.bcel6.util.Repository _repository = SyntheticRepository.getInstance();
+
+
+    /** @return currently used repository instance
+     */
+    public static org.apache.commons.bcel6.util.Repository getRepository() {
+        return _repository;
+    }
+
+
+    /** Set repository instance to be used for class loading
+     */
+    public static void setRepository( org.apache.commons.bcel6.util.Repository rep ) {
+        _repository = rep;
+    }
+
+
+    /** Lookup class somewhere found on your CLASSPATH, or whereever the
+     * repository instance looks for it.
+     *
+     * @return class object for given fully qualified class name
+     * @throws ClassNotFoundException if the class could not be found or
+     * parsed correctly
+     */
+    public static JavaClass lookupClass( String class_name ) throws ClassNotFoundException {
+        return _repository.loadClass(class_name);
+    }
+
+
+    /**
+     * Try to find class source using the internal repository instance.
+     * @see Class
+     * @return JavaClass object for given runtime class
+     * @throws ClassNotFoundException if the class could not be found or
+     * parsed correctly
+     */
+    public static JavaClass lookupClass( Class<?> clazz ) throws ClassNotFoundException {
+        return _repository.loadClass(clazz);
+    }
+
+
+    /**
+     * @return class file object for given Java class by looking on the
+     *  system class path; returns null if the class file can't be
+     *  found
+     */
+    public static ClassPath.ClassFile lookupClassFile( String class_name ) {
+        try {
+            ClassPath path = _repository.getClassPath();
+            if (path == null) {
+                return null;
+            }
+            return path.getClassFile(class_name);
+        } catch (IOException e) {
+            return null;
+        }
+    }
+
+
+    /** Clear the repository.
+     */
+    public static void clearCache() {
+        _repository.clear();
+    }
+
+
+    /**
+     * Add clazz to repository if there isn't an equally named class already in there.
+     *
+     * @return old entry in repository
+     */
+    public static JavaClass addClass( JavaClass clazz ) {
+        JavaClass old = _repository.findClass(clazz.getClassName());
+        _repository.storeClass(clazz);
+        return old;
+    }
+
+
+    /**
+     * Remove class with given (fully qualified) name from repository.
+     */
+    public static void removeClass( String clazz ) {
+        _repository.removeClass(_repository.findClass(clazz));
+    }
+
+
+    /**
+     * Remove given class from repository.
+     */
+    public static void removeClass( JavaClass clazz ) {
+        _repository.removeClass(clazz);
+    }
+
+
+    /**
+     * @return list of super classes of clazz in ascending order, i.e.,
+     * Object is always the last element
+     * @throws ClassNotFoundException if any of the superclasses can't be found
+     */
+    public static JavaClass[] getSuperClasses( JavaClass clazz ) throws ClassNotFoundException {
+        return clazz.getSuperClasses();
+    }
+
+
+    /**
+     * @return list of super classes of clazz in ascending order, i.e.,
+     * Object is always the last element.
+     * @throws ClassNotFoundException if the named class or any of its
+     *  superclasses can't be found
+     */
+    public static JavaClass[] getSuperClasses( String class_name ) throws ClassNotFoundException {
+        JavaClass jc = lookupClass(class_name);
+        return getSuperClasses(jc);
+    }
+
+
+    /**
+     * @return all interfaces implemented by class and its super
+     * classes and the interfaces that those interfaces extend, and so on.
+     * (Some people call this a transitive hull).
+     * @throws ClassNotFoundException if any of the class's
+     *  superclasses or superinterfaces can't be found
+     */
+    public static JavaClass[] getInterfaces( JavaClass clazz ) throws ClassNotFoundException {
+        return clazz.getAllInterfaces();
+    }
+
+
+    /**
+     * @return all interfaces implemented by class and its super
+     * classes and the interfaces that extend those interfaces, and so on
+     * @throws ClassNotFoundException if the named class can't be found,
+     *   or if any of its superclasses or superinterfaces can't be found
+     */
+    public static JavaClass[] getInterfaces( String class_name ) throws ClassNotFoundException {
+        return getInterfaces(lookupClass(class_name));
+    }
+
+
+    /**
+     * Equivalent to runtime "instanceof" operator.
+     * @return true, if clazz is an instance of super_class
+     * @throws ClassNotFoundException if any superclasses or superinterfaces
+     *   of clazz can't be found
+     */
+    public static boolean instanceOf( JavaClass clazz, JavaClass super_class )
+            throws ClassNotFoundException {
+        return clazz.instanceOf(super_class);
+    }
+
+
+    /**
+     * @return true, if clazz is an instance of super_class
+     * @throws ClassNotFoundException if either clazz or super_class
+     *   can't be found
+     */
+    public static boolean instanceOf( String clazz, String super_class )
+            throws ClassNotFoundException {
+        return instanceOf(lookupClass(clazz), lookupClass(super_class));
+    }
+
+
+    /**
+     * @return true, if clazz is an instance of super_class
+     * @throws ClassNotFoundException if super_class can't be found
+     */
+    public static boolean instanceOf( JavaClass clazz, String super_class )
+            throws ClassNotFoundException {
+        return instanceOf(clazz, lookupClass(super_class));
+    }
+
+
+    /**
+     * @return true, if clazz is an instance of super_class
+     * @throws ClassNotFoundException if clazz can't be found
+     */
+    public static boolean instanceOf( String clazz, JavaClass super_class )
+            throws ClassNotFoundException {
+        return instanceOf(lookupClass(clazz), super_class);
+    }
+
+
+    /**
+     * @return true, if clazz is an implementation of interface inter
+     * @throws ClassNotFoundException if any superclasses or superinterfaces
+     *   of clazz can't be found
+     */
+    public static boolean implementationOf( JavaClass clazz, JavaClass inter )
+            throws ClassNotFoundException {
+        return clazz.implementationOf(inter);
+    }
+
+
+    /**
+     * @return true, if clazz is an implementation of interface inter
+     * @throws ClassNotFoundException if clazz, inter, or any superclasses
+     *   or superinterfaces of clazz can't be found
+     */
+    public static boolean implementationOf( String clazz, String inter )
+            throws ClassNotFoundException {
+        return implementationOf(lookupClass(clazz), lookupClass(inter));
+    }
+
+
+    /**
+     * @return true, if clazz is an implementation of interface inter
+     * @throws ClassNotFoundException if inter or any superclasses
+     *   or superinterfaces of clazz can't be found
+     */
+    public static boolean implementationOf( JavaClass clazz, String inter )
+            throws ClassNotFoundException {
+        return implementationOf(clazz, lookupClass(inter));
+    }
+
+
+    /**
+     * @return true, if clazz is an implementation of interface inter
+     * @throws ClassNotFoundException if clazz or any superclasses or
+     *   superinterfaces of clazz can't be found
+     */
+    public static boolean implementationOf( String clazz, JavaClass inter )
+            throws ClassNotFoundException {
+        return implementationOf(lookupClass(clazz), inter);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/AccessFlags.java b/src/main/java/org/apache/commons/bcel6/classfile/AccessFlags.java
new file mode 100644
index 0000000..80451aa
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/AccessFlags.java
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Super class for all objects that have modifiers like private, final, ...
+ * I.e. classes, fields, and methods.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class AccessFlags implements java.io.Serializable {
+
+    private static final long serialVersionUID = 2845404654039163061L;
+    protected int access_flags; // TODO make private (has getter & setter)
+
+
+    public AccessFlags() {
+    }
+
+
+    /**
+     * @param a inital access flags
+     */
+    public AccessFlags(int a) {
+        access_flags = a;
+    }
+
+
+    /** 
+     * @return Access flags of the object aka. "modifiers".
+     */
+    public final int getAccessFlags() {
+        return access_flags;
+    }
+
+
+    /** 
+     * @return Access flags of the object aka. "modifiers".
+     */
+    public final int getModifiers() {
+        return access_flags;
+    }
+
+
+    /** Set access flags aka "modifiers".
+     * @param access_flags Access flags of the object. 
+     */
+    public final void setAccessFlags( int access_flags ) {
+        this.access_flags = access_flags;
+    }
+
+
+    /** Set access flags aka "modifiers".
+     * @param access_flags Access flags of the object. 
+     */
+    public final void setModifiers( int access_flags ) {
+        setAccessFlags(access_flags);
+    }
+
+
+    private void setFlag( int flag, boolean set ) {
+        if ((access_flags & flag) != 0) { // Flag is set already
+            if (!set) {
+                access_flags ^= flag;
+            }
+        } else { // Flag not set
+            if (set) {
+                access_flags |= flag;
+            }
+        }
+    }
+
+
+    public final void isPublic( boolean flag ) {
+        setFlag(Constants.ACC_PUBLIC, flag);
+    }
+
+
+    public final boolean isPublic() {
+        return (access_flags & Constants.ACC_PUBLIC) != 0;
+    }
+
+
+    public final void isPrivate( boolean flag ) {
+        setFlag(Constants.ACC_PRIVATE, flag);
+    }
+
+
+    public final boolean isPrivate() {
+        return (access_flags & Constants.ACC_PRIVATE) != 0;
+    }
+
+
+    public final void isProtected( boolean flag ) {
+        setFlag(Constants.ACC_PROTECTED, flag);
+    }
+
+
+    public final boolean isProtected() {
+        return (access_flags & Constants.ACC_PROTECTED) != 0;
+    }
+
+
+    public final void isStatic( boolean flag ) {
+        setFlag(Constants.ACC_STATIC, flag);
+    }
+
+
+    public final boolean isStatic() {
+        return (access_flags & Constants.ACC_STATIC) != 0;
+    }
+
+
+    public final void isFinal( boolean flag ) {
+        setFlag(Constants.ACC_FINAL, flag);
+    }
+
+
+    public final boolean isFinal() {
+        return (access_flags & Constants.ACC_FINAL) != 0;
+    }
+
+
+    public final void isSynchronized( boolean flag ) {
+        setFlag(Constants.ACC_SYNCHRONIZED, flag);
+    }
+
+
+    public final boolean isSynchronized() {
+        return (access_flags & Constants.ACC_SYNCHRONIZED) != 0;
+    }
+
+
+    public final void isVolatile( boolean flag ) {
+        setFlag(Constants.ACC_VOLATILE, flag);
+    }
+
+
+    public final boolean isVolatile() {
+        return (access_flags & Constants.ACC_VOLATILE) != 0;
+    }
+
+
+    public final void isTransient( boolean flag ) {
+        setFlag(Constants.ACC_TRANSIENT, flag);
+    }
+
+
+    public final boolean isTransient() {
+        return (access_flags & Constants.ACC_TRANSIENT) != 0;
+    }
+
+
+    public final void isNative( boolean flag ) {
+        setFlag(Constants.ACC_NATIVE, flag);
+    }
+
+
+    public final boolean isNative() {
+        return (access_flags & Constants.ACC_NATIVE) != 0;
+    }
+
+
+    public final void isInterface( boolean flag ) {
+        setFlag(Constants.ACC_INTERFACE, flag);
+    }
+
+
+    public final boolean isInterface() {
+        return (access_flags & Constants.ACC_INTERFACE) != 0;
+    }
+
+
+    public final void isAbstract( boolean flag ) {
+        setFlag(Constants.ACC_ABSTRACT, flag);
+    }
+
+
+    public final boolean isAbstract() {
+        return (access_flags & Constants.ACC_ABSTRACT) != 0;
+    }
+
+
+    public final void isStrictfp( boolean flag ) {
+        setFlag(Constants.ACC_STRICT, flag);
+    }
+
+
+    public final boolean isStrictfp() {
+        return (access_flags & Constants.ACC_STRICT) != 0;
+    }
+
+
+    public final void isSynthetic( boolean flag ) {
+        setFlag(Constants.ACC_SYNTHETIC, flag);
+    }
+
+
+    public final boolean isSynthetic() {
+        return (access_flags & Constants.ACC_SYNTHETIC) != 0;
+    }
+
+
+    public final void isAnnotation( boolean flag ) {
+        setFlag(Constants.ACC_ANNOTATION, flag);
+    }
+
+
+    public final boolean isAnnotation() {
+        return (access_flags & Constants.ACC_ANNOTATION) != 0;
+    }
+
+
+    public final void isEnum( boolean flag ) {
+        setFlag(Constants.ACC_ENUM, flag);
+    }
+
+
+    public final boolean isEnum() {
+        return (access_flags & Constants.ACC_ENUM) != 0;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/AnnotationDefault.java b/src/main/java/org/apache/commons/bcel6/classfile/AnnotationDefault.java
new file mode 100644
index 0000000..052a3f8
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/AnnotationDefault.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Represents the default value of a annotation for a method info
+ *
+ * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @version $Id: AnnotationDefault 1 2005-02-13 03:15:08Z dbrosius $
+ * @since 6.0
+ */
+public class AnnotationDefault extends Attribute {
+    
+    private static final long serialVersionUID = -4017327188724019487L;
+
+    private ElementValue default_value;
+
+    /**
+     * @param name_index    Index pointing to the name <em>Code</em>
+     * @param length        Content length in bytes
+     * @param input         Input stream
+     * @param constant_pool Array of constants
+     */
+    AnnotationDefault(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
+        this(name_index, length, (ElementValue) null, constant_pool);
+        default_value = ElementValue.readElementValue(input, constant_pool);
+    }
+
+    /**
+     * @param name_index    Index pointing to the name <em>Code</em>
+     * @param length        Content length in bytes
+     * @param defaultValue  the annotation's default value
+     * @param constant_pool Array of constants
+     */
+    public AnnotationDefault(int name_index, int length, ElementValue defaultValue, ConstantPool constant_pool) {
+        super(Constants.ATTR_ANNOTATION_DEFAULT, name_index, length, constant_pool);
+        setDefaultValue(defaultValue);
+    }
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept(Visitor v) {
+        v.visitAnnotationDefault(this);
+    }
+
+    /**
+     * @param defaultValue the default value of this methodinfo's annotation
+     */
+    public final void setDefaultValue(ElementValue defaultValue) {
+        default_value = defaultValue;
+    }
+
+    /**
+     * @return the default value
+     */
+    public final ElementValue getDefaultValue() {
+        return default_value;
+    }
+
+    @Override
+    public Attribute copy(ConstantPool _constant_pool) {
+        throw new RuntimeException("Not implemented yet!");
+    }
+
+    @Override
+    public final void dump(DataOutputStream dos) throws IOException {
+        super.dump(dos);
+        default_value.dump(dos);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/AnnotationElementValue.java b/src/main/java/org/apache/commons/bcel6/classfile/AnnotationElementValue.java
new file mode 100644
index 0000000..8a3ce54
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/AnnotationElementValue.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * @since 6.0
+ */
+public class AnnotationElementValue extends ElementValue
+{
+        // For annotation element values, this is the annotation
+        private final AnnotationEntry annotationEntry;
+
+        public AnnotationElementValue(int type, AnnotationEntry annotationEntry,
+                        ConstantPool cpool)
+        {
+                super(type, cpool);
+                if (type != ANNOTATION) {
+                    throw new RuntimeException(
+                                    "Only element values of type annotation can be built with this ctor - type specified: " + type);
+                }
+                this.annotationEntry = annotationEntry;
+        }
+
+        @Override
+        public void dump(DataOutputStream dos) throws IOException
+        {
+                dos.writeByte(type); // u1 type of value (ANNOTATION == '@')
+                annotationEntry.dump(dos);
+        }
+
+        @Override
+        public String stringifyValue()
+        {
+                return annotationEntry.toString();
+        }
+
+        @Override
+        public String toString()
+        {
+                return stringifyValue();
+        }
+
+        public AnnotationEntry getAnnotationEntry()
+        {
+                return annotationEntry;
+        }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java b/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java
new file mode 100644
index 0000000..223bf51
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/AnnotationEntry.java
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * represents one annotation in the annotation table
+ * 
+ * @version $Id: AnnotationEntry
+ * @author <A HREF="mailto:dbrosius@mebigfatguy.com">D. Brosius</A>
+ * @since 6.0
+ */
+public class AnnotationEntry implements Node, Constants, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private final int type_index;
+    private final ConstantPool constant_pool;
+    private final boolean isRuntimeVisible;
+
+    private List<ElementValuePair> element_value_pairs;
+
+    /**
+     * Factory method to create an AnnotionEntry from a DataInput
+     * 
+     * @param input
+     * @param constant_pool
+     * @param isRuntimeVisible
+     * @return the entry
+     * @throws IOException
+     */
+    public static AnnotationEntry read(DataInput input, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException {
+
+        final AnnotationEntry annotationEntry = new AnnotationEntry(input.readUnsignedShort(), constant_pool, isRuntimeVisible);
+        final int num_element_value_pairs = (input.readUnsignedShort());
+        annotationEntry.element_value_pairs = new ArrayList<ElementValuePair>();
+        for (int i = 0; i < num_element_value_pairs; i++) {
+            annotationEntry.element_value_pairs.add(new ElementValuePair(input.readUnsignedShort(), ElementValue.readElementValue(input, constant_pool),
+                    constant_pool));
+        }
+        return annotationEntry;
+    }
+
+    public AnnotationEntry(int type_index, ConstantPool constant_pool, boolean isRuntimeVisible) {
+        this.type_index = type_index;
+        this.constant_pool = constant_pool;
+        this.isRuntimeVisible = isRuntimeVisible;
+    }
+
+    public int getTypeIndex() {
+        return type_index;
+    }
+
+    public ConstantPool getConstantPool() {
+        return constant_pool;
+    }
+
+    public boolean isRuntimeVisible() {
+        return isRuntimeVisible;
+    }
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
+     * I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
+     * 
+     * @param v Visitor object
+     */
+    public void accept(Visitor v) {
+        v.visitAnnotationEntry(this);
+    }
+
+    /**
+     * @return the annotation type name
+     */
+    public String getAnnotationType() {
+        final ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(type_index, CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+    /**
+     * @return the annotation type index
+     */
+    public int getAnnotationTypeIndex() {
+        return type_index;
+    }
+
+    /**
+     * @return the number of element value pairs in this annotation entry
+     */
+    public final int getNumElementValuePairs() {
+        return element_value_pairs.size();
+    }
+
+    /**
+     * @return the element value pairs in this annotation entry
+     */
+    public ElementValuePair[] getElementValuePairs() {
+        // TODO return List
+        return element_value_pairs.toArray(new ElementValuePair[element_value_pairs.size()]);
+    }
+
+    public void dump(DataOutputStream dos) throws IOException {
+        dos.writeShort(type_index); // u2 index of type name in cpool
+        dos.writeShort(element_value_pairs.size()); // u2 element_value pair
+        // count
+        for (final ElementValuePair envp : element_value_pairs) {
+            envp.dump(dos);
+        }
+    }
+
+    public void addElementNameValuePair(ElementValuePair elementNameValuePair) {
+        element_value_pairs.add(elementNameValuePair);
+    }
+
+    public String toShortString() {
+        final StringBuilder result = new StringBuilder();
+        result.append("@");
+        result.append(getAnnotationType());
+        if (getElementValuePairs().length > 0) {
+            result.append("(");
+            for (int i = 0; i < getElementValuePairs().length; i++) {
+                final ElementValuePair element = getElementValuePairs()[i];
+                result.append(element.toShortString());
+            }
+            result.append(")");
+        }
+        return result.toString();
+    }
+
+    public static AnnotationEntry[] createAnnotationEntries(Attribute[] attrs) {
+        // Find attributes that contain annotation data
+        List<AnnotationEntry> accumulatedAnnotations = new ArrayList<AnnotationEntry>(attrs.length);
+        for (Attribute attribute : attrs) {
+            if (attribute instanceof Annotations) {
+                Annotations runtimeAnnotations = (Annotations) attribute;
+                Collections.addAll(accumulatedAnnotations, runtimeAnnotations.getAnnotationEntries());
+            }
+        }
+        return accumulatedAnnotations.toArray(new AnnotationEntry[accumulatedAnnotations.size()]);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Annotations.java b/src/main/java/org/apache/commons/bcel6/classfile/Annotations.java
new file mode 100644
index 0000000..1b19026
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Annotations.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * base class for annotations
+ * 
+ * @version $Id: Annotations
+ * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public abstract class Annotations extends Attribute {
+
+    private static final long serialVersionUID = 1L;
+
+    private AnnotationEntry[] annotation_table;
+    private final boolean isRuntimeVisible;
+
+    /**
+     * @param annotation_type the subclass type of the annotation
+     * @param name_index Index pointing to the name <em>Code</em>
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     */
+    Annotations(byte annotation_type, int name_index, int length, DataInput input, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException {
+        this(annotation_type, name_index, length, (AnnotationEntry[]) null, constant_pool, isRuntimeVisible);
+        final int annotation_table_length = (input.readUnsignedShort());
+        annotation_table = new AnnotationEntry[annotation_table_length];
+        for (int i = 0; i < annotation_table_length; i++) {
+            annotation_table[i] = AnnotationEntry.read(input, constant_pool, isRuntimeVisible);
+        }
+    }
+
+    /**
+     * @param annotation_type the subclass type of the annotation
+     * @param name_index Index pointing to the name <em>Code</em>
+     * @param length Content length in bytes
+     * @param annotation_table the actual annotations
+     * @param constant_pool Array of constants
+     */
+    public Annotations(byte annotation_type, int name_index, int length, AnnotationEntry[] annotation_table, ConstantPool constant_pool, boolean isRuntimeVisible) {
+        super(annotation_type, name_index, length, constant_pool);
+        setAnnotationTable(annotation_table);
+        this.isRuntimeVisible = isRuntimeVisible;
+    }
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
+     * I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
+     * 
+     * @param v Visitor object
+     */
+    @Override
+    public void accept(Visitor v) {
+        v.visitAnnotation(this);
+    }
+
+    /**
+     * @param annotation_table the entries to set in this annotation
+     */
+    public final void setAnnotationTable(AnnotationEntry[] annotation_table) {
+        this.annotation_table = annotation_table;
+    }
+
+    /**
+     * returns the array of annotation entries in this annotation
+     */
+    public AnnotationEntry[] getAnnotationEntries() {
+        return annotation_table;
+    }
+
+    /**
+     * @return the number of annotation entries in this annotation
+     */
+    public final int getNumAnnotations() {
+        if (annotation_table == null) {
+            return 0;
+        }
+        return annotation_table.length;
+    }
+
+    public boolean isRuntimeVisible() {
+        return isRuntimeVisible;
+    }
+
+    protected void writeAnnotations(DataOutputStream dos) throws IOException {
+        if (annotation_table == null) {
+            return;
+        }
+        dos.writeShort(annotation_table.length);
+        for (AnnotationEntry element : annotation_table) {
+            element.dump(dos);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ArrayElementValue.java b/src/main/java/org/apache/commons/bcel6/classfile/ArrayElementValue.java
new file mode 100644
index 0000000..7c6cee4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ArrayElementValue.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * @since 6.0
+ */
+public class ArrayElementValue extends ElementValue
+{
+    // For array types, this is the array
+    private final ElementValue[] evalues;
+
+    @Override
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+        sb.append("{");
+        for (int i = 0; i < evalues.length; i++)
+        {
+            sb.append(evalues[i].toString());
+            if ((i + 1) < evalues.length) {
+                sb.append(",");
+            }
+        }
+        sb.append("}");
+        return sb.toString();
+    }
+
+    public ArrayElementValue(int type, ElementValue[] datums, ConstantPool cpool)
+    {
+        super(type, cpool);
+        if (type != ARRAY) {
+            throw new RuntimeException(
+                    "Only element values of type array can be built with this ctor - type specified: " + type);
+        }
+        this.evalues = datums;
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 type of value (ARRAY == '[')
+        dos.writeShort(evalues.length);
+        for (ElementValue evalue : evalues) {
+            evalue.dump(dos);
+        }
+    }
+
+    @Override
+    public String stringifyValue()
+    {
+        StringBuilder sb = new StringBuilder();
+        sb.append("[");
+        for (int i = 0; i < evalues.length; i++)
+        {
+            sb.append(evalues[i].stringifyValue());
+            if ((i + 1) < evalues.length) {
+                sb.append(",");
+            }
+        }
+        sb.append("]");
+        return sb.toString();
+    }
+
+    public ElementValue[] getElementValuesArray()
+    {
+        return evalues;
+    }
+
+    public int getElementValuesArraySize()
+    {
+        return evalues.length;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java b/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java
new file mode 100644
index 0000000..4a96a58
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Attribute.java
@@ -0,0 +1,355 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Abstract super class for <em>Attribute</em> objects. Currently the
+ * <em>ConstantValue</em>, <em>SourceFile</em>, <em>Code</em>,
+ * <em>Exceptiontable</em>, <em>LineNumberTable</em>,
+ * <em>LocalVariableTable</em>, <em>InnerClasses</em> and
+ * <em>Synthetic</em> attributes are supported. The <em>Unknown</em>
+ * attribute stands for non-standard-attributes.
+ * 
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see ConstantValue
+ * @see SourceFile
+ * @see Code
+ * @see Unknown
+ * @see ExceptionTable
+ * @see LineNumberTable
+ * @see LocalVariableTable
+ * @see InnerClasses
+ * @see Synthetic
+ * @see Deprecated
+ * @see Signature
+ */
+public abstract class Attribute implements Cloneable, Node, Serializable
+{
+    private static final long serialVersionUID = -1707826820310002955L;
+
+    protected int name_index; // Points to attribute name in constant pool TODO make private (has getter & setter)
+
+    protected int length; // Content length of attribute field TODO make private (has getter & setter)
+
+    protected byte tag; // Tag to distinguish subclasses TODO make private & final; supposed to be immutable
+
+    protected ConstantPool constant_pool; // TODO make private (has getter & setter)
+
+    protected Attribute(byte tag, int name_index, int length, ConstantPool constant_pool)
+    {
+        this.tag = tag;
+        this.name_index = name_index;
+        this.length = length;
+        this.constant_pool = constant_pool;
+    }
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     * 
+     * @param v
+     *            Visitor object
+     */
+    public abstract void accept(Visitor v);
+
+    /**
+     * Dump attribute to file stream in binary format.
+     * 
+     * @param file
+     *            Output file stream
+     * @throws IOException
+     */
+    public void dump(DataOutputStream file) throws IOException
+    {
+        file.writeShort(name_index);
+        file.writeInt(length);
+    }
+
+    private static final Map<String, Object> readers = new HashMap<String, Object>();
+
+    /**
+     * Add an Attribute reader capable of parsing (user-defined) attributes
+     * named "name". You should not add readers for the standard attributes such
+     * as "LineNumberTable", because those are handled internally.
+     * 
+     * @param name the name of the attribute as stored in the class file
+     * @param r    the reader object
+     * @deprecated Use {@link #addAttributeReader(String, UnknownAttributeReader)} instead
+     */
+    public static void addAttributeReader(String name, AttributeReader r)
+    {
+        readers.put(name, r);
+    }
+
+    /**
+     * Add an Attribute reader capable of parsing (user-defined) attributes
+     * named "name". You should not add readers for the standard attributes such
+     * as "LineNumberTable", because those are handled internally.
+     * 
+     * @param name the name of the attribute as stored in the class file
+     * @param r    the reader object
+     */
+    public static void addAttributeReader(String name, UnknownAttributeReader r)
+    {
+        readers.put(name, r);
+    }
+
+    /**
+     * Remove attribute reader
+     * 
+     * @param name the name of the attribute as stored in the class file
+     */
+    public static void removeAttributeReader(String name)
+    {
+        readers.remove(name);
+    }
+
+    /**
+     * Class method reads one attribute from the input data stream. This method
+     * must not be accessible from the outside. It is called by the Field and
+     * Method constructor methods.
+     * 
+     * @see Field
+     * @see Method
+     * 
+     * @param file Input stream
+     * @param constant_pool Array of constants
+     * @return Attribute
+     * @throws IOException
+     * @throws ClassFormatException
+     */
+    public static Attribute readAttribute(DataInputStream file, ConstantPool constant_pool)
+            throws IOException, ClassFormatException
+    {
+        return readAttribute((DataInput) file, constant_pool);
+    }
+
+    /**
+     * Class method reads one attribute from the input data stream. This method
+     * must not be accessible from the outside. It is called by the Field and
+     * Method constructor methods.
+     * 
+     * @see Field
+     * @see Method
+     * 
+     * @param file Input stream
+     * @param constant_pool Array of constants
+     * @return Attribute
+     * @throws IOException
+     * @throws ClassFormatException
+     */
+    public static Attribute readAttribute(DataInput file, ConstantPool constant_pool)
+            throws IOException, ClassFormatException
+    {
+        byte tag = Constants.ATTR_UNKNOWN; // Unknown attribute
+        // Get class name from constant pool via `name_index' indirection
+        int name_index = file.readUnsignedShort();
+        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8);
+        String name = c.getBytes();
+        
+        // Length of data in bytes
+        int length = file.readInt();
+        
+        // Compare strings to find known attribute
+        for (byte i = 0; i < Constants.KNOWN_ATTRIBUTES; i++)
+        {
+            if (name.equals(Constants.ATTRIBUTE_NAMES[i]))
+            {
+                tag = i; // found!
+                break;
+            }
+        }
+
+        // Call proper constructor, depending on `tag'
+        switch (tag)
+        {
+            case Constants.ATTR_UNKNOWN:
+                Object r = readers.get(name);
+                if (r instanceof UnknownAttributeReader)
+                {
+                    return ((UnknownAttributeReader) r).createAttribute(name_index, length, file, constant_pool);
+                }
+                else if (r instanceof  AttributeReader && file instanceof DataInputStream)
+                {
+                    return ((AttributeReader) r).createAttribute(name_index, length, (DataInputStream) file, constant_pool);
+                }
+                return new Unknown(name_index, length, file, constant_pool);
+            case Constants.ATTR_CONSTANT_VALUE:
+                return new ConstantValue(name_index, length, file, constant_pool);
+            case Constants.ATTR_SOURCE_FILE:
+                return new SourceFile(name_index, length, file, constant_pool);
+            case Constants.ATTR_CODE:
+                return new Code(name_index, length, file, constant_pool);
+            case Constants.ATTR_EXCEPTIONS:
+                return new ExceptionTable(name_index, length, file, constant_pool);
+            case Constants.ATTR_LINE_NUMBER_TABLE:
+                return new LineNumberTable(name_index, length, file, constant_pool);
+            case Constants.ATTR_LOCAL_VARIABLE_TABLE:
+                return new LocalVariableTable(name_index, length, file, constant_pool);
+            case Constants.ATTR_INNER_CLASSES:
+                return new InnerClasses(name_index, length, file, constant_pool);
+            case Constants.ATTR_SYNTHETIC:
+                return new Synthetic(name_index, length, file, constant_pool);
+            case Constants.ATTR_DEPRECATED:
+                return new Deprecated(name_index, length, file, constant_pool);
+            case Constants.ATTR_PMG:
+                return new PMGClass(name_index, length, file, constant_pool);
+            case Constants.ATTR_SIGNATURE:
+                return new Signature(name_index, length, file, constant_pool);
+            case Constants.ATTR_STACK_MAP:
+                return new StackMap(name_index, length, file, constant_pool);
+            case Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS:
+                return new RuntimeVisibleAnnotations(name_index, length, file, constant_pool);
+            case Constants.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS:
+                return new RuntimeInvisibleAnnotations(name_index, length, file, constant_pool);
+            case Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS:
+                return new RuntimeVisibleParameterAnnotations(name_index, length, file, constant_pool);
+            case Constants.ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS:
+                return new RuntimeInvisibleParameterAnnotations(name_index, length, file, constant_pool);
+            case Constants.ATTR_ANNOTATION_DEFAULT:
+                return new AnnotationDefault(name_index, length, file, constant_pool);
+            case Constants.ATTR_LOCAL_VARIABLE_TYPE_TABLE:
+                return new LocalVariableTypeTable(name_index, length, file, constant_pool);
+            case Constants.ATTR_ENCLOSING_METHOD:
+                return new EnclosingMethod(name_index, length, file, constant_pool);
+            case Constants.ATTR_STACK_MAP_TABLE:
+                return new StackMapTable(name_index, length, file, constant_pool);
+            case Constants.ATTR_BOOTSTRAP_METHODS:
+                return new BootstrapMethods(name_index, length, file, constant_pool);
+            case Constants.ATTR_METHOD_PARAMETERS:
+                return new MethodParameters(name_index, length, file, constant_pool);
+            default:
+                // Never reached
+                throw new IllegalStateException("Unrecognized attribute type tag parsed: " + tag);
+        }
+    }
+
+    /**
+     * @return Name of attribute
+     */
+    public String getName()
+    {
+        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+    /**
+     * @return Length of attribute field in bytes.
+     */
+    public final int getLength()
+    {
+        return length;
+    }
+
+    /**
+     * @param length length in bytes.
+     */
+    public final void setLength(int length)
+    {
+        this.length = length;
+    }
+
+    /**
+     * @param name_index of attribute.
+     */
+    public final void setNameIndex(int name_index)
+    {
+        this.name_index = name_index;
+    }
+
+    /**
+     * @return Name index in constant pool of attribute name.
+     */
+    public final int getNameIndex()
+    {
+        return name_index;
+    }
+
+    /**
+     * @return Tag of attribute, i.e., its type. Value may not be altered, thus there is no setTag() method.
+     */
+    public final byte getTag()
+    {
+        return tag;
+    }
+
+    /**
+     * @return Constant pool used by this object.
+     * @see ConstantPool
+     */
+    public final ConstantPool getConstantPool()
+    {
+        return constant_pool;
+    }
+
+    /**
+     * @param constant_pool Constant pool to be used for this object.
+     * @see ConstantPool
+     */
+    public final void setConstantPool(ConstantPool constant_pool)
+    {
+        this.constant_pool = constant_pool;
+    }
+
+    /**
+     * Use copy() if you want to have a deep copy(), i.e., with all references
+     * copied correctly.
+     * 
+     * @return shallow copy of this attribute
+     */
+    @Override
+    public Object clone()
+    {
+        Attribute attr = null;
+        try
+        {
+            attr = (Attribute) super.clone();
+        }
+        catch (CloneNotSupportedException e)
+        {
+            throw new Error("Clone Not Supported"); // never happens
+        }
+        return attr;
+    }
+
+    /**
+     * @return deep copy of this attribute
+     */
+    public abstract Attribute copy(ConstantPool _constant_pool);
+
+    /**
+     * @return attribute name.
+     */
+    @Override
+    public String toString()
+    {
+        return Constants.ATTRIBUTE_NAMES[tag];
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/AttributeReader.java b/src/main/java/org/apache/commons/bcel6/classfile/AttributeReader.java
new file mode 100644
index 0000000..ce4ece4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/AttributeReader.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+/**
+ * Unknown (non-standard) attributes may be read via user-defined factory
+ * objects that can be registered with the Attribute.addAttributeReader
+ * method. These factory objects should implement this interface.
+
+ * @see Attribute
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * 
+ * @deprecated Use UnknownAttributeReader instead 
+ */
+public interface AttributeReader {
+
+    /**
+     When this attribute reader is added via the static method
+     Attribute.addAttributeReader, an attribute name is associated with it.
+     As the class file parser parses attributes, it will call various
+     AttributeReaders based on the name of the attributes it is
+     constructing.
+
+     @param name_index An index into the constant pool, indexing a
+     ConstantUtf8 that represents the name of the attribute.
+
+     @param length The length of the data contained in the attribute.  This
+     is written into the constant pool and should agree with what the
+     factory expects the length to be.
+
+     @param file This is the data input stream that the factory needs to read
+     its data from.
+
+     @param constant_pool This is the constant pool associated with the
+     Attribute that we are constructing.
+
+     @return The user-defined AttributeReader should take this data and use
+     it to construct an attribute.  In the case of errors, a null can be
+     returned which will cause the parsing of the class file to fail.
+
+     @see Attribute#addAttributeReader( String, AttributeReader )
+     */
+    Attribute createAttribute( int name_index, int length, java.io.DataInputStream file, ConstantPool constant_pool );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethod.java b/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethod.java
new file mode 100644
index 0000000..f7028ee
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethod.java
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a bootstrap method attribute, i.e., the bootstrap
+ * method ref, the number of bootstrap arguments and an array of the
+ * bootstrap arguments.
+ * 
+ * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.23">The class File Format : The BootstrapMethods Attribute</a>
+ * @since 6.0
+ */
+public class BootstrapMethod implements Serializable, Cloneable {
+
+    private static final long serialVersionUID = -4517534834047695344L;
+
+    /** Index of the CONSTANT_MethodHandle_info structure in the constant_pool table */
+    private int bootstrap_method_ref;
+
+    private int num_bootstrap_arguments;
+
+    /** Array of references to the constant_pool table */
+    private int[] bootstrap_arguments;
+
+
+    /**
+     * Initialize from another object.
+     */
+    public BootstrapMethod(BootstrapMethod c) {
+        this(c.getBootstrapMethodRef(), c.getNumBootstrapArguments(), c.getBootstrapArguments());
+    }
+
+    /**
+     * Construct object from input stream.
+     * 
+     * @param input Input stream
+     * @throws IOException
+     */
+    BootstrapMethod(DataInput input) throws IOException {
+        this(input.readUnsignedShort(), input.readUnsignedShort(), (int[]) null);
+
+        bootstrap_arguments = new int[num_bootstrap_arguments];
+        for (int i = 0; i < num_bootstrap_arguments; i++) {
+            bootstrap_arguments[i] = input.readUnsignedShort();
+        }
+    }
+
+
+    /**
+     * @param bootstrap_method_ref int index into constant_pool of CONSTANT_MethodHandle
+     * @param num_bootstrap_arguments int count of number of boostrap arguments
+     * @param bootstrap_arguments int[] indices into constant_pool of CONSTANT_<type>_info
+     */
+    public BootstrapMethod(int bootstrap_method_ref, int num_bootstrap_arguments, int[] bootstrap_arguments) {
+        this.bootstrap_method_ref = bootstrap_method_ref;
+        this.num_bootstrap_arguments = num_bootstrap_arguments;
+        this.bootstrap_arguments = bootstrap_arguments;
+    }
+
+    /**
+     * @return index into constant_pool of bootstrap_method
+     */
+    public int getBootstrapMethodRef() {
+        return bootstrap_method_ref;
+    }
+
+    /**
+     * @param bootstrap_method_ref int index into constant_pool of CONSTANT_MethodHandle
+     */
+    public void setBootstrapMethodRef(int bootstrap_method_ref) {
+        this.bootstrap_method_ref = bootstrap_method_ref;
+    }
+
+    /**
+     * @return int[] of bootstrap_method indices into constant_pool of CONSTANT_<type>_info
+     */
+    public int[] getBootstrapArguments() {
+        return bootstrap_arguments;
+    }
+
+    /**
+     * @return count of number of boostrap arguments
+     */
+    public int getNumBootstrapArguments() {
+        return num_bootstrap_arguments;
+    }
+
+    /**
+     * @param bootstrap_arguments int[] indices into constant_pool of CONSTANT_<type>_info
+     */
+    public void setBootstrapArguments(int[] bootstrap_arguments) {
+        this.bootstrap_arguments = bootstrap_arguments;
+    }
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return "BootstrapMethod(" + bootstrap_method_ref + ", " + num_bootstrap_arguments + ", "
+               //UNDONE
+               //+ bootstrap_arguments + ")";
+               + "UNDONE)";
+    }
+
+    /**
+     * @return Resolved string representation
+     */
+    public final String toString( ConstantPool constant_pool ) {
+        StringBuilder buf = new StringBuilder();
+        String bootstrap_method_name;
+        bootstrap_method_name = constant_pool.constantToString(bootstrap_method_ref,
+                Constants.CONSTANT_MethodHandle);
+        buf.append(Utility.compactClassName(bootstrap_method_name));
+        if (num_bootstrap_arguments > 0) {
+            buf.append("\n     Method Arguments:");
+            for (int i = 0; i < num_bootstrap_arguments; i++) {
+                buf.append("\n     ").append(i).append(": ");
+                buf.append(constant_pool.constantToString(constant_pool.getConstant(bootstrap_arguments[i])));
+            }
+        }
+        return buf.toString();
+    }
+
+    /**
+     * Dump object to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump(DataOutputStream file) throws IOException {
+        file.writeShort(bootstrap_method_ref);
+        file.writeShort(bootstrap_arguments.length);
+        for (int bootstrap_argument : bootstrap_arguments) {
+            file.writeShort(bootstrap_argument);
+        }
+    }
+
+    /**
+     * @return deep copy of this object
+     */
+    public BootstrapMethod copy() {
+        try {
+            return (BootstrapMethod) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethods.java b/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethods.java
new file mode 100644
index 0000000..95b48a0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/BootstrapMethods.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a BootstrapMethods attribute.
+ *
+ * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.23">The class File Format : The BootstrapMethods Attribute</a>
+ * @since 6.0
+ */
+public class BootstrapMethods extends Attribute {
+
+    private static final long serialVersionUID = -2169230245012340809L;
+
+    private BootstrapMethod[] bootstrap_methods;
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public BootstrapMethods(BootstrapMethods c) {
+        this(c.getNameIndex(), c.getLength(), c.getBootstrapMethods(), c.getConstantPool());
+    }
+
+
+    /**
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param bootstrap_methods array of bootstrap methods
+     * @param constant_pool Array of constants
+     */
+    public BootstrapMethods(int name_index, int length, BootstrapMethod[] bootstrap_methods, ConstantPool constant_pool) {
+        super(Constants.ATTR_BOOTSTRAP_METHODS, name_index, length, constant_pool);
+        this.bootstrap_methods = bootstrap_methods;
+    }
+
+    /**
+     * Construct object from Input stream.
+     *
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    BootstrapMethods(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
+        this(name_index, length, (BootstrapMethod[]) null, constant_pool);
+
+        int num_bootstrap_methods = input.readUnsignedShort();
+        bootstrap_methods = new BootstrapMethod[num_bootstrap_methods];
+        for (int i = 0; i < num_bootstrap_methods; i++) {
+            bootstrap_methods[i] = new BootstrapMethod(input);
+        }
+    }
+
+    /**
+     * @return array of bootstrap method "records"
+     */
+    public final BootstrapMethod[] getBootstrapMethods() {
+        return bootstrap_methods;
+    }
+
+    /**
+     * @param bootstrap_methods the array of bootstrap methods
+     */
+    public final void setBootstrapMethods(BootstrapMethod[] bootstrap_methods) {
+        this.bootstrap_methods = bootstrap_methods;
+    }
+
+    /**
+     * @param v Visitor object
+     */
+    @Override
+    public void accept(Visitor v) {
+        v.visitBootstrapMethods(this);
+    }
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public BootstrapMethods copy(ConstantPool _constant_pool) {
+        BootstrapMethods c = (BootstrapMethods) clone();
+        c.bootstrap_methods = new BootstrapMethod[bootstrap_methods.length];
+
+        for (int i = 0; i < bootstrap_methods.length; i++) {
+            c.bootstrap_methods[i] = bootstrap_methods[i].copy();
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+
+    /**
+     * Dump bootstrap methods attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump(DataOutputStream file) throws IOException {
+        super.dump(file);
+
+        file.writeShort(bootstrap_methods.length);
+        for (BootstrapMethod bootstrap_method : bootstrap_methods) {
+            bootstrap_method.dump(file);
+        }
+    }
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder();
+        buf.append("BootstrapMethods(");
+        buf.append(bootstrap_methods.length);
+        buf.append("):\n");
+        for (int i = 0; i < bootstrap_methods.length; i++) {
+            buf.append("  ").append(i).append(": ");
+            buf.append(bootstrap_methods[i].toString(constant_pool)).append("\n");
+        }
+        return buf.toString();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ClassElementValue.java b/src/main/java/org/apache/commons/bcel6/classfile/ClassElementValue.java
new file mode 100644
index 0000000..6dcfdda
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ClassElementValue.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * @since 6.0
+ */
+public class ClassElementValue extends ElementValue
+{
+    // For primitive types and string type, this points to the value entry in
+    // the cpool
+    // For 'class' this points to the class entry in the cpool
+    private final int idx;
+
+    public ClassElementValue(int type, int idx, ConstantPool cpool)
+    {
+        super(type, cpool);
+        this.idx = idx;
+    }
+
+    public int getIndex()
+    {
+        return idx;
+    }
+
+    public String getClassString()
+    {
+        ConstantUtf8 c = (ConstantUtf8) cpool.getConstant(idx,
+                Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+    @Override
+    public String stringifyValue()
+    {
+        ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(idx,
+                Constants.CONSTANT_Utf8);
+        return cu8.getBytes();
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 kind of value
+        dos.writeShort(idx);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ClassFormatException.java b/src/main/java/org/apache/commons/bcel6/classfile/ClassFormatException.java
new file mode 100644
index 0000000..5a18d09
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ClassFormatException.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+/** 
+ * Thrown when the BCEL attempts to read a class file and determines
+ * that the file is malformed or otherwise cannot be interpreted as a
+ * class file.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ClassFormatException extends RuntimeException {
+
+    private static final long serialVersionUID = -3569097343160139969L;
+
+    public ClassFormatException() {
+        super();
+    }
+
+
+    public ClassFormatException(String s) {
+        super(s);
+    }
+
+    public ClassFormatException(String s, Throwable initCause) {
+        super(s, initCause);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ClassParser.java b/src/main/java/org/apache/commons/bcel6/classfile/ClassParser.java
new file mode 100644
index 0000000..567c6c5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ClassParser.java
@@ -0,0 +1,304 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.BufferedInputStream;
+import java.io.DataInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Wrapper class that parses a given Java .class file. The method <A
+ * href ="#parse">parse</A> returns a <A href ="JavaClass.html">
+ * JavaClass</A> object on success. When an I/O error or an
+ * inconsistency occurs an appropiate exception is propagated back to
+ * the caller.
+ *
+ * The structure and the names comply, except for a few conveniences,
+ * exactly with the <A href="http://docs.oracle.com/javase/specs/">
+ * JVM specification 1.0</a>. See this paper for
+ * further details about the structure of a bytecode file.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
+ */
+public final class ClassParser {
+
+    private DataInputStream dataInputStream;
+    private final boolean fileOwned;
+    private final String file_name;
+    private String zip_file;
+    private int class_name_index, superclass_name_index;
+    private int major, minor; // Compiler version
+    private int access_flags; // Access rights of parsed class
+    private int[] interfaces; // Names of implemented interfaces
+    private ConstantPool constant_pool; // collection of constants
+    private Field[] fields; // class fields, i.e., its variables
+    private Method[] methods; // methods defined in the class
+    private Attribute[] attributes; // attributes defined in the class
+    private final boolean is_zip; // Loaded from zip file
+    private static final int BUFSIZE = 8192;
+
+
+    /**
+     * Parse class from the given stream.
+     *
+     * @param inputStream Input stream
+     * @param file_name File name
+     */
+    public ClassParser(InputStream inputStream, String file_name) {
+        this.file_name = file_name;
+        fileOwned = false;
+        String clazz = inputStream.getClass().getName(); // Not a very clean solution ...
+        is_zip = clazz.startsWith("java.util.zip.") || clazz.startsWith("java.util.jar.");
+        if (inputStream instanceof DataInputStream) {
+            this.dataInputStream = (DataInputStream) inputStream;
+        } else {
+            this.dataInputStream = new DataInputStream(new BufferedInputStream(inputStream, BUFSIZE));
+        }
+    }
+
+
+    /** Parse class from given .class file.
+     *
+     * @param file_name file name
+     */
+    public ClassParser(String file_name) {
+        is_zip = false;
+        this.file_name = file_name;
+        fileOwned = true;
+    }
+
+
+    /** Parse class from given .class file in a ZIP-archive
+     *
+     * @param zip_file zip file name
+     * @param file_name file name
+     */
+    public ClassParser(String zip_file, String file_name) {
+        is_zip = true;
+        fileOwned = true;
+        this.zip_file = zip_file;
+        this.file_name = file_name;
+    }
+
+
+    /**
+     * Parse the given Java class file and return an object that represents
+     * the contained data, i.e., constants, methods, fields and commands.
+     * A <em>ClassFormatException</em> is raised, if the file is not a valid
+     * .class file. (This does not include verification of the byte code as it
+     * is performed by the java interpreter).
+     *
+     * @return Class object representing the parsed class file
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    public JavaClass parse() throws IOException, ClassFormatException {
+        ZipFile zip = null;
+        try {
+            if (fileOwned) {
+                if (is_zip) {
+                    zip = new ZipFile(zip_file);
+                    ZipEntry entry = zip.getEntry(file_name);
+
+                    if (entry == null) {
+                        throw new IOException("File " + file_name + " not found");
+                    }
+
+                    dataInputStream = new DataInputStream(new BufferedInputStream(zip.getInputStream(entry),
+                            BUFSIZE));
+                } else {
+                    dataInputStream = new DataInputStream(new BufferedInputStream(new FileInputStream(
+                            file_name), BUFSIZE));
+                }
+            }
+            /****************** Read headers ********************************/
+            // Check magic tag of class file
+            readID();
+            // Get compiler version
+            readVersion();
+            /****************** Read constant pool and related **************/
+            // Read constant pool entries
+            readConstantPool();
+            // Get class information
+            readClassInfo();
+            // Get interface information, i.e., implemented interfaces
+            readInterfaces();
+            /****************** Read class fields and methods ***************/
+            // Read class fields, i.e., the variables of the class
+            readFields();
+            // Read class methods, i.e., the functions in the class
+            readMethods();
+            // Read class attributes
+            readAttributes();
+            // Check for unknown variables
+            //Unknown[] u = Unknown.getUnknownAttributes();
+            //for(int i=0; i < u.length; i++)
+            //  System.err.println("WARNING: " + u[i]);
+            // Everything should have been read now
+            //      if(file.available() > 0) {
+            //        int bytes = file.available();
+            //        byte[] buf = new byte[bytes];
+            //        file.read(buf);
+            //        if(!(is_zip && (buf.length == 1))) {
+            //      System.err.println("WARNING: Trailing garbage at end of " + file_name);
+            //      System.err.println(bytes + " extra bytes: " + Utility.toHexString(buf));
+            //        }
+            //      }
+        } finally {
+            // Read everything of interest, so close the file
+            if (fileOwned) {
+                try {
+                    if (dataInputStream != null) {
+                        dataInputStream.close();
+                    }
+                    if (zip != null) {
+                        zip.close();
+                    }
+                } catch (IOException ioe) {
+                    //ignore close exceptions
+                }
+            }
+        }
+        // Return the information we have gathered in a new object
+        return new JavaClass(class_name_index, superclass_name_index, file_name, major, minor,
+                access_flags, constant_pool, interfaces, fields, methods, attributes, is_zip
+                        ? JavaClass.ZIP
+                        : JavaClass.FILE);
+    }
+
+
+    /**
+     * Read information about the attributes of the class.
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    private void readAttributes() throws IOException, ClassFormatException {
+        int attributes_count = dataInputStream.readUnsignedShort();
+        attributes = new Attribute[attributes_count];
+        for (int i = 0; i < attributes_count; i++) {
+            attributes[i] = Attribute.readAttribute(dataInputStream, constant_pool);
+        }
+    }
+
+
+    /**
+     * Read information about the class and its super class.
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    private void readClassInfo() throws IOException, ClassFormatException {
+        access_flags = dataInputStream.readUnsignedShort();
+        /* Interfaces are implicitely abstract, the flag should be set
+         * according to the JVM specification.
+         */
+        if ((access_flags & Constants.ACC_INTERFACE) != 0) {
+            access_flags |= Constants.ACC_ABSTRACT;
+        }
+        if (((access_flags & Constants.ACC_ABSTRACT) != 0)
+                && ((access_flags & Constants.ACC_FINAL) != 0)) {
+            throw new ClassFormatException("Class " + file_name + " can't be both final and abstract");
+        }
+        class_name_index = dataInputStream.readUnsignedShort();
+        superclass_name_index = dataInputStream.readUnsignedShort();
+    }
+
+
+    /**
+     * Read constant pool entries.
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    private void readConstantPool() throws IOException, ClassFormatException {
+        constant_pool = new ConstantPool(dataInputStream);
+    }
+
+
+    /**
+     * Read information about the fields of the class, i.e., its variables.
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    private void readFields() throws IOException, ClassFormatException {
+        int fields_count = dataInputStream.readUnsignedShort();
+        fields = new Field[fields_count];
+        for (int i = 0; i < fields_count; i++) {
+            fields[i] = new Field(dataInputStream, constant_pool);
+        }
+    }
+
+
+    /******************** Private utility methods **********************/
+    /**
+     * Check whether the header of the file is ok.
+     * Of course, this has to be the first action on successive file reads.
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    private void readID() throws IOException, ClassFormatException {
+        int magic = 0xCAFEBABE;
+        if (dataInputStream.readInt() != magic) {
+            throw new ClassFormatException(file_name + " is not a Java .class file");
+        }
+    }
+
+
+    /**
+     * Read information about the interfaces implemented by this class.
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    private void readInterfaces() throws IOException, ClassFormatException {
+        int interfaces_count = dataInputStream.readUnsignedShort();
+        interfaces = new int[interfaces_count];
+        for (int i = 0; i < interfaces_count; i++) {
+            interfaces[i] = dataInputStream.readUnsignedShort();
+        }
+    }
+
+
+    /**
+     * Read information about the methods of the class.
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    private void readMethods() throws IOException, ClassFormatException {
+        int methods_count = dataInputStream.readUnsignedShort();
+        methods = new Method[methods_count];
+        for (int i = 0; i < methods_count; i++) {
+            methods[i] = new Method(dataInputStream, constant_pool);
+        }
+    }
+
+
+    /**
+     * Read major and minor version of compiler which created the file.
+     * @throws  IOException
+     * @throws  ClassFormatException
+     */
+    private void readVersion() throws IOException, ClassFormatException {
+        minor = dataInputStream.readUnsignedShort();
+        major = dataInputStream.readUnsignedShort();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Code.java b/src/main/java/org/apache/commons/bcel6/classfile/Code.java
new file mode 100644
index 0000000..7a62580
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Code.java
@@ -0,0 +1,356 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class represents a chunk of Java byte code contained in a
+ * method. It is instantiated by the
+ * <em>Attribute.readAttribute()</em> method. A <em>Code</em>
+ * attribute contains informations about operand stack, local
+ * variables, byte code and the exceptions handled within this
+ * method.
+ *
+ * This attribute has attributes itself, namely <em>LineNumberTable</em> which
+ * is used for debugging purposes and <em>LocalVariableTable</em> which 
+ * contains information about the local variables.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Attribute
+ * @see     CodeException
+ * @see     LineNumberTable
+ * @see LocalVariableTable
+ */
+public final class Code extends Attribute {
+
+    private static final long serialVersionUID = -432884354459701506L;
+    private int max_stack; // Maximum size of stack used by this method
+    private int max_locals; // Number of local variables
+    private byte[] code; // Actual byte code
+    private CodeException[] exception_table; // Table of handled exceptions
+    private Attribute[] attributes; // or LocalVariable
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use copy() for a physical copy.
+     */
+    public Code(Code c) {
+        this(c.getNameIndex(), c.getLength(), c.getMaxStack(), c.getMaxLocals(), c.getCode(), c
+                .getExceptionTable(), c.getAttributes(), c.getConstantPool());
+    }
+
+
+    /**
+     * @param name_index Index pointing to the name <em>Code</em>
+     * @param length Content length in bytes
+     * @param file Input stream
+     * @param constant_pool Array of constants
+     */
+    Code(int name_index, int length, DataInput file, ConstantPool constant_pool)
+            throws IOException {
+        // Initialize with some default values which will be overwritten later
+        this(name_index, length, file.readUnsignedShort(), file.readUnsignedShort(), (byte[]) null,
+                (CodeException[]) null, (Attribute[]) null, constant_pool);
+        int code_length = file.readInt();
+        code = new byte[code_length]; // Read byte code
+        file.readFully(code);
+        /* Read exception table that contains all regions where an exception
+         * handler is active, i.e., a try { ... } catch() block.
+         */
+        int exception_table_length = file.readUnsignedShort();
+        exception_table = new CodeException[exception_table_length];
+        for (int i = 0; i < exception_table_length; i++) {
+            exception_table[i] = new CodeException(file);
+        }
+        /* Read all attributes, currently `LineNumberTable' and
+         * `LocalVariableTable'
+         */
+        int attributes_count = file.readUnsignedShort();
+        attributes = new Attribute[attributes_count];
+        for (int i = 0; i < attributes_count; i++) {
+            attributes[i] = Attribute.readAttribute(file, constant_pool);
+        }
+        /* Adjust length, because of setAttributes in this(), s.b.  length
+         * is incorrect, because it didn't take the internal attributes
+         * into account yet! Very subtle bug, fixed in 3.1.1.
+         */
+        this.length = length;
+    }
+
+
+    /**
+     * @param name_index Index pointing to the name <em>Code</em>
+     * @param length Content length in bytes
+     * @param max_stack Maximum size of stack
+     * @param max_locals Number of local variables
+     * @param code Actual byte code
+     * @param exception_table Table of handled exceptions
+     * @param attributes Attributes of code: LineNumber or LocalVariable
+     * @param constant_pool Array of constants
+     */
+    public Code(int name_index, int length, int max_stack, int max_locals, byte[] code,
+            CodeException[] exception_table, Attribute[] attributes, ConstantPool constant_pool) {
+        super(Constants.ATTR_CODE, name_index, length, constant_pool);
+        this.max_stack = max_stack;
+        this.max_locals = max_locals;
+        setCode(code);
+        setExceptionTable(exception_table);
+        setAttributes(attributes); // Overwrites length!
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitCode(this);
+    }
+
+
+    /**
+     * Dump code attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(max_stack);
+        file.writeShort(max_locals);
+        file.writeInt(code.length);
+        file.write(code, 0, code.length);
+        file.writeShort(exception_table.length);
+        for (CodeException exception : exception_table) {
+            exception.dump(file);
+        }
+        file.writeShort(attributes.length);
+        for (Attribute attribute : attributes) {
+            attribute.dump(file);
+        }
+    }
+
+
+    /**
+     * @return Collection of code attributes.
+     * @see Attribute
+     */
+    public final Attribute[] getAttributes() {
+        return attributes;
+    }
+
+
+    /**
+     * @return LineNumberTable of Code, if it has one
+     */
+    public LineNumberTable getLineNumberTable() {
+        for (Attribute attribute : attributes) {
+            if (attribute instanceof LineNumberTable) {
+                return (LineNumberTable) attribute;
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * @return LocalVariableTable of Code, if it has one
+     */
+    public LocalVariableTable getLocalVariableTable() {
+        for (Attribute attribute : attributes) {
+            if (attribute instanceof LocalVariableTable) {
+                return (LocalVariableTable) attribute;
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * @return Actual byte code of the method.
+     */
+    public final byte[] getCode() {
+        return code;
+    }
+
+
+    /**
+     * @return Table of handled exceptions.
+     * @see CodeException
+     */
+    public final CodeException[] getExceptionTable() {
+        return exception_table;
+    }
+
+
+    /**
+     * @return Number of local variables.
+     */
+    public final int getMaxLocals() {
+        return max_locals;
+    }
+
+
+    /**
+     * @return Maximum size of stack used by this method.
+     */
+    public final int getMaxStack() {
+        return max_stack;
+    }
+
+
+    /**
+     * @return the internal length of this code attribute (minus the first 6 bytes) 
+     * and excluding all its attributes
+     */
+    private int getInternalLength() {
+        return 2 /*max_stack*/+ 2 /*max_locals*/+ 4 /*code length*/
+                + code.length /*byte-code*/
+                + 2 /*exception-table length*/
+                + 8 * (exception_table == null ? 0 : exception_table.length) /* exception table */
+                + 2 /* attributes count */;
+    }
+
+
+    /**
+     * @return the full size of this code attribute, minus its first 6 bytes,
+     * including the size of all its contained attributes
+     */
+    private int calculateLength() {
+        int len = 0;
+        if (attributes != null) {
+            for (Attribute attribute : attributes) {
+                len += attribute.length + 6 /*attribute header size*/;
+            }
+        }
+        return len + getInternalLength();
+    }
+
+
+    /**
+     * @param attributes the attributes to set for this Code
+     */
+    public final void setAttributes( Attribute[] attributes ) {
+        this.attributes = attributes != null ? attributes : new Attribute[0];
+        length = calculateLength(); // Adjust length
+    }
+
+
+    /**
+     * @param code byte code
+     */
+    public final void setCode( byte[] code ) {
+        this.code = code != null ? code : new byte[0];
+        length = calculateLength(); // Adjust length
+    }
+
+
+    /**
+     * @param exception_table exception table
+     */
+    public final void setExceptionTable( CodeException[] exception_table ) {
+        this.exception_table = exception_table != null ? exception_table : new CodeException[0];
+        length = calculateLength(); // Adjust length
+    }
+
+
+    /**
+     * @param max_locals maximum number of local variables
+     */
+    public final void setMaxLocals( int max_locals ) {
+        this.max_locals = max_locals;
+    }
+
+
+    /**
+     * @param max_stack maximum stack size
+     */
+    public final void setMaxStack( int max_stack ) {
+        this.max_stack = max_stack;
+    }
+
+
+    /**
+     * @return String representation of code chunk.
+     */
+    public final String toString( boolean verbose ) {
+        StringBuilder buf = new StringBuilder(100);
+        buf.append("Code(max_stack = ").append(max_stack).append(", max_locals = ").append(
+                max_locals).append(", code_length = ").append(code.length).append(")\n").append(
+                Utility.codeToString(code, constant_pool, 0, -1, verbose));
+        if (exception_table.length > 0) {
+            buf.append("\nException handler(s) = \n").append("From\tTo\tHandler\tType\n");
+            for (CodeException exception : exception_table) {
+                buf.append(exception.toString(constant_pool, verbose)).append("\n");
+            }
+        }
+        if (attributes.length > 0) {
+            buf.append("\nAttribute(s) = \n");
+            for (Attribute attribute : attributes) {
+                buf.append(attribute.toString()).append("\n");
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return String representation of code chunk.
+     */
+    @Override
+    public final String toString() {
+        return toString(true);
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     * 
+     * @param _constant_pool the constant pool to duplicate
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        Code c = (Code) clone();
+        if (code != null) {
+            c.code = new byte[code.length];
+            System.arraycopy(code, 0, c.code, 0, code.length);
+        }
+        c.constant_pool = _constant_pool;
+        c.exception_table = new CodeException[exception_table.length];
+        for (int i = 0; i < exception_table.length; i++) {
+            c.exception_table[i] = exception_table[i].copy();
+        }
+        c.attributes = new Attribute[attributes.length];
+        for (int i = 0; i < attributes.length; i++) {
+            c.attributes[i] = attributes[i].copy(_constant_pool);
+        }
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java b/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java
new file mode 100644
index 0000000..577d0fc
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/CodeException.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents an entry in the exception table of the <em>Code</em>
+ * attribute and is used only there. It contains a range in which a
+ * particular exception handler is active.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Code
+ */
+public final class CodeException implements Cloneable, Constants, Node, Serializable {
+
+    private static final long serialVersionUID = 2972500041254967221L;
+    private int start_pc; // Range in the code the exception handler is
+    private int end_pc; // active. start_pc is inclusive, end_pc exclusive
+    private int handler_pc; /* Starting address of exception handler, i.e.,
+     * an offset from start of code.
+     */
+    private int catch_type; /* If this is zero the handler catches any
+     * exception, otherwise it points to the
+     * exception class which is to be caught.
+     */
+
+
+    /**
+     * Initialize from another object.
+     */
+    public CodeException(CodeException c) {
+        this(c.getStartPC(), c.getEndPC(), c.getHandlerPC(), c.getCatchType());
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * @param file Input stream
+     * @throws IOException
+     */
+    CodeException(DataInput file) throws IOException {
+        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
+                .readUnsignedShort());
+    }
+
+
+    /**
+     * @param start_pc Range in the code the exception handler is active,
+     * start_pc is inclusive while
+     * @param end_pc is exclusive
+     * @param handler_pc Starting address of exception handler, i.e.,
+     * an offset from start of code.
+     * @param catch_type If zero the handler catches any 
+     * exception, otherwise it points to the exception class which is 
+     * to be caught.
+     */
+    public CodeException(int start_pc, int end_pc, int handler_pc, int catch_type) {
+        this.start_pc = start_pc;
+        this.end_pc = end_pc;
+        this.handler_pc = handler_pc;
+        this.catch_type = catch_type;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitCodeException(this);
+    }
+
+
+    /**
+     * Dump code exception to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeShort(start_pc);
+        file.writeShort(end_pc);
+        file.writeShort(handler_pc);
+        file.writeShort(catch_type);
+    }
+
+
+    /**
+     * @return 0, if the handler catches any exception, otherwise it points to
+     * the exception class which is to be caught.
+     */
+    public final int getCatchType() {
+        return catch_type;
+    }
+
+
+    /**
+     * @return Exclusive end index of the region where the handler is active.
+     */
+    public final int getEndPC() {
+        return end_pc;
+    }
+
+
+    /**
+     * @return Starting address of exception handler, relative to the code.
+     */
+    public final int getHandlerPC() {
+        return handler_pc;
+    }
+
+
+    /**
+     * @return Inclusive start index of the region where the handler is active.
+     */
+    public final int getStartPC() {
+        return start_pc;
+    }
+
+
+    /**
+     * @param catch_type the type of exception that is caught
+     */
+    public final void setCatchType( int catch_type ) {
+        this.catch_type = catch_type;
+    }
+
+
+    /**
+     * @param end_pc end of handled block
+     */
+    public final void setEndPC( int end_pc ) {
+        this.end_pc = end_pc;
+    }
+
+
+    /**
+     * @param handler_pc where the actual code is
+     */
+    public final void setHandlerPC( int handler_pc ) {
+        this.handler_pc = handler_pc;
+    }
+
+
+    /**
+     * @param start_pc start of handled block
+     */
+    public final void setStartPC( int start_pc ) {
+        this.start_pc = start_pc;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return "CodeException(start_pc = " + start_pc + ", end_pc = " + end_pc + ", handler_pc = "
+                + handler_pc + ", catch_type = " + catch_type + ")";
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    public final String toString( ConstantPool cp, boolean verbose ) {
+        String str;
+        if (catch_type == 0) {
+            str = "<Any exception>(0)";
+        } else {
+            str = Utility.compactClassName(cp.getConstantString(catch_type, CONSTANT_Class), false)
+                    + (verbose ? "(" + catch_type + ")" : "");
+        }
+        return start_pc + "\t" + end_pc + "\t" + handler_pc + "\t" + str;
+    }
+
+
+    public final String toString( ConstantPool cp ) {
+        return toString(cp, true);
+    }
+
+
+    /**
+     * @return deep copy of this object
+     */
+    public CodeException copy() {
+        try {
+            return (CodeException) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Constant.java b/src/main/java/org/apache/commons/bcel6/classfile/Constant.java
new file mode 100644
index 0000000..cfb382d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Constant.java
@@ -0,0 +1,205 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.util.BCELComparator;
+
+/**
+ * Abstract superclass for classes to represent the different constant types
+ * in the constant pool of a class file. The classes keep closely to
+ * the JVM specification.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class Constant implements Cloneable, Node, Serializable {
+
+    private static final long serialVersionUID = 5739037344085356353L;
+    private static BCELComparator _cmp = new BCELComparator() {
+
+        public boolean equals( Object o1, Object o2 ) {
+            Constant THIS = (Constant) o1;
+            Constant THAT = (Constant) o2;
+            return THIS.toString().equals(THAT.toString());
+        }
+
+
+        public int hashCode( Object o ) {
+            Constant THIS = (Constant) o;
+            return THIS.toString().hashCode();
+        }
+    };
+    /* In fact this tag is redundant since we can distinguish different
+     * `Constant' objects by their type, i.e., via `instanceof'. In some
+     * places we will use the tag for switch()es anyway.
+     *
+     * First, we want match the specification as closely as possible. Second we
+     * need the tag as an index to select the corresponding class name from the 
+     * `CONSTANT_NAMES' array.
+     */
+    protected byte tag; // TODO should be private & final
+
+
+    Constant(byte tag) {
+        this.tag = tag;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public abstract void accept( Visitor v );
+
+
+    public abstract void dump( DataOutputStream file ) throws IOException;
+
+
+    /**
+     * @return Tag of constant, i.e., its type. No setTag() method to avoid
+     * confusion.
+     */
+    public final byte getTag() {
+        return tag;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public String toString() {
+        return Constants.CONSTANT_NAMES[tag] + "[" + tag + "]";
+    }
+
+
+    /**
+     * @return deep copy of this constant
+     */
+    public Constant copy() {
+        try {
+            return (Constant) super.clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+
+
+    @Override
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new Error("Clone Not Supported"); // never happens
+        }
+    }
+
+
+    /**
+     * Read one constant from the given input, the type depends on a tag byte.
+     *
+     * @param input Input stream
+     * @return Constant object
+     */
+    static Constant readConstant( DataInput input ) throws IOException,
+            ClassFormatException {
+        byte b = input.readByte(); // Read tag byte
+        switch (b) {
+            case Constants.CONSTANT_Class:
+                return new ConstantClass(input);
+            case Constants.CONSTANT_Fieldref:
+                return new ConstantFieldref(input);
+            case Constants.CONSTANT_Methodref:
+                return new ConstantMethodref(input);
+            case Constants.CONSTANT_InterfaceMethodref:
+                return new ConstantInterfaceMethodref(input);
+            case Constants.CONSTANT_String:
+                return new ConstantString(input);
+            case Constants.CONSTANT_Integer:
+                return new ConstantInteger(input);
+            case Constants.CONSTANT_Float:
+                return new ConstantFloat(input);
+            case Constants.CONSTANT_Long:
+                return new ConstantLong(input);
+            case Constants.CONSTANT_Double:
+                return new ConstantDouble(input);
+            case Constants.CONSTANT_NameAndType:
+                return new ConstantNameAndType(input);
+            case Constants.CONSTANT_Utf8:
+                return ConstantUtf8.getInstance(input);
+            case Constants.CONSTANT_MethodHandle:
+                return new ConstantMethodHandle(input);
+            case Constants.CONSTANT_MethodType:
+                return new ConstantMethodType(input);
+            case Constants.CONSTANT_InvokeDynamic:
+                return new ConstantInvokeDynamic(input);
+            default:
+                throw new ClassFormatException("Invalid byte tag in constant pool: " + b);
+        }
+    }
+
+
+    /**
+     * @return Comparison strategy object
+     */
+    public static BCELComparator getComparator() {
+        return _cmp;
+    }
+
+
+    /**
+     * @param comparator Comparison strategy object
+     */
+    public static void setComparator( BCELComparator comparator ) {
+        _cmp = comparator;
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default two Constant objects are said to be equal when
+     * the result of toString() is equal.
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        return _cmp.equals(this, obj);
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default return the hashcode of the result of toString().
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return _cmp.hashCode(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantCP.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantCP.java
new file mode 100644
index 0000000..eae8b57
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantCP.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * Abstract super class for Fieldref, Methodref, InterfaceMethodref and
+ *                          InvokeDynamic constants.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     ConstantFieldref
+ * @see     ConstantMethodref
+ * @see     ConstantInterfaceMethodref
+ * @see     ConstantInvokeDynamic
+ */
+public abstract class ConstantCP extends Constant {
+
+    private static final long serialVersionUID = -6275762995206209402L;
+    /** References to the constants containing the class and the field signature
+     */
+    // Note that this field is used to store the
+    // bootstrap_method_attr_index of a ConstantInvokeDynamic.
+    protected int class_index; // TODO make private (has getter & setter)
+    // This field has the same meaning for all subclasses.
+    protected int name_and_type_index; // TODO make private (has getter & setter)
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantCP(ConstantCP c) {
+        this(c.getTag(), c.getClassIndex(), c.getNameAndTypeIndex());
+    }
+
+
+    /**
+     * Initialize instance from file data.
+     *
+     * @param tag  Constant type tag
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantCP(byte tag, DataInput file) throws IOException {
+        this(tag, file.readUnsignedShort(), file.readUnsignedShort());
+    }
+
+
+    /**
+     * @param class_index Reference to the class containing the field
+     * @param name_and_type_index and the field signature
+     */
+    protected ConstantCP(byte tag, int class_index, int name_and_type_index) {
+        super(tag);
+        this.class_index = class_index;
+        this.name_and_type_index = name_and_type_index;
+    }
+
+
+    /** 
+     * Dump constant field reference to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeShort(class_index);
+        file.writeShort(name_and_type_index);
+    }
+
+
+    /**
+     * @return Reference (index) to class this constant refers to.
+     */
+    public final int getClassIndex() {
+        return class_index;
+    }
+
+
+    /**
+     * @return Reference (index) to bootstrap method this constant refers to.
+     *
+     * Note that this method is a functional duplicate of getClassIndex
+     * for use by ConstantInvokeDynamic.
+     */
+    public final int getBootstrapMethodAttrIndex() {
+        return class_index;  // AKA bootstrap_method_attr_index
+    }
+
+
+    /**
+     * @param class_index points to Constant_class 
+     */
+    public final void setClassIndex( int class_index ) {
+        this.class_index = class_index;
+    }
+
+
+    /**
+     * @param bootstrap_method_attr_index points to a BootstrapMethod. 
+     *
+     * Note that this method is a functional duplicate of setClassIndex
+     * for use by ConstantInvokeDynamic.
+     */
+    public final void setBootstrapMethodAttrIndex(int bootstrap_method_attr_index) {
+        this.class_index = bootstrap_method_attr_index;
+    }
+
+
+    /**
+     * @return Reference (index) to signature of the field.
+     */
+    public final int getNameAndTypeIndex() {
+        return name_and_type_index;
+    }
+
+
+    /**
+     * @param name_and_type_index points to Constant_NameAndType
+     */
+    public final void setNameAndTypeIndex( int name_and_type_index ) {
+        this.name_and_type_index = name_and_type_index;
+    }
+
+
+    /**
+     * @return Class this field belongs to.
+     */
+    public String getClass( ConstantPool cp ) {
+        return cp.constantToString(class_index, Constants.CONSTANT_Class);
+    }
+
+
+    /**
+     * @return String representation.
+     *
+     * not final as ConstantInvokeDynamic needs to modify
+     */
+    @Override
+    public String toString() {
+        return super.toString() + "(class_index = " + class_index + ", name_and_type_index = "
+                + name_and_type_index + ")";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantClass.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantClass.java
new file mode 100644
index 0000000..84ecdc9
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantClass.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a (external) class.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public final class ConstantClass extends Constant implements ConstantObject {
+
+    private static final long serialVersionUID = -1083450233715258720L;
+    private int name_index; // Identical to ConstantString except for the name
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantClass(ConstantClass c) {
+        this(c.getNameIndex());
+    }
+
+
+    /**
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantClass(DataInput file) throws IOException {
+        this(file.readUnsignedShort());
+    }
+
+
+    /**
+     * @param name_index Name index in constant pool.  Should refer to a
+     * ConstantUtf8.
+     */
+    public ConstantClass(int name_index) {
+        super(Constants.CONSTANT_Class);
+        this.name_index = name_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantClass(this);
+    }
+
+
+    /** 
+     * Dump constant class to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeShort(name_index);
+    }
+
+
+    /**
+     * @return Name index in constant pool of class name.
+     */
+    public final int getNameIndex() {
+        return name_index;
+    }
+
+
+    /**
+     * @param name_index the name index in the constant pool of this Constant Class
+     */
+    public final void setNameIndex( int name_index ) {
+        this.name_index = name_index;
+    }
+
+
+    /** @return String object
+     */
+    public Object getConstantValue( ConstantPool cp ) {
+        Constant c = cp.getConstant(name_index, Constants.CONSTANT_Utf8);
+        return ((ConstantUtf8) c).getBytes();
+    }
+
+
+    /** @return dereferenced string
+     */
+    public String getBytes( ConstantPool cp ) {
+        return (String) getConstantValue(cp);
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(name_index = " + name_index + ")";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantDouble.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantDouble.java
new file mode 100644
index 0000000..5f0ccbb
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantDouble.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a Double object.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public final class ConstantDouble extends Constant implements ConstantObject {
+
+    private static final long serialVersionUID = -7394764537394782136L;
+    private double bytes;
+
+
+    /** 
+     * @param bytes Data
+     */
+    public ConstantDouble(double bytes) {
+        super(Constants.CONSTANT_Double);
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantDouble(ConstantDouble c) {
+        this(c.getBytes());
+    }
+
+
+    /** 
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantDouble(DataInput file) throws IOException {
+        this(file.readDouble());
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantDouble(this);
+    }
+
+
+    /**
+     * Dump constant double to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeDouble(bytes);
+    }
+
+
+    /**
+     * @return data, i.e., 8 bytes.
+     */
+    public final double getBytes() {
+        return bytes;
+    }
+
+
+    /**
+     * @param bytes the raw bytes that represent the double value
+     */
+    public final void setBytes( double bytes ) {
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(bytes = " + bytes + ")";
+    }
+
+
+    /** @return Double object
+     */
+    public Object getConstantValue( ConstantPool cp ) {
+        return new Double(bytes);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantFieldref.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantFieldref.java
new file mode 100644
index 0000000..169e4bd
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantFieldref.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class represents a constant pool reference to a field.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class ConstantFieldref extends ConstantCP {
+
+    private static final long serialVersionUID = -3993784840787819802L;
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantFieldref(ConstantFieldref c) {
+        super(Constants.CONSTANT_Fieldref, c.getClassIndex(), c.getNameAndTypeIndex());
+    }
+
+
+    /**
+     * Initialize instance from input data.
+     *
+     * @param input input stream
+     * @throws IOException
+     */
+    ConstantFieldref(DataInput input) throws IOException {
+        super(Constants.CONSTANT_Fieldref, input);
+    }
+
+
+    /**
+     * @param class_index Reference to the class containing the Field
+     * @param name_and_type_index and the Field signature
+     */
+    public ConstantFieldref(int class_index, int name_and_type_index) {
+        super(Constants.CONSTANT_Fieldref, class_index, name_and_type_index);
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of Fields,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantFieldref(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantFloat.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantFloat.java
new file mode 100644
index 0000000..ee6f61f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantFloat.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a float object.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public final class ConstantFloat extends Constant implements ConstantObject {
+
+    private static final long serialVersionUID = -2316732495687628398L;
+    private float bytes;
+
+
+    /** 
+     * @param bytes Data
+     */
+    public ConstantFloat(float bytes) {
+        super(Constants.CONSTANT_Float);
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public ConstantFloat(ConstantFloat c) {
+        this(c.getBytes());
+    }
+
+
+    /** 
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantFloat(DataInput file) throws IOException {
+        this(file.readFloat());
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantFloat(this);
+    }
+
+
+    /**
+     * Dump constant float to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeFloat(bytes);
+    }
+
+
+    /**
+     * @return data, i.e., 4 bytes.
+     */
+    public final float getBytes() {
+        return bytes;
+    }
+
+
+    /**
+     * @param bytes the raw bytes that represent this float
+     */
+    public final void setBytes( float bytes ) {
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(bytes = " + bytes + ")";
+    }
+
+
+    /** @return Float object
+     */
+    public Object getConstantValue( ConstantPool cp ) {
+        return new Float(bytes);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantInteger.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantInteger.java
new file mode 100644
index 0000000..0b38a51
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantInteger.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to an int object.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public final class ConstantInteger extends Constant implements ConstantObject {
+
+    private static final long serialVersionUID = -7040676276945754375L;
+    private int bytes;
+
+
+    /** 
+     * @param bytes Data
+     */
+    public ConstantInteger(int bytes) {
+        super(Constants.CONSTANT_Integer);
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantInteger(ConstantInteger c) {
+        this(c.getBytes());
+    }
+
+
+    /** 
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantInteger(DataInput file) throws IOException {
+        this(file.readInt());
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantInteger(this);
+    }
+
+
+    /**
+     * Dump constant integer to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeInt(bytes);
+    }
+
+
+    /**
+     * @return data, i.e., 4 bytes.
+     */
+    public final int getBytes() {
+        return bytes;
+    }
+
+
+    /**
+     * @param bytes the raw bytes that represent this integer
+     */
+    public final void setBytes( int bytes ) {
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(bytes = " + bytes + ")";
+    }
+
+
+    /** @return Integer object
+     */
+    public Object getConstantValue( ConstantPool cp ) {
+        return Integer.valueOf(bytes);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantInterfaceMethodref.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantInterfaceMethodref.java
new file mode 100644
index 0000000..b5b5c14
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantInterfaceMethodref.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class represents a constant pool reference to an interface method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class ConstantInterfaceMethodref extends ConstantCP {
+
+    private static final long serialVersionUID = -5311546335360612639L;
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantInterfaceMethodref(ConstantInterfaceMethodref c) {
+        super(Constants.CONSTANT_InterfaceMethodref, c.getClassIndex(), c.getNameAndTypeIndex());
+    }
+
+
+    /**
+     * Initialize instance from input data.
+     *
+     * @param input input stream
+     * @throws IOException
+     */
+    ConstantInterfaceMethodref(DataInput input) throws IOException {
+        super(Constants.CONSTANT_InterfaceMethodref, input);
+    }
+
+
+    /**
+     * @param class_index Reference to the class containing the method
+     * @param name_and_type_index and the method signature
+     */
+    public ConstantInterfaceMethodref(int class_index, int name_and_type_index) {
+        super(Constants.CONSTANT_InterfaceMethodref, class_index, name_and_type_index);
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantInterfaceMethodref(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantInvokeDynamic.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantInvokeDynamic.java
new file mode 100644
index 0000000..2e3e0af
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantInvokeDynamic.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a invoke dynamic.
+ * 
+ * @see     Constant
+ * @since 6.0
+ */
+public final class ConstantInvokeDynamic extends ConstantCP {
+
+    private static final long serialVersionUID = 4310367359017396174L;
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantInvokeDynamic(ConstantInvokeDynamic c) {
+        super(Constants.CONSTANT_InvokeDynamic, c.getBootstrapMethodAttrIndex(), c.getNameAndTypeIndex());
+    }
+
+
+    /**
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantInvokeDynamic(DataInput file) throws IOException {
+        super(Constants.CONSTANT_InvokeDynamic, file);
+    }
+
+
+    public ConstantInvokeDynamic(int bootstrap_method_attr_index, int name_and_type_index) {
+        super(Constants.CONSTANT_InvokeDynamic, bootstrap_method_attr_index, name_and_type_index);
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitly
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantInvokeDynamic(this);
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        // UNDONE: need to string replace "class_index" with "bootstrap_method_attr_index"
+        return super.toString();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantLong.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantLong.java
new file mode 100644
index 0000000..c5682ea
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantLong.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a long object.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public final class ConstantLong extends Constant implements ConstantObject {
+
+    private static final long serialVersionUID = 8495971186433816161L;
+    private long bytes;
+
+
+    /** 
+     * @param bytes Data
+     */
+    public ConstantLong(long bytes) {
+        super(Constants.CONSTANT_Long);
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantLong(ConstantLong c) {
+        this(c.getBytes());
+    }
+
+
+    /** 
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantLong(DataInput file) throws IOException {
+        this(file.readLong());
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantLong(this);
+    }
+
+
+    /**
+     * Dump constant long to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeLong(bytes);
+    }
+
+
+    /**
+     * @return data, i.e., 8 bytes.
+     */
+    public final long getBytes() {
+        return bytes;
+    }
+
+
+    /**
+     * @param bytes the raw bytes that represent this long
+     */
+    public final void setBytes( long bytes ) {
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(bytes = " + bytes + ")";
+    }
+
+
+    /** @return Long object
+     */
+    public Object getConstantValue( ConstantPool cp ) {
+        return Long.valueOf(bytes);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodHandle.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodHandle.java
new file mode 100644
index 0000000..a841e87
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodHandle.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a method handle.
+ * 
+ * @see     Constant
+ * @since 6.0
+ */
+public final class ConstantMethodHandle extends Constant {
+
+    private static final long serialVersionUID = -7875124116920198044L;
+    private int reference_kind;
+    private int reference_index;
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantMethodHandle(ConstantMethodHandle c) {
+        this(c.getReferenceKind(), c.getReferenceIndex());
+    }
+
+
+    /**
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantMethodHandle(DataInput file) throws IOException {
+        this(file.readUnsignedByte(), file.readUnsignedShort());
+    }
+
+
+    public ConstantMethodHandle(int reference_kind, int reference_index) {
+        super(Constants.CONSTANT_MethodHandle);
+        this.reference_kind = reference_kind;
+        this.reference_index = reference_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitly
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        // TODO Add .visitMethodHandle to Visitor interface
+    }
+
+
+    /**
+     * Dump method kind and index to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeByte(reference_kind);
+        file.writeShort(reference_index);
+    }
+
+
+    public int getReferenceKind() {
+        return reference_kind;
+    }
+
+
+    public void setReferenceKind(int reference_kind) {
+        this.reference_kind = reference_kind;
+    }
+
+
+    public int getReferenceIndex() {
+        return reference_index;
+    }
+
+
+    public void setReferenceIndex(int reference_index) {
+        this.reference_index = reference_index;
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(reference_kind = " + reference_kind +
+                ", reference_index = " + reference_index + ")";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodType.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodType.java
new file mode 100644
index 0000000..98c190a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodType.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a method type.
+ * 
+ * @see     Constant
+ * @since 6.0
+ */
+public final class ConstantMethodType extends Constant {
+
+    private static final long serialVersionUID = 6750768220616618881L;
+    private int descriptor_index;
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantMethodType(ConstantMethodType c) {
+        this(c.getDescriptorIndex());
+    }
+
+
+    /**
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantMethodType(DataInput file) throws IOException {
+        this(file.readUnsignedShort());
+    }
+
+
+    public ConstantMethodType(int descriptor_index) {
+        super(Constants.CONSTANT_MethodType);
+        this.descriptor_index = descriptor_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitly
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        // TODO Add .visitMethodType to Visitor interface
+    }
+
+
+    /**
+     * Dump name and signature index to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeShort(descriptor_index);
+    }
+
+
+    public int getDescriptorIndex() {
+        return descriptor_index;
+    }
+
+
+    public void setDescriptorIndex(int descriptor_index) {
+        this.descriptor_index = descriptor_index;
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(descriptor_index = " + descriptor_index + ")";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodref.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodref.java
new file mode 100644
index 0000000..d04be76
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantMethodref.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class represents a constant pool reference to a method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class ConstantMethodref extends ConstantCP {
+
+    private static final long serialVersionUID = -864296320352750967L;
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantMethodref(ConstantMethodref c) {
+        super(Constants.CONSTANT_Methodref, c.getClassIndex(), c.getNameAndTypeIndex());
+    }
+
+
+    /**
+     * Initialize instance from input data.
+     *
+     * @param input input stream
+     * @throws IOException
+     */
+    ConstantMethodref(DataInput input) throws IOException {
+        super(Constants.CONSTANT_Methodref, input);
+    }
+
+
+    /**
+     * @param class_index Reference to the class containing the method
+     * @param name_and_type_index and the method signature
+     */
+    public ConstantMethodref(int class_index, int name_and_type_index) {
+        super(Constants.CONSTANT_Methodref, class_index, name_and_type_index);
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantMethodref(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantNameAndType.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantNameAndType.java
new file mode 100644
index 0000000..a00d07b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantNameAndType.java
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to the name and signature
+ * of a field or method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public final class ConstantNameAndType extends Constant {
+
+    private static final long serialVersionUID = -7913354727264034451L;
+    private int name_index; // Name of field/method
+    private int signature_index; // and its signature.
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantNameAndType(ConstantNameAndType c) {
+        this(c.getNameIndex(), c.getSignatureIndex());
+    }
+
+
+    /**
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantNameAndType(DataInput file) throws IOException {
+        this(file.readUnsignedShort(), file.readUnsignedShort());
+    }
+
+
+    /**
+     * @param name_index Name of field/method
+     * @param signature_index and its signature
+     */
+    public ConstantNameAndType(int name_index, int signature_index) {
+        super(Constants.CONSTANT_NameAndType);
+        this.name_index = name_index;
+        this.signature_index = signature_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantNameAndType(this);
+    }
+
+
+    /**
+     * Dump name and signature index to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeShort(name_index);
+        file.writeShort(signature_index);
+    }
+
+
+    /**
+     * @return Name index in constant pool of field/method name.
+     */
+    public final int getNameIndex() {
+        return name_index;
+    }
+
+
+    /** @return name
+     */
+    public final String getName( ConstantPool cp ) {
+        return cp.constantToString(getNameIndex(), Constants.CONSTANT_Utf8);
+    }
+
+
+    /**
+     * @return Index in constant pool of field/method signature.
+     */
+    public final int getSignatureIndex() {
+        return signature_index;
+    }
+
+
+    /** @return signature
+     */
+    public final String getSignature( ConstantPool cp ) {
+        return cp.constantToString(getSignatureIndex(), Constants.CONSTANT_Utf8);
+    }
+
+
+    /**
+     * @param name_index the name index of this constant
+     */
+    public final void setNameIndex( int name_index ) {
+        this.name_index = name_index;
+    }
+
+
+    /**
+     * @param signature_index the signature index in the constant pool of this type
+     */
+    public final void setSignatureIndex( int signature_index ) {
+        this.signature_index = signature_index;
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(name_index = " + name_index + ", signature_index = "
+                + signature_index + ")";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantObject.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantObject.java
new file mode 100644
index 0000000..7d82555
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantObject.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+/** 
+ * This interface denotes those constants that have a "natural" value,
+ * such as ConstantLong, ConstantString, etc..
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public interface ConstantObject {
+
+    /** @return object representing the constant, e.g., Long for ConstantLong
+     */
+    Object getConstantValue( ConstantPool cp );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java
new file mode 100644
index 0000000..82789ab
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantPool.java
@@ -0,0 +1,373 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents the constant pool, i.e., a table of constants, of
+ * a parsed classfile. It may contain null references, due to the JVM
+ * specification that skips an entry after an 8-byte constant (double,
+ * long) entry.  Those interested in generating constant pools
+ * programatically should see <a href="../generic/ConstantPoolGen.html">
+ * ConstantPoolGen</a>.
+
+ * @version $Id$
+ * @see     Constant
+ * @see     org.apache.commons.bcel6.generic.ConstantPoolGen
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ConstantPool implements Cloneable, Node, Serializable {
+
+    private static final long serialVersionUID = -9093478476423540196L;
+    private Constant[] constant_pool;
+
+
+    /**
+     * @param constant_pool Array of constants
+     */
+    public ConstantPool(Constant[] constant_pool) {
+        setConstantPool(constant_pool);
+    }
+
+
+    /**
+     * Read constants from given input stream.
+     *
+     * @param input Input stream
+     * @throws IOException
+     * @throws ClassFormatException
+     */
+    public ConstantPool(DataInput input) throws IOException, ClassFormatException {
+        byte tag;
+        int constant_pool_count = input.readUnsignedShort();
+        constant_pool = new Constant[constant_pool_count];
+        /* constant_pool[0] is unused by the compiler and may be used freely
+         * by the implementation.
+         */
+        for (int i = 1; i < constant_pool_count; i++) {
+            constant_pool[i] = Constant.readConstant(input);
+            /* Quote from the JVM specification:
+             * "All eight byte constants take up two spots in the constant pool.
+             * If this is the n'th byte in the constant pool, then the next item
+             * will be numbered n+2"
+             * 
+             * Thus we have to increment the index counter.
+             */
+            tag = constant_pool[i].getTag();
+            if ((tag == Constants.CONSTANT_Double) || (tag == Constants.CONSTANT_Long)) {
+                i++;
+            }
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitConstantPool(this);
+    }
+
+
+    /**
+     * Resolve constant to a string representation.
+     *
+     * @param  c Constant to be printed
+     * @return String representation
+     */
+    public String constantToString( Constant c ) throws ClassFormatException {
+        String str;
+        int i;
+        byte tag = c.getTag();
+        switch (tag) {
+            case Constants.CONSTANT_Class:
+                i = ((ConstantClass) c).getNameIndex();
+                c = getConstant(i, Constants.CONSTANT_Utf8);
+                str = Utility.compactClassName(((ConstantUtf8) c).getBytes(), false);
+                break;
+            case Constants.CONSTANT_String:
+                i = ((ConstantString) c).getStringIndex();
+                c = getConstant(i, Constants.CONSTANT_Utf8);
+                str = "\"" + escape(((ConstantUtf8) c).getBytes()) + "\"";
+                break;
+            case Constants.CONSTANT_Utf8:
+                str = ((ConstantUtf8) c).getBytes();
+                break;
+            case Constants.CONSTANT_Double:
+                str = String.valueOf(((ConstantDouble) c).getBytes());
+                break;
+            case Constants.CONSTANT_Float:
+                str = String.valueOf(((ConstantFloat) c).getBytes());
+                break;
+            case Constants.CONSTANT_Long:
+                str = String.valueOf(((ConstantLong) c).getBytes());
+                break;
+            case Constants.CONSTANT_Integer:
+                str = String.valueOf(((ConstantInteger) c).getBytes());
+                break;
+            case Constants.CONSTANT_NameAndType:
+                str = (constantToString(((ConstantNameAndType) c).getNameIndex(),
+                        Constants.CONSTANT_Utf8)
+                        + ":" + constantToString(((ConstantNameAndType) c).getSignatureIndex(),
+                        Constants.CONSTANT_Utf8));
+                break;
+            case Constants.CONSTANT_InterfaceMethodref:
+            case Constants.CONSTANT_Methodref:
+            case Constants.CONSTANT_Fieldref:
+                str = (constantToString(((ConstantCP) c).getClassIndex(), Constants.CONSTANT_Class)
+                        + "." + constantToString(((ConstantCP) c).getNameAndTypeIndex(),
+                        Constants.CONSTANT_NameAndType));
+                break;
+            case Constants.CONSTANT_MethodHandle:
+                // Note that the ReferenceIndex may point to a Fieldref, Methodref or
+                // InterfaceMethodref - so we need to peek ahead to get the actual type.
+                ConstantMethodHandle cmh = (ConstantMethodHandle) c;
+                str = Constants.METHODHANDLE_NAMES[cmh.getReferenceKind()]
+                        + " " + constantToString(cmh.getReferenceIndex(),
+                        getConstant(cmh.getReferenceIndex()).getTag());
+                break;            
+            case Constants.CONSTANT_MethodType:
+                ConstantMethodType cmt = (ConstantMethodType) c;
+                str = constantToString(cmt.getDescriptorIndex(), Constants.CONSTANT_Utf8);
+                break;
+            case Constants.CONSTANT_InvokeDynamic:
+                ConstantInvokeDynamic cid = ((ConstantInvokeDynamic) c);
+                str = cid.getBootstrapMethodAttrIndex()
+                        + ":" + constantToString(cid.getNameAndTypeIndex(),
+                        Constants.CONSTANT_NameAndType);
+                break;
+            default: // Never reached
+                throw new RuntimeException("Unknown constant type " + tag);
+        }
+        return str;
+    }
+
+
+    private static String escape( String str ) {
+        int len = str.length();
+        StringBuilder buf = new StringBuilder(len + 5);
+        char[] ch = str.toCharArray();
+        for (int i = 0; i < len; i++) {
+            switch (ch[i]) {
+                case '\n':
+                    buf.append("\\n");
+                    break;
+                case '\r':
+                    buf.append("\\r");
+                    break;
+                case '\t':
+                    buf.append("\\t");
+                    break;
+                case '\b':
+                    buf.append("\\b");
+                    break;
+                case '"':
+                    buf.append("\\\"");
+                    break;
+                default:
+                    buf.append(ch[i]);
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * Retrieve constant at `index' from constant pool and resolve it to
+     * a string representation.
+     *
+     * @param  index of constant in constant pool
+     * @param  tag expected type
+     * @return String representation
+     */
+    public String constantToString( int index, byte tag ) throws ClassFormatException {
+        Constant c = getConstant(index, tag);
+        return constantToString(c);
+    }
+
+
+    /** 
+     * Dump constant pool to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public void dump( DataOutputStream file ) throws IOException {
+        file.writeShort(constant_pool.length);
+        for (int i = 1; i < constant_pool.length; i++) {
+            if (constant_pool[i] != null) {
+                constant_pool[i].dump(file);
+            }
+        }
+    }
+
+
+    /**
+     * Get constant from constant pool.
+     *
+     * @param  index Index in constant pool
+     * @return Constant value
+     * @see    Constant
+     */
+    public Constant getConstant( int index ) {
+        if (index >= constant_pool.length || index < 0) {
+            throw new ClassFormatException("Invalid constant pool reference: " + index
+                    + ". Constant pool size is: " + constant_pool.length);
+        }
+        return constant_pool[index];
+    }
+
+
+    /**
+     * Get constant from constant pool and check whether it has the
+     * expected type.
+     *
+     * @param  index Index in constant pool
+     * @param  tag Tag of expected constant, i.e., its type
+     * @return Constant value
+     * @see    Constant
+     * @throws  ClassFormatException
+     */
+    public Constant getConstant( int index, byte tag ) throws ClassFormatException {
+        Constant c;
+        c = getConstant(index);
+        if (c == null) {
+            throw new ClassFormatException("Constant pool at index " + index + " is null.");
+        }
+        if (c.getTag() != tag) {
+            throw new ClassFormatException("Expected class `" + Constants.CONSTANT_NAMES[tag]
+                    + "' at index " + index + " and got " + c);
+        }
+        return c;
+    }
+
+
+    /**
+     * @return Array of constants.
+     * @see    Constant
+     */
+    public Constant[] getConstantPool() {
+        return constant_pool;
+    }
+
+
+    /**
+     * Get string from constant pool and bypass the indirection of 
+     * `ConstantClass' and `ConstantString' objects. I.e. these classes have
+     * an index field that points to another entry of the constant pool of
+     * type `ConstantUtf8' which contains the real data.
+     *
+     * @param  index Index in constant pool
+     * @param  tag Tag of expected constant, either ConstantClass or ConstantString
+     * @return Contents of string reference
+     * @see    ConstantClass
+     * @see    ConstantString
+     * @throws  ClassFormatException
+     */
+    public String getConstantString( int index, byte tag ) throws ClassFormatException {
+        Constant c;
+        int i;
+        c = getConstant(index, tag);
+        /* This switch() is not that elegant, since the two classes have the
+         * same contents, they just differ in the name of the index
+         * field variable.
+         * But we want to stick to the JVM naming conventions closely though
+         * we could have solved these more elegantly by using the same
+         * variable name or by subclassing.
+         */
+        switch (tag) {
+            case Constants.CONSTANT_Class:
+                i = ((ConstantClass) c).getNameIndex();
+                break;
+            case Constants.CONSTANT_String:
+                i = ((ConstantString) c).getStringIndex();
+                break;
+            default:
+                throw new RuntimeException("getConstantString called with illegal tag " + tag);
+        }
+        // Finally get the string from the constant pool
+        c = getConstant(i, Constants.CONSTANT_Utf8);
+        return ((ConstantUtf8) c).getBytes();
+    }
+
+
+    /**
+     * @return Length of constant pool.
+     */
+    public int getLength() {
+        return constant_pool == null ? 0 : constant_pool.length;
+    }
+
+
+    /**
+     * @param constant Constant to set
+     */
+    public void setConstant( int index, Constant constant ) {
+        constant_pool[index] = constant;
+    }
+
+
+    /**
+     * @param constant_pool
+     */
+    public void setConstantPool( Constant[] constant_pool ) {
+        this.constant_pool = constant_pool;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public String toString() {
+        StringBuilder buf = new StringBuilder();
+        for (int i = 1; i < constant_pool.length; i++) {
+            buf.append(i).append(")").append(constant_pool[i]).append("\n");
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this constant pool
+     */
+    public ConstantPool copy() {
+        ConstantPool c = null;
+        try {
+            c = (ConstantPool) clone();
+            c.constant_pool = new Constant[constant_pool.length];
+            for (int i = 1; i < constant_pool.length; i++) {
+                if (constant_pool[i] != null) {
+                    c.constant_pool[i] = constant_pool[i].copy();
+                }
+            }
+        } catch (CloneNotSupportedException e) {
+        }
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantString.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantString.java
new file mode 100644
index 0000000..fce3e88
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantString.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a String object.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public final class ConstantString extends Constant implements ConstantObject {
+
+    private static final long serialVersionUID = 6603144389219397225L;
+    private int string_index; // Identical to ConstantClass except for this name
+
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantString(ConstantString c) {
+        this(c.getStringIndex());
+    }
+
+
+    /** 
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantString(DataInput file) throws IOException {
+        this(file.readUnsignedShort());
+    }
+
+
+    /**
+     * @param string_index Index of Constant_Utf8 in constant pool
+     */
+    public ConstantString(int string_index) {
+        super(Constants.CONSTANT_String);
+        this.string_index = string_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantString(this);
+    }
+
+
+    /**
+     * Dump constant field reference to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeShort(string_index);
+    }
+
+
+    /**
+     * @return Index in constant pool of the string (ConstantUtf8).
+     */
+    public final int getStringIndex() {
+        return string_index;
+    }
+
+
+    /**
+     * @param string_index the index into the constant of the string value
+     */
+    public final void setStringIndex( int string_index ) {
+        this.string_index = string_index;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(string_index = " + string_index + ")";
+    }
+
+
+    /** @return String object
+     */
+    public Object getConstantValue( ConstantPool cp ) {
+        Constant c = cp.getConstant(string_index, Constants.CONSTANT_Utf8);
+        return ((ConstantUtf8) c).getBytes();
+    }
+
+
+    /** @return dereferenced string
+     */
+    public String getBytes( ConstantPool cp ) {
+        return (String) getConstantValue(cp);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantUtf8.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantUtf8.java
new file mode 100644
index 0000000..7685fa8
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantUtf8.java
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class is derived from the abstract 
+ * <A HREF="org.apache.commons.bcel6.classfile.Constant.html">Constant</A> class 
+ * and represents a reference to a Utf8 encoded string.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Constant
+ */
+public final class ConstantUtf8 extends Constant {
+
+    private static final long serialVersionUID = -8709101585611518985L;
+    private final String bytes;
+
+    private static volatile int considered = 0;
+    private static volatile int hits = 0;
+    private static volatile int skipped = 0;
+    private static volatile int created = 0;
+
+    // Set the size to 0 or below to skip caching entirely
+    private static final int MAX_CACHED_SIZE = Integer.getInteger("bcel.maxcached.size", 200).intValue();
+    private static final boolean BCEL_STATISTICS = Boolean.getBoolean("bcel.statistics");
+
+
+    private static class CACHE_HOLDER {
+
+        private static final int MAX_CACHE_ENTRIES = 20000;
+        private static final int INITIAL_CACHE_CAPACITY = (int)(MAX_CACHE_ENTRIES/0.75);
+
+        private static final HashMap<String, ConstantUtf8> CACHE = 
+                new LinkedHashMap<String, ConstantUtf8>(INITIAL_CACHE_CAPACITY, 0.75f, true) {
+            private static final long serialVersionUID = -8506975356158971766L;
+
+            @Override
+            protected boolean removeEldestEntry(Map.Entry<String, ConstantUtf8> eldest) {
+                 return size() > MAX_CACHE_ENTRIES;
+            }
+        };
+
+    }
+
+    // for accesss by test code
+    static void printStats() {
+        System.err.println("Cache hit " + hits + "/" + considered +", " + skipped + " skipped");
+        System.err.println("Total of " + created + " ConstantUtf8 objects created");
+    }
+    
+    // for accesss by test code
+    static void clearStats() {
+        hits = considered = skipped = created = 0;
+    }
+
+    static {
+        if (BCEL_STATISTICS) {
+            Runtime.getRuntime().addShutdownHook(new Thread() {
+                @Override
+                public void run() {
+                    printStats();
+                }
+            });
+        }
+    }
+
+    public static ConstantUtf8 getCachedInstance(String s) {
+        if (s.length() > MAX_CACHED_SIZE) {
+            skipped++;
+            return  new ConstantUtf8(s);
+        }
+        considered++;
+        synchronized (ConstantUtf8.class) { // might be better with a specific lock object
+            ConstantUtf8 result = CACHE_HOLDER.CACHE.get(s);
+            if (result != null) {
+                    hits++;
+                    return result;
+                }
+            result = new ConstantUtf8(s);
+            CACHE_HOLDER.CACHE.put(s, result);
+            return result;
+        }
+    }
+
+    public static ConstantUtf8 getInstance(String s) {
+        return new ConstantUtf8(s);
+    }
+
+    public static ConstantUtf8 getInstance (DataInput input)  throws IOException {
+        return getInstance(input.readUTF());
+    }
+
+    /**
+     * Initialize from another object.
+     */
+    public ConstantUtf8(ConstantUtf8 c) {
+        this(c.getBytes());
+    }
+
+
+    /**
+     * Initialize instance from file data.
+     *
+     * @param file Input stream
+     * @throws IOException
+     */
+    ConstantUtf8(DataInput file) throws IOException {
+        super(Constants.CONSTANT_Utf8);
+        bytes = file.readUTF();
+        created++;
+    }
+
+
+    /**
+     * @param bytes Data
+     */
+    public ConstantUtf8(String bytes) {
+        super(Constants.CONSTANT_Utf8);
+        if (bytes == null) {
+            throw new IllegalArgumentException("bytes must not be null!");
+        }
+        this.bytes = bytes;
+        created++;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantUtf8(this);
+    }
+
+
+    /**
+     * Dump String in Utf8 format to file stream.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(tag);
+        file.writeUTF(bytes);
+    }
+
+
+    /**
+     * @return Data converted to string.
+     */
+    public final String getBytes() {
+        return bytes;
+    }
+
+
+    /**
+     * @param bytes the raw bytes of this Utf-8
+     * @deprecated
+     */
+    @java.lang.Deprecated
+    public final void setBytes( String bytes ) {
+        throw new UnsupportedOperationException();
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        return super.toString() + "(\"" + Utility.replace(bytes, "\n", "\\n") + "\")";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ConstantValue.java b/src/main/java/org/apache/commons/bcel6/classfile/ConstantValue.java
new file mode 100644
index 0000000..4af8b38
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ConstantValue.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class is derived from <em>Attribute</em> and represents a constant 
+ * value, i.e., a default value for initializing a class field.
+ * This class is instantiated by the <em>Attribute.readAttribute()</em> method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Attribute
+ */
+public final class ConstantValue extends Attribute {
+
+    private static final long serialVersionUID = -5668999920978520157L;
+    private int constantvalue_index;
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public ConstantValue(ConstantValue c) {
+        this(c.getNameIndex(), c.getLength(), c.getConstantValueIndex(), c.getConstantPool());
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * @param name_index Name index in constant pool
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    ConstantValue(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, input.readUnsignedShort(), constant_pool);
+    }
+
+
+    /**
+     * @param name_index Name index in constant pool
+     * @param length Content length in bytes
+     * @param constantvalue_index Index in constant pool
+     * @param constant_pool Array of constants
+     */
+    public ConstantValue(int name_index, int length, int constantvalue_index,
+            ConstantPool constant_pool) {
+        super(Constants.ATTR_CONSTANT_VALUE, name_index, length, constant_pool);
+        this.constantvalue_index = constantvalue_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitConstantValue(this);
+    }
+
+
+    /**
+     * Dump constant value attribute to file stream on binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(constantvalue_index);
+    }
+
+
+    /**
+     * @return Index in constant pool of constant value.
+     */
+    public final int getConstantValueIndex() {
+        return constantvalue_index;
+    }
+
+
+    /**
+     * @param constantvalue_index the index info the constant pool of this constant value
+     */
+    public final void setConstantValueIndex( int constantvalue_index ) {
+        this.constantvalue_index = constantvalue_index;
+    }
+
+
+    /**
+     * @return String representation of constant value.
+     */
+    @Override
+    public final String toString() {
+        Constant c = constant_pool.getConstant(constantvalue_index);
+        String buf;
+        int i;
+        // Print constant to string depending on its type
+        switch (c.getTag()) {
+            case Constants.CONSTANT_Long:
+                buf = String.valueOf(((ConstantLong) c).getBytes());
+                break;
+            case Constants.CONSTANT_Float:
+                buf = String.valueOf(((ConstantFloat) c).getBytes());
+                break;
+            case Constants.CONSTANT_Double:
+                buf = String.valueOf(((ConstantDouble) c).getBytes());
+                break;
+            case Constants.CONSTANT_Integer:
+                buf = String.valueOf(((ConstantInteger) c).getBytes());
+                break;
+            case Constants.CONSTANT_String:
+                i = ((ConstantString) c).getStringIndex();
+                c = constant_pool.getConstant(i, Constants.CONSTANT_Utf8);
+                buf = "\"" + Utility.convertString(((ConstantUtf8) c).getBytes()) + "\"";
+                break;
+            default:
+                throw new IllegalStateException("Type of ConstValue invalid: " + c);
+        }
+        return buf;
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        ConstantValue c = (ConstantValue) clone();
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Deprecated.java b/src/main/java/org/apache/commons/bcel6/classfile/Deprecated.java
new file mode 100644
index 0000000..051c920
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Deprecated.java
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class is derived from <em>Attribute</em> and denotes that this is a
+ * deprecated method.
+ * It is instantiated from the <em>Attribute.readAttribute()</em> method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Attribute
+ */
+public final class Deprecated extends Attribute {
+
+    private static final long serialVersionUID = -2242528405240201000L;
+    private byte[] bytes;
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public Deprecated(Deprecated c) {
+        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
+    }
+
+
+    /**
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param bytes Attribute contents
+     * @param constant_pool Array of constants
+     */
+    public Deprecated(int name_index, int length, byte[] bytes, ConstantPool constant_pool) {
+        super(Constants.ATTR_DEPRECATED, name_index, length, constant_pool);
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * 
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    Deprecated(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, (byte[]) null, constant_pool);
+        if (length > 0) {
+            bytes = new byte[length];
+            input.readFully(bytes);
+            System.err.println("Deprecated attribute with length > 0");
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitDeprecated(this);
+    }
+
+
+    /**
+     * Dump source file attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        if (length > 0) {
+            file.write(bytes, 0, length);
+        }
+    }
+
+
+    /**
+     * @return data bytes.
+     */
+    public final byte[] getBytes() {
+        return bytes;
+    }
+
+
+    /**
+     * @param bytes the raw bytes that represents this byte array
+     */
+    public final void setBytes( byte[] bytes ) {
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * @return attribute name
+     */
+    @Override
+    public final String toString() {
+        return Constants.ATTRIBUTE_NAMES[Constants.ATTR_DEPRECATED];
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        Deprecated c = (Deprecated) clone();
+        if (bytes != null) {
+            c.bytes = new byte[bytes.length];
+            System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/DescendingVisitor.java b/src/main/java/org/apache/commons/bcel6/classfile/DescendingVisitor.java
new file mode 100644
index 0000000..80c0c62
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/DescendingVisitor.java
@@ -0,0 +1,457 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.util.Stack;
+
+/**
+ * Traverses a JavaClass with another Visitor object 'piggy-backed' that is
+ * applied to all components of a JavaClass object. I.e. this class supplies the
+ * traversal strategy, other classes can make use of it.
+ * 
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DescendingVisitor implements Visitor
+{
+    private final JavaClass clazz;
+
+    private final Visitor visitor;
+
+    private final Stack<Object> stack = new Stack<Object>();
+
+    /**
+     * @return container of current entitity, i.e., predecessor during traversal
+     */
+    public Object predecessor()
+    {
+        return predecessor(0);
+    }
+
+    /**
+     * @param level
+     *            nesting level, i.e., 0 returns the direct predecessor
+     * @return container of current entitity, i.e., predecessor during traversal
+     */
+    public Object predecessor(int level)
+    {
+        int size = stack.size();
+        if ((size < 2) || (level < 0))
+        {
+            return null;
+        }
+        return stack.elementAt(size - (level + 2)); // size - 1 == current
+    }
+
+    /**
+     * @return current object
+     */
+    public Object current()
+    {
+        return stack.peek();
+    }
+
+    /**
+     * @param clazz
+     *            Class to traverse
+     * @param visitor
+     *            visitor object to apply to all components
+     */
+    public DescendingVisitor(JavaClass clazz, Visitor visitor)
+    {
+        this.clazz = clazz;
+        this.visitor = visitor;
+    }
+
+    /**
+     * Start traversal.
+     */
+    public void visit()
+    {
+        clazz.accept(this);
+    }
+
+    public void visitJavaClass(JavaClass _clazz)
+    {
+        stack.push(_clazz);
+        _clazz.accept(visitor);
+        Field[] fields = _clazz.getFields();
+        for (Field field : fields) {
+            field.accept(this);
+        }
+        Method[] methods = _clazz.getMethods();
+        for (Method method : methods) {
+            method.accept(this);
+        }
+        Attribute[] attributes = _clazz.getAttributes();
+        for (Attribute attribute : attributes) {
+            attribute.accept(this);
+        }
+        _clazz.getConstantPool().accept(this);
+        stack.pop();
+    }
+
+    public void visitAnnotation(Annotations annotation)
+    {
+        stack.push(annotation);
+        annotation.accept(visitor);
+        AnnotationEntry[] entries = annotation.getAnnotationEntries();
+        for (AnnotationEntry entrie : entries) {
+            entrie.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitAnnotationEntry(AnnotationEntry annotationEntry)
+    {
+        stack.push(annotationEntry);
+        annotationEntry.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitField(Field field)
+    {
+        stack.push(field);
+        field.accept(visitor);
+        Attribute[] attributes = field.getAttributes();
+        for (Attribute attribute : attributes) {
+            attribute.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitConstantValue(ConstantValue cv)
+    {
+        stack.push(cv);
+        cv.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitMethod(Method method)
+    {
+        stack.push(method);
+        method.accept(visitor);
+        Attribute[] attributes = method.getAttributes();
+        for (Attribute attribute : attributes) {
+            attribute.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitExceptionTable(ExceptionTable table)
+    {
+        stack.push(table);
+        table.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitCode(Code code)
+    {
+        stack.push(code);
+        code.accept(visitor);
+        CodeException[] table = code.getExceptionTable();
+        for (CodeException element : table) {
+            element.accept(this);
+        }
+        Attribute[] attributes = code.getAttributes();
+        for (Attribute attribute : attributes) {
+            attribute.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitCodeException(CodeException ce)
+    {
+        stack.push(ce);
+        ce.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitLineNumberTable(LineNumberTable table)
+    {
+        stack.push(table);
+        table.accept(visitor);
+        LineNumber[] numbers = table.getLineNumberTable();
+        for (LineNumber number : numbers) {
+            number.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitLineNumber(LineNumber number)
+    {
+        stack.push(number);
+        number.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitLocalVariableTable(LocalVariableTable table)
+    {
+        stack.push(table);
+        table.accept(visitor);
+        LocalVariable[] vars = table.getLocalVariableTable();
+        for (LocalVariable var : vars) {
+            var.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitStackMap(StackMap table)
+    {
+        stack.push(table);
+        table.accept(visitor);
+        StackMapEntry[] vars = table.getStackMap();
+        for (StackMapEntry var : vars) {
+            var.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitStackMapEntry(StackMapEntry var)
+    {
+        stack.push(var);
+        var.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitStackMapTable(StackMapTable table)
+    {
+        stack.push(table);
+        table.accept(visitor);
+        StackMapTableEntry[] vars = table.getStackMapTable();
+        for (StackMapTableEntry var : vars) {
+            var.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitStackMapTableEntry(StackMapTableEntry var)
+    {
+        stack.push(var);
+        var.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitLocalVariable(LocalVariable var)
+    {
+        stack.push(var);
+        var.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantPool(ConstantPool cp)
+    {
+        stack.push(cp);
+        cp.accept(visitor);
+        Constant[] constants = cp.getConstantPool();
+        for (int i = 1; i < constants.length; i++)
+        {
+            if (constants[i] != null)
+            {
+                constants[i].accept(this);
+            }
+        }
+        stack.pop();
+    }
+
+    public void visitConstantClass(ConstantClass constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantDouble(ConstantDouble constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantFieldref(ConstantFieldref constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantFloat(ConstantFloat constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantInteger(ConstantInteger constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantInterfaceMethodref(
+            ConstantInterfaceMethodref constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantInvokeDynamic(
+            ConstantInvokeDynamic constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantLong(ConstantLong constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantMethodref(ConstantMethodref constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantNameAndType(ConstantNameAndType constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantString(ConstantString constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitConstantUtf8(ConstantUtf8 constant)
+    {
+        stack.push(constant);
+        constant.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitInnerClasses(InnerClasses ic)
+    {
+        stack.push(ic);
+        ic.accept(visitor);
+        InnerClass[] ics = ic.getInnerClasses();
+        for (InnerClass ic2 : ics) {
+            ic2.accept(this);
+        }
+        stack.pop();
+    }
+
+    public void visitInnerClass(InnerClass inner)
+    {
+        stack.push(inner);
+        inner.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitBootstrapMethods(BootstrapMethods bm)
+    {
+        stack.push(bm);
+        bm.accept(visitor);
+        // BootstrapMethod[] bms = bm.getBootstrapMethods();
+        // for (int i = 0; i < bms.length; i++)
+        // {
+        //     bms[i].accept(this);
+        // }
+        stack.pop();
+    }
+
+    public void visitDeprecated(Deprecated attribute)
+    {
+        stack.push(attribute);
+        attribute.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitSignature(Signature attribute)
+    {
+        stack.push(attribute);
+        attribute.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitSourceFile(SourceFile attribute)
+    {
+        stack.push(attribute);
+        attribute.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitSynthetic(Synthetic attribute)
+    {
+        stack.push(attribute);
+        attribute.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitUnknown(Unknown attribute)
+    {
+        stack.push(attribute);
+        attribute.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitAnnotationDefault(AnnotationDefault obj)
+    {
+        stack.push(obj);
+        obj.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitEnclosingMethod(EnclosingMethod obj)
+    {
+        stack.push(obj);
+        obj.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
+    {
+        stack.push(obj);
+        obj.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitParameterAnnotation(ParameterAnnotations obj)
+    {
+        stack.push(obj);
+        obj.accept(visitor);
+        stack.pop();
+    }
+
+    public void visitMethodParameters(MethodParameters obj)
+    {
+        stack.push(obj);
+        obj.accept(visitor);
+        stack.pop();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ElementValue.java b/src/main/java/org/apache/commons/bcel6/classfile/ElementValue.java
new file mode 100644
index 0000000..87413c6
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ElementValue.java
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * @version $Id: ElementValue
+ * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public abstract class ElementValue
+{
+    protected int type; // TODO should be final
+
+    protected ConstantPool cpool; // TODO should be final
+
+    @Override
+    public String toString()
+    {
+        return stringifyValue();
+    }
+
+    protected ElementValue(int type, ConstantPool cpool)
+    {
+        this.type = type;
+        this.cpool = cpool;
+    }
+
+    public int getElementValueType()
+    {
+        return type;
+    }
+
+    public abstract String stringifyValue();
+
+    public abstract void dump(DataOutputStream dos) throws IOException;
+
+    public static final byte STRING            = 's';
+    public static final byte ENUM_CONSTANT     = 'e';
+    public static final byte CLASS             = 'c';
+    public static final byte ANNOTATION        = '@';
+    public static final byte ARRAY             = '[';
+    public static final byte PRIMITIVE_INT     = 'I';
+    public static final byte PRIMITIVE_BYTE    = 'B';
+    public static final byte PRIMITIVE_CHAR    = 'C';
+    public static final byte PRIMITIVE_DOUBLE  = 'D';
+    public static final byte PRIMITIVE_FLOAT   = 'F';
+    public static final byte PRIMITIVE_LONG    = 'J';
+    public static final byte PRIMITIVE_SHORT   = 'S';
+    public static final byte PRIMITIVE_BOOLEAN = 'Z';
+
+    public static ElementValue readElementValue(DataInput input, ConstantPool cpool) throws IOException
+    {
+        byte type = input.readByte();
+        switch (type)
+        {
+            case PRIMITIVE_BYTE:
+            case PRIMITIVE_CHAR:
+            case PRIMITIVE_DOUBLE:
+            case PRIMITIVE_FLOAT:
+            case PRIMITIVE_INT:
+            case PRIMITIVE_LONG:
+            case PRIMITIVE_SHORT:
+            case PRIMITIVE_BOOLEAN:
+            case STRING:
+                return new SimpleElementValue(type, input.readUnsignedShort(), cpool);
+            
+            case ENUM_CONSTANT:
+                return new EnumElementValue(ENUM_CONSTANT, input.readUnsignedShort(), input.readUnsignedShort(), cpool);
+            
+            case CLASS:
+                return new ClassElementValue(CLASS, input.readUnsignedShort(), cpool);
+
+            case ANNOTATION:
+                // TODO isRuntimeVisible
+                return new AnnotationElementValue(ANNOTATION, AnnotationEntry.read(input, cpool, false), cpool);
+
+            case ARRAY:
+                int numArrayVals = input.readUnsignedShort();
+                ElementValue[] evalues = new ElementValue[numArrayVals];
+                for (int j = 0; j < numArrayVals; j++)
+                {
+                    evalues[j] = ElementValue.readElementValue(input, cpool);
+                }
+                return new ArrayElementValue(ARRAY, evalues, cpool);
+
+            default:
+                throw new RuntimeException("Unexpected element value kind in annotation: " + type);
+        }
+    }
+
+    public String toShortString()
+    {
+        return stringifyValue();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ElementValuePair.java b/src/main/java/org/apache/commons/bcel6/classfile/ElementValuePair.java
new file mode 100644
index 0000000..c7477fc
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ElementValuePair.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * an annotation's element value pair
+ * 
+ * @version $Id: ElementValuePair
+ * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public class ElementValuePair
+{
+    private final ElementValue elementValue;
+
+    private final ConstantPool constantPool;
+
+    private final int elementNameIndex;
+
+    public ElementValuePair(int elementNameIndex, ElementValue elementValue,
+            ConstantPool constantPool)
+    {
+        this.elementValue = elementValue;
+        this.elementNameIndex = elementNameIndex;
+        this.constantPool = constantPool;
+    }
+
+    public String getNameString()
+    {
+        ConstantUtf8 c = (ConstantUtf8) constantPool.getConstant(
+                elementNameIndex, Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+    public final ElementValue getValue()
+    {
+        return elementValue;
+    }
+
+    public int getNameIndex()
+    {
+        return elementNameIndex;
+    }
+
+    public String toShortString()
+    {
+        StringBuilder result = new StringBuilder();
+        result.append(getNameString()).append("=").append(
+                getValue().toShortString());
+        return result.toString();
+    }
+
+    protected void dump(DataOutputStream dos) throws IOException {
+        dos.writeShort(elementNameIndex); // u2 name of the element
+        elementValue.dump(dos);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/EmptyVisitor.java b/src/main/java/org/apache/commons/bcel6/classfile/EmptyVisitor.java
new file mode 100644
index 0000000..e1994c2
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/EmptyVisitor.java
@@ -0,0 +1,204 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+/**
+ * Visitor with empty method bodies, can be extended and used in conjunction
+ * with the DescendingVisitor class, e.g. By courtesy of David Spencer.
+ * 
+ * @see DescendingVisitor
+ * @version $Id$
+ */
+public class EmptyVisitor implements Visitor
+{
+    protected EmptyVisitor()
+    {
+    }
+
+    public void visitAnnotation(Annotations obj)
+    {
+    }
+
+    public void visitParameterAnnotation(ParameterAnnotations obj)
+    {
+    }
+
+    public void visitAnnotationEntry(AnnotationEntry obj)
+    {
+    }
+
+    public void visitAnnotationDefault(AnnotationDefault obj)
+    {
+    }
+
+    public void visitCode(Code obj)
+    {
+    }
+
+    public void visitCodeException(CodeException obj)
+    {
+    }
+
+    public void visitConstantClass(ConstantClass obj)
+    {
+    }
+
+    public void visitConstantDouble(ConstantDouble obj)
+    {
+    }
+
+    public void visitConstantFieldref(ConstantFieldref obj)
+    {
+    }
+
+    public void visitConstantFloat(ConstantFloat obj)
+    {
+    }
+
+    public void visitConstantInteger(ConstantInteger obj)
+    {
+    }
+
+    public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)
+    {
+    }
+
+    public void visitConstantInvokeDynamic(ConstantInvokeDynamic obj)
+    {
+    }
+
+    public void visitConstantLong(ConstantLong obj)
+    {
+    }
+
+    public void visitConstantMethodref(ConstantMethodref obj)
+    {
+    }
+
+    public void visitConstantNameAndType(ConstantNameAndType obj)
+    {
+    }
+
+    public void visitConstantPool(ConstantPool obj)
+    {
+    }
+
+    public void visitConstantString(ConstantString obj)
+    {
+    }
+
+    public void visitConstantUtf8(ConstantUtf8 obj)
+    {
+    }
+
+    public void visitConstantValue(ConstantValue obj)
+    {
+    }
+
+    public void visitDeprecated(Deprecated obj)
+    {
+    }
+
+    public void visitExceptionTable(ExceptionTable obj)
+    {
+    }
+
+    public void visitField(Field obj)
+    {
+    }
+
+    public void visitInnerClass(InnerClass obj)
+    {
+    }
+
+    public void visitInnerClasses(InnerClasses obj)
+    {
+    }
+
+    public void visitBootstrapMethods(BootstrapMethods obj)
+    {
+    }
+
+    public void visitJavaClass(JavaClass obj)
+    {
+    }
+
+    public void visitLineNumber(LineNumber obj)
+    {
+    }
+
+    public void visitLineNumberTable(LineNumberTable obj)
+    {
+    }
+
+    public void visitLocalVariable(LocalVariable obj)
+    {
+    }
+
+    public void visitLocalVariableTable(LocalVariableTable obj)
+    {
+    }
+
+    public void visitMethod(Method obj)
+    {
+    }
+
+    public void visitSignature(Signature obj)
+    {
+    }
+
+    public void visitSourceFile(SourceFile obj)
+    {
+    }
+
+    public void visitSynthetic(Synthetic obj)
+    {
+    }
+
+    public void visitUnknown(Unknown obj)
+    {
+    }
+
+    public void visitStackMap(StackMap obj)
+    {
+    }
+
+    public void visitStackMapEntry(StackMapEntry obj)
+    {
+    }
+
+    public void visitStackMapTable(StackMapTable obj)
+    {
+    }
+
+    public void visitStackMapTableEntry(StackMapTableEntry obj)
+    {
+    }
+
+    public void visitEnclosingMethod(EnclosingMethod obj)
+    {
+    }
+
+    public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
+    {
+    }
+
+    public void visitMethodParameters(MethodParameters obj)
+    {
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/EnclosingMethod.java b/src/main/java/org/apache/commons/bcel6/classfile/EnclosingMethod.java
new file mode 100644
index 0000000..d5ae169
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/EnclosingMethod.java
@@ -0,0 +1,100 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This attribute exists for local or 
+ * anonymous classes and ... there can be only one.
+ * 
+ * @since 6.0
+ */
+public class EnclosingMethod extends Attribute {
+
+    private static final long serialVersionUID = 9136852385761725494L;
+
+    // Pointer to the CONSTANT_Class_info structure representing the 
+    // innermost class that encloses the declaration of the current class.
+    private int classIndex;
+
+    // If the current class is not immediately enclosed by a method or 
+    // constructor, then the value of the method_index item must be zero.  
+    // Otherwise, the value of the  method_index item must point to a 
+    // CONSTANT_NameAndType_info structure representing the name and the 
+    // type of a method in the class referenced by the class we point 
+    // to in the class_index.  *It is the compiler responsibility* to 
+    // ensure that the method identified by this index is the closest 
+    // lexically enclosing method that includes the local/anonymous class.
+    private int methodIndex;
+
+    // Ctors - and code to read an attribute in.
+    EnclosingMethod(int nameIndex, int len, DataInput input, ConstantPool cpool) throws IOException {
+        this(nameIndex, len, input.readUnsignedShort(), input.readUnsignedShort(), cpool);
+    }
+
+    private EnclosingMethod(int nameIndex, int len, int classIdx,int methodIdx, ConstantPool cpool) {
+        super(Constants.ATTR_ENCLOSING_METHOD, nameIndex, len, cpool);
+        classIndex  = classIdx;
+        methodIndex = methodIdx;
+    }
+
+    @Override
+    public void accept(Visitor v) {
+      v.visitEnclosingMethod(this);
+    }
+
+    @Override
+    public Attribute copy(ConstantPool constant_pool) {
+        throw new RuntimeException("Not implemented yet!");
+        // is this next line sufficient?
+        // return (EnclosingMethod)clone();
+    }
+
+    // Accessors
+    public final int getEnclosingClassIndex() { return classIndex; }  
+    public final int getEnclosingMethodIndex(){ return methodIndex;}
+
+    public final void setEnclosingClassIndex(int idx) {classIndex = idx;}
+    public final void setEnclosingMethodIndex(int idx){methodIndex= idx;}
+
+    public final ConstantClass getEnclosingClass() {
+        ConstantClass c = 
+            (ConstantClass)constant_pool.getConstant(classIndex,Constants.CONSTANT_Class);
+        return c;
+    }
+
+    public final ConstantNameAndType getEnclosingMethod() {
+        if (methodIndex == 0) {
+            return null;
+        }
+        ConstantNameAndType nat = 
+            (ConstantNameAndType)constant_pool.getConstant(methodIndex,Constants.CONSTANT_NameAndType);
+        return nat;
+    }
+
+    @Override
+    public final void dump(DataOutputStream file) throws IOException {
+        super.dump(file);
+        file.writeShort(classIndex);
+        file.writeShort(methodIndex);
+    }    
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/EnumElementValue.java b/src/main/java/org/apache/commons/bcel6/classfile/EnumElementValue.java
new file mode 100644
index 0000000..53b284b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/EnumElementValue.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * @since 6.0
+ */
+public class EnumElementValue extends ElementValue
+{
+    // For enum types, these two indices point to the type and value
+    private final int typeIdx;
+
+    private final int valueIdx;
+
+    public EnumElementValue(int type, int typeIdx, int valueIdx,
+            ConstantPool cpool)
+    {
+        super(type, cpool);
+        if (type != ENUM_CONSTANT) {
+            throw new RuntimeException(
+                    "Only element values of type enum can be built with this ctor - type specified: " + type);
+        }
+        this.typeIdx = typeIdx;
+        this.valueIdx = valueIdx;
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 type of value (ENUM_CONSTANT == 'e')
+        dos.writeShort(typeIdx); // u2
+        dos.writeShort(valueIdx); // u2
+    }
+
+    @Override
+    public String stringifyValue()
+    {
+        ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(valueIdx,
+                Constants.CONSTANT_Utf8);
+        return cu8.getBytes();
+    }
+
+    public String getEnumTypeString()
+    {
+        ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(typeIdx,
+                Constants.CONSTANT_Utf8);
+        return cu8.getBytes();// Utility.signatureToString(cu8.getBytes());
+    }
+
+    public String getEnumValueString()
+    {
+        ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(valueIdx,
+                Constants.CONSTANT_Utf8);
+        return cu8.getBytes();
+    }
+
+    public int getValueIndex()
+    {
+        return valueIdx;
+    }
+
+    public int getTypeIndex()
+    {
+        return typeIdx;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java b/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java
new file mode 100644
index 0000000..8785194
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ExceptionTable.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class represents the table of exceptions that are thrown by a
+ * method. This attribute may be used once per method.  The name of
+ * this class is <em>ExceptionTable</em> for historical reasons; The
+ * Java Virtual Machine Specification, Second Edition defines this
+ * attribute using the name <em>Exceptions</em> (which is inconsistent
+ * with the other classes).
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Code
+ */
+public final class ExceptionTable extends Attribute {
+
+    private static final long serialVersionUID = 2045358830660883220L;
+
+    private int[] exception_index_table; // constant pool
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use copy() for a physical copy.
+     */
+    public ExceptionTable(ExceptionTable c) {
+        this(c.getNameIndex(), c.getLength(), c.getExceptionIndexTable(), c.getConstantPool());
+    }
+
+
+    /**
+     * @param name_index Index in constant pool
+     * @param length Content length in bytes
+     * @param exception_index_table Table of indices in constant pool
+     * @param constant_pool Array of constants
+     */
+    public ExceptionTable(int name_index, int length, int[] exception_index_table,
+            ConstantPool constant_pool) {
+        super(Constants.ATTR_EXCEPTIONS, name_index, length, constant_pool);
+        setExceptionIndexTable(exception_index_table);
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * @param name_index Index in constant pool
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    ExceptionTable(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
+        this(name_index, length, (int[]) null, constant_pool);
+        int number_of_exceptions = input.readUnsignedShort();
+        exception_index_table = new int[number_of_exceptions];
+        for (int i = 0; i < number_of_exceptions; i++) {
+            exception_index_table[i] = input.readUnsignedShort();
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionTable(this);
+    }
+
+
+    /**
+     * Dump exceptions attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(exception_index_table.length);
+        for (int index : exception_index_table) {
+            file.writeShort(index);
+        }
+    }
+
+
+    /**
+     * @return Array of indices into constant pool of thrown exceptions.
+     */
+    public final int[] getExceptionIndexTable() {
+        return exception_index_table;
+    }
+
+
+    /**
+     * @return Length of exception table.
+     */
+    public final int getNumberOfExceptions() {
+        return exception_index_table == null ? 0 : exception_index_table.length;
+    }
+
+
+    /**
+     * @return class names of thrown exceptions
+     */
+    public final String[] getExceptionNames() {
+        String[] names = new String[exception_index_table.length];
+        for (int i = 0; i < exception_index_table.length; i++) {
+            names[i] = constant_pool.getConstantString(exception_index_table[i], 
+                    Constants.CONSTANT_Class).replace('/', '.');
+        }
+        return names;
+    }
+
+
+    /**
+     * @param exception_index_table the list of exception indexes
+     * Also redefines number_of_exceptions according to table length.
+     */
+    public final void setExceptionIndexTable( int[] exception_index_table ) {
+        this.exception_index_table = exception_index_table != null ? exception_index_table : new int[0];
+    }
+
+
+    /**
+     * @return String representation, i.e., a list of thrown exceptions.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder();
+        String str;
+        for (int i = 0; i < exception_index_table.length; i++) {
+            str = constant_pool.getConstantString(exception_index_table[i], Constants.CONSTANT_Class);
+            buf.append(Utility.compactClassName(str, false));
+            if (i < exception_index_table.length - 1) {
+                buf.append(", ");
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        ExceptionTable c = (ExceptionTable) clone();
+        if (exception_index_table != null) {
+            c.exception_index_table = new int[exception_index_table.length];
+            System.arraycopy(exception_index_table, 0, c.exception_index_table, 0,
+                    exception_index_table.length);
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Field.java b/src/main/java/org/apache/commons/bcel6/classfile/Field.java
new file mode 100644
index 0000000..f2eb0ca
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Field.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.util.BCELComparator;
+
+/**
+ * This class represents the field info structure, i.e., the representation 
+ * for a variable in the class. See JVM specification for details.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class Field extends FieldOrMethod {
+
+    private static final long serialVersionUID = -4604082205545049134L;
+    private static BCELComparator _cmp = new BCELComparator() {
+
+        public boolean equals( Object o1, Object o2 ) {
+            Field THIS = (Field) o1;
+            Field THAT = (Field) o2;
+            return THIS.getName().equals(THAT.getName())
+                    && THIS.getSignature().equals(THAT.getSignature());
+        }
+
+
+        public int hashCode( Object o ) {
+            Field THIS = (Field) o;
+            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
+        }
+    };
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public Field(Field c) {
+        super(c);
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * @param file Input stream
+     */
+    Field(DataInput file, ConstantPool constant_pool) throws IOException,
+            ClassFormatException {
+        super(file, constant_pool);
+    }
+
+
+    /**
+     * @param access_flags Access rights of field
+     * @param name_index Points to field name in constant pool
+     * @param signature_index Points to encoded signature
+     * @param attributes Collection of attributes
+     * @param constant_pool Array of constants
+     */
+    public Field(int access_flags, int name_index, int signature_index, Attribute[] attributes,
+            ConstantPool constant_pool) {
+        super(access_flags, name_index, signature_index, attributes, constant_pool);
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitField(this);
+    }
+
+
+    /**
+     * @return constant value associated with this field (may be null)
+     */
+    public final ConstantValue getConstantValue() {
+        for (Attribute attribute : attributes) {
+            if (attribute.getTag() == Constants.ATTR_CONSTANT_VALUE) {
+                return (ConstantValue) attribute;
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * Return string representation close to declaration format,
+     * `public static final short MAX = 100', e.g..
+     *
+     * @return String representation of field, including the signature.
+     */
+    @Override
+    public final String toString() {
+        String name, signature, access; // Short cuts to constant pool
+        // Get names from constant pool
+        access = Utility.accessToString(access_flags);
+        access = access.equals("") ? "" : (access + " ");
+        signature = Utility.signatureToString(getSignature());
+        name = getName();
+        StringBuilder buf = new StringBuilder(64);
+        buf.append(access).append(signature).append(" ").append(name);
+        ConstantValue cv = getConstantValue();
+        if (cv != null) {
+            buf.append(" = ").append(cv);
+        }
+        for (Attribute attribute : attributes) {
+            if (!(attribute instanceof ConstantValue)) {
+                buf.append(" [").append(attribute.toString()).append("]");
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this field
+     */
+    public final Field copy( ConstantPool _constant_pool ) {
+        return (Field) copy_(_constant_pool);
+    }
+
+
+    /**
+     * @return type of field
+     */
+    public Type getType() {
+        return Type.getReturnType(getSignature());
+    }
+
+
+    /**
+     * @return Comparison strategy object
+     */
+    public static BCELComparator getComparator() {
+        return _cmp;
+    }
+
+
+    /**
+     * @param comparator Comparison strategy object
+     */
+    public static void setComparator( BCELComparator comparator ) {
+        _cmp = comparator;
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default two Field objects are said to be equal when
+     * their names and signatures are equal.
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        return _cmp.equals(this, obj);
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default return the hashcode of the field's name XOR signature.
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return _cmp.hashCode(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java b/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
new file mode 100644
index 0000000..c5603ae
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/FieldOrMethod.java
@@ -0,0 +1,260 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * Abstract super class for fields and methods.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class FieldOrMethod extends AccessFlags implements Cloneable, Node {
+
+    private static final long serialVersionUID = -1833306330869469714L;
+    protected int name_index; // Points to field name in constant pool 
+    protected int signature_index; // Points to encoded signature
+    protected Attribute[] attributes; // Collection of attributes
+    protected AnnotationEntry[] annotationEntries; // annotations defined on the field or method 
+    protected ConstantPool constant_pool;
+
+    private String signatureAttributeString = null;
+    private boolean searchedForSignatureAttribute = false;
+
+    FieldOrMethod() {
+    }
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    protected FieldOrMethod(FieldOrMethod c) {
+        this(c.getAccessFlags(), c.getNameIndex(), c.getSignatureIndex(), c.getAttributes(), c
+                .getConstantPool());
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * @param file Input stream
+     * @throws IOException
+     * @throws ClassFormatException
+     * @deprecated Use {@link #FieldOrMethod(java.io.DataInput, ConstantPool)} instead.
+     */
+    protected FieldOrMethod(DataInputStream file, ConstantPool constant_pool) throws IOException,
+            ClassFormatException {
+        this((DataInput) file, constant_pool);
+    }
+
+    /**
+     * Construct object from file stream.
+     * @param file Input stream
+     * @throws IOException
+     * @throws ClassFormatException
+     */
+    protected FieldOrMethod(DataInput file, ConstantPool constant_pool) throws IOException, ClassFormatException {
+        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), null,
+                constant_pool);
+        int attributes_count = file.readUnsignedShort();
+        attributes = new Attribute[attributes_count];
+        for (int i = 0; i < attributes_count; i++) {
+            attributes[i] = Attribute.readAttribute(file, constant_pool);
+        }
+    }
+
+
+    /**
+     * @param access_flags Access rights of method
+     * @param name_index Points to field name in constant pool
+     * @param signature_index Points to encoded signature
+     * @param attributes Collection of attributes
+     * @param constant_pool Array of constants
+     */
+    protected FieldOrMethod(int access_flags, int name_index, int signature_index,
+            Attribute[] attributes, ConstantPool constant_pool) {
+        this.access_flags = access_flags;
+        this.name_index = name_index;
+        this.signature_index = signature_index;
+        this.constant_pool = constant_pool;
+        setAttributes(attributes);
+    }
+
+
+    /**
+     * Dump object to file stream on binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeShort(access_flags);
+        file.writeShort(name_index);
+        file.writeShort(signature_index);
+        file.writeShort(attributes.length);
+        for (Attribute attribute : attributes) {
+            attribute.dump(file);
+        }
+    }
+
+
+    /**
+     * @return Collection of object attributes.
+     */
+    public final Attribute[] getAttributes() {
+        return attributes;
+    }
+
+
+    /**
+     * @param attributes Collection of object attributes.
+     */
+    public final void setAttributes( Attribute[] attributes ) {
+        this.attributes = attributes;
+    }
+
+
+    /**
+     * @return Constant pool used by this object.
+     */
+    public final ConstantPool getConstantPool() {
+        return constant_pool;
+    }
+
+
+    /**
+     * @param constant_pool Constant pool to be used for this object.
+     */
+    public final void setConstantPool( ConstantPool constant_pool ) {
+        this.constant_pool = constant_pool;
+    }
+
+
+    /**
+     * @return Index in constant pool of object's name.
+     */
+    public final int getNameIndex() {
+        return name_index;
+    }
+
+
+    /**
+     * @param name_index Index in constant pool of object's name.
+     */
+    public final void setNameIndex( int name_index ) {
+        this.name_index = name_index;
+    }
+
+
+    /**
+     * @return Index in constant pool of field signature.
+     */
+    public final int getSignatureIndex() {
+        return signature_index;
+    }
+
+
+    /**
+     * @param signature_index Index in constant pool of field signature.
+     */
+    public final void setSignatureIndex( int signature_index ) {
+        this.signature_index = signature_index;
+    }
+
+
+    /**
+     * @return Name of object, i.e., method name or field name
+     */
+    public final String getName() {
+        ConstantUtf8 c;
+        c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+
+    /**
+     * @return String representation of object's type signature (java style)
+     */
+    public final String getSignature() {
+        ConstantUtf8 c;
+        c = (ConstantUtf8) constant_pool.getConstant(signature_index, Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+
+    /**
+     * @return deep copy of this field
+     */
+    protected FieldOrMethod copy_( ConstantPool _constant_pool ) {
+        FieldOrMethod c = null;
+
+        try {
+          c = (FieldOrMethod)clone();
+        } catch(CloneNotSupportedException e) {}
+
+        c.constant_pool    = constant_pool;
+        c.attributes       = new Attribute[attributes.length];
+
+        for (int i = 0; i < attributes.length; i++) {
+            c.attributes[i] = attributes[i].copy(constant_pool);
+        }
+
+        return c;
+    }
+
+    /**
+     * @return Annotations on the field or method
+     */
+    public AnnotationEntry[] getAnnotationEntries() {
+        if (annotationEntries == null) {
+            annotationEntries = AnnotationEntry.createAnnotationEntries(getAttributes());
+        }
+        
+        return annotationEntries;
+    }
+
+    /**
+     * Hunts for a signature attribute on the member and returns its contents.  So where the 'regular' signature
+     * may be (Ljava/util/Vector;)V the signature attribute may in fact say 'Ljava/lang/Vector&lt;Ljava/lang/String&gt;;'
+     * Coded for performance - searches for the attribute only when requested - only searches for it once.
+     */
+    public final String getGenericSignature()
+    {
+        if (!searchedForSignatureAttribute)
+        {
+            boolean found = false;
+            for (int i = 0; !found && i < attributes.length; i++)
+            {
+                if (attributes[i] instanceof Signature)
+                {
+                    signatureAttributeString = ((Signature) attributes[i])
+                            .getSignature();
+                    found = true;
+                }
+            }
+            searchedForSignatureAttribute = true;
+        }
+        return signatureAttributeString;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java b/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java
new file mode 100644
index 0000000..acfb932
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/InnerClass.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This class represents a inner class attribute, i.e., the class
+ * indices of the inner and outer classes, the name and the attributes
+ * of the inner class.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see InnerClasses
+ */
+public final class InnerClass implements Cloneable, Node, Serializable {
+
+    private static final long serialVersionUID = -7200195918166127614L;
+    private int inner_class_index;
+    private int outer_class_index;
+    private int inner_name_index;
+    private int inner_access_flags;
+
+
+    /**
+     * Initialize from another object.
+     */
+    public InnerClass(InnerClass c) {
+        this(c.getInnerClassIndex(), c.getOuterClassIndex(), c.getInnerNameIndex(), c
+                .getInnerAccessFlags());
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * @param file Input stream
+     * @throws IOException
+     */
+    InnerClass(DataInput file) throws IOException {
+        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
+                .readUnsignedShort());
+    }
+
+
+    /**
+     * @param inner_class_index Class index in constant pool of inner class
+     * @param outer_class_index Class index in constant pool of outer class
+     * @param inner_name_index  Name index in constant pool of inner class
+     * @param inner_access_flags Access flags of inner class
+     */
+    public InnerClass(int inner_class_index, int outer_class_index, int inner_name_index,
+            int inner_access_flags) {
+        this.inner_class_index = inner_class_index;
+        this.outer_class_index = outer_class_index;
+        this.inner_name_index = inner_name_index;
+        this.inner_access_flags = inner_access_flags;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitInnerClass(this);
+    }
+
+
+    /**
+     * Dump inner class attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeShort(inner_class_index);
+        file.writeShort(outer_class_index);
+        file.writeShort(inner_name_index);
+        file.writeShort(inner_access_flags);
+    }
+
+
+    /**
+     * @return access flags of inner class.
+     */
+    public final int getInnerAccessFlags() {
+        return inner_access_flags;
+    }
+
+
+    /**
+     * @return class index of inner class.
+     */
+    public final int getInnerClassIndex() {
+        return inner_class_index;
+    }
+
+
+    /**
+     * @return name index of inner class.
+     */
+    public final int getInnerNameIndex() {
+        return inner_name_index;
+    }
+
+
+    /**
+     * @return class index of outer class.
+     */
+    public final int getOuterClassIndex() {
+        return outer_class_index;
+    }
+
+
+    /**
+     * @param inner_access_flags access flags for this inner class
+     */
+    public final void setInnerAccessFlags( int inner_access_flags ) {
+        this.inner_access_flags = inner_access_flags;
+    }
+
+
+    /**
+     * @param inner_class_index index into the constant pool for this class
+     */
+    public final void setInnerClassIndex( int inner_class_index ) {
+        this.inner_class_index = inner_class_index;
+    }
+
+
+    /**
+     * @param inner_name_index index into the constant pool for this class's name
+     */
+    public final void setInnerNameIndex( int inner_name_index ) {
+        this.inner_name_index = inner_name_index;
+    }
+
+
+    /**
+     * @param outer_class_index index into the constant pool for the owning class
+     */
+    public final void setOuterClassIndex( int outer_class_index ) {
+        this.outer_class_index = outer_class_index;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        return "InnerClass(" + inner_class_index + ", " + outer_class_index + ", "
+                + inner_name_index + ", " + inner_access_flags + ")";
+    }
+
+
+    /**
+     * @return Resolved string representation
+     */
+    public final String toString( ConstantPool constant_pool ) {
+        String inner_class_name, outer_class_name, inner_name, access;
+        inner_class_name = constant_pool.getConstantString(inner_class_index,
+                Constants.CONSTANT_Class);
+        inner_class_name = Utility.compactClassName(inner_class_name);
+        if (outer_class_index != 0) {
+            outer_class_name = constant_pool.getConstantString(outer_class_index,
+                    Constants.CONSTANT_Class);
+            outer_class_name = Utility.compactClassName(outer_class_name);
+        } else {
+            outer_class_name = "<not a member>";
+        }
+        if (inner_name_index != 0) {
+            inner_name = ((ConstantUtf8) constant_pool.getConstant(inner_name_index,
+                    Constants.CONSTANT_Utf8)).getBytes();
+        } else {
+            inner_name = "<anonymous>";
+        }
+        access = Utility.accessToString(inner_access_flags, true);
+        access = access.equals("") ? "" : (access + " ");
+        return "InnerClass:" + access + inner_class_name + "(\"" + outer_class_name + "\", \""
+                + inner_name + "\")";
+    }
+
+
+    /**
+     * @return deep copy of this object
+     */
+    public InnerClass copy() {
+        try {
+            return (InnerClass) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java b/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java
new file mode 100644
index 0000000..56af457
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/InnerClasses.java
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class is derived from <em>Attribute</em> and denotes that this class
+ * is an Inner class of another.
+ * to the source file of this class.
+ * It is instantiated from the <em>Attribute.readAttribute()</em> method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Attribute
+ */
+public final class InnerClasses extends Attribute {
+
+    private static final long serialVersionUID = 4570147726361753700L;
+    private InnerClass[] inner_classes;
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public InnerClasses(InnerClasses c) {
+        this(c.getNameIndex(), c.getLength(), c.getInnerClasses(), c.getConstantPool());
+    }
+
+
+    /**
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param inner_classes array of inner classes attributes
+     * @param constant_pool Array of constants
+     */
+    public InnerClasses(int name_index, int length, InnerClass[] inner_classes,
+            ConstantPool constant_pool) {
+        super(Constants.ATTR_INNER_CLASSES, name_index, length, constant_pool);
+        setInnerClasses(inner_classes);
+    }
+
+
+    /**
+     * Construct object from input stream.
+     *
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    InnerClasses(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, (InnerClass[]) null, constant_pool);
+        int number_of_classes = input.readUnsignedShort();
+        inner_classes = new InnerClass[number_of_classes];
+        for (int i = 0; i < number_of_classes; i++) {
+            inner_classes[i] = new InnerClass(input);
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitInnerClasses(this);
+    }
+
+
+    /**
+     * Dump source file attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(inner_classes.length);
+        for (InnerClass inner_class : inner_classes) {
+            inner_class.dump(file);
+        }
+    }
+
+
+    /**
+     * @return array of inner class "records"
+     */
+    public final InnerClass[] getInnerClasses() {
+        return inner_classes;
+    }
+
+
+    /**
+     * @param inner_classes the array of inner classes
+     */
+    public final void setInnerClasses( InnerClass[] inner_classes ) {
+        this.inner_classes = inner_classes != null ? inner_classes : new InnerClass[0];
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder();
+        for (InnerClass inner_class : inner_classes) {
+            buf.append(inner_class.toString(constant_pool)).append("\n");
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        InnerClasses c = (InnerClasses) clone();
+        c.inner_classes = new InnerClass[inner_classes.length];
+        for (int i = 0; i < inner_classes.length; i++) {
+            c.inner_classes[i] = inner_classes[i].copy();
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java b/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
new file mode 100644
index 0000000..2553f36
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/JavaClass.java
@@ -0,0 +1,926 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.util.BCELComparator;
+import org.apache.commons.bcel6.util.ClassQueue;
+import org.apache.commons.bcel6.util.SyntheticRepository;
+
+/**
+ * Represents a Java class, i.e., the data structures, constant pool,
+ * fields, methods and commands contained in a Java .class file.
+ * See <a href="http://docs.oracle.com/javase/specs/">JVM specification</a> for details.
+ * The intent of this class is to represent a parsed or otherwise existing
+ * class file.  Those interested in programatically generating classes
+ * should see the <a href="../generic/ClassGen.html">ClassGen</a> class.
+
+ * @version $Id$
+ * @see org.apache.commons.bcel6.generic.ClassGen
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class JavaClass extends AccessFlags implements Cloneable, Node, Comparable<JavaClass> {
+
+    private static final long serialVersionUID = 2179314813560563755L;
+    private String file_name;
+    private String package_name;
+    private String source_file_name = "<Unknown>";
+    private int class_name_index;
+    private int superclass_name_index;
+    private String class_name;
+    private String superclass_name;
+    private int major, minor; // Compiler version
+    private ConstantPool constant_pool; // Constant pool
+    private int[] interfaces; // implemented interfaces
+    private String[] interface_names;
+    private Field[] fields; // Fields, i.e., variables of class
+    private Method[] methods; // methods defined in the class
+    private Attribute[] attributes; // attributes defined in the class
+    private AnnotationEntry[] annotations;   // annotations defined on the class
+    private byte source = HEAP; // Generated in memory
+    private boolean isAnonymous = false;
+    private boolean isNested = false;
+    private boolean computedNestedTypeStatus = false;
+    public static final byte HEAP = 1;
+    public static final byte FILE = 2;
+    public static final byte ZIP = 3;
+    static boolean debug = false; // Debugging on/off
+    final static char sep = File.separatorChar; // directory separator
+    
+    private static BCELComparator _cmp = new BCELComparator() {
+
+        public boolean equals( Object o1, Object o2 ) {
+            JavaClass THIS = (JavaClass) o1;
+            JavaClass THAT = (JavaClass) o2;
+            return THIS.getClassName().equals(THAT.getClassName());
+        }
+
+
+        public int hashCode( Object o ) {
+            JavaClass THIS = (JavaClass) o;
+            return THIS.getClassName().hashCode();
+        }
+    };
+    /**
+     * In cases where we go ahead and create something,
+     * use the default SyntheticRepository, because we
+     * don't know any better.
+     */
+    private transient org.apache.commons.bcel6.util.Repository repository = SyntheticRepository
+            .getInstance();
+
+
+    /**
+     * Constructor gets all contents as arguments.
+     *
+     * @param class_name_index Index into constant pool referencing a
+     * ConstantClass that represents this class.
+     * @param superclass_name_index Index into constant pool referencing a
+     * ConstantClass that represents this class's superclass.
+     * @param file_name File name
+     * @param major Major compiler version
+     * @param minor Minor compiler version
+     * @param access_flags Access rights defined by bit flags
+     * @param constant_pool Array of constants
+     * @param interfaces Implemented interfaces
+     * @param fields Class fields
+     * @param methods Class methods
+     * @param attributes Class attributes
+     * @param source Read from file or generated in memory?
+     */
+    public JavaClass(int class_name_index, int superclass_name_index, String file_name, int major,
+            int minor, int access_flags, ConstantPool constant_pool, int[] interfaces,
+            Field[] fields, Method[] methods, Attribute[] attributes, byte source) {
+        if (interfaces == null) {
+            interfaces = new int[0];
+        }
+        if (attributes == null) {
+            attributes = new Attribute[0];
+        }
+        if (fields == null) {
+            fields = new Field[0];
+        }
+        if (methods == null) {
+            methods = new Method[0];
+        }
+        this.class_name_index = class_name_index;
+        this.superclass_name_index = superclass_name_index;
+        this.file_name = file_name;
+        this.major = major;
+        this.minor = minor;
+        this.access_flags = access_flags;
+        this.constant_pool = constant_pool;
+        this.interfaces = interfaces;
+        this.fields = fields;
+        this.methods = methods;
+        this.attributes = attributes;
+        this.source = source;
+        // Get source file name if available
+        for (Attribute attribute : attributes) {
+            if (attribute instanceof SourceFile) {
+                source_file_name = ((SourceFile) attribute).getSourceFileName();
+                break;
+            }
+        }
+        /* According to the specification the following entries must be of type
+         * `ConstantClass' but we check that anyway via the 
+         * `ConstPool.getConstant' method.
+         */
+        class_name = constant_pool.getConstantString(class_name_index, Constants.CONSTANT_Class);
+        class_name = Utility.compactClassName(class_name, false);
+        int index = class_name.lastIndexOf('.');
+        if (index < 0) {
+            package_name = "";
+        } else {
+            package_name = class_name.substring(0, index);
+        }
+        if (superclass_name_index > 0) {
+            // May be zero -> class is java.lang.Object
+            superclass_name = constant_pool.getConstantString(superclass_name_index,
+                    Constants.CONSTANT_Class);
+            superclass_name = Utility.compactClassName(superclass_name, false);
+        } else {
+            superclass_name = "java.lang.Object";
+        }
+        interface_names = new String[interfaces.length];
+        for (int i = 0; i < interfaces.length; i++) {
+            String str = constant_pool.getConstantString(interfaces[i], Constants.CONSTANT_Class);
+            interface_names[i] = Utility.compactClassName(str, false);
+        }
+    }
+
+
+    /**
+     * Constructor gets all contents as arguments.
+     *
+     * @param class_name_index Class name
+     * @param superclass_name_index Superclass name
+     * @param file_name File name
+     * @param major Major compiler version
+     * @param minor Minor compiler version
+     * @param access_flags Access rights defined by bit flags
+     * @param constant_pool Array of constants
+     * @param interfaces Implemented interfaces
+     * @param fields Class fields
+     * @param methods Class methods
+     * @param attributes Class attributes
+     */
+    public JavaClass(int class_name_index, int superclass_name_index, String file_name, int major,
+            int minor, int access_flags, ConstantPool constant_pool, int[] interfaces,
+            Field[] fields, Method[] methods, Attribute[] attributes) {
+        this(class_name_index, superclass_name_index, file_name, major, minor, access_flags,
+                constant_pool, interfaces, fields, methods, attributes, HEAP);
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitJavaClass(this);
+    }
+
+
+    /* Print debug information depending on `JavaClass.debug'
+     */
+    static void Debug( String str ) {
+        if (debug) {
+            System.out.println(str);
+        }
+    }
+
+
+    /** 
+     * Dump class to a file.
+     *
+     * @param file Output file
+     * @throws IOException
+     */
+    public void dump( File file ) throws IOException {
+        String parent = file.getParent();
+        if (parent != null) {
+            File dir = new File(parent);
+            dir.mkdirs();
+        }
+        DataOutputStream dos = null;
+        try {
+            dos = new DataOutputStream(new FileOutputStream(file));
+            dump(dos);
+        } finally {
+            if (dos != null) {
+                dos.close();
+            }
+        }
+    }
+
+
+    /** 
+     * Dump class to a file named file_name.
+     *
+     * @param _file_name Output file name
+     * @exception IOException
+     */
+    public void dump( String _file_name ) throws IOException {
+        dump(new File(_file_name));
+    }
+
+
+    /**
+     * @return class in binary format
+     */
+    public byte[] getBytes() {
+        ByteArrayOutputStream s = new ByteArrayOutputStream();
+        DataOutputStream ds = new DataOutputStream(s);
+        try {
+            dump(ds);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                ds.close();
+            } catch (IOException e2) {
+                e2.printStackTrace();
+            }
+        }
+        return s.toByteArray();
+    }
+
+
+    /**
+     * Dump Java class to output stream in binary format.
+     *
+     * @param file Output stream
+     * @exception IOException
+     */
+    public void dump( OutputStream file ) throws IOException {
+        dump(new DataOutputStream(file));
+    }
+
+
+    /**
+     * Dump Java class to output stream in binary format.
+     *
+     * @param file Output stream
+     * @exception IOException
+     */
+    public void dump( DataOutputStream file ) throws IOException {
+        file.writeInt(0xcafebabe);
+        file.writeShort(minor);
+        file.writeShort(major);
+        constant_pool.dump(file);
+        file.writeShort(access_flags);
+        file.writeShort(class_name_index);
+        file.writeShort(superclass_name_index);
+        file.writeShort(interfaces.length);
+        for (int interface1 : interfaces) {
+            file.writeShort(interface1);
+        }
+        file.writeShort(fields.length);
+        for (Field field : fields) {
+            field.dump(file);
+        }
+        file.writeShort(methods.length);
+        for (Method method : methods) {
+            method.dump(file);
+        }
+        if (attributes != null) {
+            file.writeShort(attributes.length);
+            for (Attribute attribute : attributes) {
+                attribute.dump(file);
+            }
+        } else {
+            file.writeShort(0);
+        }
+        file.flush();
+    }
+
+
+    /**
+     * @return Attributes of the class.
+     */
+    public Attribute[] getAttributes() {
+        return attributes;
+    }
+
+    /**
+     * @return Annotations on the class
+     */
+    public AnnotationEntry[] getAnnotationEntries() {
+        if (annotations == null) {
+            annotations = AnnotationEntry.createAnnotationEntries(getAttributes());
+        }
+        
+        return annotations;
+    }
+
+    /**
+     * @return Class name.
+     */
+    public String getClassName() {
+        return class_name;
+    }
+
+
+    /**
+     * @return Package name.
+     */
+    public String getPackageName() {
+        return package_name;
+    }
+
+
+    /**
+     * @return Class name index.
+     */
+    public int getClassNameIndex() {
+        return class_name_index;
+    }
+
+
+    /**
+     * @return Constant pool.
+     */
+    public ConstantPool getConstantPool() {
+        return constant_pool;
+    }
+
+
+    /**
+     * @return Fields, i.e., variables of the class. Like the JVM spec
+     * mandates for the classfile format, these fields are those specific to
+     * this class, and not those of the superclass or superinterfaces.
+     */
+    public Field[] getFields() {
+        return fields;
+    }
+
+
+    /**
+     * @return File name of class, aka SourceFile attribute value
+     */
+    public String getFileName() {
+        return file_name;
+    }
+
+
+    /**
+     * @return Names of implemented interfaces.
+     */
+    public String[] getInterfaceNames() {
+        return interface_names;
+    }
+
+
+    /**
+     * @return Indices in constant pool of implemented interfaces.
+     */
+    public int[] getInterfaceIndices() {
+        return interfaces;
+    }
+
+
+    /**
+     * @return Major number of class file version.
+     */
+    public int getMajor() {
+        return major;
+    }
+
+
+    /**
+     * @return Methods of the class.
+     */
+    public Method[] getMethods() {
+        return methods;
+    }
+
+
+    /**
+     * @return A org.apache.commons.bcel6.classfile.Method corresponding to
+     * java.lang.reflect.Method if any
+     */
+    public Method getMethod( java.lang.reflect.Method m ) {
+        for (Method method : methods) {
+            if (m.getName().equals(method.getName()) && (m.getModifiers() == method.getModifiers())
+                    && Type.getSignature(m).equals(method.getSignature())) {
+                return method;
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * @return Minor number of class file version.
+     */
+    public int getMinor() {
+        return minor;
+    }
+
+
+    /**
+     * @return sbsolute path to file where this class was read from
+     */
+    public String getSourceFileName() {
+        return source_file_name;
+    }
+
+
+    /**
+     * returns the super class name of this class. In the case that this class is
+     * java.lang.Object, it will return itself (java.lang.Object). This is probably incorrect
+     * but isn't fixed at this time to not break existing clients.
+     *
+     * @return Superclass name.
+     */
+    public String getSuperclassName() {
+        return superclass_name;
+    }
+
+
+    /**
+     * @return Class name index.
+     */
+    public int getSuperclassNameIndex() {
+        return superclass_name_index;
+    }
+
+    static {
+        // Debugging ... on/off
+        debug = Boolean.getBoolean("JavaClass.debug");
+    }
+
+
+    /**
+     * @param attributes .
+     */
+    public void setAttributes( Attribute[] attributes ) {
+        this.attributes = attributes;
+    }
+
+
+    /**
+     * @param class_name .
+     */
+    public void setClassName( String class_name ) {
+        this.class_name = class_name;
+    }
+
+
+    /**
+     * @param class_name_index .
+     */
+    public void setClassNameIndex( int class_name_index ) {
+        this.class_name_index = class_name_index;
+    }
+
+
+    /**
+     * @param constant_pool .
+     */
+    public void setConstantPool( ConstantPool constant_pool ) {
+        this.constant_pool = constant_pool;
+    }
+
+
+    /**
+     * @param fields .
+     */
+    public void setFields( Field[] fields ) {
+        this.fields = fields;
+    }
+
+
+    /**
+     * Set File name of class, aka SourceFile attribute value
+     */
+    public void setFileName( String file_name ) {
+        this.file_name = file_name;
+    }
+
+
+    /**
+     * @param interface_names .
+     */
+    public void setInterfaceNames( String[] interface_names ) {
+        this.interface_names = interface_names;
+    }
+
+
+    /**
+     * @param interfaces .
+     */
+    public void setInterfaces( int[] interfaces ) {
+        this.interfaces = interfaces;
+    }
+
+
+    /**
+     * @param major .
+     */
+    public void setMajor( int major ) {
+        this.major = major;
+    }
+
+
+    /**
+     * @param methods .
+     */
+    public void setMethods( Method[] methods ) {
+        this.methods = methods;
+    }
+
+
+    /**
+     * @param minor .
+     */
+    public void setMinor( int minor ) {
+        this.minor = minor;
+    }
+
+
+    /**
+     * Set absolute path to file this class was read from.
+     */
+    public void setSourceFileName( String source_file_name ) {
+        this.source_file_name = source_file_name;
+    }
+
+
+    /**
+     * @param superclass_name .
+     */
+    public void setSuperclassName( String superclass_name ) {
+        this.superclass_name = superclass_name;
+    }
+
+
+    /**
+     * @param superclass_name_index .
+     */
+    public void setSuperclassNameIndex( int superclass_name_index ) {
+        this.superclass_name_index = superclass_name_index;
+    }
+
+
+    /**
+     * @return String representing class contents.
+     */
+    @Override
+    public String toString() {
+        String access = Utility.accessToString(access_flags, true);
+        access = access.equals("") ? "" : (access + " ");
+        StringBuilder buf = new StringBuilder(128);
+        buf.append(access).append(Utility.classOrInterface(access_flags)).append(" ").append(
+                class_name).append(" extends ").append(
+                Utility.compactClassName(superclass_name, false)).append('\n');
+        int size = interfaces.length;
+        if (size > 0) {
+            buf.append("implements\t\t");
+            for (int i = 0; i < size; i++) {
+                buf.append(interface_names[i]);
+                if (i < size - 1) {
+                    buf.append(", ");
+                }
+            }
+            buf.append('\n');
+        }
+        buf.append("filename\t\t").append(file_name).append('\n');
+        buf.append("compiled from\t\t").append(source_file_name).append('\n');
+        buf.append("compiler version\t").append(major).append(".").append(minor).append('\n');
+        buf.append("access flags\t\t").append(access_flags).append('\n');
+        buf.append("constant pool\t\t").append(constant_pool.getLength()).append(" entries\n");
+        buf.append("ACC_SUPER flag\t\t").append(isSuper()).append("\n");
+        if (attributes.length > 0) {
+            buf.append("\nAttribute(s):\n");
+            for (Attribute attribute : attributes) {
+                buf.append(indent(attribute));
+            }
+        }
+        AnnotationEntry[] annotations = getAnnotationEntries();
+        if (annotations!=null && annotations.length>0) {
+            buf.append("\nAnnotation(s):\n");
+            for (AnnotationEntry annotation : annotations) {
+                buf.append(indent(annotation));
+            }
+        }
+        if (fields.length > 0) {
+            buf.append("\n").append(fields.length).append(" fields:\n");
+            for (Field field : fields) {
+                buf.append("\t").append(field).append('\n');
+            }
+        }
+        if (methods.length > 0) {
+            buf.append("\n").append(methods.length).append(" methods:\n");
+            for (Method method : methods) {
+                buf.append("\t").append(method).append('\n');
+            }
+        }
+        return buf.toString();
+    }
+
+
+    private static String indent( Object obj ) {
+        StringTokenizer tok = new StringTokenizer(obj.toString(), "\n");
+        StringBuilder buf = new StringBuilder();
+        while (tok.hasMoreTokens()) {
+            buf.append("\t").append(tok.nextToken()).append("\n");
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this class
+     */
+    public JavaClass copy() {
+        JavaClass c = null;
+        try {
+            c = (JavaClass) clone();
+            c.constant_pool = constant_pool.copy();
+            c.interfaces = interfaces.clone();
+            c.interface_names = interface_names.clone();
+            c.fields = new Field[fields.length];
+            for (int i = 0; i < fields.length; i++) {
+                c.fields[i] = fields[i].copy(c.constant_pool);
+            }
+            c.methods = new Method[methods.length];
+            for (int i = 0; i < methods.length; i++) {
+                c.methods[i] = methods[i].copy(c.constant_pool);
+            }
+            c.attributes = new Attribute[attributes.length];
+            for (int i = 0; i < attributes.length; i++) {
+                c.attributes[i] = attributes[i].copy(c.constant_pool);
+            }
+        } catch (CloneNotSupportedException e) {
+        }
+        return c;
+    }
+
+
+    public final boolean isSuper() {
+        return (access_flags & Constants.ACC_SUPER) != 0;
+    }
+
+
+    public final boolean isClass() {
+        return (access_flags & Constants.ACC_INTERFACE) == 0;
+    }
+
+    public final boolean isAnonymous() {
+        computeNestedTypeStatus();
+        return this.isAnonymous;
+    }
+
+    public final boolean isNested() {
+        computeNestedTypeStatus();
+        return this.isNested;
+    }
+
+    private void computeNestedTypeStatus() {
+        if (computedNestedTypeStatus) {
+        return;
+    }
+        for (Attribute attribute : this.attributes) {
+              if (attribute instanceof InnerClasses) {
+                  InnerClass[] innerClasses = ((InnerClasses) attribute).getInnerClasses();
+                  for (InnerClass innerClasse : innerClasses) {
+                      boolean innerClassAttributeRefersToMe = false;
+                      String inner_class_name = constant_pool.getConstantString(innerClasse.getInnerClassIndex(),
+                                 Constants.CONSTANT_Class);
+                      inner_class_name = Utility.compactClassName(inner_class_name);
+                      if (inner_class_name.equals(getClassName())) {
+                          innerClassAttributeRefersToMe = true;
+                      }
+                      if (innerClassAttributeRefersToMe) {
+                          this.isNested = true;
+                          if (innerClasse.getInnerNameIndex() == 0) {
+                              this.isAnonymous = true;
+                          }
+                      }
+                  }
+              }
+        }
+        this.computedNestedTypeStatus = true;
+    }
+
+
+    /** @return returns either HEAP (generated), FILE, or ZIP
+     */
+    public final byte getSource() {
+        return source;
+    }
+
+
+    /********************* New repository functionality *********************/
+    /**
+     * Gets the ClassRepository which holds its definition. By default
+     * this is the same as SyntheticRepository.getInstance();
+     */
+    public org.apache.commons.bcel6.util.Repository getRepository() {
+        return repository;
+    }
+
+
+    /**
+     * Sets the ClassRepository which loaded the JavaClass.
+     * Should be called immediately after parsing is done.
+     */
+    public void setRepository( org.apache.commons.bcel6.util.Repository repository ) {
+        this.repository = repository;
+    }
+
+
+    /** Equivalent to runtime "instanceof" operator.
+     *
+     * @return true if this JavaClass is derived from the super class
+     * @throws ClassNotFoundException if superclasses or superinterfaces
+     *   of this object can't be found
+     */
+    public final boolean instanceOf( JavaClass super_class ) throws ClassNotFoundException {
+        if (this.equals(super_class)) {
+            return true;
+        }
+        JavaClass[] super_classes = getSuperClasses();
+        for (JavaClass super_classe : super_classes) {
+            if (super_classe.equals(super_class)) {
+                return true;
+            }
+        }
+        if (super_class.isInterface()) {
+            return implementationOf(super_class);
+        }
+        return false;
+    }
+
+
+    /**
+     * @return true, if this class is an implementation of interface inter
+     * @throws ClassNotFoundException if superclasses or superinterfaces
+     *   of this class can't be found
+     */
+    public boolean implementationOf( JavaClass inter ) throws ClassNotFoundException {
+        if (!inter.isInterface()) {
+            throw new IllegalArgumentException(inter.getClassName() + " is no interface");
+        }
+        if (this.equals(inter)) {
+            return true;
+        }
+        JavaClass[] super_interfaces = getAllInterfaces();
+        for (JavaClass super_interface : super_interfaces) {
+            if (super_interface.equals(inter)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * @return the superclass for this JavaClass object, or null if this
+     * is java.lang.Object
+     * @throws ClassNotFoundException if the superclass can't be found
+     */
+    public JavaClass getSuperClass() throws ClassNotFoundException {
+        if ("java.lang.Object".equals(getClassName())) {
+            return null;
+        }
+        return repository.loadClass(getSuperclassName());
+    }
+
+
+    /**
+     * @return list of super classes of this class in ascending order, i.e.,
+     * java.lang.Object is always the last element
+     * @throws ClassNotFoundException if any of the superclasses can't be found
+     */
+    public JavaClass[] getSuperClasses() throws ClassNotFoundException {
+        JavaClass clazz = this;
+        List<JavaClass> allSuperClasses = new ArrayList<JavaClass>();
+        for (clazz = clazz.getSuperClass(); clazz != null; clazz = clazz.getSuperClass()) {
+            allSuperClasses.add(clazz);
+        }
+        return allSuperClasses.toArray(new JavaClass[allSuperClasses.size()]);
+    }
+
+
+    /**
+     * Get interfaces directly implemented by this JavaClass.
+     */
+    public JavaClass[] getInterfaces() throws ClassNotFoundException {
+        String[] _interfaces = getInterfaceNames();
+        JavaClass[] classes = new JavaClass[_interfaces.length];
+        for (int i = 0; i < _interfaces.length; i++) {
+            classes[i] = repository.loadClass(_interfaces[i]);
+        }
+        return classes;
+    }
+
+
+    /**
+     * Get all interfaces implemented by this JavaClass (transitively).
+     */
+    public JavaClass[] getAllInterfaces() throws ClassNotFoundException {
+        ClassQueue queue = new ClassQueue();
+        Set<JavaClass> allInterfaces = new TreeSet<JavaClass>();
+        queue.enqueue(this);
+        while (!queue.empty()) {
+            JavaClass clazz = queue.dequeue();
+            JavaClass souper = clazz.getSuperClass();
+            JavaClass[] _interfaces = clazz.getInterfaces();
+            if (clazz.isInterface()) {
+                allInterfaces.add(clazz);
+            } else {
+                if (souper != null) {
+                    queue.enqueue(souper);
+                }
+            }
+            for (JavaClass _interface : _interfaces) {
+                queue.enqueue(_interface);
+            }
+        }
+        return allInterfaces.toArray(new JavaClass[allInterfaces.size()]);
+    }
+
+
+    /**
+     * @return Comparison strategy object
+     */
+    public static BCELComparator getComparator() {
+        return _cmp;
+    }
+
+
+    /**
+     * @param comparator Comparison strategy object
+     */
+    public static void setComparator( BCELComparator comparator ) {
+        _cmp = comparator;
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default two JavaClass objects are said to be equal when
+     * their class names are equal.
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        return _cmp.equals(this, obj);
+    }
+
+
+    /**
+     * Return the natural ordering of two JavaClasses.
+     * This ordering is based on the class name
+     */
+    public int compareTo( JavaClass obj ) {
+        return getClassName().compareTo(obj.getClassName());
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default return the hashcode of the class name.
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return _cmp.hashCode(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java b/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java
new file mode 100644
index 0000000..c9fd10c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/LineNumber.java
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * This class represents a (PC offset, line number) pair, i.e., a line number in
+ * the source that corresponds to a relative address in the byte code. This
+ * is used for debugging purposes.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     LineNumberTable
+ */
+public final class LineNumber implements Cloneable, Node, Serializable {
+
+    private static final long serialVersionUID = 169537400672820016L;
+    
+    /** Program Counter (PC) corresponds to line */
+    private short start_pc;
+    
+    /** number in source file */
+    private short line_number;
+
+    /**
+     * Initialize from another object.
+     * 
+     * @param c the object to copy
+     */
+    public LineNumber(LineNumber c) {
+        this(c.getStartPC(), c.getLineNumber());
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * 
+     * @param file Input stream
+     */
+    LineNumber(DataInput file) throws IOException {
+        this(file.readUnsignedShort(), file.readUnsignedShort());
+    }
+
+
+    /**
+     * @param start_pc Program Counter (PC) corresponds to
+     * @param line_number line number in source file
+     */
+    public LineNumber(int start_pc, int line_number) {
+        this.start_pc = (short) start_pc;
+        this.line_number = (short)line_number;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitLineNumber(this);
+    }
+
+
+    /**
+     * Dump line number/pc pair to file stream in binary format.
+     *
+     * @param file Output file stream
+     */
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeShort(start_pc);
+        file.writeShort(line_number);
+    }
+
+
+    /**
+     * @return Corresponding source line
+     */
+    public final int getLineNumber() {
+        return 0xffff & line_number;
+    }
+
+
+    /**
+     * @return PC in code
+     */
+    public final int getStartPC() {
+        return  0xffff & start_pc;
+    }
+
+
+    /**
+     * @param line_number the source line number
+     */
+    public final void setLineNumber( int line_number ) {
+        this.line_number = (short) line_number;
+    }
+
+
+    /**
+     * @param start_pc the pc for this line number
+     */
+    public final void setStartPC( int start_pc ) {
+        this.start_pc = (short) start_pc;
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        return "LineNumber(" + start_pc + ", " + line_number + ")";
+    }
+
+
+    /**
+     * @return deep copy of this object
+     */
+    public LineNumber copy() {
+        try {
+            return (LineNumber) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/LineNumberTable.java b/src/main/java/org/apache/commons/bcel6/classfile/LineNumberTable.java
new file mode 100644
index 0000000..fe506b0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/LineNumberTable.java
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a table of line numbers for debugging
+ * purposes. This attribute is used by the <em>Code</em> attribute. It
+ * contains pairs of PCs and line numbers.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Code
+ * @see LineNumber
+ */
+public final class LineNumberTable extends Attribute {
+
+    private static final long serialVersionUID = -6967221519632128904L;
+
+    private LineNumber[] line_number_table; // Table of line/numbers pairs
+
+
+    /*
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use copy() for a physical copy.
+     */
+    public LineNumberTable(LineNumberTable c) {
+        this(c.getNameIndex(), c.getLength(), c.getLineNumberTable(), c.getConstantPool());
+    }
+
+
+    /*
+     * @param name_index Index of name
+     * @param length Content length in bytes
+     * @param line_number_table Table of line/numbers pairs
+     * @param constant_pool Array of constants
+     */
+    public LineNumberTable(int name_index, int length, LineNumber[] line_number_table,
+            ConstantPool constant_pool) {
+        super(Constants.ATTR_LINE_NUMBER_TABLE, name_index, length, constant_pool);
+        setLineNumberTable(line_number_table);
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * @param name_index Index of name
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    LineNumberTable(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, (LineNumber[]) null, constant_pool);
+        int line_number_table_length = (input.readUnsignedShort());
+        line_number_table = new LineNumber[line_number_table_length];
+        for (int i = 0; i < line_number_table_length; i++) {
+            line_number_table[i] = new LineNumber(input);
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitLineNumberTable(this);
+    }
+
+
+    /**
+     * Dump line number table attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(line_number_table.length);
+        for (LineNumber lineNumber : line_number_table) {
+            lineNumber.dump(file);
+        }
+    }
+
+
+    /**
+     * @return Array of (pc offset, line number) pairs.
+     */
+    public final LineNumber[] getLineNumberTable() {
+        return line_number_table;
+    }
+
+
+    /**
+     * @param line_number_table the line number entries for this table
+     */
+    public final void setLineNumberTable( LineNumber[] line_number_table ) {
+        this.line_number_table = line_number_table;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder();
+        StringBuilder line = new StringBuilder();
+        String newLine = System.getProperty("line.separator", "\n");
+        for (int i = 0; i < line_number_table.length; i++) {
+            line.append(line_number_table[i].toString());
+            if (i < line_number_table.length - 1) {
+                line.append(", ");
+            }
+            if (line.length() > 72) {
+                line.append(newLine);
+                buf.append(line.toString());
+                line.setLength(0);
+            }
+        }
+        buf.append(line);
+        return buf.toString();
+    }
+
+
+    /**
+     * Map byte code positions to source code lines.
+     *
+     * @param pos byte code offset
+     * @return corresponding line in source code
+     */
+    public int getSourceLine( int pos ) {
+        int l = 0, r = line_number_table.length - 1;
+        if (r < 0) {
+            return -1;
+        }
+        int min_index = -1, min = -1;
+        /* Do a binary search since the array is ordered.
+         */
+        do {
+            int i = (l + r) / 2;
+            int j = line_number_table[i].getStartPC();
+            if (j == pos) {
+                return line_number_table[i].getLineNumber();
+            } else if (pos < j) {
+                r = i - 1;
+            } else {
+                l = i + 1;
+            }
+            /* If exact match can't be found (which is the most common case)
+             * return the line number that corresponds to the greatest index less
+             * than pos.
+             */
+            if (j < pos && j > min) {
+                min = j;
+                min_index = i;
+            }
+        } while (l <= r);
+        /* It's possible that we did not find any valid entry for the bytecode
+         * offset we were looking for.
+         */
+        if (min_index < 0) {
+            return -1;
+        }
+        return line_number_table[min_index].getLineNumber();
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        LineNumberTable c = (LineNumberTable) clone();
+        c.line_number_table = new LineNumber[line_number_table.length];
+        for (int i = 0; i < line_number_table.length; i++) {
+            c.line_number_table[i] = line_number_table[i].copy();
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+
+
+    public final int getTableLength() {
+        return line_number_table == null ? 0 : line_number_table.length;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java b/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java
new file mode 100644
index 0000000..8b6252e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/LocalVariable.java
@@ -0,0 +1,252 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a local variable within a method. It contains its
+ * scope, name, signature and index on the method's frame.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     LocalVariableTable
+ */
+public final class LocalVariable implements Constants, Cloneable, Node, Serializable {
+
+    private static final long serialVersionUID = -51081099265972179L;
+    private int start_pc; // Range in which the variable is valid
+    private int length;
+    private int name_index; // Index in constant pool of variable name
+    private int signature_index; // Index of variable signature
+    private int index; /* Variable is `index'th local variable on
+     * this method's frame.
+     */
+    private ConstantPool constant_pool;
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use copy() for a physical copy.
+     */
+    public LocalVariable(LocalVariable c) {
+        this(c.getStartPC(), c.getLength(), c.getNameIndex(), c.getSignatureIndex(), c.getIndex(),
+                c.getConstantPool());
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * @param file Input stream
+     * @throws IOException
+     */
+    LocalVariable(DataInput file, ConstantPool constant_pool) throws IOException {
+        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
+                .readUnsignedShort(), file.readUnsignedShort(), constant_pool);
+    }
+
+
+    /**
+     * @param start_pc Range in which the variable
+     * @param length ... is valid
+     * @param name_index Index in constant pool of variable name
+     * @param signature_index Index of variable's signature
+     * @param index Variable is `index'th local variable on the method's frame
+     * @param constant_pool Array of constants
+     */
+    public LocalVariable(int start_pc, int length, int name_index, int signature_index, int index,
+            ConstantPool constant_pool) {
+        this.start_pc = start_pc;
+        this.length = length;
+        this.name_index = name_index;
+        this.signature_index = signature_index;
+        this.index = index;
+        this.constant_pool = constant_pool;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitLocalVariable(this);
+    }
+
+
+    /**
+     * Dump local variable to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeShort(start_pc);
+        file.writeShort(length);
+        file.writeShort(name_index);
+        file.writeShort(signature_index);
+        file.writeShort(index);
+    }
+
+
+    /**
+     * @return Constant pool used by this object.
+     */
+    public final ConstantPool getConstantPool() {
+        return constant_pool;
+    }
+
+
+    /**
+     * @return Variable is valid within getStartPC() .. getStartPC()+getLength()
+     */
+    public final int getLength() {
+        return length;
+    }
+
+
+    /**
+     * @return Variable name.
+     */
+    public final String getName() {
+        ConstantUtf8 c;
+        c = (ConstantUtf8) constant_pool.getConstant(name_index, CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+
+    /**
+     * @return Index in constant pool of variable name.
+     */
+    public final int getNameIndex() {
+        return name_index;
+    }
+
+
+    /**
+     * @return Signature.
+     */
+    public final String getSignature() {
+        ConstantUtf8 c;
+        c = (ConstantUtf8) constant_pool.getConstant(signature_index, CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+
+    /**
+     * @return Index in constant pool of variable signature.
+     */
+    public final int getSignatureIndex() {
+        return signature_index;
+    }
+
+
+    /**
+     * @return index of register where variable is stored
+     */
+    public final int getIndex() {
+        return index;
+    }
+
+
+    /**
+     * @return Start of range where he variable is valid
+     */
+    public final int getStartPC() {
+        return start_pc;
+    }
+
+
+    /**
+     * @param constant_pool Constant pool to be used for this object.
+     */
+    public final void setConstantPool( ConstantPool constant_pool ) {
+        this.constant_pool = constant_pool;
+    }
+
+
+    /**
+     * @param length the length of this local variable
+     */
+    public final void setLength( int length ) {
+        this.length = length;
+    }
+
+
+    /**
+     * @param name_index the index into the constant pool for the name of this variable
+     */
+    public final void setNameIndex( int name_index ) {
+        this.name_index = name_index;
+    }
+
+
+    /**
+     * @param signature_index the index into the constant pool for the signature of this variable
+     */
+    public final void setSignatureIndex( int signature_index ) {
+        this.signature_index = signature_index;
+    }
+
+
+    /**
+     * @param index the index in the local variable table of this variable
+     */
+    public final void setIndex( int index ) {
+        this.index = index;
+    }
+
+
+    /**
+     * @param start_pc Specify range where the local variable is valid.
+     */
+    public final void setStartPC( int start_pc ) {
+        this.start_pc = start_pc;
+    }
+
+
+    /**
+     * @return string representation.
+     */
+    @Override
+    public final String toString() {
+        String name = getName(), signature = Utility.signatureToString(getSignature());
+        return "LocalVariable(start_pc = " + start_pc + ", length = " + length + ", index = "
+                + index + ":" + signature + " " + name + ")";
+    }
+
+
+    /**
+     * @return deep copy of this object
+     */
+    public LocalVariable copy() {
+        try {
+            return (LocalVariable) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTable.java b/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTable.java
new file mode 100644
index 0000000..ca5daf7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTable.java
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents colection of local variables in a
+ * method. This attribute is contained in the <em>Code</em> attribute.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Code
+ * @see LocalVariable
+ */
+public class LocalVariableTable extends Attribute {
+
+    private static final long serialVersionUID = 6780929007774637689L;
+    private LocalVariable[] local_variable_table; // variables
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use copy() for a physical copy.
+     */
+    public LocalVariableTable(LocalVariableTable c) {
+        this(c.getNameIndex(), c.getLength(), c.getLocalVariableTable(), c.getConstantPool());
+    }
+
+
+    /**
+     * @param name_index Index in constant pool to `LocalVariableTable'
+     * @param length Content length in bytes
+     * @param local_variable_table Table of local variables
+     * @param constant_pool Array of constants
+     */
+    public LocalVariableTable(int name_index, int length, LocalVariable[] local_variable_table,
+            ConstantPool constant_pool) {
+        super(Constants.ATTR_LOCAL_VARIABLE_TABLE, name_index, length, constant_pool);
+        setLocalVariableTable(local_variable_table);
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * @param name_index Index in constant pool
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    LocalVariableTable(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, (LocalVariable[]) null, constant_pool);
+        int local_variable_table_length = (input.readUnsignedShort());
+        local_variable_table = new LocalVariable[local_variable_table_length];
+        for (int i = 0; i < local_variable_table_length; i++) {
+            local_variable_table[i] = new LocalVariable(input, constant_pool);
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitLocalVariableTable(this);
+    }
+
+
+    /**
+     * Dump local variable table attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(local_variable_table.length);
+        for (LocalVariable variable : local_variable_table) {
+            variable.dump(file);
+        }
+    }
+
+
+    /**
+     * @return Array of local variables of method.
+     */
+    public final LocalVariable[] getLocalVariableTable() {
+        return local_variable_table;
+    }
+
+
+    /** 
+     * 
+     * @param index the variable slot
+     * 
+     * @return the first LocalVariable that matches the slot or null if not found
+     * 
+     * @deprecated since 5.2 because multiple variables can share the
+     *             same slot, use getLocalVariable(int index, int pc) instead.
+     */
+    @java.lang.Deprecated
+    public final LocalVariable getLocalVariable( int index ) {
+        for (LocalVariable variable : local_variable_table) {
+            if (variable.getIndex() == index) {
+                return variable;
+            }
+        }
+        return null;
+    }
+
+
+    /** 
+     * 
+     * @param index the variable slot
+     * @param pc the current pc that this variable is alive
+     * 
+     * @return the LocalVariable that matches or null if not found
+     */
+    public final LocalVariable getLocalVariable( int index, int pc ) {
+        for (LocalVariable variable : local_variable_table) {
+            if (variable.getIndex() == index) {
+                int start_pc = variable.getStartPC();
+                int end_pc = start_pc + variable.getLength();
+                if ((pc >= start_pc) && (pc <= end_pc)) {
+                    return variable;
+                }
+            }
+        }
+        return null;
+    }
+
+
+    public final void setLocalVariableTable( LocalVariable[] local_variable_table ) {
+        this.local_variable_table = local_variable_table;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder();
+        for (int i = 0; i < local_variable_table.length; i++) {
+            buf.append(local_variable_table[i].toString());
+            if (i < local_variable_table.length - 1) {
+                buf.append('\n');
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        LocalVariableTable c = (LocalVariableTable) clone();
+        c.local_variable_table = new LocalVariable[local_variable_table.length];
+        for (int i = 0; i < local_variable_table.length; i++) {
+            c.local_variable_table[i] = local_variable_table[i].copy();
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+
+
+    public final int getTableLength() {
+        return local_variable_table == null ? 0 : local_variable_table.length;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTypeTable.java b/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTypeTable.java
new file mode 100644
index 0000000..d69de08
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/LocalVariableTypeTable.java
@@ -0,0 +1,152 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+// The new table is used when generic types are about...
+
+//LocalVariableTable_attribute {
+//       u2 attribute_name_index;
+//       u4 attribute_length;
+//       u2 local_variable_table_length;
+//       {  u2 start_pc;
+//          u2 length;
+//          u2 name_index;
+//          u2 descriptor_index;
+//          u2 index;
+//       } local_variable_table[local_variable_table_length];
+//     }
+
+//LocalVariableTypeTable_attribute {
+//    u2 attribute_name_index;
+//    u4 attribute_length;
+//    u2 local_variable_type_table_length;
+//    { 
+//      u2 start_pc;
+//      u2 length;
+//      u2 name_index;
+//      u2 signature_index;
+//      u2 index;
+//    } local_variable_type_table[local_variable_type_table_length];
+//  }
+// J5TODO: Needs some testing !
+
+/**
+ * since 6.0
+ */
+public class LocalVariableTypeTable extends Attribute {
+
+    private static final long serialVersionUID = -1082157891095177114L;
+
+    private LocalVariable[] local_variable_type_table;        // variables
+
+    public LocalVariableTypeTable(LocalVariableTypeTable c) {
+        this(c.getNameIndex(), c.getLength(), c.getLocalVariableTypeTable(), c.getConstantPool());
+    }
+
+    public LocalVariableTypeTable(int name_index, int length, LocalVariable[] local_variable_table, ConstantPool constant_pool) {
+        super(Constants.ATTR_LOCAL_VARIABLE_TYPE_TABLE, name_index, length, constant_pool);
+        setLocalVariableTable(local_variable_table);
+    }
+
+    LocalVariableTypeTable(int nameIdx, int len, DataInput input, ConstantPool cpool) throws IOException {
+        this(nameIdx, len, (LocalVariable[]) null, cpool);
+
+        int local_variable_type_table_length = (input.readUnsignedShort());
+        local_variable_type_table = new LocalVariable[local_variable_type_table_length];
+
+        for (int i = 0; i < local_variable_type_table_length; i++) {
+            local_variable_type_table[i] = new LocalVariable(input, cpool);
+        }
+    }
+
+    @Override
+    public void accept(Visitor v) {
+        v.visitLocalVariableTypeTable(this);
+    }
+
+    @Override
+    public final void dump(DataOutputStream file) throws IOException {
+        super.dump(file);
+        file.writeShort(local_variable_type_table.length);
+        for (LocalVariable variable : local_variable_type_table) {
+            variable.dump(file);
+        }
+    }
+
+    public final LocalVariable[] getLocalVariableTypeTable() {
+        return local_variable_type_table;
+    }
+
+    public final LocalVariable getLocalVariable(int index) {
+        for (LocalVariable variable : local_variable_type_table) {
+            if (variable.getIndex() == index) {
+                return variable;
+            }
+        }
+
+        return null;
+    }
+
+    public final void setLocalVariableTable(LocalVariable[] local_variable_table) {
+        this.local_variable_type_table = local_variable_table;
+    }
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder();
+
+        for (int i = 0; i < local_variable_type_table.length; i++) {
+            buf.append(local_variable_type_table[i].toString());
+
+            if (i < local_variable_type_table.length - 1) {
+                buf.append('\n');
+            }
+        }
+
+        return buf.toString();
+    }
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy(ConstantPool constant_pool) {
+        LocalVariableTypeTable c = (LocalVariableTypeTable) clone();
+
+        c.local_variable_type_table = new LocalVariable[local_variable_type_table.length];
+        for (int i = 0; i < local_variable_type_table.length; i++) {
+            c.local_variable_type_table[i] = local_variable_type_table[i].copy();
+        }
+
+        c.constant_pool = constant_pool;
+        return c;
+    }
+
+    public final int getTableLength() {
+        return local_variable_type_table == null ? 0 : local_variable_type_table.length;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Method.java b/src/main/java/org/apache/commons/bcel6/classfile/Method.java
new file mode 100644
index 0000000..f3126b5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Method.java
@@ -0,0 +1,271 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.util.BCELComparator;
+
+/**
+ * This class represents the method info structure, i.e., the representation 
+ * for a method in the class. See JVM specification for details.
+ * A method has access flags, a name, a signature and a number of attributes.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class Method extends FieldOrMethod {
+
+    private static final long serialVersionUID = -2013983967283787941L;
+    private static BCELComparator _cmp = new BCELComparator() {
+
+        public boolean equals( Object o1, Object o2 ) {
+            Method THIS = (Method) o1;
+            Method THAT = (Method) o2;
+            return THIS.getName().equals(THAT.getName())
+                    && THIS.getSignature().equals(THAT.getSignature());
+        }
+
+
+        public int hashCode( Object o ) {
+            Method THIS = (Method) o;
+            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
+        }
+    };
+
+    // annotations defined on the parameters of a method
+    private ParameterAnnotationEntry[] parameterAnnotationEntries;
+
+    /**
+     * Empty constructor, all attributes have to be defined via `setXXX'
+     * methods. Use at your own risk.
+     */
+    public Method() {
+    }
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public Method(Method c) {
+        super(c);
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * @param file Input stream
+     * @throws IOException
+     * @throws ClassFormatException
+     */
+    Method(DataInput file, ConstantPool constant_pool) throws IOException,
+            ClassFormatException {
+        super(file, constant_pool);
+    }
+
+
+    /**
+     * @param access_flags Access rights of method
+     * @param name_index Points to field name in constant pool
+     * @param signature_index Points to encoded signature
+     * @param attributes Collection of attributes
+     * @param constant_pool Array of constants
+     */
+    public Method(int access_flags, int name_index, int signature_index, Attribute[] attributes,
+            ConstantPool constant_pool) {
+        super(access_flags, name_index, signature_index, attributes, constant_pool);
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitMethod(this);
+    }
+
+
+    /**
+     * @return Code attribute of method, if any
+     */
+    public final Code getCode() {
+        for (Attribute attribute : attributes) {
+            if (attribute instanceof Code) {
+                return (Code) attribute;
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * @return ExceptionTable attribute of method, if any, i.e., list all
+     * exceptions the method may throw not exception handlers!
+     */
+    public final ExceptionTable getExceptionTable() {
+        for (Attribute attribute : attributes) {
+            if (attribute instanceof ExceptionTable) {
+                return (ExceptionTable) attribute;
+            }
+        }
+        return null;
+    }
+
+
+    /** @return LocalVariableTable of code attribute if any, i.e. the call is forwarded
+     * to the Code atribute.
+     */
+    public final LocalVariableTable getLocalVariableTable() {
+        Code code = getCode();
+        if (code == null) {
+            return null;
+        }
+        return code.getLocalVariableTable();
+    }
+
+
+    /** @return LineNumberTable of code attribute if any, i.e. the call is forwarded
+     * to the Code atribute.
+     */
+    public final LineNumberTable getLineNumberTable() {
+        Code code = getCode();
+        if (code == null) {
+            return null;
+        }
+        return code.getLineNumberTable();
+    }
+
+
+    /**
+     * Return string representation close to declaration format,
+     * `public static void main(String[] args) throws IOException', e.g.
+     *
+     * @return String representation of the method.
+     */
+    @Override
+    public final String toString() {
+        ConstantUtf8 c;
+        String name, signature, access; // Short cuts to constant pool
+        StringBuilder buf;
+        access = Utility.accessToString(access_flags);
+        // Get name and signature from constant pool
+        c = (ConstantUtf8) constant_pool.getConstant(signature_index, Constants.CONSTANT_Utf8);
+        signature = c.getBytes();
+        c = (ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8);
+        name = c.getBytes();
+        signature = Utility.methodSignatureToString(signature, name, access, true,
+                getLocalVariableTable());
+        buf = new StringBuilder(signature);
+        for (Attribute attribute : attributes) {
+            if (!((attribute instanceof Code) || (attribute instanceof ExceptionTable))) {
+                buf.append(" [").append(attribute.toString()).append("]");
+            }
+        }
+        ExceptionTable e = getExceptionTable();
+        if (e != null) {
+            String str = e.toString();
+            if (!str.equals("")) {
+                buf.append("\n\t\tthrows ").append(str);
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this method
+     */
+    public final Method copy( ConstantPool _constant_pool ) {
+        return (Method) copy_(_constant_pool);
+    }
+
+
+    /**
+     * @return return type of method
+     */
+    public Type getReturnType() {
+        return Type.getReturnType(getSignature());
+    }
+
+
+    /**
+     * @return array of method argument types
+     */
+    public Type[] getArgumentTypes() {
+        return Type.getArgumentTypes(getSignature());
+    }
+
+
+    /**
+     * @return Comparison strategy object
+     */
+    public static BCELComparator getComparator() {
+        return _cmp;
+    }
+
+
+    /**
+     * @param comparator Comparison strategy object
+     */
+    public static void setComparator( BCELComparator comparator ) {
+        _cmp = comparator;
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default two method objects are said to be equal when
+     * their names and signatures are equal.
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        return _cmp.equals(this, obj);
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default return the hashcode of the method's name XOR signature.
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return _cmp.hashCode(this);
+    }
+
+    /**
+     * @return Annotations on the parameters of a method
+     */
+    public ParameterAnnotationEntry[] getParameterAnnotationEntries() {
+        if (parameterAnnotationEntries == null) {
+            parameterAnnotationEntries = ParameterAnnotationEntry.createParameterAnnotationEntries(getAttributes());
+        }
+        return parameterAnnotationEntries;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java b/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java
new file mode 100644
index 0000000..1707190
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/MethodParameter.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Entry of the parameters table.
+ * 
+ * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24">The class File Format : The MethodParameters Attribute</a>
+ * @since 6.0
+ */
+public class MethodParameter implements Serializable, Cloneable {
+
+    private static final long serialVersionUID = 6014494029439440326L;
+
+    /** Index of the CONSTANT_Utf8_info structure in the constant_pool table representing the name of the parameter */
+    private int name_index;
+
+    /** The access flags */
+    private int access_flags;
+
+    public MethodParameter() {
+    }
+
+    /**
+     * Construct object from input stream.
+     * 
+     * @param input Input stream
+     * @throws java.io.IOException
+     * @throws ClassFormatException
+     */
+    MethodParameter(DataInput input) throws IOException {
+        name_index = input.readUnsignedShort();
+        access_flags = input.readUnsignedShort();
+    }
+
+    public int getNameIndex() {
+        return name_index;
+    }
+
+    public void setNameIndex(int name_index) {
+        this.name_index = name_index;
+    }
+
+    /**
+     * Returns the name of the parameter.
+     */
+    public String getParameterName(ConstantPool constant_pool) {
+        if (name_index == 0) {
+            return null;
+        }
+        return ((ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8)).getBytes();
+       }
+
+    public int getAccessFlags() {
+        return access_flags;
+    }
+
+    public void setAccessFlags(int access_flags) {
+        this.access_flags = access_flags;
+    }
+
+    public boolean isFinal() {
+        return (access_flags & Constants.ACC_FINAL) != 0;
+    }
+
+    public boolean isSynthetic() {
+        return (access_flags & Constants.ACC_SYNTHETIC) != 0;
+    }
+
+    public boolean isMandated() {
+        return (access_flags & Constants.ACC_MANDATED) != 0;
+    }
+
+    /**
+     * Dump object to file stream on binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump(DataOutputStream file) throws IOException {
+        file.writeShort(name_index);
+        file.writeShort(access_flags);
+    }
+
+    /**
+     * @return deep copy of this object
+     */
+    public MethodParameter copy() {
+        try {
+            return (MethodParameter) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/MethodParameters.java b/src/main/java/org/apache/commons/bcel6/classfile/MethodParameters.java
new file mode 100644
index 0000000..6ca2407
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/MethodParameters.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a MethodParameters attribute.
+ *
+ * @see <a href="http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24">The class File Format : The MethodParameters Attribute</a>
+ * @since 6.0
+ */
+public class MethodParameters extends Attribute {
+
+    private static final long serialVersionUID = 2500272580422360140L;
+
+    private MethodParameter[] parameters = new MethodParameter[0];
+
+    MethodParameters(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
+        super(Constants.ATTR_METHOD_PARAMETERS, name_index, length, constant_pool);
+        System.out.println("new MethodParameters");
+
+        int parameters_count = input.readUnsignedByte();
+        parameters = new MethodParameter[parameters_count];
+        for (int i = 0; i < parameters_count; i++) {
+            parameters[i] = new MethodParameter(input);
+        }
+    }
+
+    public MethodParameter[] getParameters() {
+        return parameters;
+    }
+
+    public void setParameters(MethodParameter[] parameters) {
+        this.parameters = parameters;
+    }
+
+    @Override
+    public void accept(Visitor v) {
+        v.visitMethodParameters(this);
+    }
+
+    @Override
+    public Attribute copy(ConstantPool _constant_pool) {
+        MethodParameters c = (MethodParameters) clone();
+        c.parameters = new MethodParameter[parameters.length];
+
+        for (int i = 0; i < parameters.length; i++) {
+            c.parameters[i] = parameters[i].copy();
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+
+    /**
+     * Dump method parameters attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+       public void dump(DataOutputStream file) throws IOException {
+           super.dump(file);
+           file.writeByte(parameters.length);
+        for (MethodParameter parameter : parameters) {
+            parameter.dump(file);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Node.java b/src/main/java/org/apache/commons/bcel6/classfile/Node.java
new file mode 100644
index 0000000..adb35c7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Node.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+/**
+ * Denote class to have an accept method();
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface Node {
+
+    void accept( Visitor obj );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/PMGClass.java b/src/main/java/org/apache/commons/bcel6/classfile/PMGClass.java
new file mode 100644
index 0000000..66fe9fe
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/PMGClass.java
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class is derived from <em>Attribute</em> and represents a reference
+ * to a PMG attribute.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Attribute
+ */
+public final class PMGClass extends Attribute {
+
+    private static final long serialVersionUID = -7075964153234211509L;
+    private int pmg_class_index, pmg_index;
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public PMGClass(PMGClass c) {
+        this(c.getNameIndex(), c.getLength(), c.getPMGIndex(), c.getPMGClassIndex(), c
+                .getConstantPool());
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    PMGClass(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, input.readUnsignedShort(), input.readUnsignedShort(), constant_pool);
+    }
+
+
+    /**
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param pmg_index index in constant pool for source file name
+     * @param pmg_class_index Index in constant pool to CONSTANT_Utf8
+     * @param constant_pool Array of constants
+     */
+    public PMGClass(int name_index, int length, int pmg_index, int pmg_class_index,
+            ConstantPool constant_pool) {
+        super(Constants.ATTR_PMG, name_index, length, constant_pool);
+        this.pmg_index = pmg_index;
+        this.pmg_class_index = pmg_class_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        System.err.println("Visiting non-standard PMGClass object");
+    }
+
+
+    /**
+     * Dump source file attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(pmg_index);
+        file.writeShort(pmg_class_index);
+    }
+
+
+    /**
+     * @return Index in constant pool of source file name.
+     */
+    public final int getPMGClassIndex() {
+        return pmg_class_index;
+    }
+
+
+    /**
+     * @param pmg_class_index
+     */
+    public final void setPMGClassIndex( int pmg_class_index ) {
+        this.pmg_class_index = pmg_class_index;
+    }
+
+
+    /**
+     * @return Index in constant pool of source file name.
+     */
+    public final int getPMGIndex() {
+        return pmg_index;
+    }
+
+
+    /**
+     * @param pmg_index
+     */
+    public final void setPMGIndex( int pmg_index ) {
+        this.pmg_index = pmg_index;
+    }
+
+
+    /**
+     * @return PMG name.
+     */
+    public final String getPMGName() {
+        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(pmg_index,
+                Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+
+    /**
+     * @return PMG class name.
+     */
+    public final String getPMGClassName() {
+        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(pmg_class_index,
+                Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        return "PMGClass(" + getPMGName() + ", " + getPMGClassName() + ")";
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        return (Attribute) clone();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotationEntry.java b/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotationEntry.java
new file mode 100644
index 0000000..23354b7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotationEntry.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * represents one parameter annotation in the parameter annotation table
+ *
+ * @version $Id: ParameterAnnotationEntry
+ * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public class ParameterAnnotationEntry implements Node, Constants {
+
+    private final AnnotationEntry[] annotation_table;
+
+
+    /**
+     * Construct object from input stream.
+     * 
+     * @param input Input stream
+     * @throws IOException
+     */
+    ParameterAnnotationEntry(DataInput input, ConstantPool constant_pool) throws IOException {
+        int annotation_table_length = (input.readUnsignedShort());
+        annotation_table = new AnnotationEntry[annotation_table_length];
+        for (int i = 0; i < annotation_table_length; i++) {
+            // TODO isRuntimeVisible
+            annotation_table[i] = AnnotationEntry.read(input, constant_pool, false);
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        // v.visitParameterAnnotationEntry(this);
+    }
+
+    /**
+     * returns the array of annotation entries in this annotation
+     */
+    public AnnotationEntry[] getAnnotationEntries() {
+        return annotation_table;
+    }
+
+    public void dump(DataOutputStream dos) throws IOException {
+        dos.writeShort(annotation_table.length);
+        for (AnnotationEntry entry : annotation_table) {
+            entry.dump(dos);
+        }
+    }
+
+  public static ParameterAnnotationEntry[] createParameterAnnotationEntries(Attribute[] attrs) {
+      // Find attributes that contain parameter annotation data
+      List<ParameterAnnotationEntry> accumulatedAnnotations = new ArrayList<ParameterAnnotationEntry>(attrs.length);
+      for (Attribute attribute : attrs) {
+          if (attribute instanceof ParameterAnnotations) {
+              ParameterAnnotations runtimeAnnotations = (ParameterAnnotations)attribute;
+              Collections.addAll(accumulatedAnnotations, runtimeAnnotations.getParameterAnnotationEntries());
+          }
+      }
+      return accumulatedAnnotations.toArray(new ParameterAnnotationEntry[accumulatedAnnotations.size()]);
+  }
+}
+
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotations.java b/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotations.java
new file mode 100644
index 0000000..588f275
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/ParameterAnnotations.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * base class for parameter annotations
+ * 
+ * @version $Id: ParameterAnnotations
+ * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public abstract class ParameterAnnotations extends Attribute {
+
+    private static final long serialVersionUID = 5234607357644462705L;
+    
+    /** Table of parameter annotations */
+    private ParameterAnnotationEntry[] parameter_annotation_table;
+
+    /**
+     * @param parameter_annotation_type the subclass type of the parameter annotation
+     * @param name_index Index pointing to the name <em>Code</em>
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     */
+    ParameterAnnotations(byte parameter_annotation_type, int name_index, int length,
+            DataInput input, ConstantPool constant_pool) throws IOException {
+        this(parameter_annotation_type, name_index, length, (ParameterAnnotationEntry[]) null,
+                constant_pool);
+        int num_parameters = (input.readUnsignedByte());
+        parameter_annotation_table = new ParameterAnnotationEntry[num_parameters];
+        for (int i = 0; i < num_parameters; i++) {
+            parameter_annotation_table[i] = new ParameterAnnotationEntry(input, constant_pool);
+        }
+    }
+
+
+    /**
+     * @param parameter_annotation_type the subclass type of the parameter annotation
+     * @param name_index Index pointing to the name <em>Code</em>
+     * @param length Content length in bytes
+     * @param parameter_annotation_table the actual parameter annotations
+     * @param constant_pool Array of constants
+     */
+    public ParameterAnnotations(byte parameter_annotation_type, int name_index, int length,
+            ParameterAnnotationEntry[] parameter_annotation_table, ConstantPool constant_pool) {
+        super(parameter_annotation_type, name_index, length, constant_pool);
+        setParameterAnnotationTable(parameter_annotation_table);
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitParameterAnnotation(this);
+    }
+
+
+    /**
+     * @param parameter_annotation_table the entries to set in this parameter annotation
+     */
+    public final void setParameterAnnotationTable(ParameterAnnotationEntry[] parameter_annotation_table ) {
+        this.parameter_annotation_table = parameter_annotation_table;
+    }
+
+
+    /**
+     * @return the parameter annotation entry table
+     */
+    public final ParameterAnnotationEntry[] getParameterAnnotationTable() {
+        return parameter_annotation_table;
+    }
+
+
+    /**
+     * returns the array of parameter annotation entries in this parameter annotation
+     */
+    public ParameterAnnotationEntry[] getParameterAnnotationEntries() {
+        return parameter_annotation_table;
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        super.dump(dos);
+        dos.writeByte(parameter_annotation_table.length);
+
+        for (ParameterAnnotationEntry element : parameter_annotation_table) {
+            element.dump(dos);
+        }
+
+    }
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool constant_pool ) {
+        ParameterAnnotations c = (ParameterAnnotations) clone();
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/RuntimeInvisibleAnnotations.java b/src/main/java/org/apache/commons/bcel6/classfile/RuntimeInvisibleAnnotations.java
new file mode 100644
index 0000000..2b149c5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/RuntimeInvisibleAnnotations.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * represents an annotation that is represented in the class file but is not
+ * provided to the JVM.
+ * 
+ * @version $Id: RuntimeInvisibleAnnotations
+ * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public class RuntimeInvisibleAnnotations extends Annotations
+{
+    private static final long serialVersionUID = 5274986004117955967L;
+
+    /**
+     * @param name_index
+     *            Index pointing to the name <em>Code</em>
+     * @param length
+     *            Content length in bytes
+     * @param input
+     *            Input stream
+     * @param constant_pool
+     *            Array of constants
+     */
+    public RuntimeInvisibleAnnotations(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException
+    {
+        super(Constants.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS, name_index, length, input, constant_pool, false);
+    }
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy(ConstantPool constant_pool)
+    {
+        Annotations c = (Annotations) clone();
+        return c;
+    }
+
+    @Override
+    public final void dump(DataOutputStream dos) throws IOException
+    {
+        super.dump(dos);
+        writeAnnotations(dos);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/RuntimeInvisibleParameterAnnotations.java b/src/main/java/org/apache/commons/bcel6/classfile/RuntimeInvisibleParameterAnnotations.java
new file mode 100644
index 0000000..7d110aa
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/RuntimeInvisibleParameterAnnotations.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Represents a parameter annotation that is represented in the class file
+ * but is not provided to the JVM.
+ * 
+ * @version $Id: RuntimeInvisibleParameterAnnotations
+ * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public class RuntimeInvisibleParameterAnnotations extends ParameterAnnotations {
+
+    private static final long serialVersionUID = 270153155050617200L;
+    
+    /**
+     * @param name_index Index pointing to the name <em>Code</em>
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     */
+    public RuntimeInvisibleParameterAnnotations(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        super(Constants.ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS, name_index, length, input, constant_pool);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/RuntimeVisibleAnnotations.java b/src/main/java/org/apache/commons/bcel6/classfile/RuntimeVisibleAnnotations.java
new file mode 100644
index 0000000..930bb6d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/RuntimeVisibleAnnotations.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * represents an annotation that is represented in the class file and is
+ * provided to the JVM.
+ * 
+ * @version $Id: RuntimeVisibleAnnotations
+ * @author <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public class RuntimeVisibleAnnotations extends Annotations
+{
+    private static final long serialVersionUID = 8992333017010665281L;
+
+    /**
+     * @param name_index
+     *            Index pointing to the name <em>Code</em>
+     * @param length
+     *            Content length in bytes
+     * @param input
+     *            Input stream
+     * @param constant_pool
+     *            Array of constants
+     */
+    public RuntimeVisibleAnnotations(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException
+    {
+        super(Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS, name_index, length, input, constant_pool, true);
+    }
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy(ConstantPool constant_pool)
+    {
+        return (Annotations) clone();
+    }
+
+    @Override
+    public final void dump(DataOutputStream dos) throws IOException
+    {
+        super.dump(dos);
+        writeAnnotations(dos);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/RuntimeVisibleParameterAnnotations.java b/src/main/java/org/apache/commons/bcel6/classfile/RuntimeVisibleParameterAnnotations.java
new file mode 100644
index 0000000..6feb598
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/RuntimeVisibleParameterAnnotations.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Represents a parameter annotation that is represented in the class file
+ * and is provided to the JVM.
+ * 
+ * @version $Id: RuntimeVisibleParameterAnnotations
+ * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
+ * @since 6.0
+ */
+public class RuntimeVisibleParameterAnnotations extends ParameterAnnotations {
+
+    private static final long serialVersionUID = -4266572854750267070L;
+    
+    /**
+     * @param name_index Index pointing to the name <em>Code</em>
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     */
+    public RuntimeVisibleParameterAnnotations(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        super(Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS, name_index, length, input, constant_pool);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Signature.java b/src/main/java/org/apache/commons/bcel6/classfile/Signature.java
new file mode 100644
index 0000000..ad43868
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Signature.java
@@ -0,0 +1,270 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class is derived from <em>Attribute</em> and represents a reference
+ * to a GJ attribute.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Attribute
+ */
+public final class Signature extends Attribute {
+
+    private static final long serialVersionUID = 5808807822688827177L;
+    private int signature_index;
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public Signature(Signature c) {
+        this(c.getNameIndex(), c.getLength(), c.getSignatureIndex(), c.getConstantPool());
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    Signature(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, input.readUnsignedShort(), constant_pool);
+    }
+
+
+    /**
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param signature_index Index in constant pool to CONSTANT_Utf8
+     * @param constant_pool Array of constants
+     */
+    public Signature(int name_index, int length, int signature_index, ConstantPool constant_pool) {
+        super(Constants.ATTR_SIGNATURE, name_index, length, constant_pool);
+        this.signature_index = signature_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        //System.err.println("Visiting non-standard Signature object");
+        v.visitSignature(this);
+    }
+
+
+    /**
+     * Dump source file attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(signature_index);
+    }
+
+
+    /**
+     * @return Index in constant pool of source file name.
+     */
+    public final int getSignatureIndex() {
+        return signature_index;
+    }
+
+
+    /**
+     * @param signature_index the index info the constant pool of this signature
+     */
+    public final void setSignatureIndex( int signature_index ) {
+        this.signature_index = signature_index;
+    }
+
+
+    /**
+     * @return GJ signature.
+     */
+    public final String getSignature() {
+        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(signature_index,
+                Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+    /**
+     * Extends ByteArrayInputStream to make 'unreading' chars possible.
+     */
+    private static final class MyByteArrayInputStream extends ByteArrayInputStream {
+
+        MyByteArrayInputStream(String data) {
+            super(data.getBytes());
+        }
+
+
+        final String getData() {
+            return new String(buf);
+        }
+
+
+        final void unread() {
+            if (pos > 0) {
+                pos--;
+            }
+        }
+    }
+
+
+    private static boolean identStart( int ch ) {
+        return ch == 'T' || ch == 'L';
+    }
+
+
+    private static void matchIdent( MyByteArrayInputStream in, StringBuilder buf ) {
+        int ch;
+        if ((ch = in.read()) == -1) {
+            throw new RuntimeException("Illegal signature: " + in.getData()
+                    + " no ident, reaching EOF");
+        }
+        //System.out.println("return from ident:" + (char)ch);
+        if (!identStart(ch)) {
+            StringBuilder buf2 = new StringBuilder();
+            int count = 1;
+            while (Character.isJavaIdentifierPart((char) ch)) {
+                buf2.append((char) ch);
+                count++;
+                ch = in.read();
+            }
+            if (ch == ':') { // Ok, formal parameter
+                in.skip("Ljava/lang/Object".length());
+                buf.append(buf2);
+                ch = in.read();
+                in.unread();
+                //System.out.println("so far:" + buf2 + ":next:" +(char)ch);
+            } else {
+                for (int i = 0; i < count; i++) {
+                    in.unread();
+                }
+            }
+            return;
+        }
+        StringBuilder buf2 = new StringBuilder();
+        ch = in.read();
+        do {
+            buf2.append((char) ch);
+            ch = in.read();
+            //System.out.println("within ident:"+ (char)ch);
+        } while ((ch != -1) && (Character.isJavaIdentifierPart((char) ch) || (ch == '/')));
+        buf.append(buf2.toString().replace('/', '.'));
+        //System.out.println("regular return ident:"+ (char)ch + ":" + buf2);
+        if (ch != -1) {
+            in.unread();
+        }
+    }
+
+
+    private static void matchGJIdent( MyByteArrayInputStream in, StringBuilder buf ) {
+        int ch;
+        matchIdent(in, buf);
+        ch = in.read();
+        if ((ch == '<') || ch == '(') { // Parameterized or method
+            //System.out.println("Enter <");
+            buf.append((char) ch);
+            matchGJIdent(in, buf);
+            while (((ch = in.read()) != '>') && (ch != ')')) { // List of parameters
+                if (ch == -1) {
+                    throw new RuntimeException("Illegal signature: " + in.getData()
+                            + " reaching EOF");
+                }
+                //System.out.println("Still no >");
+                buf.append(", ");
+                in.unread();
+                matchGJIdent(in, buf); // Recursive call
+            }
+            //System.out.println("Exit >");
+            buf.append((char) ch);
+        } else {
+            in.unread();
+        }
+        ch = in.read();
+        if (identStart(ch)) {
+            in.unread();
+            matchGJIdent(in, buf);
+        } else if (ch == ')') {
+            in.unread();
+            return;
+        } else if (ch != ';') {
+            throw new RuntimeException("Illegal signature: " + in.getData() + " read " + (char) ch);
+        }
+    }
+
+
+    public static String translate( String s ) {
+        //System.out.println("Sig:" + s);
+        StringBuilder buf = new StringBuilder();
+        matchGJIdent(new MyByteArrayInputStream(s), buf);
+        return buf.toString();
+    }
+
+
+    public static boolean isFormalParameterList( String s ) {
+        return s.startsWith("<") && (s.indexOf(':') > 0);
+    }
+
+
+    public static boolean isActualParameterList( String s ) {
+        return s.startsWith("L") && s.endsWith(">;");
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        String s = getSignature();
+        return "Signature(" + s + ")";
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        return (Attribute) clone();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/SimpleElementValue.java b/src/main/java/org/apache/commons/bcel6/classfile/SimpleElementValue.java
new file mode 100644
index 0000000..4c9082a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/SimpleElementValue.java
@@ -0,0 +1,226 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * @since 6.0
+ */
+public class SimpleElementValue extends ElementValue
+{
+    private int index;
+
+    public SimpleElementValue(int type, int index, ConstantPool cpool)
+    {
+        super(type, cpool);
+        this.index = index;
+    }
+
+    /**
+     * @return Value entry index in the cpool
+     */
+    public int getIndex()
+    {
+        return index;
+    }
+
+    public void setIndex(int index)
+    {
+        this.index = index;
+    }
+
+    public String getValueString()
+    {
+        if (type != STRING) {
+            throw new RuntimeException(
+                    "Dont call getValueString() on a non STRING ElementValue");
+        }
+        ConstantUtf8 c = (ConstantUtf8) cpool.getConstant(getIndex(),
+                Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+    public int getValueInt()
+    {
+        if (type != PRIMITIVE_INT) {
+            throw new RuntimeException(
+                    "Dont call getValueString() on a non STRING ElementValue");
+        }
+        ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
+                Constants.CONSTANT_Integer);
+        return c.getBytes();
+    }
+
+    public byte getValueByte()
+    {
+        if (type != PRIMITIVE_BYTE) {
+            throw new RuntimeException(
+                    "Dont call getValueByte() on a non BYTE ElementValue");
+        }
+        ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
+                Constants.CONSTANT_Integer);
+        return (byte) c.getBytes();
+    }
+
+    public char getValueChar()
+    {
+        if (type != PRIMITIVE_CHAR) {
+            throw new RuntimeException(
+                    "Dont call getValueChar() on a non CHAR ElementValue");
+        }
+        ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
+                Constants.CONSTANT_Integer);
+        return (char) c.getBytes();
+    }
+
+    public long getValueLong()
+    {
+        if (type != PRIMITIVE_LONG) {
+            throw new RuntimeException(
+                    "Dont call getValueLong() on a non LONG ElementValue");
+        }
+        ConstantLong j = (ConstantLong) cpool.getConstant(getIndex());
+        return j.getBytes();
+    }
+
+    public float getValueFloat()
+    {
+        if (type != PRIMITIVE_FLOAT) {
+            throw new RuntimeException(
+                    "Dont call getValueFloat() on a non FLOAT ElementValue");
+        }
+        ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex());
+        return f.getBytes();
+    }
+
+    public double getValueDouble()
+    {
+        if (type != PRIMITIVE_DOUBLE) {
+            throw new RuntimeException(
+                    "Dont call getValueDouble() on a non DOUBLE ElementValue");
+        }
+        ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex());
+        return d.getBytes();
+    }
+
+    public boolean getValueBoolean()
+    {
+        if (type != PRIMITIVE_BOOLEAN) {
+            throw new RuntimeException(
+                    "Dont call getValueBoolean() on a non BOOLEAN ElementValue");
+        }
+        ConstantInteger bo = (ConstantInteger) cpool.getConstant(getIndex());
+        return (bo.getBytes() != 0);
+    }
+
+    public short getValueShort()
+    {
+        if (type != PRIMITIVE_SHORT) {
+            throw new RuntimeException(
+                    "Dont call getValueShort() on a non SHORT ElementValue");
+        }
+        ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex());
+        return (short) s.getBytes();
+    }
+
+    @Override
+    public String toString()
+    {
+        return stringifyValue();
+    }
+
+    // Whatever kind of value it is, return it as a string
+    @Override
+    public String stringifyValue()
+    {
+        switch (type)
+        {
+        case PRIMITIVE_INT:
+            ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
+                    Constants.CONSTANT_Integer);
+            return Integer.toString(c.getBytes());
+        case PRIMITIVE_LONG:
+            ConstantLong j = (ConstantLong) cpool.getConstant(getIndex(),
+                    Constants.CONSTANT_Long);
+            return Long.toString(j.getBytes());
+        case PRIMITIVE_DOUBLE:
+            ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex(),
+                    Constants.CONSTANT_Double);
+            return Double.toString(d.getBytes());
+        case PRIMITIVE_FLOAT:
+            ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex(),
+                    Constants.CONSTANT_Float);
+            return Float.toString(f.getBytes());
+        case PRIMITIVE_SHORT:
+            ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex(),
+                    Constants.CONSTANT_Integer);
+            return Integer.toString(s.getBytes());
+        case PRIMITIVE_BYTE:
+            ConstantInteger b = (ConstantInteger) cpool.getConstant(getIndex(),
+                    Constants.CONSTANT_Integer);
+            return Integer.toString(b.getBytes());
+        case PRIMITIVE_CHAR:
+            ConstantInteger ch = (ConstantInteger) cpool.getConstant(
+                    getIndex(), Constants.CONSTANT_Integer);
+            return String.valueOf((char)ch.getBytes());
+        case PRIMITIVE_BOOLEAN:
+            ConstantInteger bo = (ConstantInteger) cpool.getConstant(
+                    getIndex(), Constants.CONSTANT_Integer);
+            if (bo.getBytes() == 0) {
+                return "false";
+            }
+            return "true";
+        case STRING:
+            ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(getIndex(),
+                    Constants.CONSTANT_Utf8);
+            return cu8.getBytes();
+        default:
+            throw new RuntimeException(
+                    "SimpleElementValue class does not know how to stringify type "
+                            + type);
+        }
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 kind of value
+        switch (type)
+        {
+        case PRIMITIVE_INT:
+        case PRIMITIVE_BYTE:
+        case PRIMITIVE_CHAR:
+        case PRIMITIVE_FLOAT:
+        case PRIMITIVE_LONG:
+        case PRIMITIVE_BOOLEAN:
+        case PRIMITIVE_SHORT:
+        case PRIMITIVE_DOUBLE:
+        case STRING:
+            dos.writeShort(getIndex());
+            break;
+        default:
+            throw new RuntimeException(
+                    "SimpleElementValue doesnt know how to write out type "
+                            + type);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/SourceFile.java b/src/main/java/org/apache/commons/bcel6/classfile/SourceFile.java
new file mode 100644
index 0000000..e40d106
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/SourceFile.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class is derived from <em>Attribute</em> and represents a reference
+ * to the source file of this class.  At most one SourceFile attribute
+ * should appear per classfile.  The intention of this class is that it is
+ * instantiated from the <em>Attribute.readAttribute()</em> method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Attribute
+ */
+public final class SourceFile extends Attribute {
+
+    private static final long serialVersionUID = -804226255663222912L;
+    private int sourcefile_index;
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public SourceFile(SourceFile c) {
+        this(c.getNameIndex(), c.getLength(), c.getSourceFileIndex(), c.getConstantPool());
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    SourceFile(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, input.readUnsignedShort(), constant_pool);
+    }
+
+
+    /**
+     * @param name_index Index in constant pool to CONSTANT_Utf8, which
+     * should represent the string "SourceFile".
+     * @param length Content length in bytes, the value should be 2.
+     * @param constant_pool The constant pool that this attribute is
+     * associated with.
+     * @param sourcefile_index Index in constant pool to CONSTANT_Utf8.  This
+     * string will be interpreted as the name of the file from which this
+     * class was compiled.  It will not be interpreted as indicating the name
+     * of the directory contqining the file or an absolute path; this
+     * information has to be supplied the consumer of this attribute - in
+     * many cases, the JVM.
+     */
+    public SourceFile(int name_index, int length, int sourcefile_index, ConstantPool constant_pool) {
+        super(Constants.ATTR_SOURCE_FILE, name_index, length, constant_pool);
+        this.sourcefile_index = sourcefile_index;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitSourceFile(this);
+    }
+
+
+    /**
+     * Dump source file attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(sourcefile_index);
+    }
+
+
+    /**
+     * @return Index in constant pool of source file name.
+     */
+    public final int getSourceFileIndex() {
+        return sourcefile_index;
+    }
+
+
+    /**
+     * @param sourcefile_index
+     */
+    public final void setSourceFileIndex( int sourcefile_index ) {
+        this.sourcefile_index = sourcefile_index;
+    }
+
+
+    /**
+     * @return Source file name.
+     */
+    public final String getSourceFileName() {
+        ConstantUtf8 c = (ConstantUtf8) constant_pool.getConstant(sourcefile_index,
+                Constants.CONSTANT_Utf8);
+        return c.getBytes();
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        return "SourceFile(" + getSourceFileName() + ")";
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        return (Attribute) clone();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/StackMap.java b/src/main/java/org/apache/commons/bcel6/classfile/StackMap.java
new file mode 100644
index 0000000..fcf5a9f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/StackMap.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a stack map attribute used for
+ * preverification of Java classes for the <a
+ * href="http://java.sun.com/j2me/"> Java 2 Micro Edition</a>
+ * (J2ME). This attribute is used by the <a
+ * href="http://java.sun.com/products/cldc/">KVM</a> and contained
+ * within the Code attribute of a method. See CLDC specification
+ * �5.3.1.2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Code
+ * @see     StackMapEntry
+ * @see     StackMapType
+ */
+public final class StackMap extends Attribute {
+
+    private static final long serialVersionUID = -6238662431726968495L;
+    private StackMapEntry[] map; // Table of stack map entries
+
+
+    /*
+     * @param name_index Index of name
+     * @param length Content length in bytes
+     * @param map Table of stack map entries
+     * @param constant_pool Array of constants
+     */
+    public StackMap(int name_index, int length, StackMapEntry[] map, ConstantPool constant_pool) {
+        super(Constants.ATTR_STACK_MAP, name_index, length, constant_pool);
+        setStackMap(map);
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * 
+     * @param name_index Index of name
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    StackMap(int name_index, int length, DataInput input, ConstantPool constant_pool) throws IOException {
+        this(name_index, length, (StackMapEntry[]) null, constant_pool);
+        int map_length = input.readUnsignedShort();
+        map = new StackMapEntry[map_length];
+        for (int i = 0; i < map_length; i++) {
+            map[i] = new StackMapEntry(input, constant_pool);
+        }
+    }
+
+
+    /**
+     * Dump line number table attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(map.length);
+        for (StackMapEntry entry : map) {
+            entry.dump(file);
+        }
+    }
+
+
+    /**
+     * @return Array of stack map entries
+     */
+    public final StackMapEntry[] getStackMap() {
+        return map;
+    }
+
+
+    /**
+     * @param map Array of stack map entries
+     */
+    public final void setStackMap( StackMapEntry[] map ) {
+        this.map = map;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder("StackMap(");
+        for (int i = 0; i < map.length; i++) {
+            buf.append(map[i].toString());
+            if (i < map.length - 1) {
+                buf.append(", ");
+            }
+        }
+        buf.append(')');
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        StackMap c = (StackMap) clone();
+        c.map = new StackMapEntry[map.length];
+        for (int i = 0; i < map.length; i++) {
+            c.map[i] = map[i].copy();
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackMap(this);
+    }
+
+
+    public final int getMapLength() {
+        return map == null ? 0 : map.length;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java b/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java
new file mode 100644
index 0000000..3b1f038
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/StackMapEntry.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * This class represents a stack map entry recording the types of
+ * local variables and the the of stack items at a given byte code offset.
+ * See CLDC specification �5.3.1.2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     StackMap
+ * @see     StackMapType
+ */
+public final class StackMapEntry implements Cloneable, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private int byte_code_offset;
+    private StackMapType[] types_of_locals;
+    private StackMapType[] types_of_stack_items;
+    private ConstantPool constant_pool;
+
+
+    /**
+     * Construct object from input stream.
+     * 
+     * @param input Input stream
+     * @throws IOException
+     */
+    StackMapEntry(DataInput input, ConstantPool constant_pool) throws IOException {
+        this.constant_pool = constant_pool;
+        this.byte_code_offset = input.readShort();
+
+        int number_of_locals = input.readShort();
+        types_of_locals = new StackMapType[number_of_locals];
+        for (int i = 0; i < number_of_locals; i++) {
+            types_of_locals[i] = new StackMapType(input, constant_pool);
+        }
+
+        int number_of_stack_items = input.readShort();
+        types_of_stack_items = new StackMapType[number_of_stack_items];
+        for (int i = 0; i < number_of_stack_items; i++) {
+            types_of_stack_items[i] = new StackMapType(input, constant_pool);
+        }
+    }
+
+
+    public StackMapEntry(int byte_code_offset, int number_of_locals,
+            StackMapType[] types_of_locals, int number_of_stack_items,
+            StackMapType[] types_of_stack_items, ConstantPool constant_pool) {
+        this.byte_code_offset = byte_code_offset;
+        setTypesOfLocals(types_of_locals);
+        setTypesOfStackItems(types_of_stack_items);
+        this.constant_pool = constant_pool;
+    }
+
+
+    /**
+     * Dump stack map entry
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeShort(byte_code_offset);
+        file.writeShort(types_of_locals.length);
+        for (StackMapType type : types_of_locals) {
+            type.dump(file);
+        }
+        file.writeShort(types_of_stack_items.length);
+        for (StackMapType type : types_of_stack_items) {
+            type.dump(file);
+        }
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder(64);
+        buf.append("(offset=").append(byte_code_offset);
+        if (types_of_locals.length > 0) {
+            buf.append(", locals={");
+            for (int i = 0; i < types_of_locals.length; i++) {
+                buf.append(types_of_locals[i]);
+                if (i < types_of_locals.length - 1) {
+                    buf.append(", ");
+                }
+            }
+            buf.append("}");
+        }
+        if (types_of_stack_items.length > 0) {
+            buf.append(", stack items={");
+            for (int i = 0; i < types_of_stack_items.length; i++) {
+                buf.append(types_of_stack_items[i]);
+                if (i < types_of_stack_items.length - 1) {
+                    buf.append(", ");
+                }
+            }
+            buf.append("}");
+        }
+        buf.append(")");
+        return buf.toString();
+    }
+
+
+    public void setByteCodeOffset( int b ) {
+        byte_code_offset = b;
+    }
+
+
+    public int getByteCodeOffset() {
+        return byte_code_offset;
+    }
+
+
+    @java.lang.Deprecated
+    public void setNumberOfLocals( int n ) {
+    }
+
+
+    public int getNumberOfLocals() {
+        return types_of_locals == null ? 0 : types_of_locals.length;
+    }
+
+
+    public void setTypesOfLocals( StackMapType[] types ) {
+        types_of_locals = types != null ? types : new StackMapType[0];
+    }
+
+
+    public StackMapType[] getTypesOfLocals() {
+        return types_of_locals;
+    }
+
+
+    @java.lang.Deprecated
+    public void setNumberOfStackItems( int n ) {
+    }
+
+
+    public int getNumberOfStackItems() {
+        return types_of_stack_items == null ? 0 : types_of_stack_items.length;
+    }
+
+
+    public void setTypesOfStackItems( StackMapType[] types ) {
+        types_of_stack_items = types != null ? types : new StackMapType[0];
+    }
+
+
+    public StackMapType[] getTypesOfStackItems() {
+        return types_of_stack_items;
+    }
+
+
+    /**
+     * @return deep copy of this object
+     */
+    public StackMapEntry copy() {
+        try {
+            return (StackMapEntry) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitStackMapEntry(this);
+    }
+
+
+    /**
+     * @return Constant pool used by this object.
+     */
+    public final ConstantPool getConstantPool() {
+        return constant_pool;
+    }
+
+
+    /**
+     * @param constant_pool Constant pool to be used for this object.
+     */
+    public final void setConstantPool( ConstantPool constant_pool ) {
+        this.constant_pool = constant_pool;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/StackMapTable.java b/src/main/java/org/apache/commons/bcel6/classfile/StackMapTable.java
new file mode 100644
index 0000000..bb3a101
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/StackMapTable.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a stack map attribute used for
+ * preverification of Java classes for the <a
+ * href="http://java.sun.com/j2me/"> Java 2 Micro Edition</a>
+ * (J2ME). This attribute is used by the <a
+ * href="http://java.sun.com/products/cldc/">KVM</a> and contained
+ * within the Code attribute of a method. See CLDC specification
+ * ��?5.3.1.2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Code
+ * @see     StackMapEntry
+ * @see     StackMapType
+ * @since 6.0
+ */
+public final class StackMapTable extends Attribute {
+
+    private static final long serialVersionUID = -5802191977296683162L;
+    private StackMapTableEntry[] map; // Table of stack map entries
+
+
+    /*
+     * @param name_index Index of name
+     * @param length Content length in bytes
+     * @param map Table of stack map entries
+     * @param constant_pool Array of constants
+     */
+    public StackMapTable(int name_index, int length, StackMapTableEntry[] map, ConstantPool constant_pool) {
+        super(Constants.ATTR_STACK_MAP_TABLE, name_index, length, constant_pool);
+        setStackMapTable(map);
+    }
+
+
+    /**
+     * Construct object from file stream.
+     * @param name_index Index of name
+     * @param length Content length in bytes
+     * @param file Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    StackMapTable(int name_index, int length, DataInput file, ConstantPool constant_pool) throws IOException {
+        this(name_index, length, (StackMapTableEntry[]) null, constant_pool);
+        int map_length = file.readUnsignedShort();
+        map = new StackMapTableEntry[map_length];
+        for (int i = 0; i < map_length; i++) {
+            map[i] = new StackMapTableEntry(file, constant_pool);
+        }
+    }
+
+
+    /**
+     * Dump line number table attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        file.writeShort(map.length);
+        for (StackMapTableEntry entry : map) {
+            entry.dump(file);
+        }
+    }
+
+
+    /**
+     * @return Array of stack map entries
+     */
+    public final StackMapTableEntry[] getStackMapTable() {
+        return map;
+    }
+
+
+    /**
+     * @param map Array of stack map entries
+     */
+    public final void setStackMapTable( StackMapTableEntry[] map ) {
+        this.map = map;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder("StackMapTable(");
+        for (int i = 0; i < map.length; i++) {
+            buf.append(map[i].toString());
+            if (i < map.length - 1) {
+                buf.append(", ");
+            }
+        }
+        buf.append(')');
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        StackMapTable c = (StackMapTable) clone();
+        c.map = new StackMapTableEntry[map.length];
+        for (int i = 0; i < map.length; i++) {
+            c.map[i] = map[i].copy();
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackMapTable(this);
+    }
+
+
+    public final int getMapLength() {
+        return map == null ? 0 : map.length;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java b/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java
new file mode 100644
index 0000000..47bc4f8
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/StackMapTableEntry.java
@@ -0,0 +1,278 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a stack map entry recording the types of
+ * local variables and the the of stack items at a given byte code offset.
+ * See CLDC specification ��?5.3.1.2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     StackMap
+ * @see     StackMapType
+ * @since 6.0
+ */
+public final class StackMapTableEntry implements Cloneable, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private final int frame_type;
+    private int byte_code_offset_delta;
+    private StackMapType[] types_of_locals;
+    private StackMapType[] types_of_stack_items;
+    private ConstantPool constant_pool;
+
+
+    /**
+     * Construct object from file stream.
+     * * 
+     * @param file Input stream
+     * @throws IOException
+     */
+    StackMapTableEntry(DataInput file, ConstantPool constant_pool) throws IOException {
+        this(file.readByte() & 0xFF, -1, null, null, constant_pool);
+
+        if (frame_type >= Constants.SAME_FRAME && frame_type <= Constants.SAME_FRAME_MAX) {
+            byte_code_offset_delta = frame_type - Constants.SAME_FRAME;
+        } else if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type <= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+            byte_code_offset_delta = frame_type - Constants.SAME_LOCALS_1_STACK_ITEM_FRAME;
+            types_of_stack_items = new StackMapType[1];
+            types_of_stack_items[0] = new StackMapType(file, constant_pool);
+        } else if (frame_type == Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
+            byte_code_offset_delta = file.readShort();
+            types_of_stack_items = new StackMapType[1];
+            types_of_stack_items[0] = new StackMapType(file, constant_pool);
+        } else if (frame_type >= Constants.CHOP_FRAME && frame_type <= Constants.CHOP_FRAME_MAX) {
+            byte_code_offset_delta = file.readShort();
+        } else if (frame_type == Constants.SAME_FRAME_EXTENDED) {
+            byte_code_offset_delta = file.readShort();
+        } else if (frame_type >= Constants.APPEND_FRAME && frame_type <= Constants.APPEND_FRAME_MAX) {
+            byte_code_offset_delta = file.readShort();
+            int number_of_locals = frame_type - 251;
+            types_of_locals = new StackMapType[number_of_locals];
+            for (int i = 0; i < number_of_locals; i++) {
+                types_of_locals[i] = new StackMapType(file, constant_pool);
+            }            
+        } else if (frame_type == Constants.FULL_FRAME) {        
+            byte_code_offset_delta = file.readShort();
+            int number_of_locals = file.readShort();
+            types_of_locals = new StackMapType[number_of_locals];
+            for (int i = 0; i < number_of_locals; i++) {
+                types_of_locals[i] = new StackMapType(file, constant_pool);
+            }
+            int number_of_stack_items = file.readShort();
+            types_of_stack_items = new StackMapType[number_of_stack_items];
+            for (int i = 0; i < number_of_stack_items; i++) {
+                types_of_stack_items[i] = new StackMapType(file, constant_pool);
+            }
+        } else {
+            /* Can't happen */
+            throw new ClassFormatException ("Invalid frame type found while parsing stack map table: " + frame_type);
+        }
+    }
+
+
+    public StackMapTableEntry(int tag, int byte_code_offset_delta,
+            StackMapType[] types_of_locals,
+            StackMapType[] types_of_stack_items, ConstantPool constant_pool) {
+        this.frame_type = tag;
+        this.byte_code_offset_delta = byte_code_offset_delta;
+        setTypesOfLocals(types_of_locals);
+        setTypesOfStackItems(types_of_stack_items);
+        this.constant_pool = constant_pool;
+    }
+
+
+    /**
+     * Dump stack map entry
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.write(frame_type);
+        if (frame_type >= Constants.SAME_FRAME && frame_type <= Constants.SAME_FRAME_MAX) {
+            // nothing to be done
+        } else if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type <= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+            types_of_stack_items[0].dump(file);
+        } else if (frame_type == Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
+            file.writeShort(byte_code_offset_delta);
+            types_of_stack_items[0].dump(file);
+        } else if (frame_type >= Constants.CHOP_FRAME && frame_type <= Constants.CHOP_FRAME_MAX) {
+            file.writeShort(byte_code_offset_delta);
+        } else if (frame_type == Constants.SAME_FRAME_EXTENDED) {
+            file.writeShort(byte_code_offset_delta);
+        } else if (frame_type >= Constants.APPEND_FRAME && frame_type <= Constants.APPEND_FRAME_MAX) {
+            file.writeShort(byte_code_offset_delta);
+            for (StackMapType type : types_of_locals) {
+                type.dump(file);
+            }            
+        } else if (frame_type == Constants.FULL_FRAME) {        
+            file.writeShort(byte_code_offset_delta);
+            file.writeShort(types_of_locals.length);
+            for (StackMapType type : types_of_locals) {
+                type.dump(file);
+            }
+            file.writeShort(types_of_stack_items.length);
+            for (StackMapType type : types_of_stack_items) {
+                type.dump(file);
+            }
+        } else {
+            /* Can't happen */
+            throw new ClassFormatException ("Invalid Stack map table tag: " + frame_type);
+        }
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder(64);
+        buf.append("(");
+        if (frame_type >= Constants.SAME_FRAME && frame_type <= Constants.SAME_FRAME_MAX) {
+            buf.append("SAME");
+        } else if (frame_type >= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME && frame_type <= Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {
+            buf.append("SAME_LOCALS_1_STACK");
+        } else if (frame_type == Constants.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {
+            buf.append("SAME_LOCALS_1_STACK_EXTENDED");
+        } else if (frame_type >= Constants.CHOP_FRAME && frame_type <= Constants.CHOP_FRAME_MAX) {
+            buf.append("CHOP "+(251-frame_type));
+        } else if (frame_type == Constants.SAME_FRAME_EXTENDED) {
+            buf.append("SAME_EXTENDED");
+        } else if (frame_type >= Constants.APPEND_FRAME && frame_type <= Constants.APPEND_FRAME_MAX) {
+            buf.append("APPEND "+(frame_type-251));
+        } else if (frame_type == Constants.FULL_FRAME) {        
+            buf.append("FULL");
+        } else {
+            buf.append("UNKNOWN");
+        }
+        buf.append(", offset delta=").append(byte_code_offset_delta);
+        if (types_of_locals.length > 0) {
+            buf.append(", locals={");
+            for (int i = 0; i < types_of_locals.length; i++) {
+                buf.append(types_of_locals[i]);
+                if (i < types_of_locals.length - 1) {
+                    buf.append(", ");
+                }
+            }
+            buf.append("}");
+        }
+        if (types_of_stack_items.length > 0) {
+            buf.append(", stack items={");
+            for (int i = 0; i < types_of_stack_items.length; i++) {
+                buf.append(types_of_stack_items[i]);
+                if (i < types_of_stack_items.length - 1) {
+                    buf.append(", ");
+                }
+            }
+            buf.append("}");
+        }
+        buf.append(")");
+        return buf.toString();
+    }
+
+
+    public void setByteCodeOffsetDelta( int b ) {
+        byte_code_offset_delta = b;
+    }
+
+
+    public int getByteCodeOffsetDelta() {
+        return byte_code_offset_delta;
+    }
+
+    
+    public int getNumberOfLocals() {
+        return types_of_locals.length;
+    }
+
+
+    public void setTypesOfLocals( StackMapType[] types ) {
+        types_of_locals = types != null ? types : new StackMapType[0];
+    }
+
+
+    public StackMapType[] getTypesOfLocals() {
+        return types_of_locals;
+    }
+
+
+    public int getNumberOfStackItems() {
+        return types_of_stack_items.length;
+    }
+
+
+    public void setTypesOfStackItems( StackMapType[] types ) {
+        types_of_stack_items = types != null ? types : new StackMapType[0];
+    }
+
+
+    public StackMapType[] getTypesOfStackItems() {
+        return types_of_stack_items;
+    }
+
+
+    /**
+     * @return deep copy of this object
+     */
+    public StackMapTableEntry copy() {
+        try {
+            return (StackMapTableEntry) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        v.visitStackMapTableEntry(this);
+    }
+
+
+    /**
+     * @return Constant pool used by this object.
+     */
+    public final ConstantPool getConstantPool() {
+        return constant_pool;
+    }
+
+
+    /**
+     * @param constant_pool Constant pool to be used for this object.
+     */
+    public final void setConstantPool( ConstantPool constant_pool ) {
+        this.constant_pool = constant_pool;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java b/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java
new file mode 100644
index 0000000..97b0a98
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/StackMapType.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents the type of a local variable or item on stack
+ * used in the StackMap entries.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     StackMapEntry
+ * @see     StackMap
+ * @see     Constants
+ */
+public final class StackMapType implements Cloneable, Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private byte type;
+    private int index = -1; // Index to CONSTANT_Class or offset
+    private ConstantPool constant_pool;
+
+
+    /**
+     * Construct object from file stream.
+     * @param file Input stream
+     * @throws IOException
+     */
+    StackMapType(DataInput file, ConstantPool constant_pool) throws IOException {
+        this(file.readByte(), -1, constant_pool);
+        if (hasIndex()) {
+            setIndex(file.readShort());
+        }
+        setConstantPool(constant_pool);
+    }
+
+
+    /**
+     * @param type type tag as defined in the Constants interface
+     * @param index index to constant pool, or byte code offset
+     */
+    public StackMapType(byte type, int index, ConstantPool constant_pool) {
+        setType(type);
+        setIndex(index);
+        setConstantPool(constant_pool);
+    }
+
+
+    public void setType( byte t ) {
+        if ((t < Constants.ITEM_Bogus) || (t > Constants.ITEM_NewObject)) {
+            throw new RuntimeException("Illegal type for StackMapType: " + t);
+        }
+        type = t;
+    }
+
+
+    public byte getType() {
+        return type;
+    }
+
+
+    public void setIndex( int t ) {
+        index = t;
+    }
+
+
+    /** @return index to constant pool if type == ITEM_Object, or offset
+     * in byte code, if type == ITEM_NewObject, and -1 otherwise
+     */
+    public int getIndex() {
+        return index;
+    }
+
+
+    /**
+     * Dump type entries to file.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    public final void dump( DataOutputStream file ) throws IOException {
+        file.writeByte(type);
+        if (hasIndex()) {
+            file.writeShort(getIndex());
+        }
+    }
+
+
+    /** @return true, if type is either ITEM_Object or ITEM_NewObject
+     */
+    public final boolean hasIndex() {
+        return ((type == Constants.ITEM_Object) || (type == Constants.ITEM_NewObject));
+    }
+
+
+    private String printIndex() {
+        if (type == Constants.ITEM_Object) {
+            if (index < 0) {
+                return ", class=<unknown>";
+            }
+            return ", class=" + constant_pool.constantToString(index, Constants.CONSTANT_Class);
+        } else if (type == Constants.ITEM_NewObject) {
+            return ", offset=" + index;
+        } else {
+            return "";
+        }
+    }
+
+
+    /**
+     * @return String representation
+     */
+    @Override
+    public final String toString() {
+        return "(type=" + Constants.ITEM_NAMES[type] + printIndex() + ")";
+    }
+
+
+    /**
+     * @return deep copy of this object
+     */
+    public StackMapType copy() {
+        try {
+            return (StackMapType) clone();
+        } catch (CloneNotSupportedException e) {
+        }
+        return null;
+    }
+
+
+    /**
+     * @return Constant pool used by this object.
+     */
+    public final ConstantPool getConstantPool() {
+        return constant_pool;
+    }
+
+
+    /**
+     * @param constant_pool Constant pool to be used for this object.
+     */
+    public final void setConstantPool( ConstantPool constant_pool ) {
+        this.constant_pool = constant_pool;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Synthetic.java b/src/main/java/org/apache/commons/bcel6/classfile/Synthetic.java
new file mode 100644
index 0000000..2d2eaf7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Synthetic.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class is derived from <em>Attribute</em> and declares this class as
+ * `synthetic', i.e., it needs special handling.  The JVM specification
+ * states "A class member that does not appear in the source code must be
+ * marked using a Synthetic attribute."  It may appear in the ClassFile
+ * attribute table, a field_info table or a method_info table.  This class
+ * is intended to be instantiated from the
+ * <em>Attribute.readAttribute()</em> method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Attribute
+ */
+public final class Synthetic extends Attribute {
+
+    private static final long serialVersionUID = -123334426995458366L;
+    private byte[] bytes;
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use copy() for a physical copy.
+     */
+    public Synthetic(Synthetic c) {
+        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
+    }
+
+
+    /**
+     * @param name_index Index in constant pool to CONSTANT_Utf8, which
+     * should represent the string "Synthetic".
+     * @param length Content length in bytes - should be zero.
+     * @param bytes Attribute contents
+     * @param constant_pool The constant pool this attribute is associated
+     * with.
+     */
+    public Synthetic(int name_index, int length, byte[] bytes, ConstantPool constant_pool) {
+        super(Constants.ATTR_SYNTHETIC, name_index, length, constant_pool);
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * 
+     * @param name_index Index in constant pool to CONSTANT_Utf8
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    Synthetic(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, (byte[]) null, constant_pool);
+        if (length > 0) {
+            bytes = new byte[length];
+            input.readFully(bytes);
+            System.err.println("Synthetic attribute with length > 0");
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitSynthetic(this);
+    }
+
+
+    /**
+     * Dump source file attribute to file stream in binary format.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        if (length > 0) {
+            file.write(bytes, 0, length);
+        }
+    }
+
+
+    /**
+     * @return data bytes.
+     */
+    public final byte[] getBytes() {
+        return bytes;
+    }
+
+
+    /**
+     * @param bytes
+     */
+    public final void setBytes( byte[] bytes ) {
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        StringBuilder buf = new StringBuilder("Synthetic");
+        if (length > 0) {
+            buf.append(" ").append(Utility.toHexString(bytes));
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        Synthetic c = (Synthetic) clone();
+        if (bytes != null) {
+            c.bytes = new byte[bytes.length];
+            System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Unknown.java b/src/main/java/org/apache/commons/bcel6/classfile/Unknown.java
new file mode 100644
index 0000000..a80e5c2
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Unknown.java
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * This class represents a reference to an unknown (i.e.,
+ * application-specific) attribute of a class.  It is instantiated from the
+ * {@link Attribute#readAttribute(java.io.DataInput, ConstantPool)} method.
+ * Applications that need to read in application-specific attributes should create an
+ * {@link UnknownAttributeReader} implementation and attach it via
+ * {@link Attribute#addAttributeReader(String, UnknownAttributeReader)}.
+
+ *
+ * @version $Id$
+ * @see org.apache.commons.bcel6.classfile.Attribute
+ * @see org.apache.commons.bcel6.classfile.UnknownAttributeReader
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class Unknown extends Attribute {
+
+    private static final long serialVersionUID = -4099655108069755015L;
+    private byte[] bytes;
+    private final String name;
+    private static final Map<String, Unknown> unknown_attributes = new HashMap<String, Unknown>();
+
+
+    /** @return array of unknown attributes, but just one for each kind.
+     */
+    static Unknown[] getUnknownAttributes() {
+        Unknown[] unknowns = new Unknown[unknown_attributes.size()];
+        unknown_attributes.values().toArray(unknowns);
+        unknown_attributes.clear();
+        return unknowns;
+    }
+
+
+    /**
+     * Initialize from another object. Note that both objects use the same
+     * references (shallow copy). Use clone() for a physical copy.
+     */
+    public Unknown(Unknown c) {
+        this(c.getNameIndex(), c.getLength(), c.getBytes(), c.getConstantPool());
+    }
+
+
+    /**
+     * Create a non-standard attribute.
+     *
+     * @param name_index Index in constant pool
+     * @param length Content length in bytes
+     * @param bytes Attribute contents
+     * @param constant_pool Array of constants
+     */
+    public Unknown(int name_index, int length, byte[] bytes, ConstantPool constant_pool) {
+        super(Constants.ATTR_UNKNOWN, name_index, length, constant_pool);
+        this.bytes = bytes;
+        name = ((ConstantUtf8) constant_pool.getConstant(name_index, Constants.CONSTANT_Utf8))
+                .getBytes();
+        unknown_attributes.put(name, this);
+    }
+
+
+    /**
+     * Construct object from input stream.
+     * 
+     * @param name_index Index in constant pool
+     * @param length Content length in bytes
+     * @param input Input stream
+     * @param constant_pool Array of constants
+     * @throws IOException
+     */
+    Unknown(int name_index, int length, DataInput input, ConstantPool constant_pool)
+            throws IOException {
+        this(name_index, length, (byte[]) null, constant_pool);
+        if (length > 0) {
+            bytes = new byte[length];
+            input.readFully(bytes);
+        }
+    }
+
+
+    /**
+     * Called by objects that are traversing the nodes of the tree implicitely
+     * defined by the contents of a Java class. I.e., the hierarchy of methods,
+     * fields, attributes, etc. spawns a tree of objects.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitUnknown(this);
+    }
+
+
+    /**
+     * Dump unknown bytes to file stream.
+     *
+     * @param file Output file stream
+     * @throws IOException
+     */
+    @Override
+    public final void dump( DataOutputStream file ) throws IOException {
+        super.dump(file);
+        if (length > 0) {
+            file.write(bytes, 0, length);
+        }
+    }
+
+
+    /**
+     * @return data bytes.
+     */
+    public final byte[] getBytes() {
+        return bytes;
+    }
+
+
+    /**
+     * @return name of attribute.
+     */
+    @Override
+    public final String getName() {
+        return name;
+    }
+
+
+    /**
+     * @param bytes the bytes to set
+     */
+    public final void setBytes( byte[] bytes ) {
+        this.bytes = bytes;
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public final String toString() {
+        if (length == 0 || bytes == null) {
+            return "(Unknown attribute " + name + ")";
+        }
+        String hex;
+        if (length > 10) {
+            byte[] tmp = new byte[10];
+            System.arraycopy(bytes, 0, tmp, 0, 10);
+            hex = Utility.toHexString(tmp) + "... (truncated)";
+        } else {
+            hex = Utility.toHexString(bytes);
+        }
+        return "(Unknown attribute " + name + ": " + hex + ")";
+    }
+
+
+    /**
+     * @return deep copy of this attribute
+     */
+    @Override
+    public Attribute copy( ConstantPool _constant_pool ) {
+        Unknown c = (Unknown) clone();
+        if (bytes != null) {
+            c.bytes = new byte[bytes.length];
+            System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
+        }
+        c.constant_pool = _constant_pool;
+        return c;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/UnknownAttributeReader.java b/src/main/java/org/apache/commons/bcel6/classfile/UnknownAttributeReader.java
new file mode 100644
index 0000000..c8ecabd
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/UnknownAttributeReader.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+/**
+ * Unknown (non-standard) attributes may be read via user-defined factory
+ * objects that can be registered with the Attribute.addAttributeReader
+ * method. These factory objects should implement this interface.
+ * 
+ * @see Attribute
+ * @version $Id$
+ */
+public interface UnknownAttributeReader {
+
+    /**
+     * When this attribute reader is added via the static method Attribute.addAttributeReader,
+     * an attribute name is associated with it. As the class file parser parses attributes,
+     * it will call various AttributeReaders based on the name of the attributes it is constructing.
+     * 
+     * @param name_index    An index into the constant pool, indexing a ConstantUtf8
+     *                      that represents the name of the attribute.
+     * @param length        The length of the data contained in the attribute. This is written
+     *                      into the constant pool and should agree with what the factory expects the length to be.
+     * @param input         This is the data input that the factory needs to read its data from.
+     * @param constant_pool This is the constant pool associated with the Attribute that we are constructing.
+     *                      
+     * @return The user-defined AttributeReader should take this data and use
+     * it to construct an attribute.  In the case of errors, a null can be
+     * returned which will cause the parsing of the class file to fail.
+     * 
+     * @see Attribute#addAttributeReader(String, UnknownAttributeReader)
+     */
+    Attribute createAttribute( int name_index, int length, java.io.DataInput file, ConstantPool constant_pool );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Utility.java b/src/main/java/org/apache/commons/bcel6/classfile/Utility.java
new file mode 100644
index 0000000..2c7fabb
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Utility.java
@@ -0,0 +1,1467 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayReader;
+import java.io.CharArrayWriter;
+import java.io.FilterReader;
+import java.io.FilterWriter;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/**
+ * Utility functions that do not really belong to any class in particular.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class Utility {
+
+    private static int unwrap( ThreadLocal<Integer> tl ) {
+        return tl.get().intValue();
+    }
+
+
+    private static void wrap( ThreadLocal<Integer> tl, int value ) {
+        tl.set(Integer.valueOf(value));
+    }
+
+    private static ThreadLocal<Integer> consumed_chars = new ThreadLocal<Integer>() {
+
+        @Override
+        protected Integer initialValue() {
+            return Integer.valueOf(0);
+        }
+    };/* How many chars have been consumed
+     * during parsing in signatureToString().
+     * Read by methodSignatureToString().
+     * Set by side effect,but only internally.
+     */
+    private static boolean wide = false; /* The `WIDE' instruction is used in the
+     * byte code to allow 16-bit wide indices
+     * for local variables. This opcode
+     * precedes an `ILOAD', e.g.. The opcode
+     * immediately following takes an extra
+     * byte which is combined with the
+     * following byte to form a
+     * 16-bit value.
+     */
+
+
+    /**
+     * Convert bit field of flags into string such as `static final'.
+     *
+     * @param  access_flags Access flags
+     * @return String representation of flags
+     */
+    public static String accessToString( int access_flags ) {
+        return accessToString(access_flags, false);
+    }
+
+
+    /**
+     * Convert bit field of flags into string such as `static final'.
+     *
+     * Special case: Classes compiled with new compilers and with the
+     * `ACC_SUPER' flag would be said to be "synchronized". This is
+     * because SUN used the same value for the flags `ACC_SUPER' and
+     * `ACC_SYNCHRONIZED'. 
+     *
+     * @param  access_flags Access flags
+     * @param  for_class access flags are for class qualifiers ?
+     * @return String representation of flags
+     */
+    public static String accessToString( int access_flags, boolean for_class ) {
+        StringBuilder buf = new StringBuilder();
+        int p = 0;
+        for (int i = 0; p < Constants.MAX_ACC_FLAG; i++) { // Loop through known flags
+            p = pow2(i);
+            if ((access_flags & p) != 0) {
+                /* Special case: Classes compiled with new compilers and with the
+                 * `ACC_SUPER' flag would be said to be "synchronized". This is
+                 * because SUN used the same value for the flags `ACC_SUPER' and
+                 * `ACC_SYNCHRONIZED'.
+                 */
+                if (for_class && ((p == Constants.ACC_SUPER) || (p == Constants.ACC_INTERFACE))) {
+                    continue;
+                }
+                buf.append(Constants.ACCESS_NAMES[i]).append(" ");
+            }
+        }
+        return buf.toString().trim();
+    }
+
+
+    /**
+     * @param access_flags the class flags
+     * 
+     * @return "class" or "interface", depending on the ACC_INTERFACE flag
+     */
+    public static String classOrInterface( int access_flags ) {
+        return ((access_flags & Constants.ACC_INTERFACE) != 0) ? "interface" : "class";
+    }
+
+
+    /**
+     * Disassemble a byte array of JVM byte codes starting from code line 
+     * `index' and return the disassembled string representation. Decode only
+     * `num' opcodes (including their operands), use -1 if you want to
+     * decompile everything.
+     *
+     * @param  code byte code array
+     * @param  constant_pool Array of constants
+     * @param  index offset in `code' array
+     * <EM>(number of opcodes, not bytes!)</EM>
+     * @param  length number of opcodes to decompile, -1 for all
+     * @param  verbose be verbose, e.g. print constant pool index
+     * @return String representation of byte codes
+     */
+    public static String codeToString( byte[] code, ConstantPool constant_pool, int index,
+            int length, boolean verbose ) {
+        StringBuilder buf = new StringBuilder(code.length * 20); // Should be sufficient
+        ByteSequence stream = new ByteSequence(code);
+        try {
+            for (int i = 0; i < index; i++) {
+                codeToString(stream, constant_pool, verbose);
+            }
+            for (int i = 0; stream.available() > 0; i++) {
+                if ((length < 0) || (i < length)) {
+                    String indices = fillup(stream.getIndex() + ":", 6, true, ' ');
+                    buf.append(indices).append(codeToString(stream, constant_pool, verbose))
+                            .append('\n');
+                }
+            }
+        } catch (IOException e) {
+            System.out.println(buf.toString());
+            e.printStackTrace();
+            throw new ClassFormatException("Byte code error: " + e, e);
+        }
+        return buf.toString();
+    }
+
+
+    public static String codeToString( byte[] code, ConstantPool constant_pool, int index, int length ) {
+        return codeToString(code, constant_pool, index, length, true);
+    }
+
+
+    /**
+     * Disassemble a stream of byte codes and return the
+     * string representation.
+     *
+     * @param  bytes stream of bytes
+     * @param  constant_pool Array of constants
+     * @param  verbose be verbose, e.g. print constant pool index
+     * @return String representation of byte code
+     * 
+     * @throws IOException if a failure from reading from the bytes argument occurs
+     */
+    public static String codeToString( ByteSequence bytes, ConstantPool constant_pool,
+            boolean verbose ) throws IOException {
+        short opcode = (short) bytes.readUnsignedByte();
+        int default_offset = 0, low, high, npairs;
+        int index, vindex, constant;
+        int[] match, jump_table;
+        int no_pad_bytes = 0, offset;
+        StringBuilder buf = new StringBuilder(Constants.OPCODE_NAMES[opcode]);
+        /* Special case: Skip (0-3) padding bytes, i.e., the
+         * following bytes are 4-byte-aligned
+         */
+        if ((opcode == Constants.TABLESWITCH) || (opcode == Constants.LOOKUPSWITCH)) {
+            int remainder = bytes.getIndex() % 4;
+            no_pad_bytes = (remainder == 0) ? 0 : 4 - remainder;
+            for (int i = 0; i < no_pad_bytes; i++) {
+                byte b;
+                if ((b = bytes.readByte()) != 0) {
+                    System.err.println("Warning: Padding byte != 0 in "
+                            + Constants.OPCODE_NAMES[opcode] + ":" + b);
+                }
+            }
+            // Both cases have a field default_offset in common
+            default_offset = bytes.readInt();
+        }
+        switch (opcode) {
+            /* Table switch has variable length arguments.
+             */
+            case Constants.TABLESWITCH:
+                low = bytes.readInt();
+                high = bytes.readInt();
+                offset = bytes.getIndex() - 12 - no_pad_bytes - 1;
+                default_offset += offset;
+                buf.append("\tdefault = ").append(default_offset).append(", low = ").append(low)
+                        .append(", high = ").append(high).append("(");
+                jump_table = new int[high - low + 1];
+                for (int i = 0; i < jump_table.length; i++) {
+                    jump_table[i] = offset + bytes.readInt();
+                    buf.append(jump_table[i]);
+                    if (i < jump_table.length - 1) {
+                        buf.append(", ");
+                    }
+                }
+                buf.append(")");
+                break;
+            /* Lookup switch has variable length arguments.
+             */
+            case Constants.LOOKUPSWITCH: {
+                npairs = bytes.readInt();
+                offset = bytes.getIndex() - 8 - no_pad_bytes - 1;
+                match = new int[npairs];
+                jump_table = new int[npairs];
+                default_offset += offset;
+                buf.append("\tdefault = ").append(default_offset).append(", npairs = ").append(
+                        npairs).append(" (");
+                for (int i = 0; i < npairs; i++) {
+                    match[i] = bytes.readInt();
+                    jump_table[i] = offset + bytes.readInt();
+                    buf.append("(").append(match[i]).append(", ").append(jump_table[i]).append(")");
+                    if (i < npairs - 1) {
+                        buf.append(", ");
+                    }
+                }
+                buf.append(")");
+            }
+                break;
+            /* Two address bytes + offset from start of byte stream form the
+             * jump target
+             */
+            case Constants.GOTO:
+            case Constants.IFEQ:
+            case Constants.IFGE:
+            case Constants.IFGT:
+            case Constants.IFLE:
+            case Constants.IFLT:
+            case Constants.JSR:
+            case Constants.IFNE:
+            case Constants.IFNONNULL:
+            case Constants.IFNULL:
+            case Constants.IF_ACMPEQ:
+            case Constants.IF_ACMPNE:
+            case Constants.IF_ICMPEQ:
+            case Constants.IF_ICMPGE:
+            case Constants.IF_ICMPGT:
+            case Constants.IF_ICMPLE:
+            case Constants.IF_ICMPLT:
+            case Constants.IF_ICMPNE:
+                buf.append("\t\t#").append((bytes.getIndex() - 1) + bytes.readShort());
+                break;
+            /* 32-bit wide jumps
+             */
+            case Constants.GOTO_W:
+            case Constants.JSR_W:
+                buf.append("\t\t#").append(((bytes.getIndex() - 1) + bytes.readInt()));
+                break;
+            /* Index byte references local variable (register)
+             */
+            case Constants.ALOAD:
+            case Constants.ASTORE:
+            case Constants.DLOAD:
+            case Constants.DSTORE:
+            case Constants.FLOAD:
+            case Constants.FSTORE:
+            case Constants.ILOAD:
+            case Constants.ISTORE:
+            case Constants.LLOAD:
+            case Constants.LSTORE:
+            case Constants.RET:
+                if (wide) {
+                    vindex = bytes.readUnsignedShort();
+                    wide = false; // Clear flag
+                } else {
+                    vindex = bytes.readUnsignedByte();
+                }
+                buf.append("\t\t%").append(vindex);
+                break;
+            /*
+             * Remember wide byte which is used to form a 16-bit address in the
+             * following instruction. Relies on that the method is called again with
+             * the following opcode.
+             */
+            case Constants.WIDE:
+                wide = true;
+                buf.append("\t(wide)");
+                break;
+            /* Array of basic type.
+             */
+            case Constants.NEWARRAY:
+                buf.append("\t\t<").append(Constants.TYPE_NAMES[bytes.readByte()]).append(">");
+                break;
+            /* Access object/class fields.
+             */
+            case Constants.GETFIELD:
+            case Constants.GETSTATIC:
+            case Constants.PUTFIELD:
+            case Constants.PUTSTATIC:
+                index = bytes.readUnsignedShort();
+                buf.append("\t\t").append(
+                        constant_pool.constantToString(index, Constants.CONSTANT_Fieldref)).append(
+                        (verbose ? " (" + index + ")" : ""));
+                break;
+            /* Operands are references to classes in constant pool
+             */
+            case Constants.NEW:
+            case Constants.CHECKCAST:
+                buf.append("\t");
+                //$FALL-THROUGH$
+            case Constants.INSTANCEOF:
+                index = bytes.readUnsignedShort();
+                buf.append("\t<").append(
+                        constant_pool.constantToString(index, Constants.CONSTANT_Class))
+                        .append(">").append((verbose ? " (" + index + ")" : ""));
+                break;
+            /* Operands are references to methods in constant pool
+             */
+            case Constants.INVOKESPECIAL:
+            case Constants.INVOKESTATIC:
+                index = bytes.readUnsignedShort();
+                Constant c = constant_pool.getConstant(index);
+                // With Java8 operand may be either a CONSTANT_Methodref
+                // or a CONSTANT_InterfaceMethodref.   (markro)
+                buf.append("\t").append(
+                        constant_pool.constantToString(index, c.getTag()))
+                        .append((verbose ? " (" + index + ")" : ""));
+                break;
+            case Constants.INVOKEVIRTUAL:
+                index = bytes.readUnsignedShort();
+                buf.append("\t").append(
+                        constant_pool.constantToString(index, Constants.CONSTANT_Methodref))
+                        .append((verbose ? " (" + index + ")" : ""));
+                break;
+            case Constants.INVOKEINTERFACE:
+                index = bytes.readUnsignedShort();
+                int nargs = bytes.readUnsignedByte(); // historical, redundant
+                buf.append("\t").append(
+                        constant_pool
+                                .constantToString(index, Constants.CONSTANT_InterfaceMethodref))
+                        .append(verbose ? " (" + index + ")\t" : "").append(nargs).append("\t")
+                        .append(bytes.readUnsignedByte()); // Last byte is a reserved space
+                break;
+            case Constants.INVOKEDYNAMIC:
+                index = bytes.readUnsignedShort();
+                buf.append("\t").append(
+                        constant_pool
+                                .constantToString(index, Constants.CONSTANT_InvokeDynamic))
+                        .append(verbose ? " (" + index + ")\t" : "")
+                        .append(bytes.readUnsignedByte())  // Thrid byte is a reserved space
+                        .append(bytes.readUnsignedByte()); // Last byte is a reserved space
+                break;
+            /* Operands are references to items in constant pool
+             */
+            case Constants.LDC_W:
+            case Constants.LDC2_W:
+                index = bytes.readUnsignedShort();
+                buf.append("\t\t").append(
+                        constant_pool.constantToString(index, constant_pool.getConstant(index)
+                                .getTag())).append((verbose ? " (" + index + ")" : ""));
+                break;
+            case Constants.LDC:
+                index = bytes.readUnsignedByte();
+                buf.append("\t\t").append(
+                        constant_pool.constantToString(index, constant_pool.getConstant(index)
+                                .getTag())).append((verbose ? " (" + index + ")" : ""));
+                break;
+            /* Array of references.
+             */
+            case Constants.ANEWARRAY:
+                index = bytes.readUnsignedShort();
+                buf.append("\t\t<").append(
+                        compactClassName(constant_pool.getConstantString(index,
+                                Constants.CONSTANT_Class), false)).append(">").append(
+                        (verbose ? " (" + index + ")" : ""));
+                break;
+            /* Multidimensional array of references.
+             */
+            case Constants.MULTIANEWARRAY: {
+                index = bytes.readUnsignedShort();
+                int dimensions = bytes.readUnsignedByte();
+                buf.append("\t<").append(
+                        compactClassName(constant_pool.getConstantString(index,
+                                Constants.CONSTANT_Class), false)).append(">\t").append(dimensions)
+                        .append((verbose ? " (" + index + ")" : ""));
+            }
+                break;
+            /* Increment local variable.
+             */
+            case Constants.IINC:
+                if (wide) {
+                    vindex = bytes.readUnsignedShort();
+                    constant = bytes.readShort();
+                    wide = false;
+                } else {
+                    vindex = bytes.readUnsignedByte();
+                    constant = bytes.readByte();
+                }
+                buf.append("\t\t%").append(vindex).append("\t").append(constant);
+                break;
+            default:
+                if (Constants.NO_OF_OPERANDS[opcode] > 0) {
+                    for (int i = 0; i < Constants.TYPE_OF_OPERANDS[opcode].length; i++) {
+                        buf.append("\t\t");
+                        switch (Constants.TYPE_OF_OPERANDS[opcode][i]) {
+                            case Constants.T_BYTE:
+                                buf.append(bytes.readByte());
+                                break;
+                            case Constants.T_SHORT:
+                                buf.append(bytes.readShort());
+                                break;
+                            case Constants.T_INT:
+                                buf.append(bytes.readInt());
+                                break;
+                            default: // Never reached
+                                System.err.println("Unreachable default case reached!");
+                                System.exit(-1);
+                        }
+                    }
+                }
+        }
+        return buf.toString();
+    }
+
+
+    public static String codeToString( ByteSequence bytes, ConstantPool constant_pool )
+            throws IOException {
+        return codeToString(bytes, constant_pool, true);
+    }
+
+
+    /**
+     * Shorten long class names, <em>java/lang/String</em> becomes 
+     * <em>String</em>.
+     *
+     * @param str The long class name
+     * @return Compacted class name
+     */
+    public static String compactClassName( String str ) {
+        return compactClassName(str, true);
+    }
+
+
+    /**
+     * Shorten long class name <em>str</em>, i.e., chop off the <em>prefix</em>,
+     * if the
+     * class name starts with this string and the flag <em>chopit</em> is true.
+     * Slashes <em>/</em> are converted to dots <em>.</em>.
+     *
+     * @param str The long class name
+     * @param prefix The prefix the get rid off
+     * @param chopit Flag that determines whether chopping is executed or not
+     * @return Compacted class name
+     */
+    public static String compactClassName( String str, String prefix, boolean chopit ) {
+        int len = prefix.length();
+        str = str.replace('/', '.'); // Is `/' on all systems, even DOS
+        if (chopit) {
+            // If string starts with `prefix' and contains no further dots
+            if (str.startsWith(prefix) && (str.substring(len).indexOf('.') == -1)) {
+                str = str.substring(len);
+            }
+        }
+        return str;
+    }
+
+
+    /**
+     * Shorten long class names, <em>java/lang/String</em> becomes 
+     * <em>java.lang.String</em>,
+     * e.g.. If <em>chopit</em> is <em>true</em> the prefix <em>java.lang</em>
+     * is also removed.
+     *
+     * @param str The long class name
+     * @param chopit Flag that determines whether chopping is executed or not
+     * @return Compacted class name
+     */
+    public static String compactClassName( String str, boolean chopit ) {
+        return compactClassName(str, "java.lang.", chopit);
+    }
+
+
+    /**
+     * @return `flag' with bit `i' set to 1
+     */
+    public static int setBit( int flag, int i ) {
+        return flag | pow2(i);
+    }
+
+
+    /**
+     * @return `flag' with bit `i' set to 0
+     */
+    public static int clearBit( int flag, int i ) {
+        int bit = pow2(i);
+        return (flag & bit) == 0 ? flag : flag ^ bit;
+    }
+
+
+    /**
+     * @return true, if bit `i' in `flag' is set
+     */
+    public static boolean isSet( int flag, int i ) {
+        return (flag & pow2(i)) != 0;
+    }
+
+
+    /**
+     * Converts string containing the method return and argument types 
+     * to a byte code method signature.
+     *
+     * @param  ret Return type of method
+     * @param  argv Types of method arguments
+     * @return Byte code representation of method signature
+     * 
+     * @throws ClassFormatException if the signature is for Void
+     */
+    public static String methodTypeToSignature( String ret, String[] argv )
+            throws ClassFormatException {
+        StringBuilder buf = new StringBuilder("(");
+        String str;
+        if (argv != null) {
+            for (String element : argv) {
+                str = getSignature(element);
+                if (str.endsWith("V")) {
+                    throw new ClassFormatException("Invalid type: " + element);
+                }
+                buf.append(str);
+            }
+        }
+        str = getSignature(ret);
+        buf.append(")").append(str);
+        return buf.toString();
+    }
+
+
+    /**
+     * @param  signature    Method signature
+     * @return Array of argument types
+     * @throws  ClassFormatException  
+     */
+    public static String[] methodSignatureArgumentTypes( String signature )
+            throws ClassFormatException {
+        return methodSignatureArgumentTypes(signature, true);
+    }
+
+
+    /**
+     * @param  signature    Method signature
+     * @param chopit Shorten class names ?
+     * @return Array of argument types
+     * @throws  ClassFormatException  
+     */
+    public static String[] methodSignatureArgumentTypes( String signature, boolean chopit ) 
+            throws ClassFormatException {
+        List<String> vec = new ArrayList<String>();
+        int index;
+        try { // Read all declarations between for `(' and `)'
+            if (signature.charAt(0) != '(') {
+                throw new ClassFormatException("Invalid method signature: " + signature);
+            }
+            index = 1; // current string position
+            while (signature.charAt(index) != ')') {
+                vec.add(signatureToString(signature.substring(index), chopit));
+                //corrected concurrent private static field acess
+                index += unwrap(consumed_chars); // update position
+            }
+        } catch (StringIndexOutOfBoundsException e) { // Should never occur
+            throw new ClassFormatException("Invalid method signature: " + signature, e);
+        }
+        return vec.toArray(new String[vec.size()]);
+    }
+
+
+    /**
+     * @param  signature    Method signature
+     * @return return type of method
+     * @throws  ClassFormatException  
+     */
+    public static String methodSignatureReturnType( String signature ) throws ClassFormatException {
+        return methodSignatureReturnType(signature, true);
+    }
+
+
+    /**
+     * @param  signature    Method signature
+     * @param chopit Shorten class names ?
+     * @return return type of method
+     * @throws  ClassFormatException  
+     */
+    public static String methodSignatureReturnType( String signature, boolean chopit ) throws ClassFormatException {
+        int index;
+        String type;
+        try {
+            // Read return type after `)'
+            index = signature.lastIndexOf(')') + 1;
+            type = signatureToString(signature.substring(index), chopit);
+        } catch (StringIndexOutOfBoundsException e) { // Should never occur
+            throw new ClassFormatException("Invalid method signature: " + signature, e);
+        }
+        return type;
+    }
+
+
+    /**
+     * Converts method signature to string with all class names compacted.
+     *
+     * @param signature to convert
+     * @param name of method
+     * @param access flags of method
+     * @return Human readable signature
+     */
+    public static String methodSignatureToString( String signature, String name, String access ) {
+        return methodSignatureToString(signature, name, access, true);
+    }
+
+
+    public static String methodSignatureToString( String signature, String name, String access, boolean chopit ) {
+        return methodSignatureToString(signature, name, access, chopit, null);
+    }
+
+
+    /**
+     * A returntype signature represents the return value from a method.
+     * It is a series of bytes in the following grammar:
+     *
+     * <pre>
+     * &lt;return_signature&gt; ::= &lt;field_type&gt; | V
+     * </pre>
+     *
+     * The character V indicates that the method returns no value. Otherwise, the
+     * signature indicates the type of the return value.
+     * An argument signature represents an argument passed to a method:
+     *
+     * <pre>
+     * &lt;argument_signature&gt; ::= &lt;field_type&gt;
+     * </pre>
+     *
+     * A method signature represents the arguments that the method expects, and
+     * the value that it returns.
+     * <pre>
+     * &lt;method_signature&gt; ::= (&lt;arguments_signature&gt;) &lt;return_signature&gt;
+     * &lt;arguments_signature&gt;::= &lt;argument_signature&gt;*
+     * </pre>
+     *
+     * This method converts such a string into a Java type declaration like
+     * `void main(String[])' and throws a `ClassFormatException' when the parsed 
+     * type is invalid.
+     *
+     * @param  signature    Method signature
+     * @param  name         Method name
+     * @param  access       Method access rights
+     * @param chopit
+     * @param vars
+     * @return Java type declaration
+     * @throws  ClassFormatException  
+     */
+    public static String methodSignatureToString( String signature, String name,
+            String access, boolean chopit, LocalVariableTable vars ) throws ClassFormatException {
+        StringBuilder buf = new StringBuilder("(");
+        String type;
+        int index;
+        int var_index = access.contains("static") ? 0 : 1;
+        try { // Read all declarations between for `(' and `)'
+            if (signature.charAt(0) != '(') {
+                throw new ClassFormatException("Invalid method signature: " + signature);
+            }
+            index = 1; // current string position
+            while (signature.charAt(index) != ')') {
+                String param_type = signatureToString(signature.substring(index), chopit);
+                buf.append(param_type);
+                if (vars != null) {
+                    LocalVariable l = vars.getLocalVariable(var_index);
+                    if (l != null) {
+                        buf.append(" ").append(l.getName());
+                    }
+                } else {
+                    buf.append(" arg").append(var_index);
+                }
+                if ("double".equals(param_type) || "long".equals(param_type)) {
+                    var_index += 2;
+                } else {
+                    var_index++;
+                }
+                buf.append(", ");
+                //corrected concurrent private static field acess
+                index += unwrap(consumed_chars); // update position
+            }
+            index++; // update position
+            // Read return type after `)'
+            type = signatureToString(signature.substring(index), chopit);
+        } catch (StringIndexOutOfBoundsException e) { // Should never occur
+            throw new ClassFormatException("Invalid method signature: " + signature, e);
+        }
+        if (buf.length() > 1) {
+            buf.setLength(buf.length() - 2);
+        }
+        buf.append(")");
+        return access + ((access.length() > 0) ? " " : "") + // May be an empty string
+                type + " " + name + buf.toString();
+    }
+
+
+    // Guess what this does
+    private static int pow2( int n ) {
+        return 1 << n;
+    }
+
+
+    /**
+     * Replace all occurrences of <em>old</em> in <em>str</em> with <em>new</em>.
+     *
+     * @param str String to permute
+     * @param old String to be replaced
+     * @param new_ Replacement string
+     * @return new String object
+     */
+    public static String replace( String str, String old, String new_ ) {
+        int index, old_index;
+        try {
+            if (str.contains(old)) { // `old' found in str
+                StringBuilder buf = new StringBuilder();
+                old_index = 0; // String start offset
+                // While we have something to replace
+                while ((index = str.indexOf(old, old_index)) != -1) {
+                    buf.append(str.substring(old_index, index)); // append prefix
+                    buf.append(new_); // append replacement
+                    old_index = index + old.length(); // Skip `old'.length chars
+                }
+                buf.append(str.substring(old_index)); // append rest of string
+                str = buf.toString();
+            }
+        } catch (StringIndexOutOfBoundsException e) { // Should not occur
+            System.err.println(e);
+        }
+        return str;
+    }
+
+
+    /**
+     * Converts signature to string with all class names compacted.
+     *
+     * @param signature to convert
+     * @return Human readable signature
+     */
+    public static String signatureToString( String signature ) {
+        return signatureToString(signature, true);
+    }
+
+
+    /**
+     * The field signature represents the value of an argument to a function or 
+     * the value of a variable. It is a series of bytes generated by the 
+     * following grammar:
+     *
+     * <PRE>
+     * &lt;field_signature&gt; ::= &lt;field_type&gt;
+     * &lt;field_type&gt;      ::= &lt;base_type&gt;|&lt;object_type&gt;|&lt;array_type&gt;
+     * &lt;base_type&gt;       ::= B|C|D|F|I|J|S|Z
+     * &lt;object_type&gt;     ::= L&lt;fullclassname&gt;;
+     * &lt;array_type&gt;      ::= [&lt;field_type&gt;
+     *
+     * The meaning of the base types is as follows:
+     * B byte signed byte
+     * C char character
+     * D double double precision IEEE float
+     * F float single precision IEEE float
+     * I int integer
+     * J long long integer
+     * L&lt;fullclassname&gt;; ... an object of the given class
+     * S short signed short
+     * Z boolean true or false
+     * [&lt;field sig&gt; ... array
+     * </PRE>
+     *
+     * This method converts this string into a Java type declaration such as
+     * `String[]' and throws a `ClassFormatException' when the parsed type is 
+     * invalid.
+     *
+     * @param  signature  Class signature
+     * @param chopit Flag that determines whether chopping is executed or not
+     * @return Java type declaration
+     * @throws ClassFormatException
+     */
+    public static String signatureToString( String signature, boolean chopit ) {
+        //corrected concurrent private static field acess
+        wrap(consumed_chars, 1); // This is the default, read just one char like `B'
+        try {
+            switch (signature.charAt(0)) {
+                case 'B':
+                    return "byte";
+                case 'C':
+                    return "char";
+                case 'D':
+                    return "double";
+                case 'F':
+                    return "float";
+                case 'I':
+                    return "int";
+                case 'J':
+                    return "long";
+                case 'T': { // TypeVariableSignature
+                    int index = signature.indexOf(';'); // Look for closing `;'
+                    if (index < 0) {
+                        throw new ClassFormatException("Invalid signature: " + signature);
+                    }
+                    //corrected concurrent private static field acess
+                    wrap(consumed_chars, index + 1); // "Tblabla;" `T' and `;' are removed
+                    return compactClassName(signature.substring(1, index), chopit);
+                }
+                case 'L': { // Full class name
+                    // should this be a while loop? can there be more than
+                    // one generic clause?  (markro)
+                    int fromIndex = signature.indexOf('<'); // generic type?
+                    if (fromIndex < 0) {
+                        fromIndex = 0;
+                    } else {
+                        fromIndex = signature.indexOf('>', fromIndex);
+                        if (fromIndex < 0) {
+                            throw new ClassFormatException("Invalid signature: " + signature);
+                        }
+                    }
+                    int index = signature.indexOf(';', fromIndex); // Look for closing `;'
+                    if (index < 0) {
+                        throw new ClassFormatException("Invalid signature: " + signature);
+                    }
+                    // check to see if there are any TypeArguments
+                    int bracketIndex = signature.substring(0, index).indexOf('<');
+                    if (bracketIndex < 0) {
+                        // just a class identifier
+                        wrap(consumed_chars, index + 1); // "Lblabla;" `L' and `;' are removed
+                        return compactClassName(signature.substring(1, index), chopit);
+                    }
+
+                    // we have TypeArguments; build up partial result
+                    // as we recurse for each TypeArgument
+                    String type = compactClassName(signature.substring(1, bracketIndex), chopit) + "<";
+                    int consumed_chars = bracketIndex + 1; // Shadows global var
+
+                    // check for wildcards
+                    if (signature.charAt(consumed_chars) == '+') {
+                        type = type + "? extends ";
+                        consumed_chars = ++consumed_chars;
+                    } else if (signature.charAt(consumed_chars) == '-') {
+                        type = type + "? super ";
+                        consumed_chars = ++consumed_chars;
+                    } else if (signature.charAt(consumed_chars) == '*') {
+                        // must be at end of signature
+                        if (signature.charAt(consumed_chars + 1) != '>') {
+                            throw new ClassFormatException("Invalid signature: " + signature);
+                        }
+                        if (signature.charAt(consumed_chars + 2) != ';') {
+                            throw new ClassFormatException("Invalid signature: " + signature);
+                        }
+                        wrap(Utility.consumed_chars, consumed_chars + 3); // remove final "*>;"
+                        return type + "?>...";
+                    }
+
+                    // get the first TypeArgument
+                    type = type + signatureToString(signature.substring(consumed_chars), chopit);
+                    // update our consumed count by the number of characters the for type argument
+                    consumed_chars = unwrap(Utility.consumed_chars) + consumed_chars;
+                    wrap(Utility.consumed_chars, consumed_chars);
+
+                    // are there more TypeArguments?
+                    while (signature.charAt(consumed_chars) != '>') {
+                        type = type + ", " + signatureToString(signature.substring(consumed_chars), chopit);
+                        // update our consumed count by the number of characters the for type argument
+                        consumed_chars = unwrap(Utility.consumed_chars) + consumed_chars;
+                        wrap(Utility.consumed_chars, consumed_chars);
+                    }
+
+                    if (signature.charAt(consumed_chars + 1) != ';') {
+                        throw new ClassFormatException("Invalid signature: " + signature);
+                    }
+                    wrap(Utility.consumed_chars, consumed_chars + 2); // remove final ">;"
+                    return type + ">";
+                }
+                case 'S':
+                    return "short";
+                case 'Z':
+                    return "boolean";
+                case '[': { // Array declaration
+                    int n;
+                    StringBuilder brackets;
+                    String type;
+                    int consumed_chars; // Shadows global var
+                    brackets = new StringBuilder(); // Accumulate []'s
+                    // Count opening brackets and look for optional size argument
+                    for (n = 0; signature.charAt(n) == '['; n++) {
+                        brackets.append("[]");
+                    }
+                    consumed_chars = n; // Remember value
+                    // The rest of the string denotes a `<field_type>'
+                    type = signatureToString(signature.substring(n), chopit);
+                    //corrected concurrent private static field acess
+                    //Utility.consumed_chars += consumed_chars; is replaced by:
+                    int _temp = unwrap(Utility.consumed_chars) + consumed_chars;
+                    wrap(Utility.consumed_chars, _temp);
+                    return type + brackets.toString();
+                }
+                case 'V':
+                    return "void";
+                default:
+                    throw new ClassFormatException("Invalid signature: `" + signature + "'");
+            }
+        } catch (StringIndexOutOfBoundsException e) { // Should never occur
+            throw new ClassFormatException("Invalid signature: " + signature, e);
+        }
+    }
+
+
+    /** Parse Java type such as "char", or "java.lang.String[]" and return the
+     * signature in byte code format, e.g. "C" or "[Ljava/lang/String;" respectively.
+     *
+     * @param  type Java type
+     * @return byte code signature
+     */
+    public static String getSignature( String type ) {
+        StringBuilder buf = new StringBuilder();
+        char[] chars = type.toCharArray();
+        boolean char_found = false, delim = false;
+        int index = -1;
+        loop: for (int i = 0; i < chars.length; i++) {
+            switch (chars[i]) {
+                case ' ':
+                case '\t':
+                case '\n':
+                case '\r':
+                case '\f':
+                    if (char_found) {
+                        delim = true;
+                    }
+                    break;
+                case '[':
+                    if (!char_found) {
+                        throw new RuntimeException("Illegal type: " + type);
+                    }
+                    index = i;
+                    break loop;
+                default:
+                    char_found = true;
+                    if (!delim) {
+                        buf.append(chars[i]);
+                    }
+            }
+        }
+        int brackets = 0;
+        if (index > 0) {
+            brackets = countBrackets(type.substring(index));
+        }
+        type = buf.toString();
+        buf.setLength(0);
+        for (int i = 0; i < brackets; i++) {
+            buf.append('[');
+        }
+        boolean found = false;
+        for (int i = Constants.T_BOOLEAN; (i <= Constants.T_VOID) && !found; i++) {
+            if (Constants.TYPE_NAMES[i].equals(type)) {
+                found = true;
+                buf.append(Constants.SHORT_TYPE_NAMES[i]);
+            }
+        }
+        if (!found) {
+            buf.append('L').append(type.replace('.', '/')).append(';');
+        }
+        return buf.toString();
+    }
+
+
+    private static int countBrackets( String brackets ) {
+        char[] chars = brackets.toCharArray();
+        int count = 0;
+        boolean open = false;
+        for (char c : chars) {
+            switch (c) {
+                case '[':
+                    if (open) {
+                        throw new RuntimeException("Illegally nested brackets:" + brackets);
+                    }
+                    open = true;
+                    break;
+                case ']':
+                    if (!open) {
+                        throw new RuntimeException("Illegally nested brackets:" + brackets);
+                    }
+                    open = false;
+                    count++;
+                    break;
+                default:
+                    // Don't care
+            }
+        }
+        if (open) {
+            throw new RuntimeException("Illegally nested brackets:" + brackets);
+        }
+        return count;
+    }
+
+
+    /**
+     * Return type of method signature as a byte value as defined in <em>Constants</em>
+     *
+     * @param  signature in format described above
+     * @return type of method signature
+     * @see    Constants
+     * 
+     * @throws ClassFormatException if signature is not a method signature
+     */
+    public static byte typeOfMethodSignature( String signature ) throws ClassFormatException {
+        int index;
+        try {
+            if (signature.charAt(0) != '(') {
+                throw new ClassFormatException("Invalid method signature: " + signature);
+            }
+            index = signature.lastIndexOf(')') + 1;
+            return typeOfSignature(signature.substring(index));
+        } catch (StringIndexOutOfBoundsException e) {
+            throw new ClassFormatException("Invalid method signature: " + signature, e);
+        }
+    }
+
+
+    /**
+     * Return type of signature as a byte value as defined in <em>Constants</em>
+     *
+     * @param  signature in format described above
+     * @return type of signature
+     * @see    Constants
+     * 
+     * @throws ClassFormatException if signature isn't a known type
+     */
+    public static byte typeOfSignature( String signature ) throws ClassFormatException {
+        try {
+            switch (signature.charAt(0)) {
+                case 'B':
+                    return Constants.T_BYTE;
+                case 'C':
+                    return Constants.T_CHAR;
+                case 'D':
+                    return Constants.T_DOUBLE;
+                case 'F':
+                    return Constants.T_FLOAT;
+                case 'I':
+                    return Constants.T_INT;
+                case 'J':
+                    return Constants.T_LONG;
+                case 'L':
+                case 'T':
+                    return Constants.T_REFERENCE;
+                case '[':
+                    return Constants.T_ARRAY;
+                case 'V':
+                    return Constants.T_VOID;
+                case 'Z':
+                    return Constants.T_BOOLEAN;
+                case 'S':
+                    return Constants.T_SHORT;
+                default:
+                    throw new ClassFormatException("Invalid method signature: " + signature);
+            }
+        } catch (StringIndexOutOfBoundsException e) {
+            throw new ClassFormatException("Invalid method signature: " + signature, e);
+        }
+    }
+
+
+    /** Map opcode names to opcode numbers. E.g., return Constants.ALOAD for "aload"
+     */
+    public static short searchOpcode( String name ) {
+        name = name.toLowerCase(Locale.ENGLISH);
+        for (short i = 0; i < Constants.OPCODE_NAMES.length; i++) {
+            if (Constants.OPCODE_NAMES[i].equals(name)) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+
+    /**
+     * Convert (signed) byte to (unsigned) short value, i.e., all negative
+     * values become positive.
+     */
+    private static short byteToShort( byte b ) {
+        return (b < 0) ? (short) (256 + b) : (short) b;
+    }
+
+
+    /** Convert bytes into hexadecimal string
+     *
+     * @param bytes an array of bytes to convert to hexadecimal
+     * 
+     * @return bytes as hexadecimal string, e.g. 00 FA 12 ...
+     */
+    public static String toHexString( byte[] bytes ) {
+        StringBuilder buf = new StringBuilder();
+        for (int i = 0; i < bytes.length; i++) {
+            short b = byteToShort(bytes[i]);
+            String hex = Integer.toString(b, 0x10);
+            if (b < 0x10) {
+                buf.append('0');
+            }
+            buf.append(hex);
+            if (i < bytes.length - 1) {
+                buf.append(' ');
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * Return a string for an integer justified left or right and filled up with
+     * `fill' characters if necessary.
+     *
+     * @param i integer to format
+     * @param length length of desired string
+     * @param left_justify format left or right
+     * @param fill fill character
+     * @return formatted int
+     */
+    public static String format( int i, int length, boolean left_justify, char fill ) {
+        return fillup(Integer.toString(i), length, left_justify, fill);
+    }
+
+
+    /**
+     * Fillup char with up to length characters with char `fill' and justify it left or right.
+     *
+     * @param str string to format
+     * @param length length of desired string
+     * @param left_justify format left or right
+     * @param fill fill character
+     * @return formatted string
+     */
+    public static String fillup( String str, int length, boolean left_justify, char fill ) {
+        int len = length - str.length();
+        char[] buf = new char[(len < 0) ? 0 : len];
+        for (int j = 0; j < buf.length; j++) {
+            buf[j] = fill;
+        }
+        if (left_justify) {
+            return str + new String(buf);
+        }
+        return new String(buf) + str;
+    }
+
+
+    static boolean equals( byte[] a, byte[] b ) {
+        int size;
+        if ((size = a.length) != b.length) {
+            return false;
+        }
+        for (int i = 0; i < size; i++) {
+            if (a[i] != b[i]) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    public static void printArray( PrintStream out, Object[] obj ) {
+        out.println(printArray(obj, true));
+    }
+
+
+    public static void printArray( PrintWriter out, Object[] obj ) {
+        out.println(printArray(obj, true));
+    }
+
+
+    public static String printArray( Object[] obj ) {
+        return printArray(obj, true);
+    }
+
+
+    public static String printArray( Object[] obj, boolean braces ) {
+        return printArray(obj, braces, false);
+    }
+
+
+    public static String printArray( Object[] obj, boolean braces, boolean quote ) {
+        if (obj == null) {
+            return null;
+        }
+        StringBuilder buf = new StringBuilder();
+        if (braces) {
+            buf.append('{');
+        }
+        for (int i = 0; i < obj.length; i++) {
+            if (obj[i] != null) {
+                buf.append((quote ? "\"" : "")).append(obj[i].toString()).append(
+                        (quote ? "\"" : ""));
+            } else {
+                buf.append("null");
+            }
+            if (i < obj.length - 1) {
+                buf.append(", ");
+            }
+        }
+        if (braces) {
+            buf.append('}');
+        }
+        return buf.toString();
+    }
+
+
+    /** 
+     * @param ch the character to test if it's part of an identifier
+     * 
+     * @return true, if character is one of (a, ... z, A, ... Z, 0, ... 9, _)
+     */
+    public static boolean isJavaIdentifierPart( char ch ) {
+        return ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z'))
+                || ((ch >= '0') && (ch <= '9')) || (ch == '_');
+    }
+
+
+    /**
+     * Encode byte array it into Java identifier string, i.e., a string
+     * that only contains the following characters: (a, ... z, A, ... Z,
+     * 0, ... 9, _, $).  The encoding algorithm itself is not too
+     * clever: if the current byte's ASCII value already is a valid Java
+     * identifier part, leave it as it is. Otherwise it writes the
+     * escape character($) followed by:
+     * 
+     * <ul>
+     *   <li> the ASCII value as a hexadecimal string, if the value is not in the range 200..247</li>
+     *   <li>a Java identifier char not used in a lowercase hexadecimal string, if the value is in the range 200..247</li>
+     * </ul>
+     *
+     * <p>This operation inflates the original byte array by roughly 40-50%</p>
+     *
+     * @param bytes the byte array to convert
+     * @param compress use gzip to minimize string
+     * 
+     * @throws IOException if there's a gzip exception
+     */
+    public static String encode( byte[] bytes, boolean compress ) throws IOException {
+        if (compress) {
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            GZIPOutputStream gos = new GZIPOutputStream(baos);
+            gos.write(bytes, 0, bytes.length);
+            gos.close();
+            baos.close();
+            bytes = baos.toByteArray();
+        }
+        CharArrayWriter caw = new CharArrayWriter();
+        JavaWriter jw = new JavaWriter(caw);
+        for (byte b : bytes) {
+            int in = b & 0x000000ff; // Normalize to unsigned
+            jw.write(in);
+        }
+        jw.close();
+        return caw.toString();
+    }
+
+
+    /**
+     * Decode a string back to a byte array.
+     *
+     * @param s the string to convert
+     * @param uncompress use gzip to uncompress the stream of bytes
+     * 
+     * @throws IOException if there's a gzip exception
+     */
+    public static byte[] decode( String s, boolean uncompress ) throws IOException {
+        char[] chars = s.toCharArray();
+        CharArrayReader car = new CharArrayReader(chars);
+        JavaReader jr = new JavaReader(car);
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        int ch;
+        while ((ch = jr.read()) >= 0) {
+            bos.write(ch);
+        }
+        bos.close();
+        car.close();
+        jr.close();
+        byte[] bytes = bos.toByteArray();
+        if (uncompress) {
+            GZIPInputStream gis = new GZIPInputStream(new ByteArrayInputStream(bytes));
+            byte[] tmp = new byte[bytes.length * 3]; // Rough estimate
+            int count = 0;
+            int b;
+            while ((b = gis.read()) >= 0) {
+                tmp[count++] = (byte) b;
+            }
+            bytes = new byte[count];
+            System.arraycopy(tmp, 0, bytes, 0, count);
+        }
+        return bytes;
+    }
+
+    // A-Z, g-z, _, $
+    private static final int FREE_CHARS = 48;
+    static int[] CHAR_MAP = new int[FREE_CHARS];
+    static int[] MAP_CHAR = new int[256]; // Reverse map
+    private static final char ESCAPE_CHAR = '$';
+    static {
+        int j = 0;
+        for (int i = 'A'; i <= 'Z'; i++) {
+            CHAR_MAP[j] = i;
+            MAP_CHAR[i] = j;
+            j++;
+        }
+        for (int i = 'g'; i <= 'z'; i++) {
+            CHAR_MAP[j] = i;
+            MAP_CHAR[i] = j;
+            j++;
+        }
+        CHAR_MAP[j] = '$';
+        MAP_CHAR['$'] = j;
+        j++;
+        CHAR_MAP[j] = '_';
+        MAP_CHAR['_'] = j;
+    }
+
+    /**
+     * Decode characters into bytes.
+     * Used by <a href="Utility.html#decode(java.lang.String, boolean)">decode()</a>
+     */
+    private static class JavaReader extends FilterReader {
+
+        public JavaReader(Reader in) {
+            super(in);
+        }
+
+
+        @Override
+        public int read() throws IOException {
+            int b = in.read();
+            if (b != ESCAPE_CHAR) {
+                return b;
+            }
+            int i = in.read();
+            if (i < 0) {
+                return -1;
+            }
+            if (((i >= '0') && (i <= '9')) || ((i >= 'a') && (i <= 'f'))) { // Normal escape
+                int j = in.read();
+                if (j < 0) {
+                    return -1;
+                }
+                char[] tmp = {
+                        (char) i, (char) j
+                };
+                int s = Integer.parseInt(new String(tmp), 16);
+                return s;
+            }
+            return MAP_CHAR[i];
+        }
+
+
+        @Override
+        public int read( char[] cbuf, int off, int len ) throws IOException {
+            for (int i = 0; i < len; i++) {
+                cbuf[off + i] = (char) read();
+            }
+            return len;
+        }
+    }
+
+    /**
+     * Encode bytes into valid java identifier characters.
+     * Used by <a href="Utility.html#encode(byte[], boolean)">encode()</a>
+     */
+    private static class JavaWriter extends FilterWriter {
+
+        public JavaWriter(Writer out) {
+            super(out);
+        }
+
+
+        @Override
+        public void write( int b ) throws IOException {
+            if (isJavaIdentifierPart((char) b) && (b != ESCAPE_CHAR)) {
+                out.write(b);
+            } else {
+                out.write(ESCAPE_CHAR); // Escape character
+                // Special escape
+                if (b >= 0 && b < FREE_CHARS) {
+                    out.write(CHAR_MAP[b]);
+                } else { // Normal escape
+                    char[] tmp = Integer.toHexString(b).toCharArray();
+                    if (tmp.length == 1) {
+                        out.write('0');
+                        out.write(tmp[0]);
+                    } else {
+                        out.write(tmp[0]);
+                        out.write(tmp[1]);
+                    }
+                }
+            }
+        }
+
+
+        @Override
+        public void write( char[] cbuf, int off, int len ) throws IOException {
+            for (int i = 0; i < len; i++) {
+                write(cbuf[off + i]);
+            }
+        }
+
+
+        @Override
+        public void write( String str, int off, int len ) throws IOException {
+            write(str.toCharArray(), off, len);
+        }
+    }
+
+
+    /**
+     * Escape all occurences of newline chars '\n', quotes \", etc.
+     */
+    public static String convertString( String label ) {
+        char[] ch = label.toCharArray();
+        StringBuilder buf = new StringBuilder();
+        for (char element : ch) {
+            switch (element) {
+                case '\n':
+                    buf.append("\\n");
+                    break;
+                case '\r':
+                    buf.append("\\r");
+                    break;
+                case '\"':
+                    buf.append("\\\"");
+                    break;
+                case '\'':
+                    buf.append("\\'");
+                    break;
+                case '\\':
+                    buf.append("\\\\");
+                    break;
+                default:
+                    buf.append(element);
+                    break;
+            }
+        }
+        return buf.toString();
+    }
+
+}
diff --git a/src/main/java/org/apache/commons/bcel6/classfile/Visitor.java b/src/main/java/org/apache/commons/bcel6/classfile/Visitor.java
new file mode 100644
index 0000000..332f913
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/classfile/Visitor.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.classfile;
+
+/**
+ * Interface to make use of the Visitor pattern programming style. I.e. a class
+ * that implements this interface can traverse the contents of a Java class just
+ * by calling the `accept' method which all classes have.
+ * 
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface Visitor
+{
+    void visitCode(Code obj);
+
+    void visitCodeException(CodeException obj);
+
+    void visitConstantClass(ConstantClass obj);
+
+    void visitConstantDouble(ConstantDouble obj);
+
+    void visitConstantFieldref(ConstantFieldref obj);
+
+    void visitConstantFloat(ConstantFloat obj);
+
+    void visitConstantInteger(ConstantInteger obj);
+
+    void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj);
+
+    void visitConstantInvokeDynamic(ConstantInvokeDynamic obj);
+
+    void visitConstantLong(ConstantLong obj);
+
+    void visitConstantMethodref(ConstantMethodref obj);
+
+    void visitConstantNameAndType(ConstantNameAndType obj);
+
+    void visitConstantPool(ConstantPool obj);
+
+    void visitConstantString(ConstantString obj);
+
+    void visitConstantUtf8(ConstantUtf8 obj);
+
+    void visitConstantValue(ConstantValue obj);
+
+    void visitDeprecated(Deprecated obj);
+
+    void visitExceptionTable(ExceptionTable obj);
+
+    void visitField(Field obj);
+
+    void visitInnerClass(InnerClass obj);
+
+    void visitInnerClasses(InnerClasses obj);
+
+    void visitJavaClass(JavaClass obj);
+
+    void visitLineNumber(LineNumber obj);
+
+    void visitLineNumberTable(LineNumberTable obj);
+
+    void visitLocalVariable(LocalVariable obj);
+
+    void visitLocalVariableTable(LocalVariableTable obj);
+
+    void visitMethod(Method obj);
+
+    void visitSignature(Signature obj);
+
+    void visitSourceFile(SourceFile obj);
+
+    void visitSynthetic(Synthetic obj);
+
+    void visitUnknown(Unknown obj);
+
+    void visitStackMap(StackMap obj);
+
+    void visitStackMapEntry(StackMapEntry obj);
+
+    void visitStackMapTable(StackMapTable obj);
+
+    void visitStackMapTableEntry(StackMapTableEntry obj);
+
+    void visitAnnotation(Annotations obj);
+
+    void visitParameterAnnotation(ParameterAnnotations obj);
+
+    void visitAnnotationEntry(AnnotationEntry obj);
+
+    void visitAnnotationDefault(AnnotationDefault obj);
+
+    void visitLocalVariableTypeTable(LocalVariableTypeTable obj);
+
+    void visitEnclosingMethod(EnclosingMethod obj);
+
+    void visitBootstrapMethods(BootstrapMethods obj);
+
+    void visitMethodParameters(MethodParameters obj);
+}
diff --git a/src/main/java/org/apache/bcel/classfile/package.html b/src/main/java/org/apache/commons/bcel6/classfile/package.html
similarity index 100%
rename from src/main/java/org/apache/bcel/classfile/package.html
rename to src/main/java/org/apache/commons/bcel6/classfile/package.html
diff --git a/src/main/java/org/apache/commons/bcel6/generic/AALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/AALOAD.java
new file mode 100644
index 0000000..8a6f106
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/AALOAD.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * AALOAD - Load reference from array
+ * <PRE>Stack: ..., arrayref, index -&gt; value</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class AALOAD extends ArrayInstruction implements StackProducer {
+
+    private static final long serialVersionUID = -8606835203239531080L;
+
+
+    /** Load reference from array
+     */
+    public AALOAD() {
+        super(org.apache.commons.bcel6.Constants.AALOAD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitAALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/AASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/AASTORE.java
new file mode 100644
index 0000000..c5f4e30
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/AASTORE.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * AASTORE -  Store into reference array
+ * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class AASTORE extends ArrayInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = -6440799431970565816L;
+
+
+    /** Store into reference array
+     */
+    public AASTORE() {
+        super(org.apache.commons.bcel6.Constants.AASTORE);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitAASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ACONST_NULL.java b/src/main/java/org/apache/commons/bcel6/generic/ACONST_NULL.java
new file mode 100644
index 0000000..c4d63be
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ACONST_NULL.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ACONST_NULL - Push null reference
+ * <PRE>Stack: ... -&gt; ..., null</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ACONST_NULL extends Instruction implements PushInstruction, TypedInstruction {
+
+    private static final long serialVersionUID = -4127036801984829715L;
+
+
+    /** 
+     * Push null reference
+     */
+    public ACONST_NULL() {
+        super(org.apache.commons.bcel6.Constants.ACONST_NULL, (short) 1);
+    }
+
+
+    /** @return Type.NULL
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.NULL;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitPushInstruction(this);
+        v.visitTypedInstruction(this);
+        v.visitACONST_NULL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/ALOAD.java
new file mode 100644
index 0000000..59a294b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ALOAD.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ALOAD - Load reference from local variable
+ * <PRE>Stack: ... -&gt; ..., objectref</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ALOAD extends LoadInstruction {
+
+    private static final long serialVersionUID = 6993893925210913542L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ALOAD() {
+        super(org.apache.commons.bcel6.Constants.ALOAD, org.apache.commons.bcel6.Constants.ALOAD_0);
+    }
+
+
+    /** Load reference from local variable
+     * @param n index of local variable
+     */
+    public ALOAD(int n) {
+        super(org.apache.commons.bcel6.Constants.ALOAD, org.apache.commons.bcel6.Constants.ALOAD_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ANEWARRAY.java b/src/main/java/org/apache/commons/bcel6/generic/ANEWARRAY.java
new file mode 100644
index 0000000..e294eff
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ANEWARRAY.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * ANEWARRAY -  Create new array of references
+ * <PRE>Stack: ..., count -&gt; ..., arrayref</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ANEWARRAY extends CPInstruction implements LoadClass, AllocationInstruction,
+        ExceptionThrower, StackConsumer, StackProducer {
+
+    private static final long serialVersionUID = -3720173810934984310L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ANEWARRAY() {
+    }
+
+
+    public ANEWARRAY(int index) {
+        super(org.apache.commons.bcel6.Constants.ANEWARRAY, index);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitLoadClass(this);
+        v.visitAllocationInstruction(this);
+        v.visitExceptionThrower(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitCPInstruction(this);
+        v.visitANEWARRAY(this);
+    }
+
+
+    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
+        Type t = getType(cpg);
+        if (t instanceof ArrayType) {
+            t = ((ArrayType) t).getBasicType();
+        }
+        return (t instanceof ObjectType) ? (ObjectType) t : null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ARETURN.java b/src/main/java/org/apache/commons/bcel6/generic/ARETURN.java
new file mode 100644
index 0000000..e0409c5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ARETURN.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ARETURN -  Return reference from method
+ * <PRE>Stack: ..., objectref -&gt; &lt;empty&gt;</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ARETURN extends ReturnInstruction {
+
+    private static final long serialVersionUID = -3497286197421151311L;
+
+
+    /** 
+     * Return reference from method
+     */
+    public ARETURN() {
+        super(org.apache.commons.bcel6.Constants.ARETURN);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitReturnInstruction(this);
+        v.visitARETURN(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java b/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java
new file mode 100644
index 0000000..5c38576
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ARRAYLENGTH.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ARRAYLENGTH -  Get length of array
+ * <PRE>Stack: ..., arrayref -&gt; ..., length</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ARRAYLENGTH extends Instruction implements ExceptionThrower, StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = 3038891629544391578L;
+
+
+    /** Get length of array
+     */
+    public ARRAYLENGTH() {
+        super(org.apache.commons.bcel6.Constants.ARRAYLENGTH, (short) 1);
+    }
+
+
+    /** @return exceptions this instruction may cause
+     */
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.NULL_POINTER_EXCEPTION
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitStackProducer(this);
+        v.visitARRAYLENGTH(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/ASTORE.java
new file mode 100644
index 0000000..05e31ac
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ASTORE.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ASTORE - Store reference into local variable
+ * <PRE>Stack ..., objectref -&gt; ... </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ASTORE extends StoreInstruction {
+
+    private static final long serialVersionUID = 3598929416636143200L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ASTORE() {
+        super(org.apache.commons.bcel6.Constants.ASTORE, org.apache.commons.bcel6.Constants.ASTORE_0);
+    }
+
+
+    /** Store reference into local variable
+     * @param n index of local variable
+     */
+    public ASTORE(int n) {
+        super(org.apache.commons.bcel6.Constants.ASTORE, org.apache.commons.bcel6.Constants.ASTORE_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java b/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java
new file mode 100644
index 0000000..f21ff6f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ATHROW.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ATHROW -  Throw exception
+ * <PRE>Stack: ..., objectref -&gt; objectref</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ATHROW extends Instruction implements UnconditionalBranch, ExceptionThrower {
+
+    private static final long serialVersionUID = -5072509566909688739L;
+
+
+    /** 
+     *  Throw exception
+     */
+    public ATHROW() {
+        super(org.apache.commons.bcel6.Constants.ATHROW, (short) 1);
+    }
+
+
+    /** @return exceptions this instruction may cause
+     */
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.THROWABLE
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitUnconditionalBranch(this);
+        v.visitExceptionThrower(this);
+        v.visitATHROW(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/AllocationInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/AllocationInstruction.java
new file mode 100644
index 0000000..dd4737b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/AllocationInstruction.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denote family of instructions that allocates space in the heap.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface AllocationInstruction {
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/AnnotationElementValueGen.java b/src/main/java/org/apache/commons/bcel6/generic/AnnotationElementValueGen.java
new file mode 100644
index 0000000..f0099fc
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/AnnotationElementValueGen.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.AnnotationElementValue;
+import org.apache.commons.bcel6.classfile.ElementValue;
+
+/**
+ * @since 6.0
+ */
+public class AnnotationElementValueGen extends ElementValueGen
+{
+    // For annotation element values, this is the annotation
+    private final AnnotationEntryGen a;
+
+    public AnnotationElementValueGen(AnnotationEntryGen a, ConstantPoolGen cpool)
+    {
+        super(ANNOTATION, cpool);
+        this.a = a;
+    }
+
+    public AnnotationElementValueGen(int type, AnnotationEntryGen annotation,
+            ConstantPoolGen cpool)
+    {
+        super(type, cpool);
+        if (type != ANNOTATION) {
+            throw new RuntimeException(
+                    "Only element values of type annotation can be built with this ctor - type specified: " + type);
+        }
+        this.a = annotation;
+    }
+
+    public AnnotationElementValueGen(AnnotationElementValue value,
+            ConstantPoolGen cpool, boolean copyPoolEntries)
+    {
+        super(ANNOTATION, cpool);
+        a = new AnnotationEntryGen(value.getAnnotationEntry(), cpool, copyPoolEntries);
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 type of value (ANNOTATION == '@')
+        a.dump(dos);
+    }
+
+    @Override
+    public String stringifyValue()
+    {
+        throw new RuntimeException("Not implemented yet");
+    }
+
+    /**
+     * Return immutable variant of this AnnotationElementValueGen
+     */
+    @Override
+    public ElementValue getElementValue()
+    {
+        return new AnnotationElementValue(this.type, a.getAnnotation(), cpGen
+                .getConstantPool());
+    }
+
+    public AnnotationEntryGen getAnnotation()
+    {
+        return a;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java b/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java
new file mode 100644
index 0000000..2233f5b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/AnnotationEntryGen.java
@@ -0,0 +1,355 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInput;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ElementValuePair;
+import org.apache.commons.bcel6.classfile.RuntimeInvisibleAnnotations;
+import org.apache.commons.bcel6.classfile.RuntimeInvisibleParameterAnnotations;
+import org.apache.commons.bcel6.classfile.RuntimeVisibleAnnotations;
+import org.apache.commons.bcel6.classfile.RuntimeVisibleParameterAnnotations;
+
+/**
+ * @since 6.0
+ */
+public class AnnotationEntryGen {
+    private int typeIndex;
+
+    private List<ElementValuePairGen> evs;
+
+    private final ConstantPoolGen cpool;
+
+    private boolean isRuntimeVisible = false;
+
+    /**
+     * Here we are taking a fixed annotation of type Annotation and building a
+     * modifiable AnnotationGen object. If the pool passed in is for a different
+     * class file, then copyPoolEntries should have been passed as true as that
+     * will force us to do a deep copy of the annotation and move the cpool
+     * entries across. We need to copy the type and the element name value pairs
+     * and the visibility.
+     */
+    public AnnotationEntryGen(AnnotationEntry a, ConstantPoolGen cpool,
+                              boolean copyPoolEntries) {
+        this.cpool = cpool;
+        if (copyPoolEntries) {
+            typeIndex = cpool.addUtf8(a.getAnnotationType());
+        } else {
+            typeIndex = a.getAnnotationTypeIndex();
+        }
+        isRuntimeVisible = a.isRuntimeVisible();
+        evs = copyValues(a.getElementValuePairs(), cpool, copyPoolEntries);
+    }
+
+    private List<ElementValuePairGen> copyValues(ElementValuePair[] in, ConstantPoolGen cpool,
+                                                 boolean copyPoolEntries) {
+        List<ElementValuePairGen> out = new ArrayList<ElementValuePairGen>();
+        for (ElementValuePair nvp : in) {
+            out.add(new ElementValuePairGen(nvp, cpool, copyPoolEntries));
+        }
+        return out;
+    }
+
+    private AnnotationEntryGen(ConstantPoolGen cpool) {
+        this.cpool = cpool;
+    }
+
+    /**
+     * Retrieve an immutable version of this AnnotationGen
+     */
+    public AnnotationEntry getAnnotation() {
+        AnnotationEntry a = new AnnotationEntry(typeIndex, cpool.getConstantPool(),
+                isRuntimeVisible);
+        for (ElementValuePairGen element : evs) {
+            a.addElementNameValuePair(element.getElementNameValuePair());
+        }
+        return a;
+    }
+
+    public AnnotationEntryGen(ObjectType type,
+                              List<ElementValuePairGen> elements, boolean vis,
+                              ConstantPoolGen cpool) {
+        this.cpool = cpool;
+        this.typeIndex = cpool.addUtf8(type.getSignature());
+        evs = elements;
+        isRuntimeVisible = vis;
+    }
+
+    public static AnnotationEntryGen read(DataInput dis,
+                                          ConstantPoolGen cpool, boolean b) throws IOException {
+        AnnotationEntryGen a = new AnnotationEntryGen(cpool);
+        a.typeIndex = dis.readUnsignedShort();
+        int elemValuePairCount = dis.readUnsignedShort();
+        for (int i = 0; i < elemValuePairCount; i++) {
+            int nidx = dis.readUnsignedShort();
+            a.addElementNameValuePair(new ElementValuePairGen(nidx,
+                    ElementValueGen.readElementValue(dis, cpool), cpool));
+        }
+        a.isRuntimeVisible(b);
+        return a;
+    }
+
+    public void dump(DataOutputStream dos) throws IOException {
+        dos.writeShort(typeIndex); // u2 index of type name in cpool
+        dos.writeShort(evs.size()); // u2 element_value pair count
+        for (ElementValuePairGen envp : evs) {
+            envp.dump(dos);
+        }
+    }
+
+    public void addElementNameValuePair(ElementValuePairGen evp) {
+        if (evs == null) {
+            evs = new ArrayList<ElementValuePairGen>();
+        }
+        evs.add(evp);
+    }
+
+    public int getTypeIndex() {
+        return typeIndex;
+    }
+
+    public final String getTypeSignature() {
+        // ConstantClass c = (ConstantClass)cpool.getConstant(typeIndex);
+        ConstantUtf8 utf8 = (ConstantUtf8) cpool
+                .getConstant(typeIndex/* c.getNameIndex() */);
+        return utf8.getBytes();
+    }
+
+    public final String getTypeName() {
+        return getTypeSignature();// BCELBUG: Should I use this instead?
+        // Utility.signatureToString(getTypeSignature());
+    }
+
+    /**
+     * Returns list of ElementNameValuePair objects
+     */
+    public List<ElementValuePairGen> getValues() {
+        return evs;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder s = new StringBuilder(32);
+        s.append("AnnotationGen:[" + getTypeName() + " #" + evs.size() + " {");
+        for (int i = 0; i < evs.size(); i++) {
+            s.append(evs.get(i));
+            if (i + 1 < evs.size()) {
+                s.append(",");
+            }
+        }
+        s.append("}]");
+        return s.toString();
+    }
+
+    public String toShortString() {
+        StringBuilder s = new StringBuilder();
+        s.append("@" + getTypeName() + "(");
+        for (int i = 0; i < evs.size(); i++) {
+            s.append(evs.get(i));
+            if (i + 1 < evs.size()) {
+                s.append(",");
+            }
+        }
+        s.append(")");
+        return s.toString();
+    }
+
+    private void isRuntimeVisible(boolean b) {
+        isRuntimeVisible = b;
+    }
+
+    public boolean isRuntimeVisible() {
+        return isRuntimeVisible;
+    }
+
+
+    /**
+     * Converts a list of AnnotationGen objects into a set of attributes
+     * that can be attached to the class file.
+     *
+     * @param cp  The constant pool gen where we can create the necessary name refs
+     * @param vec A list of AnnotationGen objects
+     */
+    static Attribute[] getAnnotationAttributes(ConstantPoolGen cp, List<AnnotationEntryGen> vec) {
+        if (vec.isEmpty()) {
+            return new Attribute[0];
+        }
+
+        try {
+            int countVisible = 0;
+            int countInvisible = 0;
+
+            //  put the annotations in the right output stream
+            for (AnnotationEntryGen a : vec) {
+                if (a.isRuntimeVisible()) {
+                    countVisible++;
+                } else {
+                    countInvisible++;
+                }
+            }
+
+            ByteArrayOutputStream rvaBytes = new ByteArrayOutputStream();
+            ByteArrayOutputStream riaBytes = new ByteArrayOutputStream();
+            DataOutputStream rvaDos = new DataOutputStream(rvaBytes);
+            DataOutputStream riaDos = new DataOutputStream(riaBytes);
+
+            rvaDos.writeShort(countVisible);
+            riaDos.writeShort(countInvisible);
+
+            // put the annotations in the right output stream
+            for (AnnotationEntryGen a : vec) {
+                if (a.isRuntimeVisible()) {
+                    a.dump(rvaDos);
+                } else {
+                    a.dump(riaDos);
+                }
+            }
+
+            rvaDos.close();
+            riaDos.close();
+
+            byte[] rvaData = rvaBytes.toByteArray();
+            byte[] riaData = riaBytes.toByteArray();
+
+            int rvaIndex = -1;
+            int riaIndex = -1;
+
+            if (rvaData.length > 2) {
+                rvaIndex = cp.addUtf8("RuntimeVisibleAnnotations");
+            }
+            if (riaData.length > 2) {
+                riaIndex = cp.addUtf8("RuntimeInvisibleAnnotations");
+            }
+
+            List<Attribute> newAttributes = new ArrayList<Attribute>();
+            if (rvaData.length > 2) {
+                newAttributes.add(
+                        new RuntimeVisibleAnnotations(rvaIndex, rvaData.length, new DataInputStream(new ByteArrayInputStream(rvaData)), cp.getConstantPool()));
+            }
+            if (riaData.length > 2) {
+                newAttributes.add(
+                        new RuntimeInvisibleAnnotations(riaIndex, riaData.length, new DataInputStream(new ByteArrayInputStream(riaData)), cp.getConstantPool()));
+            }
+
+            return newAttributes.toArray(new Attribute[newAttributes.size()]);
+        } catch (IOException e) {
+            System.err.println("IOException whilst processing annotations");
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+
+    /**
+     * Annotations against a class are stored in one of four attribute kinds:
+     * - RuntimeVisibleParameterAnnotations
+     * - RuntimeInvisibleParameterAnnotations
+     */
+    static Attribute[] getParameterAnnotationAttributes(
+            ConstantPoolGen cp,
+            List<AnnotationEntryGen>[] /*Array of lists, array size depends on #params */vec) {
+        int visCount[] = new int[vec.length];
+        int totalVisCount = 0;
+        int invisCount[] = new int[vec.length];
+        int totalInvisCount = 0;
+        try {
+            for (int i = 0; i < vec.length; i++) {
+                if (vec[i] != null) {
+                    for (AnnotationEntryGen element : vec[i]) {
+                        if (element.isRuntimeVisible()) {
+                            visCount[i]++;
+                            totalVisCount++;
+                        } else {
+                            invisCount[i]++;
+                            totalInvisCount++;
+                        }
+                    }
+                }
+            }
+            // Lets do the visible ones
+            ByteArrayOutputStream rvaBytes = new ByteArrayOutputStream();
+            DataOutputStream rvaDos = new DataOutputStream(rvaBytes);
+            rvaDos.writeByte(vec.length); // First goes number of parameters
+            for (int i = 0; i < vec.length; i++) {
+                rvaDos.writeShort(visCount[i]);
+                if (visCount[i] > 0) {
+                    for (AnnotationEntryGen element : vec[i]) {
+                        if (element.isRuntimeVisible()) {
+                            element.dump(rvaDos);
+                        }
+                    }
+                }
+            }
+            rvaDos.close();
+            // Lets do the invisible ones
+            ByteArrayOutputStream riaBytes = new ByteArrayOutputStream();
+            DataOutputStream riaDos = new DataOutputStream(riaBytes);
+            riaDos.writeByte(vec.length); // First goes number of parameters
+            for (int i = 0; i < vec.length; i++) {
+                riaDos.writeShort(invisCount[i]);
+                if (invisCount[i] > 0) {
+                    for (AnnotationEntryGen element : vec[i]) {
+                        if (!element.isRuntimeVisible()) {
+                            element.dump(riaDos);
+                        }
+                    }
+                }
+            }
+            riaDos.close();
+            byte[] rvaData = rvaBytes.toByteArray();
+            byte[] riaData = riaBytes.toByteArray();
+            int rvaIndex = -1;
+            int riaIndex = -1;
+            if (totalVisCount > 0) {
+                rvaIndex = cp.addUtf8("RuntimeVisibleParameterAnnotations");
+            }
+            if (totalInvisCount > 0) {
+                riaIndex = cp.addUtf8("RuntimeInvisibleParameterAnnotations");
+            }
+            List<Attribute> newAttributes = new ArrayList<Attribute>();
+            if (totalVisCount > 0) {
+                newAttributes
+                        .add(new RuntimeVisibleParameterAnnotations(rvaIndex,
+                                rvaData.length, new DataInputStream(new ByteArrayInputStream(rvaData)), cp.getConstantPool()));
+            }
+            if (totalInvisCount > 0) {
+                newAttributes
+                        .add(new RuntimeInvisibleParameterAnnotations(riaIndex,
+                                riaData.length, new DataInputStream(new ByteArrayInputStream(riaData)), cp.getConstantPool()));
+            }
+            return newAttributes.toArray(new Attribute[newAttributes.size()]);
+        } catch (IOException e) {
+            System.err
+                    .println("IOException whilst processing parameter annotations");
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ArithmeticInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/ArithmeticInstruction.java
new file mode 100644
index 0000000..98435e9
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ArithmeticInstruction.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Super class for the family of arithmetic instructions.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class ArithmeticInstruction extends Instruction implements TypedInstruction,
+        StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = 5027221136148765144L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ArithmeticInstruction() {
+    }
+
+
+    /**
+     * @param opcode of instruction
+     */
+    protected ArithmeticInstruction(short opcode) {
+        super(opcode, (short) 1);
+    }
+
+
+    /** @return type associated with the instruction
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        switch (opcode) {
+            case Constants.DADD:
+            case Constants.DDIV:
+            case Constants.DMUL:
+            case Constants.DNEG:
+            case Constants.DREM:
+            case Constants.DSUB:
+                return Type.DOUBLE;
+            case Constants.FADD:
+            case Constants.FDIV:
+            case Constants.FMUL:
+            case Constants.FNEG:
+            case Constants.FREM:
+            case Constants.FSUB:
+                return Type.FLOAT;
+            case Constants.IADD:
+            case Constants.IAND:
+            case Constants.IDIV:
+            case Constants.IMUL:
+            case Constants.INEG:
+            case Constants.IOR:
+            case Constants.IREM:
+            case Constants.ISHL:
+            case Constants.ISHR:
+            case Constants.ISUB:
+            case Constants.IUSHR:
+            case Constants.IXOR:
+                return Type.INT;
+            case Constants.LADD:
+            case Constants.LAND:
+            case Constants.LDIV:
+            case Constants.LMUL:
+            case Constants.LNEG:
+            case Constants.LOR:
+            case Constants.LREM:
+            case Constants.LSHL:
+            case Constants.LSHR:
+            case Constants.LSUB:
+            case Constants.LUSHR:
+            case Constants.LXOR:
+                return Type.LONG;
+            default: // Never reached
+                throw new ClassGenException("Unknown type " + opcode);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ArrayElementValueGen.java b/src/main/java/org/apache/commons/bcel6/generic/ArrayElementValueGen.java
new file mode 100644
index 0000000..3576e80
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ArrayElementValueGen.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.classfile.ArrayElementValue;
+import org.apache.commons.bcel6.classfile.ElementValue;
+
+/**
+ * @since 6.0
+ */
+public class ArrayElementValueGen extends ElementValueGen
+{
+    // J5TODO: Should we make this an array or a list? A list would be easier to
+    // modify ...
+    private final List<ElementValueGen> evalues;
+
+    public ArrayElementValueGen(ConstantPoolGen cp)
+    {
+        super(ARRAY, cp);
+        evalues = new ArrayList<ElementValueGen>();
+    }
+
+    public ArrayElementValueGen(int type, ElementValue[] datums,
+            ConstantPoolGen cpool)
+    {
+        super(type, cpool);
+        if (type != ARRAY) {
+            throw new RuntimeException(
+                    "Only element values of type array can be built with this ctor - type specified: " + type);
+        }
+        this.evalues = new ArrayList<ElementValueGen>();
+        for (ElementValue datum : datums) {
+            evalues.add(ElementValueGen.copy(datum, cpool, true));
+        }
+    }
+
+    /**
+     * Return immutable variant of this ArrayElementValueGen
+     */
+    @Override
+    public ElementValue getElementValue()
+    {
+        ElementValue[] immutableData = new ElementValue[evalues.size()];
+        int i = 0;
+        for (ElementValueGen element : evalues) {
+            immutableData[i++] = element.getElementValue();
+        }
+        return new ArrayElementValue(type, immutableData, cpGen
+                .getConstantPool());
+    }
+
+    /**
+     * @param value
+     * @param cpool
+     */
+    public ArrayElementValueGen(ArrayElementValue value, ConstantPoolGen cpool,
+            boolean copyPoolEntries)
+    {
+        super(ARRAY, cpool);
+        evalues = new ArrayList<ElementValueGen>();
+        ElementValue[] in = value.getElementValuesArray();
+        for (ElementValue element : in) {
+            evalues.add(ElementValueGen.copy(element, cpool, copyPoolEntries));
+        }
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 type of value (ARRAY == '[')
+        dos.writeShort(evalues.size());
+        for (ElementValueGen element : evalues) {
+            element.dump(dos);
+        }
+    }
+
+    @Override
+    public String stringifyValue()
+    {
+        StringBuilder sb = new StringBuilder();
+        sb.append("[");
+        String comma = "";
+        for (ElementValueGen element : evalues) {
+            sb.append(comma);
+            comma = ",";
+            sb.append(element.stringifyValue());
+        }
+        sb.append("]");
+        return sb.toString();
+    }
+
+    public List<ElementValueGen> getElementValues()
+    {
+        return evalues;
+    }
+
+    public int getElementValuesSize()
+    {
+        return evalues.size();
+    }
+
+    public void addElement(ElementValueGen gen)
+    {
+        evalues.add(gen);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ArrayInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/ArrayInstruction.java
new file mode 100644
index 0000000..37279b6
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ArrayInstruction.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Super class for instructions dealing with array access such as IALOAD.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class ArrayInstruction extends Instruction implements ExceptionThrower,
+        TypedInstruction {
+
+    private static final long serialVersionUID = 1355074014869910296L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ArrayInstruction() {
+    }
+
+
+    /**
+     * @param opcode of instruction
+     */
+    protected ArrayInstruction(short opcode) {
+        super(opcode, (short) 1);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return org.apache.commons.bcel6.ExceptionConstants.EXCS_ARRAY_EXCEPTION;
+    }
+
+
+    /** @return type associated with the instruction
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        switch (opcode) {
+            case org.apache.commons.bcel6.Constants.IALOAD:
+            case org.apache.commons.bcel6.Constants.IASTORE:
+                return Type.INT;
+            case org.apache.commons.bcel6.Constants.CALOAD:
+            case org.apache.commons.bcel6.Constants.CASTORE:
+                return Type.CHAR;
+            case org.apache.commons.bcel6.Constants.BALOAD:
+            case org.apache.commons.bcel6.Constants.BASTORE:
+                return Type.BYTE;
+            case org.apache.commons.bcel6.Constants.SALOAD:
+            case org.apache.commons.bcel6.Constants.SASTORE:
+                return Type.SHORT;
+            case org.apache.commons.bcel6.Constants.LALOAD:
+            case org.apache.commons.bcel6.Constants.LASTORE:
+                return Type.LONG;
+            case org.apache.commons.bcel6.Constants.DALOAD:
+            case org.apache.commons.bcel6.Constants.DASTORE:
+                return Type.DOUBLE;
+            case org.apache.commons.bcel6.Constants.FALOAD:
+            case org.apache.commons.bcel6.Constants.FASTORE:
+                return Type.FLOAT;
+            case org.apache.commons.bcel6.Constants.AALOAD:
+            case org.apache.commons.bcel6.Constants.AASTORE:
+                return Type.OBJECT;
+            default:
+                throw new ClassGenException("Oops: unknown case in switch" + opcode);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ArrayType.java b/src/main/java/org/apache/commons/bcel6/generic/ArrayType.java
new file mode 100644
index 0000000..27a7f12
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ArrayType.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * Denotes array type, such as int[][]
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class ArrayType extends ReferenceType {
+
+    private static final long serialVersionUID = 7587687059797903734L;
+    private int dimensions;
+    private Type basic_type;
+
+
+    /**
+     * Convenience constructor for array type, e.g. int[]
+     *
+     * @param type array type, e.g. T_INT
+     */
+    public ArrayType(byte type, int dimensions) {
+        this(BasicType.getType(type), dimensions);
+    }
+
+
+    /**
+     * Convenience constructor for reference array type, e.g. Object[]
+     *
+     * @param class_name complete name of class (java.lang.String, e.g.)
+     */
+    public ArrayType(String class_name, int dimensions) {
+        this(ObjectType.getInstance(class_name), dimensions);
+    }
+
+
+    /**
+     * Constructor for array of given type
+     *
+     * @param type type of array (may be an array itself)
+     */
+    public ArrayType(Type type, int dimensions) {
+        super(Constants.T_ARRAY, "<dummy>");
+        if ((dimensions < 1) || (dimensions > Constants.MAX_BYTE)) {
+            throw new ClassGenException("Invalid number of dimensions: " + dimensions);
+        }
+        switch (type.getType()) {
+            case Constants.T_ARRAY:
+                ArrayType array = (ArrayType) type;
+                this.dimensions = dimensions + array.dimensions;
+                basic_type = array.basic_type;
+                break;
+            case Constants.T_VOID:
+                throw new ClassGenException("Invalid type: void[]");
+            default: // Basic type or reference
+                this.dimensions = dimensions;
+                basic_type = type;
+                break;
+        }
+        StringBuilder buf = new StringBuilder();
+        for (int i = 0; i < this.dimensions; i++) {
+            buf.append('[');
+        }
+        buf.append(basic_type.getSignature());
+        signature = buf.toString();
+    }
+
+
+    /**
+     * @return basic type of array, i.e., for int[][][] the basic type is int
+     */
+    public Type getBasicType() {
+        return basic_type;
+    }
+
+
+    /**
+     * @return element type of array, i.e., for int[][][] the element type is int[][]
+     */
+    public Type getElementType() {
+        if (dimensions == 1) {
+            return basic_type;
+        }
+        return new ArrayType(basic_type, dimensions - 1);
+    }
+
+
+    /** @return number of dimensions of array
+     */
+    public int getDimensions() {
+        return dimensions;
+    }
+
+
+    /** @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() {
+        return basic_type.hashCode() ^ dimensions;
+    }
+
+
+    /** @return true if both type objects refer to the same array type.
+     */
+    @Override
+    public boolean equals( Object _type ) {
+        if (_type instanceof ArrayType) {
+            ArrayType array = (ArrayType) _type;
+            return (array.dimensions == dimensions) && array.basic_type.equals(basic_type);
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/BALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/BALOAD.java
new file mode 100644
index 0000000..53be1be
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/BALOAD.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * BALOAD - Load byte or boolean from array
+ * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class BALOAD extends ArrayInstruction implements StackProducer {
+
+    private static final long serialVersionUID = -849061295095748102L;
+
+
+    /** Load byte or boolean from array
+     */
+    public BALOAD() {
+        super(org.apache.commons.bcel6.Constants.BALOAD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitBALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/BASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/BASTORE.java
new file mode 100644
index 0000000..42fea6f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/BASTORE.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * BASTORE -  Store into byte or boolean array
+ * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class BASTORE extends ArrayInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = 1127770065463906050L;
+
+
+    /** Store byte or boolean into array
+     */
+    public BASTORE() {
+        super(org.apache.commons.bcel6.Constants.BASTORE);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitBASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/BIPUSH.java b/src/main/java/org/apache/commons/bcel6/generic/BIPUSH.java
new file mode 100644
index 0000000..5ea7e96
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/BIPUSH.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * BIPUSH - Push byte on stack
+ *
+ * <PRE>Stack: ... -&gt; ..., value</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class BIPUSH extends Instruction implements ConstantPushInstruction {
+
+    private static final long serialVersionUID = -6859389515217572656L;
+    private byte b;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    BIPUSH() {
+    }
+
+
+    /** Push byte on stack
+     */
+    public BIPUSH(byte b) {
+        super(org.apache.commons.bcel6.Constants.BIPUSH, (short) 2);
+        this.b = b;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        super.dump(out);
+        out.writeByte(b);
+    }
+
+
+    /**
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        return super.toString(verbose) + " " + b;
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        length = 2;
+        b = bytes.readByte();
+    }
+
+
+    public Number getValue() {
+        return Integer.valueOf(b);
+    }
+
+
+    /** @return Type.BYTE
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.BYTE;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitPushInstruction(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitConstantPushInstruction(this);
+        v.visitBIPUSH(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/BREAKPOINT.java b/src/main/java/org/apache/commons/bcel6/generic/BREAKPOINT.java
new file mode 100644
index 0000000..ffe767e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/BREAKPOINT.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * BREAKPOINT, JVM dependent, ignored by default
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class BREAKPOINT extends Instruction {
+
+    private static final long serialVersionUID = -4186956277760244254L;
+
+
+    public BREAKPOINT() {
+        super(org.apache.commons.bcel6.Constants.BREAKPOINT, (short) 1);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitBREAKPOINT(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/BasicType.java b/src/main/java/org/apache/commons/bcel6/generic/BasicType.java
new file mode 100644
index 0000000..6782e66
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/BasicType.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * Denotes basic type such as int.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class BasicType extends Type {
+
+    private static final long serialVersionUID = -6546010740455512176L;
+
+
+    /**
+     * Constructor for basic types such as int, long, `void'
+     *
+     * @param type one of T_INT, T_BOOLEAN, ..., T_VOID
+     * @see org.apache.commons.bcel6.Constants
+     */
+    BasicType(byte type) {
+        super(type, Constants.SHORT_TYPE_NAMES[type]);
+        if ((type < Constants.T_BOOLEAN) || (type > Constants.T_VOID)) {
+            throw new ClassGenException("Invalid type: " + type);
+        }
+    }
+
+
+    public static BasicType getType( byte type ) {
+        switch (type) {
+            case Constants.T_VOID:
+                return VOID;
+            case Constants.T_BOOLEAN:
+                return BOOLEAN;
+            case Constants.T_BYTE:
+                return BYTE;
+            case Constants.T_SHORT:
+                return SHORT;
+            case Constants.T_CHAR:
+                return CHAR;
+            case Constants.T_INT:
+                return INT;
+            case Constants.T_LONG:
+                return LONG;
+            case Constants.T_DOUBLE:
+                return DOUBLE;
+            case Constants.T_FLOAT:
+                return FLOAT;
+            default:
+                throw new ClassGenException("Invalid type: " + type);
+        }
+    }
+
+
+    /** @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() {
+        return type;
+    }
+
+
+    /** @return true if both type objects refer to the same type
+     */
+    @Override
+    public boolean equals( Object _type ) {
+        return (_type instanceof BasicType) ? ((BasicType) _type).type == this.type : false;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/BranchHandle.java b/src/main/java/org/apache/commons/bcel6/generic/BranchHandle.java
new file mode 100644
index 0000000..69326e3
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/BranchHandle.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * BranchHandle is returned by specialized InstructionList.append() whenever a
+ * BranchInstruction is appended. This is useful when the target of this
+ * instruction is not known at time of creation and must be set later
+ * via setTarget().
+ *
+ * @see InstructionHandle
+ * @see Instruction
+ * @see InstructionList
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class BranchHandle extends InstructionHandle {
+
+    private static final long serialVersionUID = -2520878285698255956L;
+    private BranchInstruction bi; // An alias in fact, but saves lots of casts
+
+
+    private BranchHandle(BranchInstruction i) {
+        super(i);
+        bi = i;
+    }
+
+    /** Factory methods.
+     */
+    private static BranchHandle bh_list = null; // List of reusable handles
+
+
+    static BranchHandle getBranchHandle( BranchInstruction i ) {
+        if (bh_list == null) {
+            return new BranchHandle(i);
+        }
+        BranchHandle bh = bh_list;
+        bh_list = (BranchHandle) bh.next;
+        bh.setInstruction(i);
+        return bh;
+    }
+
+
+    /** Handle adds itself to the list of resuable handles.
+     */
+    @Override
+    protected void addHandle() {
+        next = bh_list;
+        bh_list = this;
+    }
+
+
+    /* Override InstructionHandle methods: delegate to branch instruction.
+     * Through this overriding all access to the private i_position field should
+     * be prevented.
+     */
+    @Override
+    public int getPosition() {
+        return bi.position;
+    }
+
+
+    @Override
+    void setPosition( int pos ) {
+        i_position = bi.position = pos;
+    }
+
+
+    @Override
+    protected int updatePosition( int offset, int max_offset ) {
+        int x = bi.updatePosition(offset, max_offset);
+        i_position = bi.position;
+        return x;
+    }
+
+
+    /**
+     * Pass new target to instruction.
+     */
+    public void setTarget( InstructionHandle ih ) {
+        bi.setTarget(ih);
+    }
+
+
+    /**
+     * Update target of instruction.
+     */
+    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
+        bi.updateTarget(old_ih, new_ih);
+    }
+
+
+    /**
+     * @return target of instruction.
+     */
+    public InstructionHandle getTarget() {
+        return bi.getTarget();
+    }
+
+
+    /** 
+     * Set new contents. Old instruction is disposed and may not be used anymore.
+     */
+    @Override
+    public void setInstruction( Instruction i ) {
+        super.setInstruction(i);
+        if (!(i instanceof BranchInstruction)) {
+            throw new ClassGenException("Assigning " + i
+                    + " to branch handle which is not a branch instruction");
+        }
+        bi = (BranchInstruction) i;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/BranchInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/BranchInstruction.java
new file mode 100644
index 0000000..faa6767
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/BranchInstruction.java
@@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * Abstract super class for branching instructions like GOTO, IFEQ, etc..
+ * Branch instructions may have a variable length, namely GOTO, JSR, 
+ * LOOKUPSWITCH and TABLESWITCH.
+ *
+ * @see InstructionList
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class BranchInstruction extends Instruction implements InstructionTargeter {
+
+    private static final long serialVersionUID = 3225905281842405051L;
+    protected int index; // Branch target relative to this instruction
+    protected InstructionHandle target; // Target object in instruction list
+    protected int position; // Byte code offset
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    BranchInstruction() {
+    }
+
+
+    /** Common super constructor
+     * @param opcode Instruction opcode
+     * @param target instruction to branch to
+     */
+    protected BranchInstruction(short opcode, InstructionHandle target) {
+        super(opcode, (short) 3);
+        setTarget(target);
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode);
+        index = getTargetOffset();
+        if (Math.abs(index) >= 32767) {
+            throw new ClassGenException("Branch target offset too large for short: " + index);
+        }
+        out.writeShort(index); // May be negative, i.e., point backwards
+    }
+
+
+    /**
+     * @param _target branch target
+     * @return the offset to  `target' relative to this instruction
+     */
+    protected int getTargetOffset( InstructionHandle _target ) {
+        if (_target == null) {
+            throw new ClassGenException("Target of " + super.toString(true)
+                    + " is invalid null handle");
+        }
+        int t = _target.getPosition();
+        if (t < 0) {
+            throw new ClassGenException("Invalid branch target position offset for "
+                    + super.toString(true) + ":" + t + ":" + _target);
+        }
+        return t - position;
+    }
+
+
+    /**
+     * @return the offset to this instruction's target
+     */
+    protected int getTargetOffset() {
+        return getTargetOffset(target);
+    }
+
+
+    /**
+     * Called by InstructionList.setPositions when setting the position for every
+     * instruction. In the presence of variable length instructions `setPositions'
+     * performs multiple passes over the instruction list to calculate the
+     * correct (byte) positions and offsets by calling this function.
+     *
+     * @param offset additional offset caused by preceding (variable length) instructions
+     * @param max_offset the maximum offset that may be caused by these instructions
+     * @return additional offset caused by possible change of this instruction's length
+     */
+    protected int updatePosition( int offset, int max_offset ) {
+        position += offset;
+        return 0;
+    }
+
+
+    /**
+     * Long output format:
+     *
+     * &lt;position in byte code&gt;
+     * &lt;name of opcode&gt; "["&lt;opcode number&gt;"]" 
+     * "("&lt;length of instruction&gt;")"
+     * "&lt;"&lt;target instruction&gt;"&gt;" "@"&lt;branch target offset&gt;
+     *
+     * @param verbose long/short format switch
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        String s = super.toString(verbose);
+        String t = "null";
+        if (verbose) {
+            if (target != null) {
+                if (target.getInstruction() == this) {
+                    t = "<points to itself>";
+                } else if (target.getInstruction() == null) {
+                    t = "<null instruction!!!?>";
+                } else {
+                    t = target.getInstruction().toString(false); // Avoid circles
+                }
+            }
+        } else {
+            if (target != null) {
+                index = getTargetOffset();
+                t = "" + (index + position);
+            }
+        }
+        return s + " -> " + t;
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file. Conversion to a InstructionHandle
+     * is done in InstructionList(byte[]).
+     *
+     * @param bytes input stream
+     * @param wide wide prefix?
+     * @see InstructionList
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        length = 3;
+        index = bytes.readShort();
+    }
+
+
+    /**
+     * @return target offset in byte code
+     */
+    public final int getIndex() {
+        return index;
+    }
+
+
+    /**
+     * @return target of branch instruction
+     */
+    public InstructionHandle getTarget() {
+        return target;
+    }
+
+
+    /**
+     * Set branch target
+     * @param target branch target
+     */
+    public void setTarget( InstructionHandle target ) {
+        notifyTarget(this.target, target, this);
+        this.target = target;
+    }
+
+
+    /**
+     * Used by BranchInstruction, LocalVariableGen, CodeExceptionGen
+     */
+    static void notifyTarget( InstructionHandle old_ih, InstructionHandle new_ih,
+            InstructionTargeter t ) {
+        if (old_ih != null) {
+            old_ih.removeTargeter(t);
+        }
+        if (new_ih != null) {
+            new_ih.addTargeter(t);
+        }
+    }
+
+
+    /**
+     * @param old_ih old target
+     * @param new_ih new target
+     */
+    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
+        if (target == old_ih) {
+            setTarget(new_ih);
+        } else {
+            throw new ClassGenException("Not targeting " + old_ih + ", but " + target);
+        }
+    }
+
+
+    /**
+     * @return true, if ih is target of this instruction
+     */
+    public boolean containsTarget( InstructionHandle ih ) {
+        return (target == ih);
+    }
+
+
+    /**
+     * Inform target that it's not targeted anymore.
+     */
+    @Override
+    void dispose() {
+        setTarget(null);
+        index = -1;
+        position = -1;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/CALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/CALOAD.java
new file mode 100644
index 0000000..f581c75
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/CALOAD.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * CALOAD - Load char from array
+ * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class CALOAD extends ArrayInstruction implements StackProducer {
+
+    private static final long serialVersionUID = -2085721349377637959L;
+
+
+    /** Load char from array
+     */
+    public CALOAD() {
+        super(org.apache.commons.bcel6.Constants.CALOAD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitCALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/CASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/CASTORE.java
new file mode 100644
index 0000000..1bc094f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/CASTORE.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * CASTORE -  Store into char array
+ * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class CASTORE extends ArrayInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = -4021755905444053495L;
+
+
+    /** Store char into array
+     */
+    public CASTORE() {
+        super(org.apache.commons.bcel6.Constants.CASTORE);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitCASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/CHECKCAST.java b/src/main/java/org/apache/commons/bcel6/generic/CHECKCAST.java
new file mode 100644
index 0000000..6d69396
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/CHECKCAST.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * CHECKCAST - Check whether object is of given type
+ * <PRE>Stack: ..., objectref -&gt; ..., objectref</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class CHECKCAST extends CPInstruction implements LoadClass, ExceptionThrower, StackProducer,
+        StackConsumer {
+
+    private static final long serialVersionUID = 1227128733786393518L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    CHECKCAST() {
+    }
+
+
+    /** Check whether object is of given type
+     * @param index index to class in constant pool
+     */
+    public CHECKCAST(int index) {
+        super(org.apache.commons.bcel6.Constants.CHECKCAST, index);
+    }
+
+
+    /** @return exceptions this instruction may cause
+     */
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.CLASS_CAST_EXCEPTION;
+        return cs;
+    }
+
+
+    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
+        Type t = getType(cpg);
+        if (t instanceof ArrayType) {
+            t = ((ArrayType) t).getBasicType();
+        }
+        return (t instanceof ObjectType) ? (ObjectType) t : null;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitLoadClass(this);
+        v.visitExceptionThrower(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitTypedInstruction(this);
+        v.visitCPInstruction(this);
+        v.visitCHECKCAST(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/CPInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/CPInstruction.java
new file mode 100644
index 0000000..ab9cab1
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/CPInstruction.java
@@ -0,0 +1,145 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * Abstract super class for instructions that use an index into the 
+ * constant pool such as LDC, INVOKEVIRTUAL, etc.
+ *
+ * @see ConstantPoolGen
+ * @see LDC
+ * @see INVOKEVIRTUAL
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class CPInstruction extends Instruction implements TypedInstruction,
+        IndexedInstruction {
+
+    private static final long serialVersionUID = 2968547649792233082L;
+    protected int index; // index to constant pool
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    CPInstruction() {
+    }
+
+
+    /**
+     * @param index to constant pool
+     */
+    protected CPInstruction(short opcode, int index) {
+        super(opcode, (short) 3);
+        setIndex(index);
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode);
+        out.writeShort(index);
+    }
+
+
+    /**
+     * Long output format:
+     *
+     * &lt;name of opcode&gt; "["&lt;opcode number&gt;"]" 
+     * "("&lt;length of instruction&gt;")" "&lt;"&lt; constant pool index&gt;"&gt;"
+     *
+     * @param verbose long/short format switch
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        return super.toString(verbose) + " " + index;
+    }
+
+
+    /**
+     * @return mnemonic for instruction with symbolic references resolved
+     */
+    @Override
+    public String toString( ConstantPool cp ) {
+        Constant c = cp.getConstant(index);
+        String str = cp.constantToString(c);
+        if (c instanceof ConstantClass) {
+            str = str.replace('.', '/');
+        }
+        return org.apache.commons.bcel6.Constants.OPCODE_NAMES[opcode] + " " + str;
+    }
+
+
+    /**
+     * Read needed data (i.e., index) from file.
+     * @param bytes input stream
+     * @param wide wide prefix?
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        setIndex(bytes.readUnsignedShort());
+        length = 3;
+    }
+
+
+    /**
+     * @return index in constant pool referred by this instruction.
+     */
+    public final int getIndex() {
+        return index;
+    }
+
+
+    /**
+     * Set the index to constant pool.
+     * @param index in  constant pool.
+     */
+    public void setIndex( int index ) {
+        if (index < 0) {
+            throw new ClassGenException("Negative index value: " + index);
+        }
+        this.index = index;
+    }
+
+
+    /** @return type related with this instruction.
+     */
+    public Type getType( ConstantPoolGen cpg ) {
+        ConstantPool cp = cpg.getConstantPool();
+        String name = cp.getConstantString(index, org.apache.commons.bcel6.Constants.CONSTANT_Class);
+        if (!name.startsWith("[")) {
+            name = "L" + name + ";";
+        }
+        return Type.getType(name);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ClassElementValueGen.java b/src/main/java/org/apache/commons/bcel6/generic/ClassElementValueGen.java
new file mode 100644
index 0000000..5870f5f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ClassElementValueGen.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.ClassElementValue;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ElementValue;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.ElementValueGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+
+/**
+ * @since 6.0
+ */
+public class ClassElementValueGen extends ElementValueGen
+{
+    // For primitive types and string type, this points to the value entry in
+    // the cpool
+    // For 'class' this points to the class entry in the cpool
+    private int idx;
+
+    protected ClassElementValueGen(int typeIdx, ConstantPoolGen cpool)
+    {
+        super(ElementValueGen.CLASS, cpool);
+        this.idx = typeIdx;
+    }
+
+    public ClassElementValueGen(ObjectType t, ConstantPoolGen cpool)
+    {
+        super(ElementValueGen.CLASS, cpool);
+        // this.idx = cpool.addClass(t);
+        idx = cpool.addUtf8(t.getSignature());
+    }
+
+    /**
+     * Return immutable variant of this ClassElementValueGen
+     */
+    @Override
+    public ElementValue getElementValue()
+    {
+        return new ClassElementValue(type, idx, cpGen.getConstantPool());
+    }
+
+    public ClassElementValueGen(ClassElementValue value, ConstantPoolGen cpool,
+            boolean copyPoolEntries)
+    {
+        super(CLASS, cpool);
+        if (copyPoolEntries)
+        {
+            // idx = cpool.addClass(value.getClassString());
+            idx = cpool.addUtf8(value.getClassString());
+        }
+        else
+        {
+            idx = value.getIndex();
+        }
+    }
+
+    public int getIndex()
+    {
+        return idx;
+    }
+
+    public String getClassString()
+    {
+        ConstantUtf8 cu8 = (ConstantUtf8) getConstantPool().getConstant(idx);
+        return cu8.getBytes();
+        // ConstantClass c = (ConstantClass)getConstantPool().getConstant(idx);
+        // ConstantUtf8 utf8 =
+        // (ConstantUtf8)getConstantPool().getConstant(c.getNameIndex());
+        // return utf8.getBytes();
+    }
+
+    @Override
+    public String stringifyValue()
+    {
+        return getClassString();
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 kind of value
+        dos.writeShort(idx);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ClassGen.java b/src/main/java/org/apache/commons/bcel6/generic/ClassGen.java
new file mode 100644
index 0000000..917bc4c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ClassGen.java
@@ -0,0 +1,606 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.AccessFlags;
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.Annotations;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.RuntimeInvisibleAnnotations;
+import org.apache.commons.bcel6.classfile.RuntimeVisibleAnnotations;
+import org.apache.commons.bcel6.classfile.SourceFile;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.util.BCELComparator;
+
+/** 
+ * Template class for building up a java class. May be initialized with an
+ * existing java class (file).
+ *
+ * @see JavaClass
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ClassGen extends AccessFlags implements Cloneable {
+
+    private static final long serialVersionUID = 6880879387392827211L;
+    /* Corresponds to the fields found in a JavaClass object.
+     */
+    private String class_name, super_class_name;
+    private final String file_name;
+    private int class_name_index = -1, superclass_name_index = -1;
+    private int major = Constants.MAJOR_1_1, minor = Constants.MINOR_1_1;
+    private ConstantPoolGen cp; // Template for building up constant pool
+    // ArrayLists instead of arrays to gather fields, methods, etc.
+    private final List<Field> field_vec = new ArrayList<Field>();
+    private final List<Method> method_vec = new ArrayList<Method>();
+    private final List<Attribute> attribute_vec = new ArrayList<Attribute>();
+    private final List<String> interface_vec = new ArrayList<String>();
+    private final List<AnnotationEntryGen> annotation_vec = new ArrayList<AnnotationEntryGen>();
+
+    private static BCELComparator _cmp = new BCELComparator() {
+
+        public boolean equals( Object o1, Object o2 ) {
+            ClassGen THIS = (ClassGen) o1;
+            ClassGen THAT = (ClassGen) o2;
+            return THIS.getClassName().equals(THAT.getClassName());
+        }
+
+
+        public int hashCode( Object o ) {
+            ClassGen THIS = (ClassGen) o;
+            return THIS.getClassName().hashCode();
+        }
+    };
+
+
+    /** Convenience constructor to set up some important values initially.
+     *
+     * @param class_name fully qualified class name
+     * @param super_class_name fully qualified superclass name
+     * @param file_name source file name
+     * @param access_flags access qualifiers
+     * @param interfaces implemented interfaces
+     * @param cp constant pool to use
+     */
+    public ClassGen(String class_name, String super_class_name, String file_name, int access_flags,
+            String[] interfaces, ConstantPoolGen cp) {
+        this.class_name = class_name;
+        this.super_class_name = super_class_name;
+        this.file_name = file_name;
+        this.access_flags = access_flags;
+        this.cp = cp;
+        // Put everything needed by default into the constant pool and the vectors
+        if (file_name != null) {
+            addAttribute(new SourceFile(cp.addUtf8("SourceFile"), 2, cp.addUtf8(file_name), cp
+                    .getConstantPool()));
+        }
+        class_name_index = cp.addClass(class_name);
+        superclass_name_index = cp.addClass(super_class_name);
+        if (interfaces != null) {
+            for (String interface1 : interfaces) {
+                addInterface(interface1);
+            }
+        }
+    }
+
+
+    /** Convenience constructor to set up some important values initially.
+     *
+     * @param class_name fully qualified class name
+     * @param super_class_name fully qualified superclass name
+     * @param file_name source file name
+     * @param access_flags access qualifiers
+     * @param interfaces implemented interfaces
+     */
+    public ClassGen(String class_name, String super_class_name, String file_name, int access_flags,
+            String[] interfaces) {
+        this(class_name, super_class_name, file_name, access_flags, interfaces,
+                new ConstantPoolGen());
+    }
+
+
+    /**
+     * Initialize with existing class.
+     * @param clazz JavaClass object (e.g. read from file)
+     */
+    public ClassGen(JavaClass clazz) {
+        class_name_index = clazz.getClassNameIndex();
+        superclass_name_index = clazz.getSuperclassNameIndex();
+        class_name = clazz.getClassName();
+        super_class_name = clazz.getSuperclassName();
+        file_name = clazz.getSourceFileName();
+        access_flags = clazz.getAccessFlags();
+        cp = new ConstantPoolGen(clazz.getConstantPool());
+        major = clazz.getMajor();
+        minor = clazz.getMinor();
+        Attribute[] attributes = clazz.getAttributes();
+        // J5TODO: Could make unpacking lazy, done on first reference
+        AnnotationEntryGen[] annotations = unpackAnnotations(attributes);
+        Method[] methods = clazz.getMethods();
+        Field[] fields = clazz.getFields();
+        String[] interfaces = clazz.getInterfaceNames();
+        for (String interface1 : interfaces) {
+            addInterface(interface1);
+        }
+        for (Attribute attribute : attributes) {
+            if (!(attribute instanceof Annotations)) {
+                addAttribute(attribute);
+            }
+        }
+        for (AnnotationEntryGen annotation : annotations) {
+            addAnnotationEntry(annotation);
+        }
+        for (Method method : methods) {
+            addMethod(method);
+        }
+        for (Field field : fields) {
+            addField(field);
+        }
+    }
+
+    /**
+     * Look for attributes representing annotations and unpack them.
+     */
+    private AnnotationEntryGen[] unpackAnnotations(Attribute[] attrs)
+    {
+        List<AnnotationEntryGen> annotationGenObjs = new ArrayList<AnnotationEntryGen>();
+        for (Attribute attr : attrs) {
+            if (attr instanceof RuntimeVisibleAnnotations)
+            {
+                RuntimeVisibleAnnotations rva = (RuntimeVisibleAnnotations) attr;
+                AnnotationEntry[] annos = rva.getAnnotationEntries();
+                for (AnnotationEntry a : annos) {
+                    annotationGenObjs.add(new AnnotationEntryGen(a,
+                            getConstantPool(), false));
+                }
+            }
+            else
+                if (attr instanceof RuntimeInvisibleAnnotations)
+                {
+                    RuntimeInvisibleAnnotations ria = (RuntimeInvisibleAnnotations) attr;
+                    AnnotationEntry[] annos = ria.getAnnotationEntries();
+                    for (AnnotationEntry a : annos) {
+                        annotationGenObjs.add(new AnnotationEntryGen(a,
+                                getConstantPool(), false));
+                    }
+                }
+        }
+        return annotationGenObjs.toArray(new AnnotationEntryGen[annotationGenObjs.size()]);
+    }
+
+
+    /**
+     * @return the (finally) built up Java class object.
+     */
+    public JavaClass getJavaClass() {
+        int[] interfaces = getInterfaces();
+        Field[] fields = getFields();
+        Method[] methods = getMethods();
+        Attribute[] attributes = null;
+        if (annotation_vec.isEmpty()) {
+            attributes = getAttributes();
+        } else {
+            // TODO: Sometime later, trash any attributes called 'RuntimeVisibleAnnotations' or 'RuntimeInvisibleAnnotations'
+            Attribute[] annAttributes  = AnnotationEntryGen.getAnnotationAttributes(cp,annotation_vec);
+            attributes = new Attribute[attribute_vec.size()+annAttributes.length];
+            attribute_vec.toArray(attributes);
+            System.arraycopy(annAttributes,0,attributes,attribute_vec.size(),annAttributes.length);       
+        }
+        // Must be last since the above calls may still add something to it
+        ConstantPool _cp = this.cp.getFinalConstantPool();
+        return new JavaClass(class_name_index, superclass_name_index, file_name, major, minor,
+                access_flags, _cp, interfaces, fields, methods, attributes);
+    }
+
+
+    /**
+     * Add an interface to this class, i.e., this class has to implement it.
+     * @param name interface to implement (fully qualified class name)
+     */
+    public void addInterface( String name ) {
+        interface_vec.add(name);
+    }
+
+
+    /**
+     * Remove an interface from this class.
+     * @param name interface to remove (fully qualified name)
+     */
+    public void removeInterface( String name ) {
+        interface_vec.remove(name);
+    }
+
+
+    /**
+     * @return major version number of class file
+     */
+    public int getMajor() {
+        return major;
+    }
+
+
+    /** Set major version number of class file, default value is 45 (JDK 1.1)
+     * @param major major version number
+     */
+    public void setMajor( int major ) {
+        this.major = major;
+    }
+
+
+    /** Set minor version number of class file, default value is 3 (JDK 1.1)
+     * @param minor minor version number
+     */
+    public void setMinor( int minor ) {
+        this.minor = minor;
+    }
+
+
+    /**
+     * @return minor version number of class file
+     */
+    public int getMinor() {
+        return minor;
+    }
+
+
+    /**
+     * Add an attribute to this class.
+     * @param a attribute to add
+     */
+    public void addAttribute( Attribute a ) {
+        attribute_vec.add(a);
+    }
+
+    public void addAnnotationEntry(AnnotationEntryGen a) { 
+        annotation_vec.add(a); 
+    }
+
+
+    /**
+     * Add a method to this class.
+     * @param m method to add
+     */
+    public void addMethod( Method m ) {
+        method_vec.add(m);
+    }
+
+
+    /**
+     * Convenience method.
+     *
+     * Add an empty constructor to this class that does nothing but calling super().
+     * @param access_flags rights for constructor
+     */
+    public void addEmptyConstructor( int access_flags ) {
+        InstructionList il = new InstructionList();
+        il.append(InstructionConstants.THIS); // Push `this'
+        il.append(new INVOKESPECIAL(cp.addMethodref(super_class_name, "<init>", "()V")));
+        il.append(InstructionConstants.RETURN);
+        MethodGen mg = new MethodGen(access_flags, Type.VOID, Type.NO_ARGS, null, "<init>",
+                class_name, il, cp);
+        mg.setMaxStack(1);
+        addMethod(mg.getMethod());
+    }
+
+
+    /**
+     * Add a field to this class.
+     * @param f field to add
+     */
+    public void addField( Field f ) {
+        field_vec.add(f);
+    }
+
+
+    public boolean containsField( Field f ) {
+        return field_vec.contains(f);
+    }
+
+
+    /** @return field object with given name, or null
+     */
+    public Field containsField( String name ) {
+        for (Field f : field_vec) {
+            if (f.getName().equals(name)) {
+                return f;
+            }
+        }
+        return null;
+    }
+
+
+    /** @return method object with given name and signature, or null
+     */
+    public Method containsMethod( String name, String signature ) {
+        for (Method m : method_vec) {
+            if (m.getName().equals(name) && m.getSignature().equals(signature)) {
+                return m;
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * Remove an attribute from this class.
+     * @param a attribute to remove
+     */
+    public void removeAttribute( Attribute a ) {
+        attribute_vec.remove(a);
+    }
+
+
+    /**
+     * Remove a method from this class.
+     * @param m method to remove
+     */
+    public void removeMethod( Method m ) {
+        method_vec.remove(m);
+    }
+
+
+    /** Replace given method with new one. If the old one does not exist
+     * add the new_ method to the class anyway.
+     */
+    public void replaceMethod( Method old, Method new_ ) {
+        if (new_ == null) {
+            throw new ClassGenException("Replacement method must not be null");
+        }
+        int i = method_vec.indexOf(old);
+        if (i < 0) {
+            method_vec.add(new_);
+        } else {
+            method_vec.set(i, new_);
+        }
+    }
+
+
+    /** Replace given field with new one. If the old one does not exist
+     * add the new_ field to the class anyway.
+     */
+    public void replaceField( Field old, Field new_ ) {
+        if (new_ == null) {
+            throw new ClassGenException("Replacement method must not be null");
+        }
+        int i = field_vec.indexOf(old);
+        if (i < 0) {
+            field_vec.add(new_);
+        } else {
+            field_vec.set(i, new_);
+        }
+    }
+
+
+    /**
+     * Remove a field to this class.
+     * @param f field to remove
+     */
+    public void removeField( Field f ) {
+        field_vec.remove(f);
+    }
+
+
+    public String getClassName() {
+        return class_name;
+    }
+
+
+    public String getSuperclassName() {
+        return super_class_name;
+    }
+
+
+    public String getFileName() {
+        return file_name;
+    }
+
+
+    public void setClassName( String name ) {
+        class_name = name.replace('/', '.');
+        class_name_index = cp.addClass(name);
+    }
+
+
+    public void setSuperclassName( String name ) {
+        super_class_name = name.replace('/', '.');
+        superclass_name_index = cp.addClass(name);
+    }
+
+
+    public Method[] getMethods() {
+        return method_vec.toArray(new Method[method_vec.size()]);
+    }
+
+
+    public void setMethods( Method[] methods ) {
+        method_vec.clear();
+        for (Method method : methods) {
+            addMethod(method);
+        }
+    }
+
+
+    public void setMethodAt( Method method, int pos ) {
+        method_vec.set(pos, method);
+    }
+
+
+    public Method getMethodAt( int pos ) {
+        return method_vec.get(pos);
+    }
+
+
+    public String[] getInterfaceNames() {
+        int size = interface_vec.size();
+        String[] interfaces = new String[size];
+        interface_vec.toArray(interfaces);
+        return interfaces;
+    }
+
+
+    public int[] getInterfaces() {
+        int size = interface_vec.size();
+        int[] interfaces = new int[size];
+        for (int i = 0; i < size; i++) {
+            interfaces[i] = cp.addClass(interface_vec.get(i));
+        }
+        return interfaces;
+    }
+
+
+    public Field[] getFields() {
+        return field_vec.toArray(new Field[field_vec.size()]);
+    }
+
+
+    public Attribute[] getAttributes() {
+        return attribute_vec.toArray(new Attribute[attribute_vec.size()]);
+    }
+
+    //  J5TODO: Should we make calling unpackAnnotations() lazy and put it in here?
+    public AnnotationEntryGen[] getAnnotationEntries() {
+        return annotation_vec.toArray(new AnnotationEntryGen[annotation_vec.size()]);
+    }
+
+
+    public ConstantPoolGen getConstantPool() {
+        return cp;
+    }
+
+
+    public void setConstantPool( ConstantPoolGen constant_pool ) {
+        cp = constant_pool;
+    }
+
+
+    public void setClassNameIndex( int class_name_index ) {
+        this.class_name_index = class_name_index;
+        class_name = cp.getConstantPool().getConstantString(class_name_index,
+                Constants.CONSTANT_Class).replace('/', '.');
+    }
+
+
+    public void setSuperclassNameIndex( int superclass_name_index ) {
+        this.superclass_name_index = superclass_name_index;
+        super_class_name = cp.getConstantPool().getConstantString(superclass_name_index,
+                Constants.CONSTANT_Class).replace('/', '.');
+    }
+
+
+    public int getSuperclassNameIndex() {
+        return superclass_name_index;
+    }
+
+
+    public int getClassNameIndex() {
+        return class_name_index;
+    }
+
+    private List<ClassObserver> observers;
+
+
+    /** Add observer for this object.
+     */
+    public void addObserver( ClassObserver o ) {
+        if (observers == null) {
+            observers = new ArrayList<ClassObserver>();
+        }
+        observers.add(o);
+    }
+
+
+    /** Remove observer for this object.
+     */
+    public void removeObserver( ClassObserver o ) {
+        if (observers != null) {
+            observers.remove(o);
+        }
+    }
+
+
+    /** Call notify() method on all observers. This method is not called
+     * automatically whenever the state has changed, but has to be
+     * called by the user after he has finished editing the object.
+     */
+    public void update() {
+        if (observers != null) {
+            for (ClassObserver observer : observers) {
+                observer.notify(this);
+            }
+        }
+    }
+
+
+    @Override
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new Error("Clone Not Supported"); // never happens
+        }
+    }
+
+
+    /**
+     * @return Comparison strategy object
+     */
+    public static BCELComparator getComparator() {
+        return _cmp;
+    }
+
+
+    /**
+     * @param comparator Comparison strategy object
+     */
+    public static void setComparator( BCELComparator comparator ) {
+        _cmp = comparator;
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default two ClassGen objects are said to be equal when
+     * their class names are equal.
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        return _cmp.equals(this, obj);
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default return the hashcode of the class name.
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return _cmp.hashCode(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ClassGenException.java b/src/main/java/org/apache/commons/bcel6/generic/ClassGenException.java
new file mode 100644
index 0000000..7376f86
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ClassGenException.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * Thrown on internal errors. Extends RuntimeException so it hasn't to be declared
+ * in the throws clause every time.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ClassGenException extends RuntimeException {
+
+    private static final long serialVersionUID = 7247369755051242791L;
+
+    public ClassGenException() {
+        super();
+    }
+
+
+    public ClassGenException(String s) {
+        super(s);
+    }
+
+    public ClassGenException(String s, Throwable initCause) {
+        super(s, initCause);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ClassObserver.java b/src/main/java/org/apache/commons/bcel6/generic/ClassObserver.java
new file mode 100644
index 0000000..4410f1a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ClassObserver.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Implement this interface if you're interested in changes to a ClassGen object
+ * and register yourself with addObserver().
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface ClassObserver {
+
+    void notify( ClassGen clazz );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/CodeExceptionGen.java b/src/main/java/org/apache/commons/bcel6/generic/CodeExceptionGen.java
new file mode 100644
index 0000000..391be30
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/CodeExceptionGen.java
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.classfile.CodeException;
+
+/** 
+ * This class represents an exception handler, i.e., specifies the  region where
+ * a handler is active and an instruction where the actual handling is done.
+ * pool as parameters. Opposed to the JVM specification the end of the handled
+ * region is set to be inclusive, i.e. all instructions between start and end
+ * are protected including the start and end instructions (handles) themselves.
+ * The end of the region is automatically mapped to be exclusive when calling
+ * getCodeException(), i.e., there is no difference semantically.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     MethodGen
+ * @see     CodeException
+ * @see     InstructionHandle
+ */
+public final class CodeExceptionGen implements InstructionTargeter, Cloneable, java.io.Serializable {
+
+    private static final long serialVersionUID = 6548901422158960190L;
+    private InstructionHandle start_pc;
+    private InstructionHandle end_pc;
+    private InstructionHandle handler_pc;
+    private ObjectType catch_type;
+
+
+    /**
+     * Add an exception handler, i.e., specify region where a handler is active and an
+     * instruction where the actual handling is done.
+     *
+     * @param start_pc Start of handled region (inclusive)
+     * @param end_pc End of handled region (inclusive)
+     * @param handler_pc Where handling is done
+     * @param catch_type which exception is handled, null for ANY
+     */
+    public CodeExceptionGen(InstructionHandle start_pc, InstructionHandle end_pc,
+            InstructionHandle handler_pc, ObjectType catch_type) {
+        setStartPC(start_pc);
+        setEndPC(end_pc);
+        setHandlerPC(handler_pc);
+        this.catch_type = catch_type;
+    }
+
+
+    /**
+     * Get CodeException object.<BR>
+     *
+     * This relies on that the instruction list has already been dumped
+     * to byte code or or that the `setPositions' methods has been
+     * called for the instruction list.
+     *
+     * @param cp constant pool
+     */
+    public CodeException getCodeException( ConstantPoolGen cp ) {
+        return new CodeException(start_pc.getPosition(), end_pc.getPosition()
+                + end_pc.getInstruction().getLength(), handler_pc.getPosition(),
+                (catch_type == null) ? 0 : cp.addClass(catch_type));
+    }
+
+
+    /* Set start of handler 
+     * @param start_pc Start of handled region (inclusive)
+     */
+    public void setStartPC( InstructionHandle start_pc ) {
+        BranchInstruction.notifyTarget(this.start_pc, start_pc, this);
+        this.start_pc = start_pc;
+    }
+
+
+    /* Set end of handler 
+     * @param end_pc End of handled region (inclusive)
+     */
+    public void setEndPC( InstructionHandle end_pc ) {
+        BranchInstruction.notifyTarget(this.end_pc, end_pc, this);
+        this.end_pc = end_pc;
+    }
+
+
+    /* Set handler code
+     * @param handler_pc Start of handler
+     */
+    public void setHandlerPC( InstructionHandle handler_pc ) {
+        BranchInstruction.notifyTarget(this.handler_pc, handler_pc, this);
+        this.handler_pc = handler_pc;
+    }
+
+
+    /**
+     * @param old_ih old target, either start or end
+     * @param new_ih new target
+     */
+    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
+        boolean targeted = false;
+        if (start_pc == old_ih) {
+            targeted = true;
+            setStartPC(new_ih);
+        }
+        if (end_pc == old_ih) {
+            targeted = true;
+            setEndPC(new_ih);
+        }
+        if (handler_pc == old_ih) {
+            targeted = true;
+            setHandlerPC(new_ih);
+        }
+        if (!targeted) {
+            throw new ClassGenException("Not targeting " + old_ih + ", but {" + start_pc + ", "
+                    + end_pc + ", " + handler_pc + "}");
+        }
+    }
+
+
+    /**
+     * @return true, if ih is target of this handler
+     */
+    public boolean containsTarget( InstructionHandle ih ) {
+        return (start_pc == ih) || (end_pc == ih) || (handler_pc == ih);
+    }
+
+
+    /** Sets the type of the Exception to catch. Set 'null' for ANY. */
+    public void setCatchType( ObjectType catch_type ) {
+        this.catch_type = catch_type;
+    }
+
+
+    /** Gets the type of the Exception to catch, 'null' for ANY. */
+    public ObjectType getCatchType() {
+        return catch_type;
+    }
+
+
+    /** @return start of handled region (inclusive)
+     */
+    public InstructionHandle getStartPC() {
+        return start_pc;
+    }
+
+
+    /** @return end of handled region (inclusive)
+     */
+    public InstructionHandle getEndPC() {
+        return end_pc;
+    }
+
+
+    /** @return start of handler
+     */
+    public InstructionHandle getHandlerPC() {
+        return handler_pc;
+    }
+
+
+    @Override
+    public String toString() {
+        return "CodeExceptionGen(" + start_pc + ", " + end_pc + ", " + handler_pc + ")";
+    }
+
+
+    @Override
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new Error("Clone Not Supported"); // never happens
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/CompoundInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/CompoundInstruction.java
new file mode 100644
index 0000000..4ee94fb
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/CompoundInstruction.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Wrapper class for `compound' operations, virtual instructions that
+ * don't exist as byte code, but give a useful meaning. For example,
+ * the (virtual) PUSH instruction takes an arbitray argument and produces the
+ * appropiate code at dump time (ICONST, LDC, BIPUSH, ...). Also you can use the
+ * SWITCH instruction as a useful template for either LOOKUPSWITCH or
+ * TABLESWITCH.
+ *
+ * The interface provides the possibilty for the user to write
+ * `templates' or `macros' for such reuseable code patterns.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see PUSH
+ * @see SWITCH
+ */
+public interface CompoundInstruction {
+
+    InstructionList getInstructionList();
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ConstantPoolGen.java b/src/main/java/org/apache/commons/bcel6/generic/ConstantPoolGen.java
new file mode 100644
index 0000000..802e911
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ConstantPoolGen.java
@@ -0,0 +1,800 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantCP;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantDouble;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantFloat;
+import org.apache.commons.bcel6.classfile.ConstantInteger;
+import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
+import org.apache.commons.bcel6.classfile.ConstantInvokeDynamic;
+import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantMethodref;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantString;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+
+/** 
+ * This class is used to build up a constant pool. The user adds
+ * constants via `addXXX' methods, `addString', `addClass',
+ * etc.. These methods return an index into the constant
+ * pool. Finally, `getFinalConstantPool()' returns the constant pool
+ * built up. Intermediate versions of the constant pool can be
+ * obtained with `getConstantPool()'. A constant pool has capacity for
+ * Constants.MAX_SHORT entries. Note that the first (0) is used by the
+ * JVM and that Double and Long constants need two slots.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see Constant
+ */
+public class ConstantPoolGen implements java.io.Serializable {
+
+    private static final long serialVersionUID = 6664071417323174824L;
+    protected int size; 
+    protected Constant[] constants;
+    protected int index = 1; // First entry (0) used by JVM
+    private static final String METHODREF_DELIM = ":";
+    private static final String IMETHODREF_DELIM = "#";
+    private static final String FIELDREF_DELIM = "&";
+    private static final String NAT_DELIM = "%";
+
+    private static class Index implements java.io.Serializable {
+
+        private static final long serialVersionUID = -9187078620578535161L;
+        int index;
+
+
+        Index(int i) {
+            index = i;
+        }
+    }
+
+
+    /**
+     * Initialize with given array of constants.
+     *
+     * @param cs array of given constants, new ones will be appended
+     */
+    public ConstantPoolGen(Constant[] cs) {
+        StringBuilder sb = new StringBuilder(256);
+
+        size = Math.max(256, cs.length + 64);
+        constants = new Constant[size];
+
+        System.arraycopy(cs, 0, constants, 0, cs.length);
+        if (cs.length > 0) {
+            index = cs.length;
+        }
+
+
+        for (int i = 1; i < index; i++) {
+            Constant c = constants[i];
+            if (c instanceof ConstantString) {
+                ConstantString s = (ConstantString) c;
+                ConstantUtf8 u8 = (ConstantUtf8) constants[s.getStringIndex()];
+                String key = u8.getBytes();
+                if (!string_table.containsKey(key)) {
+                    string_table.put(key, new Index(i));
+                }
+            } else if (c instanceof ConstantClass) {
+                ConstantClass s = (ConstantClass) c;
+                ConstantUtf8 u8 = (ConstantUtf8) constants[s.getNameIndex()];
+                String key = u8.getBytes();
+                if (!class_table.containsKey(key)) {
+                    class_table.put(key, new Index(i));
+                }
+            } else if (c instanceof ConstantNameAndType) {
+                ConstantNameAndType n = (ConstantNameAndType) c;
+                ConstantUtf8 u8 = (ConstantUtf8) constants[n.getNameIndex()];
+                ConstantUtf8 u8_2 = (ConstantUtf8) constants[n.getSignatureIndex()];
+
+                sb.append(u8.getBytes());
+                sb.append(NAT_DELIM);
+                sb.append(u8_2.getBytes());
+                String key = sb.toString();
+                sb.delete(0, sb.length());
+
+                if (!n_a_t_table.containsKey(key)) {
+                    n_a_t_table.put(key, new Index(i));
+                }
+            } else if (c instanceof ConstantUtf8) {
+                ConstantUtf8 u = (ConstantUtf8) c;
+                String key = u.getBytes();
+                if (!utf8_table.containsKey(key)) {
+                    utf8_table.put(key, new Index(i));
+                }
+            } else if (c instanceof ConstantCP) {
+                ConstantCP m = (ConstantCP) c;
+                String class_name;
+                ConstantUtf8 u8;
+
+                if (c instanceof ConstantInvokeDynamic) {
+                    class_name = Integer.toString(m.getBootstrapMethodAttrIndex());
+                    // since name can't begin with digit, can  use
+                    // METHODREF_DELIM with out fear of duplicates.
+                } else {
+                ConstantClass clazz = (ConstantClass) constants[m.getClassIndex()];
+                    u8 = (ConstantUtf8) constants[clazz.getNameIndex()];
+                    class_name = u8.getBytes().replace('/', '.');
+                }
+
+                ConstantNameAndType n = (ConstantNameAndType) constants[m.getNameAndTypeIndex()];
+                u8 = (ConstantUtf8) constants[n.getNameIndex()];
+                String method_name = u8.getBytes();
+                u8 = (ConstantUtf8) constants[n.getSignatureIndex()];
+                String signature = u8.getBytes();
+
+                String delim = METHODREF_DELIM;
+                if (c instanceof ConstantInterfaceMethodref) {
+                    delim = IMETHODREF_DELIM;
+                } else if (c instanceof ConstantFieldref) {
+                    delim = FIELDREF_DELIM;
+                }
+
+                sb.append(class_name);
+                sb.append(delim);
+                sb.append(method_name);
+                sb.append(delim);
+                sb.append(signature);
+                String key = sb.toString();
+                sb.delete(0, sb.length());
+
+                if (!cp_table.containsKey(key)) {
+                    cp_table.put(key, new Index(i));
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Initialize with given constant pool.
+     */
+    public ConstantPoolGen(ConstantPool cp) {
+        this(cp.getConstantPool());
+    }
+
+
+    /**
+     * Create empty constant pool.
+     */
+    public ConstantPoolGen() {
+        size = 256;
+        constants = new Constant[size];
+    }
+
+
+    /** Resize internal array of constants.
+     */
+    protected void adjustSize() {
+        if (index + 3 >= size) {
+            Constant[] cs = constants;
+            size *= 2;
+            constants = new Constant[size];
+            System.arraycopy(cs, 0, constants, 0, index);
+        }
+    }
+
+    private final Map<String, Index> string_table = new HashMap<String, Index>();
+
+
+    /** 
+     * Look for ConstantString in ConstantPool containing String `str'.
+     *
+     * @param str String to search for
+     * @return index on success, -1 otherwise
+     */
+    public int lookupString( String str ) {
+        Index index = string_table.get(str);
+        return (index != null) ? index.index : -1;
+    }
+
+
+    /**
+     * Add a new String constant to the ConstantPool, if it is not already in there.
+     *
+     * @param str String to add
+     * @return index of entry
+     */
+    public int addString( String str ) {
+        int ret;
+        if ((ret = lookupString(str)) != -1) {
+            return ret; // Already in CP
+        }
+        int utf8 = addUtf8(str);
+        adjustSize();
+        ConstantString s = new ConstantString(utf8);
+        ret = index;
+        constants[index++] = s;
+        if (!string_table.containsKey(str)) {
+            string_table.put(str, new Index(ret));
+        }
+        return ret;
+    }
+
+    private final Map<String, Index> class_table = new HashMap<String, Index>();
+
+
+    /**
+     * Look for ConstantClass in ConstantPool named `str'.
+     *
+     * @param str String to search for
+     * @return index on success, -1 otherwise
+     */
+    public int lookupClass( String str ) {
+        Index index = class_table.get(str.replace('.', '/'));
+        return (index != null) ? index.index : -1;
+    }
+
+
+    private int addClass_( String clazz ) {
+        int ret;
+        if ((ret = lookupClass(clazz)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        ConstantClass c = new ConstantClass(addUtf8(clazz));
+        ret = index;
+        constants[index++] = c;
+        if (!class_table.containsKey(clazz)) {
+            class_table.put(clazz, new Index(ret));
+        }
+        return ret;
+    }
+
+
+    /**
+     * Add a new Class reference to the ConstantPool, if it is not already in there.
+     *
+     * @param str Class to add
+     * @return index of entry
+     */
+    public int addClass( String str ) {
+        return addClass_(str.replace('.', '/'));
+    }
+
+
+    /**
+     * Add a new Class reference to the ConstantPool for a given type.
+     *
+     * @param type Class to add
+     * @return index of entry
+     */
+    public int addClass( ObjectType type ) {
+        return addClass(type.getClassName());
+    }
+
+
+    /**
+     * Add a reference to an array class (e.g. String[][]) as needed by MULTIANEWARRAY
+     * instruction, e.g. to the ConstantPool.
+     *
+     * @param type type of array class
+     * @return index of entry
+     */
+    public int addArrayClass( ArrayType type ) {
+        return addClass_(type.getSignature());
+    }
+
+
+    /** 
+     * Look for ConstantInteger in ConstantPool.
+     *
+     * @param n integer number to look for
+     * @return index on success, -1 otherwise
+     */
+    public int lookupInteger( int n ) {
+        for (int i = 1; i < index; i++) {
+            if (constants[i] instanceof ConstantInteger) {
+                ConstantInteger c = (ConstantInteger) constants[i];
+                if (c.getBytes() == n) {
+                    return i;
+                }
+            }
+        }
+        return -1;
+    }
+
+
+    /**
+     * Add a new Integer constant to the ConstantPool, if it is not already in there.
+     *
+     * @param n integer number to add
+     * @return index of entry
+     */
+    public int addInteger( int n ) {
+        int ret;
+        if ((ret = lookupInteger(n)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        ret = index;
+        constants[index++] = new ConstantInteger(n);
+        return ret;
+    }
+
+
+    /** 
+     * Look for ConstantFloat in ConstantPool.
+     *
+     * @param n Float number to look for
+     * @return index on success, -1 otherwise
+     */
+    public int lookupFloat( float n ) {
+        int bits = Float.floatToIntBits(n);
+        for (int i = 1; i < index; i++) {
+            if (constants[i] instanceof ConstantFloat) {
+                ConstantFloat c = (ConstantFloat) constants[i];
+                if (Float.floatToIntBits(c.getBytes()) == bits) {
+                    return i;
+                }
+            }
+        }
+        return -1;
+    }
+
+
+    /**
+     * Add a new Float constant to the ConstantPool, if it is not already in there.
+     *
+     * @param n Float number to add
+     * @return index of entry
+     */
+    public int addFloat( float n ) {
+        int ret;
+        if ((ret = lookupFloat(n)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        ret = index;
+        constants[index++] = new ConstantFloat(n);
+        return ret;
+    }
+
+    private final Map<String, Index> utf8_table = new HashMap<String, Index>();
+
+
+    /** 
+     * Look for ConstantUtf8 in ConstantPool.
+     *
+     * @param n Utf8 string to look for
+     * @return index on success, -1 otherwise
+     */
+    public int lookupUtf8( String n ) {
+        Index index = utf8_table.get(n);
+        return (index != null) ? index.index : -1;
+    }
+
+
+    /**
+     * Add a new Utf8 constant to the ConstantPool, if it is not already in there.
+     *
+     * @param n Utf8 string to add
+     * @return index of entry
+     */
+    public int addUtf8( String n ) {
+        int ret;
+        if ((ret = lookupUtf8(n)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        ret = index;
+        constants[index++] = new ConstantUtf8(n);
+        if (!utf8_table.containsKey(n)) {
+            utf8_table.put(n, new Index(ret));
+        }
+        return ret;
+    }
+
+
+    /** 
+     * Look for ConstantLong in ConstantPool.
+     *
+     * @param n Long number to look for
+     * @return index on success, -1 otherwise
+     */
+    public int lookupLong( long n ) {
+        for (int i = 1; i < index; i++) {
+            if (constants[i] instanceof ConstantLong) {
+                ConstantLong c = (ConstantLong) constants[i];
+                if (c.getBytes() == n) {
+                    return i;
+                }
+            }
+        }
+        return -1;
+    }
+
+
+    /**
+     * Add a new long constant to the ConstantPool, if it is not already in there.
+     *
+     * @param n Long number to add
+     * @return index of entry
+     */
+    public int addLong( long n ) {
+        int ret;
+        if ((ret = lookupLong(n)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        ret = index;
+        constants[index] = new ConstantLong(n);
+        index += 2; // Wastes one entry according to spec
+        return ret;
+    }
+
+
+    /** 
+     * Look for ConstantDouble in ConstantPool.
+     *
+     * @param n Double number to look for
+     * @return index on success, -1 otherwise
+     */
+    public int lookupDouble( double n ) {
+        long bits = Double.doubleToLongBits(n);
+        for (int i = 1; i < index; i++) {
+            if (constants[i] instanceof ConstantDouble) {
+                ConstantDouble c = (ConstantDouble) constants[i];
+                if (Double.doubleToLongBits(c.getBytes()) == bits) {
+                    return i;
+                }
+            }
+        }
+        return -1;
+    }
+
+
+    /**
+     * Add a new double constant to the ConstantPool, if it is not already in there.
+     *
+     * @param n Double number to add
+     * @return index of entry
+     */
+    public int addDouble( double n ) {
+        int ret;
+        if ((ret = lookupDouble(n)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        ret = index;
+        constants[index] = new ConstantDouble(n);
+        index += 2; // Wastes one entry according to spec
+        return ret;
+    }
+
+    private final Map<String, Index> n_a_t_table = new HashMap<String, Index>();
+
+
+    /** 
+     * Look for ConstantNameAndType in ConstantPool.
+     *
+     * @param name of variable/method
+     * @param signature of variable/method
+     * @return index on success, -1 otherwise
+     */
+    public int lookupNameAndType( String name, String signature ) {
+        Index _index = n_a_t_table.get(name + NAT_DELIM + signature);
+        return (_index != null) ? _index.index : -1;
+    }
+
+
+    /**
+     * Add a new NameAndType constant to the ConstantPool if it is not already 
+     * in there.
+     *
+     * @param name Name string to add
+     * @param signature signature string to add
+     * @return index of entry
+     */
+    public int addNameAndType( String name, String signature ) {
+        int ret;
+        int name_index, signature_index;
+        if ((ret = lookupNameAndType(name, signature)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        name_index = addUtf8(name);
+        signature_index = addUtf8(signature);
+        ret = index;
+        constants[index++] = new ConstantNameAndType(name_index, signature_index);
+        String key = name + NAT_DELIM + signature;
+        if (!n_a_t_table.containsKey(key)) {
+            n_a_t_table.put(key, new Index(ret));
+        }
+        return ret;
+    }
+
+    private final Map<String, Index> cp_table = new HashMap<String, Index>();
+
+
+    /** 
+     * Look for ConstantMethodref in ConstantPool.
+     *
+     * @param class_name Where to find method
+     * @param method_name Guess what
+     * @param signature return and argument types
+     * @return index on success, -1 otherwise
+     */
+    public int lookupMethodref( String class_name, String method_name, String signature ) {
+        Index index = cp_table.get(class_name + METHODREF_DELIM + method_name
+                + METHODREF_DELIM + signature);
+        return (index != null) ? index.index : -1;
+    }
+
+
+    public int lookupMethodref( MethodGen method ) {
+        return lookupMethodref(method.getClassName(), method.getName(), method.getSignature());
+    }
+
+
+    /**
+     * Add a new Methodref constant to the ConstantPool, if it is not already 
+     * in there.
+     *
+     * @param class_name class name string to add
+     * @param method_name method name string to add
+     * @param signature method signature string to add
+     * @return index of entry
+     */
+    public int addMethodref( String class_name, String method_name, String signature ) {
+        int ret, class_index, name_and_type_index;
+        if ((ret = lookupMethodref(class_name, method_name, signature)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        name_and_type_index = addNameAndType(method_name, signature);
+        class_index = addClass(class_name);
+        ret = index;
+        constants[index++] = new ConstantMethodref(class_index, name_and_type_index);
+        String key = class_name + METHODREF_DELIM + method_name + METHODREF_DELIM + signature;
+        if (!cp_table.containsKey(key)) {
+            cp_table.put(key, new Index(ret));
+        }
+        return ret;
+    }
+
+
+    public int addMethodref( MethodGen method ) {
+        return addMethodref(method.getClassName(), method.getName(), method.getSignature());
+    }
+
+
+    /** 
+     * Look for ConstantInterfaceMethodref in ConstantPool.
+     *
+     * @param class_name Where to find method
+     * @param method_name Guess what
+     * @param signature return and argument types
+     * @return index on success, -1 otherwise
+     */
+    public int lookupInterfaceMethodref( String class_name, String method_name, String signature ) {
+        Index index = cp_table.get(class_name + IMETHODREF_DELIM + method_name
+                + IMETHODREF_DELIM + signature);
+        return (index != null) ? index.index : -1;
+    }
+
+
+    public int lookupInterfaceMethodref( MethodGen method ) {
+        return lookupInterfaceMethodref(method.getClassName(), method.getName(), method
+                .getSignature());
+    }
+
+
+    /**
+     * Add a new InterfaceMethodref constant to the ConstantPool, if it is not already 
+     * in there.
+     *
+     * @param class_name class name string to add
+     * @param method_name method name string to add
+     * @param signature signature string to add
+     * @return index of entry
+     */
+    public int addInterfaceMethodref( String class_name, String method_name, String signature ) {
+        int ret, class_index, name_and_type_index;
+        if ((ret = lookupInterfaceMethodref(class_name, method_name, signature)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        class_index = addClass(class_name);
+        name_and_type_index = addNameAndType(method_name, signature);
+        ret = index;
+        constants[index++] = new ConstantInterfaceMethodref(class_index, name_and_type_index);
+        String key = class_name + IMETHODREF_DELIM + method_name + IMETHODREF_DELIM + signature;
+        if (!cp_table.containsKey(key)) {
+            cp_table.put(key, new Index(ret));
+        }
+        return ret;
+    }
+
+
+    public int addInterfaceMethodref( MethodGen method ) {
+        return addInterfaceMethodref(method.getClassName(), method.getName(), method.getSignature());
+    }
+
+
+    /** 
+     * Look for ConstantFieldref in ConstantPool.
+     *
+     * @param class_name Where to find method
+     * @param field_name Guess what
+     * @param signature return and argument types
+     * @return index on success, -1 otherwise
+     */
+    public int lookupFieldref( String class_name, String field_name, String signature ) {
+        Index index = cp_table.get(class_name + FIELDREF_DELIM + field_name
+                + FIELDREF_DELIM + signature);
+        return (index != null) ? index.index : -1;
+    }
+
+
+    /**
+     * Add a new Fieldref constant to the ConstantPool, if it is not already 
+     * in there.
+     *
+     * @param class_name class name string to add
+     * @param field_name field name string to add
+     * @param signature signature string to add
+     * @return index of entry
+     */
+    public int addFieldref( String class_name, String field_name, String signature ) {
+        int ret;
+        int class_index, name_and_type_index;
+        if ((ret = lookupFieldref(class_name, field_name, signature)) != -1) {
+            return ret; // Already in CP
+        }
+        adjustSize();
+        class_index = addClass(class_name);
+        name_and_type_index = addNameAndType(field_name, signature);
+        ret = index;
+        constants[index++] = new ConstantFieldref(class_index, name_and_type_index);
+        String key = class_name + FIELDREF_DELIM + field_name + FIELDREF_DELIM + signature;
+        if (!cp_table.containsKey(key)) {
+            cp_table.put(key, new Index(ret));
+        }
+        return ret;
+    }
+
+
+    /**
+     * @param i index in constant pool
+     * @return constant pool entry at index i
+     */
+    public Constant getConstant( int i ) {
+        return constants[i];
+    }
+
+
+    /**
+     * Use with care!
+     *
+     * @param i index in constant pool
+     * @param c new constant pool entry at index i
+     */
+    public void setConstant( int i, Constant c ) {
+        constants[i] = c;
+    }
+
+
+    /**
+     * @return intermediate constant pool
+     */
+    public ConstantPool getConstantPool() {
+        return new ConstantPool(constants);
+    }
+
+
+    /**
+     * @return current size of constant pool
+     */
+    public int getSize() {
+        return index;
+    }
+
+
+    /**
+     * @return constant pool with proper length
+     */
+    public ConstantPool getFinalConstantPool() {
+        Constant[] cs = new Constant[index];
+        System.arraycopy(constants, 0, cs, 0, index);
+        return new ConstantPool(cs);
+    }
+
+
+    /**
+     * @return String representation.
+     */
+    @Override
+    public String toString() {
+        StringBuilder buf = new StringBuilder();
+        for (int i = 1; i < index; i++) {
+            buf.append(i).append(")").append(constants[i]).append("\n");
+        }
+        return buf.toString();
+    }
+
+
+    /** Import constant from another ConstantPool and return new index.
+     */
+    public int addConstant( Constant c, ConstantPoolGen cp ) {
+        Constant[] constants = cp.getConstantPool().getConstantPool();
+        switch (c.getTag()) {
+            case Constants.CONSTANT_String: {
+                ConstantString s = (ConstantString) c;
+                ConstantUtf8 u8 = (ConstantUtf8) constants[s.getStringIndex()];
+                return addString(u8.getBytes());
+            }
+            case Constants.CONSTANT_Class: {
+                ConstantClass s = (ConstantClass) c;
+                ConstantUtf8 u8 = (ConstantUtf8) constants[s.getNameIndex()];
+                return addClass(u8.getBytes());
+            }
+            case Constants.CONSTANT_NameAndType: {
+                ConstantNameAndType n = (ConstantNameAndType) c;
+                ConstantUtf8 u8 = (ConstantUtf8) constants[n.getNameIndex()];
+                ConstantUtf8 u8_2 = (ConstantUtf8) constants[n.getSignatureIndex()];
+                return addNameAndType(u8.getBytes(), u8_2.getBytes());
+            }
+            case Constants.CONSTANT_Utf8:
+                return addUtf8(((ConstantUtf8) c).getBytes());
+            case Constants.CONSTANT_Double:
+                return addDouble(((ConstantDouble) c).getBytes());
+            case Constants.CONSTANT_Float:
+                return addFloat(((ConstantFloat) c).getBytes());
+            case Constants.CONSTANT_Long:
+                return addLong(((ConstantLong) c).getBytes());
+            case Constants.CONSTANT_Integer:
+                return addInteger(((ConstantInteger) c).getBytes());
+            case Constants.CONSTANT_InterfaceMethodref:
+            case Constants.CONSTANT_Methodref:
+            case Constants.CONSTANT_Fieldref: {
+                ConstantCP m = (ConstantCP) c;
+                ConstantClass clazz = (ConstantClass) constants[m.getClassIndex()];
+                ConstantNameAndType n = (ConstantNameAndType) constants[m.getNameAndTypeIndex()];
+                ConstantUtf8 u8 = (ConstantUtf8) constants[clazz.getNameIndex()];
+                String class_name = u8.getBytes().replace('/', '.');
+                u8 = (ConstantUtf8) constants[n.getNameIndex()];
+                String name = u8.getBytes();
+                u8 = (ConstantUtf8) constants[n.getSignatureIndex()];
+                String signature = u8.getBytes();
+                switch (c.getTag()) {
+                    case Constants.CONSTANT_InterfaceMethodref:
+                        return addInterfaceMethodref(class_name, name, signature);
+                    case Constants.CONSTANT_Methodref:
+                        return addMethodref(class_name, name, signature);
+                    case Constants.CONSTANT_Fieldref:
+                        return addFieldref(class_name, name, signature);
+                    default: // Never reached
+                        throw new RuntimeException("Unknown constant type " + c);
+                }
+            }
+            default: // Never reached
+                throw new RuntimeException("Unknown constant type " + c);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ConstantPushInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/ConstantPushInstruction.java
new file mode 100644
index 0000000..d9a7322
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ConstantPushInstruction.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denotes a push instruction that produces a literal on the stack
+ * such as  SIPUSH, BIPUSH, ICONST, etc.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+
+ * @see ICONST
+ * @see SIPUSH
+ */
+public interface ConstantPushInstruction extends PushInstruction, TypedInstruction {
+
+    Number getValue();
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ConversionInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/ConversionInstruction.java
new file mode 100644
index 0000000..d89fbed
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ConversionInstruction.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+
+/**
+ * Super class for the x2y family of instructions.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class ConversionInstruction extends Instruction implements TypedInstruction,
+        StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = -4283015897133699172L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ConversionInstruction() {
+    }
+
+
+    /**
+     * @param opcode opcode of instruction
+     */
+    protected ConversionInstruction(short opcode) {
+        super(opcode, (short) 1);
+    }
+
+
+    /** @return type associated with the instruction
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        switch (opcode) {
+            case Constants.D2I:
+            case Constants.F2I:
+            case Constants.L2I:
+                return Type.INT;
+            case Constants.D2F:
+            case Constants.I2F:
+            case Constants.L2F:
+                return Type.FLOAT;
+            case Constants.D2L:
+            case Constants.F2L:
+            case Constants.I2L:
+                return Type.LONG;
+            case Constants.F2D:
+            case Constants.I2D:
+            case Constants.L2D:
+                return Type.DOUBLE;
+            case Constants.I2B:
+                return Type.BYTE;
+            case Constants.I2C:
+                return Type.CHAR;
+            case Constants.I2S:
+                return Type.SHORT;
+            default: // Never reached
+                throw new ClassGenException("Unknown type " + opcode);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/D2F.java b/src/main/java/org/apache/commons/bcel6/generic/D2F.java
new file mode 100644
index 0000000..e855adb
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/D2F.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * D2F - Convert double to float
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class D2F extends ConversionInstruction {
+
+    private static final long serialVersionUID = -448595874334076240L;
+
+
+    /** Convert double to float
+     */
+    public D2F() {
+        super(org.apache.commons.bcel6.Constants.D2F);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitD2F(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/D2I.java b/src/main/java/org/apache/commons/bcel6/generic/D2I.java
new file mode 100644
index 0000000..5db6d80
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/D2I.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * D2I - Convert double to int
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class D2I extends ConversionInstruction {
+
+    private static final long serialVersionUID = -1226710355146064416L;
+
+
+    /** Convert double to int
+     */
+    public D2I() {
+        super(org.apache.commons.bcel6.Constants.D2I);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitD2I(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/D2L.java b/src/main/java/org/apache/commons/bcel6/generic/D2L.java
new file mode 100644
index 0000000..99cdefa
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/D2L.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * D2L - Convert double to long
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class D2L extends ConversionInstruction {
+
+    private static final long serialVersionUID = -1985923584192796706L;
+
+
+    /** Convert double to long
+     */
+    public D2L() {
+        super(org.apache.commons.bcel6.Constants.D2L);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitD2L(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DADD.java b/src/main/java/org/apache/commons/bcel6/generic/DADD.java
new file mode 100644
index 0000000..17cf2d2
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DADD.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DADD - Add doubles
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result1.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DADD extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 241485501977646418L;
+
+
+    /** Add doubles
+     */
+    public DADD() {
+        super(org.apache.commons.bcel6.Constants.DADD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitDADD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/DALOAD.java
new file mode 100644
index 0000000..37f738b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DALOAD.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DALOAD - Load double from array
+ * <PRE>Stack: ..., arrayref, index -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DALOAD extends ArrayInstruction implements StackProducer {
+
+    private static final long serialVersionUID = -8493938101832015094L;
+
+
+    /** Load double from array
+     */
+    public DALOAD() {
+        super(org.apache.commons.bcel6.Constants.DALOAD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitDALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/DASTORE.java
new file mode 100644
index 0000000..86cbb3f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DASTORE.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DASTORE -  Store into double array
+ * <PRE>Stack: ..., arrayref, index, value.word1, value.word2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DASTORE extends ArrayInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = 5236493427411303394L;
+
+
+    /** Store double into array
+     */
+    public DASTORE() {
+        super(org.apache.commons.bcel6.Constants.DASTORE);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitDASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DCMPG.java b/src/main/java/org/apache/commons/bcel6/generic/DCMPG.java
new file mode 100644
index 0000000..fd0ece0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DCMPG.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DCMPG - Compare doubles: value1 &gt; value2
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DCMPG extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = 1929664840821745262L;
+
+    public DCMPG() {
+        super(org.apache.commons.bcel6.Constants.DCMPG, (short) 1);
+    }
+
+    /** @return Type.DOUBLE
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.DOUBLE;
+    }
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitDCMPG(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DCMPL.java b/src/main/java/org/apache/commons/bcel6/generic/DCMPL.java
new file mode 100644
index 0000000..e45178e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DCMPL.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DCMPL - Compare doubles: value1 &lt; value2
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DCMPL extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = 2514357528484232014L;
+
+    public DCMPL() {
+        super(org.apache.commons.bcel6.Constants.DCMPL, (short) 1);
+    }
+
+    /** @return Type.DOUBLE
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.DOUBLE;
+    }
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitDCMPL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DCONST.java b/src/main/java/org/apache/commons/bcel6/generic/DCONST.java
new file mode 100644
index 0000000..2b01358
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DCONST.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DCONST - Push 0.0 or 1.0, other values cause an exception
+ *
+ * <PRE>Stack: ... -&gt; ..., </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DCONST extends Instruction implements ConstantPushInstruction {
+
+    private static final long serialVersionUID = 4421839896759165218L;
+    private double value;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    DCONST() {
+    }
+
+
+    public DCONST(double f) {
+        super(org.apache.commons.bcel6.Constants.DCONST_0, (short) 1);
+        if (f == 0.0) {
+            opcode = org.apache.commons.bcel6.Constants.DCONST_0;
+        } else if (f == 1.0) {
+            opcode = org.apache.commons.bcel6.Constants.DCONST_1;
+        } else {
+            throw new ClassGenException("DCONST can be used only for 0.0 and 1.0: " + f);
+        }
+        value = f;
+    }
+
+
+    public Number getValue() {
+        return new Double(value);
+    }
+
+
+    /** @return Type.DOUBLE
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.DOUBLE;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitPushInstruction(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitConstantPushInstruction(this);
+        v.visitDCONST(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DDIV.java b/src/main/java/org/apache/commons/bcel6/generic/DDIV.java
new file mode 100644
index 0000000..8ef835e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DDIV.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DDIV -  Divide doubles
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DDIV extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -2241740228269641540L;
+
+
+    /** Divide doubles
+     */
+    public DDIV() {
+        super(org.apache.commons.bcel6.Constants.DDIV);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitDDIV(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DLOAD.java b/src/main/java/org/apache/commons/bcel6/generic/DLOAD.java
new file mode 100644
index 0000000..b9b45cd
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DLOAD.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DLOAD - Load double from local variable
+ * <PRE>Stack ... -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DLOAD extends LoadInstruction {
+
+    private static final long serialVersionUID = -197027701448834250L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    DLOAD() {
+        super(org.apache.commons.bcel6.Constants.DLOAD, org.apache.commons.bcel6.Constants.DLOAD_0);
+    }
+
+
+    /** Load double from local variable
+     * @param n index of local variable
+     */
+    public DLOAD(int n) {
+        super(org.apache.commons.bcel6.Constants.DLOAD, org.apache.commons.bcel6.Constants.DLOAD_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitDLOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DMUL.java b/src/main/java/org/apache/commons/bcel6/generic/DMUL.java
new file mode 100644
index 0000000..a397e6d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DMUL.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DMUL - Multiply doubles
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DMUL extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 7491480641611951432L;
+
+
+    /** Multiply doubles
+     */
+    public DMUL() {
+        super(org.apache.commons.bcel6.Constants.DMUL);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitDMUL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DNEG.java b/src/main/java/org/apache/commons/bcel6/generic/DNEG.java
new file mode 100644
index 0000000..f78c6fd
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DNEG.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DNEG - Negate double
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DNEG extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -8860107731099493429L;
+
+
+    public DNEG() {
+        super(org.apache.commons.bcel6.Constants.DNEG);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitDNEG(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DREM.java b/src/main/java/org/apache/commons/bcel6/generic/DREM.java
new file mode 100644
index 0000000..09ec66f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DREM.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DREM - Remainder of doubles
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DREM extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -3984082114153729887L;
+
+
+    /** Remainder of doubles
+     */
+    public DREM() {
+        super(org.apache.commons.bcel6.Constants.DREM);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitDREM(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DRETURN.java b/src/main/java/org/apache/commons/bcel6/generic/DRETURN.java
new file mode 100644
index 0000000..22182f5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DRETURN.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DRETURN -  Return double from method
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; &lt;empty&gt;</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DRETURN extends ReturnInstruction {
+
+    private static final long serialVersionUID = 7442064109402271402L;
+
+
+    /** Return double from method
+     */
+    public DRETURN() {
+        super(org.apache.commons.bcel6.Constants.DRETURN);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitReturnInstruction(this);
+        v.visitDRETURN(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DSTORE.java b/src/main/java/org/apache/commons/bcel6/generic/DSTORE.java
new file mode 100644
index 0000000..de32d25
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DSTORE.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DSTORE - Store double into local variable
+ * <pre>Stack: ..., value.word1, value.word2 -&gt; ... </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DSTORE extends StoreInstruction {
+
+    private static final long serialVersionUID = 2593414593903082469L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    DSTORE() {
+        super(org.apache.commons.bcel6.Constants.DSTORE, org.apache.commons.bcel6.Constants.DSTORE_0);
+    }
+
+
+    /** Store double into local variable
+     * @param n index of local variable
+     */
+    public DSTORE(int n) {
+        super(org.apache.commons.bcel6.Constants.DSTORE, org.apache.commons.bcel6.Constants.DSTORE_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitDSTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DSUB.java b/src/main/java/org/apache/commons/bcel6/generic/DSUB.java
new file mode 100644
index 0000000..c2d000b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DSUB.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DSUB - Substract doubles
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DSUB extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -5398969227995149466L;
+
+
+    /** Substract doubles
+     */
+    public DSUB() {
+        super(org.apache.commons.bcel6.Constants.DSUB);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitDSUB(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DUP.java b/src/main/java/org/apache/commons/bcel6/generic/DUP.java
new file mode 100644
index 0000000..5309f58
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DUP.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DUP - Duplicate top operand stack word
+ * <PRE>Stack: ..., word -&gt; ..., word, word</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DUP extends StackInstruction implements PushInstruction {
+
+    private static final long serialVersionUID = 2297553463589366154L;
+
+
+    public DUP() {
+        super(org.apache.commons.bcel6.Constants.DUP);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitPushInstruction(this);
+        v.visitStackInstruction(this);
+        v.visitDUP(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DUP2.java b/src/main/java/org/apache/commons/bcel6/generic/DUP2.java
new file mode 100644
index 0000000..7bb85af
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DUP2.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DUP2 - Duplicate two top operand stack words
+ * <PRE>Stack: ..., word2, word1 -&gt; ..., word2, word1, word2, word1</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DUP2 extends StackInstruction implements PushInstruction {
+
+    private static final long serialVersionUID = -7098411152822612791L;
+
+
+    public DUP2() {
+        super(org.apache.commons.bcel6.Constants.DUP2);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitPushInstruction(this);
+        v.visitStackInstruction(this);
+        v.visitDUP2(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DUP2_X1.java b/src/main/java/org/apache/commons/bcel6/generic/DUP2_X1.java
new file mode 100644
index 0000000..46a8378
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DUP2_X1.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DUP2_X1 - Duplicate two top operand stack words and put three down
+ * <PRE>Stack: ..., word3, word2, word1 -&gt; ..., word2, word1, word3, word2, word1</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DUP2_X1 extends StackInstruction {
+
+    private static final long serialVersionUID = 4940667268525283202L;
+
+
+    public DUP2_X1() {
+        super(org.apache.commons.bcel6.Constants.DUP2_X1);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackInstruction(this);
+        v.visitDUP2_X1(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DUP2_X2.java b/src/main/java/org/apache/commons/bcel6/generic/DUP2_X2.java
new file mode 100644
index 0000000..78c7b7e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DUP2_X2.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DUP2_X2 - Duplicate two top operand stack words and put four down
+ * <PRE>Stack: ..., word4, word3, word2, word1 -&gt; ..., word2, word1, word4, word3, word2, word1</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DUP2_X2 extends StackInstruction {
+
+    private static final long serialVersionUID = 1182584253776211326L;
+
+
+    public DUP2_X2() {
+        super(org.apache.commons.bcel6.Constants.DUP2_X2);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackInstruction(this);
+        v.visitDUP2_X2(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DUP_X1.java b/src/main/java/org/apache/commons/bcel6/generic/DUP_X1.java
new file mode 100644
index 0000000..5364318
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DUP_X1.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DUP_X1 - Duplicate top operand stack word and put two down
+ * <PRE>Stack: ..., word2, word1 -&gt; ..., word1, word2, word1</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DUP_X1 extends StackInstruction {
+
+    private static final long serialVersionUID = 2059042937326757526L;
+
+
+    public DUP_X1() {
+        super(org.apache.commons.bcel6.Constants.DUP_X1);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackInstruction(this);
+        v.visitDUP_X1(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/DUP_X2.java b/src/main/java/org/apache/commons/bcel6/generic/DUP_X2.java
new file mode 100644
index 0000000..9659a64
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/DUP_X2.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * DUP_X2 - Duplicate top operand stack word and put three down
+ * <PRE>Stack: ..., word3, word2, word1 -&gt; ..., word1, word3, word2, word1</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class DUP_X2 extends StackInstruction {
+
+    private static final long serialVersionUID = -8851562833314313571L;
+
+
+    public DUP_X2() {
+        super(org.apache.commons.bcel6.Constants.DUP_X2);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackInstruction(this);
+        v.visitDUP_X2(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ElementValueGen.java b/src/main/java/org/apache/commons/bcel6/generic/ElementValueGen.java
new file mode 100644
index 0000000..4c23fb0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ElementValueGen.java
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataInput;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.AnnotationElementValue;
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.ArrayElementValue;
+import org.apache.commons.bcel6.classfile.ClassElementValue;
+import org.apache.commons.bcel6.classfile.ElementValue;
+import org.apache.commons.bcel6.classfile.EnumElementValue;
+import org.apache.commons.bcel6.classfile.SimpleElementValue;
+
+/**
+ * @since 6.0
+ */
+public abstract class ElementValueGen
+{
+    protected int type;
+
+    protected ConstantPoolGen cpGen;
+
+    protected ElementValueGen(int type, ConstantPoolGen cpGen)
+    {
+        this.type = type;
+        this.cpGen = cpGen;
+    }
+
+    /**
+     * Subtypes return an immutable variant of the ElementValueGen
+     */
+    public abstract ElementValue getElementValue();
+
+    public int getElementValueType()
+    {
+        return type;
+    }
+
+    public abstract String stringifyValue();
+
+    public abstract void dump(DataOutputStream dos) throws IOException;
+
+    public static final int STRING = 's';
+
+    public static final int ENUM_CONSTANT = 'e';
+
+    public static final int CLASS = 'c';
+
+    public static final int ANNOTATION = '@';
+
+    public static final int ARRAY = '[';
+
+    public static final int PRIMITIVE_INT = 'I';
+
+    public static final int PRIMITIVE_BYTE = 'B';
+
+    public static final int PRIMITIVE_CHAR = 'C';
+
+    public static final int PRIMITIVE_DOUBLE = 'D';
+
+    public static final int PRIMITIVE_FLOAT = 'F';
+
+    public static final int PRIMITIVE_LONG = 'J';
+
+    public static final int PRIMITIVE_SHORT = 'S';
+
+    public static final int PRIMITIVE_BOOLEAN = 'Z';
+
+    public static ElementValueGen readElementValue(DataInput dis,
+            ConstantPoolGen cpGen) throws IOException
+    {
+        int type = dis.readUnsignedByte();
+        switch (type)
+        {
+        case 'B': // byte
+            return new SimpleElementValueGen(PRIMITIVE_BYTE, dis
+                    .readUnsignedShort(), cpGen);
+        case 'C': // char
+            return new SimpleElementValueGen(PRIMITIVE_CHAR, dis
+                    .readUnsignedShort(), cpGen);
+        case 'D': // double
+            return new SimpleElementValueGen(PRIMITIVE_DOUBLE, dis
+                    .readUnsignedShort(), cpGen);
+        case 'F': // float
+            return new SimpleElementValueGen(PRIMITIVE_FLOAT, dis
+                    .readUnsignedShort(), cpGen);
+        case 'I': // int
+            return new SimpleElementValueGen(PRIMITIVE_INT, dis
+                    .readUnsignedShort(), cpGen);
+        case 'J': // long
+            return new SimpleElementValueGen(PRIMITIVE_LONG, dis
+                    .readUnsignedShort(), cpGen);
+        case 'S': // short
+            return new SimpleElementValueGen(PRIMITIVE_SHORT, dis
+                    .readUnsignedShort(), cpGen);
+        case 'Z': // boolean
+            return new SimpleElementValueGen(PRIMITIVE_BOOLEAN, dis
+                    .readUnsignedShort(), cpGen);
+        case 's': // String
+            return new SimpleElementValueGen(STRING, dis.readUnsignedShort(),
+                    cpGen);
+        case 'e': // Enum constant
+            return new EnumElementValueGen(dis.readUnsignedShort(), dis
+                    .readUnsignedShort(), cpGen);
+        case 'c': // Class
+            return new ClassElementValueGen(dis.readUnsignedShort(), cpGen);
+        case '@': // Annotation
+            // TODO: isRuntimeVisible ??????????
+            // FIXME
+            return new AnnotationElementValueGen(ANNOTATION,
+                    new AnnotationEntryGen(AnnotationEntry.read(dis, cpGen
+                            .getConstantPool(), true), cpGen, false), cpGen);
+        case '[': // Array
+            int numArrayVals = dis.readUnsignedShort();
+            ElementValue[] evalues = new ElementValue[numArrayVals];
+            for (int j = 0; j < numArrayVals; j++)
+            {
+                evalues[j] = ElementValue.readElementValue(dis, cpGen
+                        .getConstantPool());
+            }
+            return new ArrayElementValueGen(ARRAY, evalues, cpGen);
+        default:
+            throw new RuntimeException(
+                    "Unexpected element value kind in annotation: " + type);
+        }
+    }
+
+    protected ConstantPoolGen getConstantPool()
+    {
+        return cpGen;
+    }
+
+    /**
+     * Creates an (modifiable) ElementValueGen copy of an (immutable)
+     * ElementValue - constant pool is assumed correct.
+     */
+    public static ElementValueGen copy(ElementValue value,
+            ConstantPoolGen cpool, boolean copyPoolEntries)
+    {
+        switch (value.getElementValueType())
+        {
+        case 'B': // byte
+        case 'C': // char
+        case 'D': // double
+        case 'F': // float
+        case 'I': // int
+        case 'J': // long
+        case 'S': // short
+        case 'Z': // boolean
+        case 's': // String
+            return new SimpleElementValueGen((SimpleElementValue) value, cpool,
+                    copyPoolEntries);
+        case 'e': // Enum constant
+            return new EnumElementValueGen((EnumElementValue) value, cpool,
+                    copyPoolEntries);
+        case '@': // Annotation
+            return new AnnotationElementValueGen(
+                    (AnnotationElementValue) value, cpool, copyPoolEntries);
+        case '[': // Array
+            return new ArrayElementValueGen((ArrayElementValue) value, cpool,
+                    copyPoolEntries);
+        case 'c': // Class
+            return new ClassElementValueGen((ClassElementValue) value, cpool,
+                    copyPoolEntries);
+        default:
+            throw new RuntimeException("Not implemented yet! ("
+                    + value.getElementValueType() + ")");
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ElementValuePairGen.java b/src/main/java/org/apache/commons/bcel6/generic/ElementValuePairGen.java
new file mode 100644
index 0000000..187f6c0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ElementValuePairGen.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ElementValue;
+import org.apache.commons.bcel6.classfile.ElementValuePair;
+
+/**
+ * @since 6.0
+ */
+public class ElementValuePairGen
+{
+    private int nameIdx;
+
+    private final ElementValueGen value;
+
+    private final ConstantPoolGen cpool;
+
+    public ElementValuePairGen(ElementValuePair nvp, ConstantPoolGen cpool,
+            boolean copyPoolEntries)
+    {
+        this.cpool = cpool;
+        // J5ASSERT:
+        // Could assert nvp.getNameString() points to the same thing as
+        // cpool.getConstant(nvp.getNameIndex())
+        // if
+        // (!nvp.getNameString().equals(((ConstantUtf8)cpool.getConstant(nvp.getNameIndex())).getBytes()))
+        // {
+        // throw new RuntimeException("envp buggered");
+        // }
+        if (copyPoolEntries)
+        {
+            nameIdx = cpool.addUtf8(nvp.getNameString());
+        }
+        else
+        {
+            nameIdx = nvp.getNameIndex();
+        }
+        value = ElementValueGen.copy(nvp.getValue(), cpool, copyPoolEntries);
+    }
+
+    /**
+     * Retrieve an immutable version of this ElementNameValuePairGen
+     */
+    public ElementValuePair getElementNameValuePair()
+    {
+        ElementValue immutableValue = value.getElementValue();
+        return new ElementValuePair(nameIdx, immutableValue, cpool
+                .getConstantPool());
+    }
+
+    protected ElementValuePairGen(int idx, ElementValueGen value,
+            ConstantPoolGen cpool)
+    {
+        this.nameIdx = idx;
+        this.value = value;
+        this.cpool = cpool;
+    }
+
+    public ElementValuePairGen(String name, ElementValueGen value,
+            ConstantPoolGen cpool)
+    {
+        this.nameIdx = cpool.addUtf8(name);
+        this.value = value;
+        this.cpool = cpool;
+    }
+
+    protected void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeShort(nameIdx); // u2 name of the element
+        value.dump(dos);
+    }
+
+    public int getNameIndex()
+    {
+        return nameIdx;
+    }
+
+    public final String getNameString()
+    {
+        // ConstantString cu8 = (ConstantString)cpool.getConstant(nameIdx);
+        return ((ConstantUtf8) cpool.getConstant(nameIdx)).getBytes();
+    }
+
+    public final ElementValueGen getValue()
+    {
+        return value;
+    }
+
+    @Override
+    public String toString()
+    {
+        return "ElementValuePair:[" + getNameString() + "="
+                + value.stringifyValue() + "]";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/EmptyVisitor.java b/src/main/java/org/apache/commons/bcel6/generic/EmptyVisitor.java
new file mode 100644
index 0000000..f843b18
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/EmptyVisitor.java
@@ -0,0 +1,749 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Supplies empty method bodies to be overridden by subclasses.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class EmptyVisitor implements Visitor {
+
+    public void visitStackInstruction( StackInstruction obj ) {
+    }
+
+
+    public void visitLocalVariableInstruction( LocalVariableInstruction obj ) {
+    }
+
+
+    public void visitBranchInstruction( BranchInstruction obj ) {
+    }
+
+
+    public void visitLoadClass( LoadClass obj ) {
+    }
+
+
+    public void visitFieldInstruction( FieldInstruction obj ) {
+    }
+
+
+    public void visitIfInstruction( IfInstruction obj ) {
+    }
+
+
+    public void visitConversionInstruction( ConversionInstruction obj ) {
+    }
+
+
+    public void visitPopInstruction( PopInstruction obj ) {
+    }
+
+
+    public void visitJsrInstruction( JsrInstruction obj ) {
+    }
+
+
+    public void visitGotoInstruction( GotoInstruction obj ) {
+    }
+
+
+    public void visitStoreInstruction( StoreInstruction obj ) {
+    }
+
+
+    public void visitTypedInstruction( TypedInstruction obj ) {
+    }
+
+
+    public void visitSelect( Select obj ) {
+    }
+
+
+    public void visitUnconditionalBranch( UnconditionalBranch obj ) {
+    }
+
+
+    public void visitPushInstruction( PushInstruction obj ) {
+    }
+
+
+    public void visitArithmeticInstruction( ArithmeticInstruction obj ) {
+    }
+
+
+    public void visitCPInstruction( CPInstruction obj ) {
+    }
+
+
+    public void visitInvokeInstruction( InvokeInstruction obj ) {
+    }
+
+
+    public void visitArrayInstruction( ArrayInstruction obj ) {
+    }
+
+
+    public void visitAllocationInstruction( AllocationInstruction obj ) {
+    }
+
+
+    public void visitReturnInstruction( ReturnInstruction obj ) {
+    }
+
+
+    public void visitFieldOrMethod( FieldOrMethod obj ) {
+    }
+
+
+    public void visitConstantPushInstruction( ConstantPushInstruction obj ) {
+    }
+
+
+    public void visitExceptionThrower( ExceptionThrower obj ) {
+    }
+
+
+    public void visitLoadInstruction( LoadInstruction obj ) {
+    }
+
+
+    public void visitVariableLengthInstruction( VariableLengthInstruction obj ) {
+    }
+
+
+    public void visitStackProducer( StackProducer obj ) {
+    }
+
+
+    public void visitStackConsumer( StackConsumer obj ) {
+    }
+
+
+    public void visitACONST_NULL( ACONST_NULL obj ) {
+    }
+
+
+    public void visitGETSTATIC( GETSTATIC obj ) {
+    }
+
+
+    public void visitIF_ICMPLT( IF_ICMPLT obj ) {
+    }
+
+
+    public void visitMONITOREXIT( MONITOREXIT obj ) {
+    }
+
+
+    public void visitIFLT( IFLT obj ) {
+    }
+
+
+    public void visitLSTORE( LSTORE obj ) {
+    }
+
+
+    public void visitPOP2( POP2 obj ) {
+    }
+
+
+    public void visitBASTORE( BASTORE obj ) {
+    }
+
+
+    public void visitISTORE( ISTORE obj ) {
+    }
+
+
+    public void visitCHECKCAST( CHECKCAST obj ) {
+    }
+
+
+    public void visitFCMPG( FCMPG obj ) {
+    }
+
+
+    public void visitI2F( I2F obj ) {
+    }
+
+
+    public void visitATHROW( ATHROW obj ) {
+    }
+
+
+    public void visitDCMPL( DCMPL obj ) {
+    }
+
+
+    public void visitARRAYLENGTH( ARRAYLENGTH obj ) {
+    }
+
+
+    public void visitDUP( DUP obj ) {
+    }
+
+
+    public void visitINVOKESTATIC( INVOKESTATIC obj ) {
+    }
+
+
+    public void visitLCONST( LCONST obj ) {
+    }
+
+
+    public void visitDREM( DREM obj ) {
+    }
+
+
+    public void visitIFGE( IFGE obj ) {
+    }
+
+
+    public void visitCALOAD( CALOAD obj ) {
+    }
+
+
+    public void visitLASTORE( LASTORE obj ) {
+    }
+
+
+    public void visitI2D( I2D obj ) {
+    }
+
+
+    public void visitDADD( DADD obj ) {
+    }
+
+
+    public void visitINVOKESPECIAL( INVOKESPECIAL obj ) {
+    }
+
+
+    public void visitIAND( IAND obj ) {
+    }
+
+
+    public void visitPUTFIELD( PUTFIELD obj ) {
+    }
+
+
+    public void visitILOAD( ILOAD obj ) {
+    }
+
+
+    public void visitDLOAD( DLOAD obj ) {
+    }
+
+
+    public void visitDCONST( DCONST obj ) {
+    }
+
+
+    public void visitNEW( NEW obj ) {
+    }
+
+
+    public void visitIFNULL( IFNULL obj ) {
+    }
+
+
+    public void visitLSUB( LSUB obj ) {
+    }
+
+
+    public void visitL2I( L2I obj ) {
+    }
+
+
+    public void visitISHR( ISHR obj ) {
+    }
+
+
+    public void visitTABLESWITCH( TABLESWITCH obj ) {
+    }
+
+
+    public void visitIINC( IINC obj ) {
+    }
+
+
+    public void visitDRETURN( DRETURN obj ) {
+    }
+
+
+    public void visitFSTORE( FSTORE obj ) {
+    }
+
+
+    public void visitDASTORE( DASTORE obj ) {
+    }
+
+
+    public void visitIALOAD( IALOAD obj ) {
+    }
+
+
+    public void visitDDIV( DDIV obj ) {
+    }
+
+
+    public void visitIF_ICMPGE( IF_ICMPGE obj ) {
+    }
+
+
+    public void visitLAND( LAND obj ) {
+    }
+
+
+    public void visitIDIV( IDIV obj ) {
+    }
+
+
+    public void visitLOR( LOR obj ) {
+    }
+
+
+    public void visitCASTORE( CASTORE obj ) {
+    }
+
+
+    public void visitFREM( FREM obj ) {
+    }
+
+
+    public void visitLDC( LDC obj ) {
+    }
+
+
+    public void visitBIPUSH( BIPUSH obj ) {
+    }
+
+
+    public void visitDSTORE( DSTORE obj ) {
+    }
+
+
+    public void visitF2L( F2L obj ) {
+    }
+
+
+    public void visitFMUL( FMUL obj ) {
+    }
+
+
+    public void visitLLOAD( LLOAD obj ) {
+    }
+
+
+    public void visitJSR( JSR obj ) {
+    }
+
+
+    public void visitFSUB( FSUB obj ) {
+    }
+
+
+    public void visitSASTORE( SASTORE obj ) {
+    }
+
+
+    public void visitALOAD( ALOAD obj ) {
+    }
+
+
+    public void visitDUP2_X2( DUP2_X2 obj ) {
+    }
+
+
+    public void visitRETURN( RETURN obj ) {
+    }
+
+
+    public void visitDALOAD( DALOAD obj ) {
+    }
+
+
+    public void visitSIPUSH( SIPUSH obj ) {
+    }
+
+
+    public void visitDSUB( DSUB obj ) {
+    }
+
+
+    public void visitL2F( L2F obj ) {
+    }
+
+
+    public void visitIF_ICMPGT( IF_ICMPGT obj ) {
+    }
+
+
+    public void visitF2D( F2D obj ) {
+    }
+
+
+    public void visitI2L( I2L obj ) {
+    }
+
+
+    public void visitIF_ACMPNE( IF_ACMPNE obj ) {
+    }
+
+
+    public void visitPOP( POP obj ) {
+    }
+
+
+    public void visitI2S( I2S obj ) {
+    }
+
+
+    public void visitIFEQ( IFEQ obj ) {
+    }
+
+
+    public void visitSWAP( SWAP obj ) {
+    }
+
+
+    public void visitIOR( IOR obj ) {
+    }
+
+
+    public void visitIREM( IREM obj ) {
+    }
+
+
+    public void visitIASTORE( IASTORE obj ) {
+    }
+
+
+    public void visitNEWARRAY( NEWARRAY obj ) {
+    }
+
+
+    public void visitINVOKEINTERFACE( INVOKEINTERFACE obj ) {
+    }
+
+
+    public void visitINEG( INEG obj ) {
+    }
+
+
+    public void visitLCMP( LCMP obj ) {
+    }
+
+
+    public void visitJSR_W( JSR_W obj ) {
+    }
+
+
+    public void visitMULTIANEWARRAY( MULTIANEWARRAY obj ) {
+    }
+
+
+    public void visitDUP_X2( DUP_X2 obj ) {
+    }
+
+
+    public void visitSALOAD( SALOAD obj ) {
+    }
+
+
+    public void visitIFNONNULL( IFNONNULL obj ) {
+    }
+
+
+    public void visitDMUL( DMUL obj ) {
+    }
+
+
+    public void visitIFNE( IFNE obj ) {
+    }
+
+
+    public void visitIF_ICMPLE( IF_ICMPLE obj ) {
+    }
+
+
+    public void visitLDC2_W( LDC2_W obj ) {
+    }
+
+
+    public void visitGETFIELD( GETFIELD obj ) {
+    }
+
+
+    public void visitLADD( LADD obj ) {
+    }
+
+
+    public void visitNOP( NOP obj ) {
+    }
+
+
+    public void visitFALOAD( FALOAD obj ) {
+    }
+
+
+    public void visitINSTANCEOF( INSTANCEOF obj ) {
+    }
+
+
+    public void visitIFLE( IFLE obj ) {
+    }
+
+
+    public void visitLXOR( LXOR obj ) {
+    }
+
+
+    public void visitLRETURN( LRETURN obj ) {
+    }
+
+
+    public void visitFCONST( FCONST obj ) {
+    }
+
+
+    public void visitIUSHR( IUSHR obj ) {
+    }
+
+
+    public void visitBALOAD( BALOAD obj ) {
+    }
+
+
+    public void visitDUP2( DUP2 obj ) {
+    }
+
+
+    public void visitIF_ACMPEQ( IF_ACMPEQ obj ) {
+    }
+
+
+    public void visitIMPDEP1( IMPDEP1 obj ) {
+    }
+
+
+    public void visitMONITORENTER( MONITORENTER obj ) {
+    }
+
+
+    public void visitLSHL( LSHL obj ) {
+    }
+
+
+    public void visitDCMPG( DCMPG obj ) {
+    }
+
+
+    public void visitD2L( D2L obj ) {
+    }
+
+
+    public void visitIMPDEP2( IMPDEP2 obj ) {
+    }
+
+
+    public void visitL2D( L2D obj ) {
+    }
+
+
+    public void visitRET( RET obj ) {
+    }
+
+
+    public void visitIFGT( IFGT obj ) {
+    }
+
+
+    public void visitIXOR( IXOR obj ) {
+    }
+
+
+    public void visitINVOKEVIRTUAL( INVOKEVIRTUAL obj ) {
+    }
+
+
+    public void visitFASTORE( FASTORE obj ) {
+    }
+
+
+    public void visitIRETURN( IRETURN obj ) {
+    }
+
+
+    public void visitIF_ICMPNE( IF_ICMPNE obj ) {
+    }
+
+
+    public void visitFLOAD( FLOAD obj ) {
+    }
+
+
+    public void visitLDIV( LDIV obj ) {
+    }
+
+
+    public void visitPUTSTATIC( PUTSTATIC obj ) {
+    }
+
+
+    public void visitAALOAD( AALOAD obj ) {
+    }
+
+
+    public void visitD2I( D2I obj ) {
+    }
+
+
+    public void visitIF_ICMPEQ( IF_ICMPEQ obj ) {
+    }
+
+
+    public void visitAASTORE( AASTORE obj ) {
+    }
+
+
+    public void visitARETURN( ARETURN obj ) {
+    }
+
+
+    public void visitDUP2_X1( DUP2_X1 obj ) {
+    }
+
+
+    public void visitFNEG( FNEG obj ) {
+    }
+
+
+    public void visitGOTO_W( GOTO_W obj ) {
+    }
+
+
+    public void visitD2F( D2F obj ) {
+    }
+
+
+    public void visitGOTO( GOTO obj ) {
+    }
+
+
+    public void visitISUB( ISUB obj ) {
+    }
+
+
+    public void visitF2I( F2I obj ) {
+    }
+
+
+    public void visitDNEG( DNEG obj ) {
+    }
+
+
+    public void visitICONST( ICONST obj ) {
+    }
+
+
+    public void visitFDIV( FDIV obj ) {
+    }
+
+
+    public void visitI2B( I2B obj ) {
+    }
+
+
+    public void visitLNEG( LNEG obj ) {
+    }
+
+
+    public void visitLREM( LREM obj ) {
+    }
+
+
+    public void visitIMUL( IMUL obj ) {
+    }
+
+
+    public void visitIADD( IADD obj ) {
+    }
+
+
+    public void visitLSHR( LSHR obj ) {
+    }
+
+
+    public void visitLOOKUPSWITCH( LOOKUPSWITCH obj ) {
+    }
+
+
+    public void visitDUP_X1( DUP_X1 obj ) {
+    }
+
+
+    public void visitFCMPL( FCMPL obj ) {
+    }
+
+
+    public void visitI2C( I2C obj ) {
+    }
+
+
+    public void visitLMUL( LMUL obj ) {
+    }
+
+
+    public void visitLUSHR( LUSHR obj ) {
+    }
+
+
+    public void visitISHL( ISHL obj ) {
+    }
+
+
+    public void visitLALOAD( LALOAD obj ) {
+    }
+
+
+    public void visitASTORE( ASTORE obj ) {
+    }
+
+
+    public void visitANEWARRAY( ANEWARRAY obj ) {
+    }
+
+
+    public void visitFRETURN( FRETURN obj ) {
+    }
+
+
+    public void visitFADD( FADD obj ) {
+    }
+
+
+    public void visitBREAKPOINT( BREAKPOINT obj ) {
+    }
+
+    public void visitINVOKEDYNAMIC(INVOKEDYNAMIC obj) {
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/EnumElementValueGen.java b/src/main/java/org/apache/commons/bcel6/generic/EnumElementValueGen.java
new file mode 100644
index 0000000..f124ca3
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/EnumElementValueGen.java
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ElementValue;
+import org.apache.commons.bcel6.classfile.EnumElementValue;
+
+/**
+ * @since 6.0
+ */
+public class EnumElementValueGen extends ElementValueGen
+{
+    // For enum types, these two indices point to the type and value
+    private int typeIdx;
+
+    private int valueIdx;
+
+    /**
+     * This ctor assumes the constant pool already contains the right type and
+     * value - as indicated by typeIdx and valueIdx. This ctor is used for
+     * deserialization
+     */
+    protected EnumElementValueGen(int typeIdx, int valueIdx,
+            ConstantPoolGen cpool)
+    {
+        super(ElementValueGen.ENUM_CONSTANT, cpool);
+        if (type != ENUM_CONSTANT) {
+            throw new RuntimeException(
+                    "Only element values of type enum can be built with this ctor - type specified: " + type);
+        }
+        this.typeIdx = typeIdx;
+        this.valueIdx = valueIdx;
+    }
+
+    /**
+     * Return immutable variant of this EnumElementValue
+     */
+    @Override
+    public ElementValue getElementValue()
+    {
+        System.err.println("Duplicating value: " + getEnumTypeString() + ":"
+                + getEnumValueString());
+        return new EnumElementValue(type, typeIdx, valueIdx, cpGen
+                .getConstantPool());
+    }
+
+    public EnumElementValueGen(ObjectType t, String value, ConstantPoolGen cpool)
+    {
+        super(ElementValueGen.ENUM_CONSTANT, cpool);
+        typeIdx = cpool.addUtf8(t.getSignature());// was addClass(t);
+        valueIdx = cpool.addUtf8(value);// was addString(value);
+    }
+
+    public EnumElementValueGen(EnumElementValue value, ConstantPoolGen cpool,
+            boolean copyPoolEntries)
+    {
+        super(ENUM_CONSTANT, cpool);
+        if (copyPoolEntries)
+        {
+            typeIdx = cpool.addUtf8(value.getEnumTypeString());// was
+                                                                // addClass(value.getEnumTypeString());
+            valueIdx = cpool.addUtf8(value.getEnumValueString()); // was
+                                                                    // addString(value.getEnumValueString());
+        }
+        else
+        {
+            typeIdx = value.getTypeIndex();
+            valueIdx = value.getValueIndex();
+        }
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 type of value (ENUM_CONSTANT == 'e')
+        dos.writeShort(typeIdx); // u2
+        dos.writeShort(valueIdx); // u2
+    }
+
+    @Override
+    public String stringifyValue()
+    {
+        ConstantUtf8 cu8 = (ConstantUtf8) getConstantPool().getConstant(
+                valueIdx);
+        return cu8.getBytes();
+        // ConstantString cu8 =
+        // (ConstantString)getConstantPool().getConstant(valueIdx);
+        // return
+        // ((ConstantUtf8)getConstantPool().getConstant(cu8.getStringIndex())).getBytes();
+    }
+
+    // BCELBUG: Should we need to call utility.signatureToString() on the output
+    // here?
+    public String getEnumTypeString()
+    {
+        // Constant cc = getConstantPool().getConstant(typeIdx);
+        // ConstantClass cu8 =
+        // (ConstantClass)getConstantPool().getConstant(typeIdx);
+        // return
+        // ((ConstantUtf8)getConstantPool().getConstant(cu8.getNameIndex())).getBytes();
+        return ((ConstantUtf8) getConstantPool().getConstant(typeIdx))
+                .getBytes();
+        // return Utility.signatureToString(cu8.getBytes());
+    }
+
+    public String getEnumValueString()
+    {
+        return ((ConstantUtf8) getConstantPool().getConstant(valueIdx))
+                .getBytes();
+        // ConstantString cu8 =
+        // (ConstantString)getConstantPool().getConstant(valueIdx);
+        // return
+        // ((ConstantUtf8)getConstantPool().getConstant(cu8.getStringIndex())).getBytes();
+    }
+
+    public int getValueIndex()
+    {
+        return valueIdx;
+    }
+
+    public int getTypeIndex()
+    {
+        return typeIdx;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ExceptionThrower.java b/src/main/java/org/apache/commons/bcel6/generic/ExceptionThrower.java
new file mode 100644
index 0000000..fa99540
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ExceptionThrower.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denote an instruction that may throw a run-time or a linking
+ * exception (or both) during execution.  This is not quite the truth
+ * as such; because all instructions may throw an
+ * java.lang.VirtualMachineError. These exceptions are omitted.
+ * 
+ * The Lava Language Specification specifies exactly which
+ * <i>RUN-TIME</i> and which <i>LINKING</i> exceptions each
+ * instruction may throw which is reflected by the implementers.  Due
+ * to the structure of the JVM specification, it may be possible that
+ * an Instruction implementing this interface returns a Class[] of
+ * size 0.
+ *
+ * Please note that we speak of an "exception" here when we mean any
+ * "Throwable" object; so this term is equally used for "Exception"
+ * and "Error" objects.
+ *
+ * @version $Id$
+ * @author  Enver Haase
+ */
+public interface ExceptionThrower {
+
+    java.lang.Class<?>[] getExceptions();
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/F2D.java b/src/main/java/org/apache/commons/bcel6/generic/F2D.java
new file mode 100644
index 0000000..fcb9449
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/F2D.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * F2D - Convert float to double
+ * <PRE>Stack: ..., value -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class F2D extends ConversionInstruction {
+
+    private static final long serialVersionUID = -4668119344425861047L;
+
+
+    /** Convert float to double
+     */
+    public F2D() {
+        super(org.apache.commons.bcel6.Constants.F2D);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitF2D(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/F2I.java b/src/main/java/org/apache/commons/bcel6/generic/F2I.java
new file mode 100644
index 0000000..58c36ab
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/F2I.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * F2I - Convert float to int
+ * <PRE>Stack: ..., value -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class F2I extends ConversionInstruction {
+
+    private static final long serialVersionUID = 6142843856130131105L;
+
+
+    /** Convert float to int
+     */
+    public F2I() {
+        super(org.apache.commons.bcel6.Constants.F2I);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitF2I(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/F2L.java b/src/main/java/org/apache/commons/bcel6/generic/F2L.java
new file mode 100644
index 0000000..8883afd
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/F2L.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * F2L - Convert float to long
+ * <PRE>Stack: ..., value -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class F2L extends ConversionInstruction {
+
+    private static final long serialVersionUID = -5583947322933513819L;
+
+
+    /** Convert float to long
+     */
+    public F2L() {
+        super(org.apache.commons.bcel6.Constants.F2L);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitF2L(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FADD.java b/src/main/java/org/apache/commons/bcel6/generic/FADD.java
new file mode 100644
index 0000000..8baba4f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FADD.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FADD - Add floats
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FADD extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 5654582990564566355L;
+
+
+    /** Add floats
+     */
+    public FADD() {
+        super(org.apache.commons.bcel6.Constants.FADD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitFADD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/FALOAD.java
new file mode 100644
index 0000000..a16dae4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FALOAD.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FALOAD - Load float from array
+ * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FALOAD extends ArrayInstruction implements StackProducer {
+
+    private static final long serialVersionUID = 3369925718821219472L;
+
+
+    /** Load float from array
+     */
+    public FALOAD() {
+        super(org.apache.commons.bcel6.Constants.FALOAD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitFALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/FASTORE.java
new file mode 100644
index 0000000..a42300d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FASTORE.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FASTORE -  Store into float array
+ * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FASTORE extends ArrayInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = -1583134120388207470L;
+
+
+    /** Store float into array
+     */
+    public FASTORE() {
+        super(org.apache.commons.bcel6.Constants.FASTORE);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitFASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FCMPG.java b/src/main/java/org/apache/commons/bcel6/generic/FCMPG.java
new file mode 100644
index 0000000..37ccb79
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FCMPG.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FCMPG - Compare floats: value1 &gt; value2
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FCMPG extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = -715944337480121908L;
+
+
+    public FCMPG() {
+        super(org.apache.commons.bcel6.Constants.FCMPG, (short) 1);
+    }
+
+
+    /** @return Type.FLOAT
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.FLOAT;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitFCMPG(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FCMPL.java b/src/main/java/org/apache/commons/bcel6/generic/FCMPL.java
new file mode 100644
index 0000000..6c01d8b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FCMPL.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FCMPL - Compare floats: value1 &lt; value2
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FCMPL extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = -5283096582947056142L;
+
+
+    public FCMPL() {
+        super(org.apache.commons.bcel6.Constants.FCMPL, (short) 1);
+    }
+
+
+    /** @return Type.FLOAT
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.FLOAT;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitFCMPL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FCONST.java b/src/main/java/org/apache/commons/bcel6/generic/FCONST.java
new file mode 100644
index 0000000..17dc519
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FCONST.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FCONST - Push 0.0, 1.0 or 2.0, other values cause an exception
+ *
+ * <PRE>Stack: ... -&gt; ..., </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FCONST extends Instruction implements ConstantPushInstruction {
+
+    private static final long serialVersionUID = 3018815844848018054L;
+    private float value;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    FCONST() {
+    }
+
+
+    public FCONST(float f) {
+        super(org.apache.commons.bcel6.Constants.FCONST_0, (short) 1);
+        if (f == 0.0) {
+            opcode = org.apache.commons.bcel6.Constants.FCONST_0;
+        } else if (f == 1.0) {
+            opcode = org.apache.commons.bcel6.Constants.FCONST_1;
+        } else if (f == 2.0) {
+            opcode = org.apache.commons.bcel6.Constants.FCONST_2;
+        } else {
+            throw new ClassGenException("FCONST can be used only for 0.0, 1.0 and 2.0: " + f);
+        }
+        value = f;
+    }
+
+
+    public Number getValue() {
+        return new Float(value);
+    }
+
+
+    /** @return Type.FLOAT
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.FLOAT;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitPushInstruction(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitConstantPushInstruction(this);
+        v.visitFCONST(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FDIV.java b/src/main/java/org/apache/commons/bcel6/generic/FDIV.java
new file mode 100644
index 0000000..ffd0398
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FDIV.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * FDIV - Divide floats
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FDIV extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -8536341322669578097L;
+
+
+    /** Divide floats
+     */
+    public FDIV() {
+        super(org.apache.commons.bcel6.Constants.FDIV);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitFDIV(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FLOAD.java b/src/main/java/org/apache/commons/bcel6/generic/FLOAD.java
new file mode 100644
index 0000000..cf11b11
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FLOAD.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FLOAD - Load float from local variable
+ * <PRE>Stack ... -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FLOAD extends LoadInstruction {
+
+    private static final long serialVersionUID = 7970650436462434345L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    FLOAD() {
+        super(org.apache.commons.bcel6.Constants.FLOAD, org.apache.commons.bcel6.Constants.FLOAD_0);
+    }
+
+
+    /** Load float from local variable
+     * @param n index of local variable
+     */
+    public FLOAD(int n) {
+        super(org.apache.commons.bcel6.Constants.FLOAD, org.apache.commons.bcel6.Constants.FLOAD_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitFLOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FMUL.java b/src/main/java/org/apache/commons/bcel6/generic/FMUL.java
new file mode 100644
index 0000000..17b3ed3
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FMUL.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * FMUL - Multiply floats
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FMUL extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -1981818566663824251L;
+
+
+    /** Multiply floats
+     */
+    public FMUL() {
+        super(org.apache.commons.bcel6.Constants.FMUL);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitFMUL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FNEG.java b/src/main/java/org/apache/commons/bcel6/generic/FNEG.java
new file mode 100644
index 0000000..8081b31
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FNEG.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FNEG - Negate float
+ * <PRE>Stack: ..., value -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FNEG extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 2963444954300367744L;
+
+
+    public FNEG() {
+        super(org.apache.commons.bcel6.Constants.FNEG);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitFNEG(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FREM.java b/src/main/java/org/apache/commons/bcel6/generic/FREM.java
new file mode 100644
index 0000000..0705df6
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FREM.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * FREM - Remainder of floats
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FREM extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -9122754212888086133L;
+
+
+    /** Remainder of floats
+     */
+    public FREM() {
+        super(org.apache.commons.bcel6.Constants.FREM);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitFREM(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FRETURN.java b/src/main/java/org/apache/commons/bcel6/generic/FRETURN.java
new file mode 100644
index 0000000..18684c4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FRETURN.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FRETURN -  Return float from method
+ * <PRE>Stack: ..., value -&gt; &lt;empty&gt;</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FRETURN extends ReturnInstruction {
+
+    private static final long serialVersionUID = -3630453809574277966L;
+
+
+    /** Return float from method
+     */
+    public FRETURN() {
+        super(org.apache.commons.bcel6.Constants.FRETURN);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitReturnInstruction(this);
+        v.visitFRETURN(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FSTORE.java b/src/main/java/org/apache/commons/bcel6/generic/FSTORE.java
new file mode 100644
index 0000000..937dcf6
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FSTORE.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * FSTORE - Store float into local variable
+ * <PRE>Stack: ..., value -&gt; ... </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FSTORE extends StoreInstruction {
+
+    private static final long serialVersionUID = 2587266679484598179L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    FSTORE() {
+        super(org.apache.commons.bcel6.Constants.FSTORE, org.apache.commons.bcel6.Constants.FSTORE_0);
+    }
+
+
+    /** Store float into local variable
+     * @param n index of local variable
+     */
+    public FSTORE(int n) {
+        super(org.apache.commons.bcel6.Constants.FSTORE, org.apache.commons.bcel6.Constants.FSTORE_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitFSTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FSUB.java b/src/main/java/org/apache/commons/bcel6/generic/FSUB.java
new file mode 100644
index 0000000..0f33358
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FSUB.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * FSUB - Substract floats
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class FSUB extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 8403880233375858501L;
+
+
+    /** Substract floats
+     */
+    public FSUB() {
+        super(org.apache.commons.bcel6.Constants.FSUB);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitFSUB(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FieldGen.java b/src/main/java/org/apache/commons/bcel6/generic/FieldGen.java
new file mode 100644
index 0000000..029d8a4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FieldGen.java
@@ -0,0 +1,379 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.Annotations;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantObject;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantValue;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.util.BCELComparator;
+
+/** 
+ * Template class for building up a field.  The only extraordinary thing
+ * one can do is to add a constant value attribute to a field (which must of
+ * course be compatible with to the declared type).
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see Field
+ */
+public class FieldGen extends FieldGenOrMethodGen {
+
+    private static final long serialVersionUID = -6050448955000008261L;
+    private Object value = null;
+    private static BCELComparator _cmp = new BCELComparator() {
+
+        public boolean equals( Object o1, Object o2 ) {
+            FieldGen THIS = (FieldGen) o1;
+            FieldGen THAT = (FieldGen) o2;
+            return THIS.getName().equals(THAT.getName())
+                    && THIS.getSignature().equals(THAT.getSignature());
+        }
+
+
+        public int hashCode( Object o ) {
+            FieldGen THIS = (FieldGen) o;
+            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
+        }
+    };
+
+
+    /**
+     * Declare a field. If it is static (isStatic() == true) and has a
+     * basic type like int or String it may have an initial value
+     * associated with it as defined by setInitValue().
+     *
+     * @param access_flags access qualifiers
+     * @param type  field type
+     * @param name field name
+     * @param cp constant pool
+     */
+    public FieldGen(int access_flags, Type type, String name, ConstantPoolGen cp) {
+        setAccessFlags(access_flags);
+        setType(type);
+        setName(name);
+        setConstantPool(cp);
+    }
+
+
+    /**
+     * Instantiate from existing field.
+     *
+     * @param field Field object
+     * @param cp constant pool (must contain the same entries as the field's constant pool)
+     */
+    public FieldGen(Field field, ConstantPoolGen cp) {
+        this(field.getAccessFlags(), Type.getType(field.getSignature()), field.getName(), cp);
+        Attribute[] attrs = field.getAttributes();
+        for (Attribute attr : attrs) {
+            if (attr instanceof ConstantValue) {
+                setValue(((ConstantValue) attr).getConstantValueIndex());
+            } else if (attr instanceof Annotations) {
+                Annotations runtimeAnnotations = (Annotations)attr;
+                AnnotationEntry[] annotationEntries = runtimeAnnotations.getAnnotationEntries();
+                for (AnnotationEntry element : annotationEntries) {
+                    addAnnotationEntry(new AnnotationEntryGen(element,cp,false));
+                }
+            } else {
+                addAttribute(attr);
+            }
+        }
+    }
+
+
+    private void setValue( int index ) {
+        ConstantPool cp = this.cp.getConstantPool();
+        Constant c = cp.getConstant(index);
+        value = ((ConstantObject) c).getConstantValue(cp);
+    }
+
+
+    /**
+     * Set (optional) initial value of field, otherwise it will be set to null/0/false
+     * by the JVM automatically.
+     */
+    public void setInitValue( String str ) {
+        checkType(  ObjectType.getInstance("java.lang.String"));
+        if (str != null) {
+            value = str;
+        }
+    }
+
+
+    public void setInitValue( long l ) {
+        checkType(Type.LONG);
+        if (l != 0L) {
+            value = new Long(l);
+        }
+    }
+
+
+    public void setInitValue( int i ) {
+        checkType(Type.INT);
+        if (i != 0) {
+            value = Integer.valueOf(i);
+        }
+    }
+
+
+    public void setInitValue( short s ) {
+        checkType(Type.SHORT);
+        if (s != 0) {
+            value = Integer.valueOf(s);
+        }
+    }
+
+
+    public void setInitValue( char c ) {
+        checkType(Type.CHAR);
+        if (c != 0) {
+            value = Integer.valueOf(c);
+        }
+    }
+
+
+    public void setInitValue( byte b ) {
+        checkType(Type.BYTE);
+        if (b != 0) {
+            value = Integer.valueOf(b);
+        }
+    }
+
+
+    public void setInitValue( boolean b ) {
+        checkType(Type.BOOLEAN);
+        if (b) {
+            value = Integer.valueOf(1);
+        }
+    }
+
+
+    public void setInitValue( float f ) {
+        checkType(Type.FLOAT);
+        if (f != 0.0) {
+            value = new Float(f);
+        }
+    }
+
+
+    public void setInitValue( double d ) {
+        checkType(Type.DOUBLE);
+        if (d != 0.0) {
+            value = new Double(d);
+        }
+    }
+
+
+    /** Remove any initial value.
+     */
+    public void cancelInitValue() {
+        value = null;
+    }
+
+
+    private void checkType( Type atype ) {
+        if (type == null) {
+            throw new ClassGenException("You haven't defined the type of the field yet");
+        }
+        if (!isFinal()) {
+            throw new ClassGenException("Only final fields may have an initial value!");
+        }
+        if (!type.equals(atype)) {
+            throw new ClassGenException("Types are not compatible: " + type + " vs. " + atype);
+        }
+    }
+
+
+    /**
+     * Get field object after having set up all necessary values.
+     */
+    public Field getField() {
+        String signature = getSignature();
+        int name_index = cp.addUtf8(name);
+        int signature_index = cp.addUtf8(signature);
+        if (value != null) {
+            checkType(type);
+            int index = addConstant();
+            addAttribute(new ConstantValue(cp.addUtf8("ConstantValue"), 2, index, cp
+                    .getConstantPool()));
+        }
+        addAnnotationsAsAttribute(cp);
+        return new Field(access_flags, name_index, signature_index, getAttributes(), cp
+                .getConstantPool());
+    }
+
+    private void addAnnotationsAsAttribute(ConstantPoolGen cp) {
+          Attribute[] attrs = AnnotationEntryGen.getAnnotationAttributes(cp,annotation_vec);
+        for (Attribute attr : attrs) {
+            addAttribute(attr);
+        }
+      }
+
+
+    private int addConstant() {
+        switch (type.getType()) {
+            case Constants.T_INT:
+            case Constants.T_CHAR:
+            case Constants.T_BYTE:
+            case Constants.T_BOOLEAN:
+            case Constants.T_SHORT:
+                return cp.addInteger(((Integer) value).intValue());
+            case Constants.T_FLOAT:
+                return cp.addFloat(((Float) value).floatValue());
+            case Constants.T_DOUBLE:
+                return cp.addDouble(((Double) value).doubleValue());
+            case Constants.T_LONG:
+                return cp.addLong(((Long) value).longValue());
+            case Constants.T_REFERENCE:
+                return cp.addString(((String) value));
+            default:
+                throw new RuntimeException("Oops: Unhandled : " + type.getType());
+        }
+    }
+
+
+    @Override
+    public String getSignature() {
+        return type.getSignature();
+    }
+
+    private List<FieldObserver> observers;
+
+
+    /** Add observer for this object.
+     */
+    public void addObserver( FieldObserver o ) {
+        if (observers == null) {
+            observers = new ArrayList<FieldObserver>();
+        }
+        observers.add(o);
+    }
+
+
+    /** Remove observer for this object.
+     */
+    public void removeObserver( FieldObserver o ) {
+        if (observers != null) {
+            observers.remove(o);
+        }
+    }
+
+
+    /** Call notify() method on all observers. This method is not called
+     * automatically whenever the state has changed, but has to be
+     * called by the user after he has finished editing the object.
+     */
+    public void update() {
+        if (observers != null) {
+            for (FieldObserver observer : observers ) {
+                observer.notify(this);
+            }
+        }
+    }
+
+
+    public String getInitValue() {
+        if (value != null) {
+            return value.toString();
+        } else {
+            return null;
+        }
+    }
+
+
+    /**
+     * Return string representation close to declaration format,
+     * `public static final short MAX = 100', e.g..
+     *
+     * @return String representation of field
+     */
+    @Override
+    public final String toString() {
+        String name, signature, access; // Short cuts to constant pool
+        access = Utility.accessToString(access_flags);
+        access = access.equals("") ? "" : (access + " ");
+        signature = type.toString();
+        name = getName();
+        StringBuilder buf = new StringBuilder(32);
+        buf.append(access).append(signature).append(" ").append(name);
+        String value = getInitValue();
+        if (value != null) {
+            buf.append(" = ").append(value);
+        }
+        return buf.toString();
+    }
+
+
+    /** @return deep copy of this field
+     */
+    public FieldGen copy( ConstantPoolGen cp ) {
+        FieldGen fg = (FieldGen) clone();
+        fg.setConstantPool(cp);
+        return fg;
+    }
+
+
+    /**
+     * @return Comparison strategy object
+     */
+    public static BCELComparator getComparator() {
+        return _cmp;
+    }
+
+
+    /**
+     * @param comparator Comparison strategy object
+     */
+    public static void setComparator( BCELComparator comparator ) {
+        _cmp = comparator;
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default two FieldGen objects are said to be equal when
+     * their names and signatures are equal.
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        return _cmp.equals(this, obj);
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default return the hashcode of the field's name XOR signature.
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return _cmp.hashCode(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FieldGenOrMethodGen.java b/src/main/java/org/apache/commons/bcel6/generic/FieldGenOrMethodGen.java
new file mode 100644
index 0000000..160805a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FieldGenOrMethodGen.java
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.AccessFlags;
+import org.apache.commons.bcel6.classfile.Attribute;
+
+/**
+ * Super class for FieldGen and MethodGen objects, since they have
+ * some methods in common!
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAndTyped, Cloneable {
+
+    private static final long serialVersionUID = -2549303846821589647L;
+    protected String name;
+    protected Type type;
+    protected ConstantPoolGen cp;
+    private final List<Attribute> attribute_vec = new ArrayList<Attribute>();
+    protected List<AnnotationEntryGen>       annotation_vec= new ArrayList<AnnotationEntryGen>();
+
+
+    protected FieldGenOrMethodGen() {
+    }
+
+
+    public void setType( Type type ) {
+        if (type.getType() == Constants.T_ADDRESS) {
+            throw new IllegalArgumentException("Type can not be " + type);
+        }
+        this.type = type;
+    }
+
+
+    public Type getType() {
+        return type;
+    }
+
+
+    /** @return name of method/field.
+     */
+    public String getName() {
+        return name;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    public ConstantPoolGen getConstantPool() {
+        return cp;
+    }
+
+
+    public void setConstantPool( ConstantPoolGen cp ) {
+        this.cp = cp;
+    }
+
+
+    /**
+     * Add an attribute to this method. Currently, the JVM knows about
+     * the `Code', `ConstantValue', `Synthetic' and `Exceptions'
+     * attributes. Other attributes will be ignored by the JVM but do no
+     * harm.
+     *
+     * @param a attribute to be added
+     */
+    public void addAttribute( Attribute a ) {
+        attribute_vec.add(a);
+    }
+
+    public void addAnnotationEntry(AnnotationEntryGen ag)
+    {
+        annotation_vec.add(ag);
+    }
+
+
+    /**
+     * Remove an attribute.
+     */
+    public void removeAttribute( Attribute a ) {
+        attribute_vec.remove(a);
+    }
+
+    public void removeAnnotationEntry(AnnotationEntryGen ag)
+    {
+        annotation_vec.remove(ag);
+    }
+
+
+    /**
+     * Remove all attributes.
+     */
+    public void removeAttributes() {
+        attribute_vec.clear();
+    }
+
+    public void removeAnnotationEntries()
+    {
+        annotation_vec.clear();
+    }
+
+
+    /**
+     * @return all attributes of this method.
+     */
+    public Attribute[] getAttributes() {
+        Attribute[] attributes = new Attribute[attribute_vec.size()];
+        attribute_vec.toArray(attributes);
+        return attributes;
+    }
+
+    public AnnotationEntryGen[] getAnnotationEntries() {
+        AnnotationEntryGen[] annotations = new AnnotationEntryGen[annotation_vec.size()];
+          annotation_vec.toArray(annotations);
+          return annotations;
+      }
+
+
+    /** @return signature of method/field.
+     */
+    public abstract String getSignature();
+
+
+    @Override
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new Error("Clone Not Supported"); // never happens
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FieldInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/FieldInstruction.java
new file mode 100644
index 0000000..ef12bad
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FieldInstruction.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.classfile.ConstantPool;
+
+/**
+ * Super class for the GET/PUTxxx family of instructions.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class FieldInstruction extends FieldOrMethod {
+
+    private static final long serialVersionUID = -7870956226459765817L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    FieldInstruction() {
+    }
+
+
+    /**
+     * @param index to constant pool
+     */
+    protected FieldInstruction(short opcode, int index) {
+        super(opcode, index);
+    }
+
+
+    /**
+     * @return mnemonic for instruction with symbolic references resolved
+     */
+    @Override
+    public String toString( ConstantPool cp ) {
+        return org.apache.commons.bcel6.Constants.OPCODE_NAMES[opcode] + " "
+                + cp.constantToString(index, org.apache.commons.bcel6.Constants.CONSTANT_Fieldref);
+    }
+
+
+    /** @return size of field (1 or 2)
+     */
+    protected int getFieldSize( ConstantPoolGen cpg ) {
+        return Type.size(Type.getTypeSize(getSignature(cpg)));
+    }
+
+
+    /** @return return type of referenced field
+     */
+    @Override
+    public Type getType( ConstantPoolGen cpg ) {
+        return getFieldType(cpg);
+    }
+
+
+    /** @return type of field
+     */
+    public Type getFieldType( ConstantPoolGen cpg ) {
+        return Type.getType(getSignature(cpg));
+    }
+
+
+    /** @return name of referenced field.
+     */
+    public String getFieldName( ConstantPoolGen cpg ) {
+        return getName(cpg);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FieldObserver.java b/src/main/java/org/apache/commons/bcel6/generic/FieldObserver.java
new file mode 100644
index 0000000..7ba1f6f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FieldObserver.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Imnplement this interface if you're interested in changes to a FieldGen object
+ * and register yourself with addObserver().
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface FieldObserver {
+
+    void notify( FieldGen field );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/FieldOrMethod.java b/src/main/java/org/apache/commons/bcel6/generic/FieldOrMethod.java
new file mode 100644
index 0000000..1b52b6c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/FieldOrMethod.java
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.classfile.ConstantCP;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+
+// We have removed Deprecated from getClassName() as we continue to use
+// it with our tools and want to remove warnings.  (markro)
+
+/**
+ * Super class for InvokeInstruction and FieldInstruction, since they have
+ * some methods in common!
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class FieldOrMethod extends CPInstruction implements LoadClass {
+
+    private static final long serialVersionUID = 2036985877748835708L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    FieldOrMethod() {
+    }
+
+
+    /**
+     * @param index to constant pool
+     */
+    protected FieldOrMethod(short opcode, int index) {
+        super(opcode, index);
+    }
+
+
+    /** @return signature of referenced method/field.
+     */
+    public String getSignature( ConstantPoolGen cpg ) {
+        ConstantPool cp = cpg.getConstantPool();
+        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
+        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
+        return ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
+    }
+
+
+    /** @return name of referenced method/field.
+     */
+    public String getName( ConstantPoolGen cpg ) {
+        ConstantPool cp = cpg.getConstantPool();
+        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
+        ConstantNameAndType cnat = (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
+        return ((ConstantUtf8) cp.getConstant(cnat.getNameIndex())).getBytes();
+    }
+
+
+    /** @return name of the referenced class/interface
+     *  deprecated If the instruction references an array class,
+     *    this method will return "java.lang.Object".
+     *    For code generated by Java 1.5, this answer is
+     *    sometimes wrong (e.g., if the "clone()" method is
+     *    called on an array).  A better idea is to use
+     *    the getReferenceType() method, which correctly distinguishes
+     *    between class types and array types.
+     */
+//  @Deprecated
+    public String getClassName( ConstantPoolGen cpg ) {
+        ConstantPool cp = cpg.getConstantPool();
+        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
+        String className = cp.getConstantString(cmr.getClassIndex(),
+                org.apache.commons.bcel6.Constants.CONSTANT_Class);
+        if (className.startsWith("[")) {
+            // Turn array classes into java.lang.Object.
+            return "java.lang.Object";
+        }
+        return className.replace('/', '.');
+    }
+
+
+    /** @return type of the referenced class/interface
+     * @deprecated If the instruction references an array class,
+     *    the ObjectType returned will be invalid.  Use
+     *    getReferenceType() instead.
+     */
+    @Deprecated
+    public ObjectType getClassType( ConstantPoolGen cpg ) {
+        return ObjectType.getInstance(getClassName(cpg));
+    }
+
+
+    /**
+     * Return the reference type representing the class, interface,
+     * or array class referenced by the instruction.
+     * @param cpg the ConstantPoolGen used to create the instruction
+     * @return an ObjectType (if the referenced class type is a class
+     *   or interface), or an ArrayType (if the referenced class
+     *   type is an array class)
+     */
+    public ReferenceType getReferenceType( ConstantPoolGen cpg ) {
+        ConstantPool cp = cpg.getConstantPool();
+        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
+        String className = cp.getConstantString(cmr.getClassIndex(),
+                org.apache.commons.bcel6.Constants.CONSTANT_Class);
+        if (className.startsWith("[")) {
+            return (ArrayType) Type.getType(className);
+        } else {
+            className = className.replace('/', '.');
+            return ObjectType.getInstance(className);
+        }
+    }
+
+
+    /** @return type of the referenced class/interface
+     */
+    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
+        return getClassType(cpg);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/GETFIELD.java b/src/main/java/org/apache/commons/bcel6/generic/GETFIELD.java
new file mode 100644
index 0000000..5ea1586
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/GETFIELD.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * GETFIELD - Fetch field from object
+ * <PRE>Stack: ..., objectref -&gt; ..., value</PRE>
+ * OR
+ * <PRE>Stack: ..., objectref -&gt; ..., value.word1, value.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class GETFIELD extends FieldInstruction implements ExceptionThrower, StackConsumer,
+        StackProducer {
+
+    private static final long serialVersionUID = -6510928743515082496L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    GETFIELD() {
+    }
+
+
+    public GETFIELD(int index) {
+        super(Constants.GETFIELD, index);
+    }
+
+
+    @Override
+    public int produceStack( ConstantPoolGen cpg ) {
+        return getFieldSize(cpg);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitStackConsumer(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitFieldInstruction(this);
+        v.visitGETFIELD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/GETSTATIC.java b/src/main/java/org/apache/commons/bcel6/generic/GETSTATIC.java
new file mode 100644
index 0000000..730cb07
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/GETSTATIC.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * GETSTATIC - Fetch static field from class
+ * <PRE>Stack: ..., -&gt; ..., value</PRE>
+ * OR
+ * <PRE>Stack: ..., -&gt; ..., value.word1, value.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class GETSTATIC extends FieldInstruction implements PushInstruction, ExceptionThrower {
+
+    private static final long serialVersionUID = -477185594622953478L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    GETSTATIC() {
+    }
+
+
+    public GETSTATIC(int index) {
+        super(Constants.GETSTATIC, index);
+    }
+
+
+    @Override
+    public int produceStack( ConstantPoolGen cpg ) {
+        return getFieldSize(cpg);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitPushInstruction(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitFieldInstruction(this);
+        v.visitGETSTATIC(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/GOTO.java b/src/main/java/org/apache/commons/bcel6/generic/GOTO.java
new file mode 100644
index 0000000..328bac7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/GOTO.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/** 
+ * GOTO - Branch always (to relative offset, not absolute address)
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class GOTO extends GotoInstruction implements VariableLengthInstruction {
+
+    private static final long serialVersionUID = 6106731367505145625L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    GOTO() {
+    }
+
+
+    public GOTO(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.GOTO, target);
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        index = getTargetOffset();
+        if (opcode == org.apache.commons.bcel6.Constants.GOTO) {
+            super.dump(out);
+        } else { // GOTO_W
+            index = getTargetOffset();
+            out.writeByte(opcode);
+            out.writeInt(index);
+        }
+    }
+
+
+    /** Called in pass 2 of InstructionList.setPositions() in order to update
+     * the branch target, that may shift due to variable length instructions.
+     */
+    @Override
+    protected int updatePosition( int offset, int max_offset ) {
+        int i = getTargetOffset(); // Depending on old position value
+        position += offset; // Position may be shifted by preceding expansions
+        if (Math.abs(i) >= (32767 - max_offset)) { // to large for short (estimate)
+            opcode = org.apache.commons.bcel6.Constants.GOTO_W;
+            short old_length = length;
+            length = 5;
+            return length - old_length;
+        }
+        return 0;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitVariableLengthInstruction(this);
+        v.visitUnconditionalBranch(this);
+        v.visitBranchInstruction(this);
+        v.visitGotoInstruction(this);
+        v.visitGOTO(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/GOTO_W.java b/src/main/java/org/apache/commons/bcel6/generic/GOTO_W.java
new file mode 100644
index 0000000..1420933
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/GOTO_W.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * GOTO_W - Branch always (to relative offset, not absolute address)
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class GOTO_W extends GotoInstruction {
+
+    private static final long serialVersionUID = -344799540124265957L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    GOTO_W() {
+    }
+
+
+    public GOTO_W(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.GOTO_W, target);
+        length = 5;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        index = getTargetOffset();
+        out.writeByte(opcode);
+        out.writeInt(index);
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        index = bytes.readInt();
+        length = 5;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitUnconditionalBranch(this);
+        v.visitBranchInstruction(this);
+        v.visitGotoInstruction(this);
+        v.visitGOTO_W(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/GotoInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/GotoInstruction.java
new file mode 100644
index 0000000..eb2f60c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/GotoInstruction.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * Super class for GOTO
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class GotoInstruction extends BranchInstruction implements UnconditionalBranch {
+
+    private static final long serialVersionUID = -2882435228056875173L;
+
+
+    GotoInstruction(short opcode, InstructionHandle target) {
+        super(opcode, target);
+    }
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    GotoInstruction() {
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/I2B.java b/src/main/java/org/apache/commons/bcel6/generic/I2B.java
new file mode 100644
index 0000000..80ba9b0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/I2B.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * I2B - Convert int to byte
+ * <PRE>Stack: ..., value -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class I2B extends ConversionInstruction {
+
+    private static final long serialVersionUID = -260969101469366410L;
+
+
+    /** Convert int to byte
+     */
+    public I2B() {
+        super(org.apache.commons.bcel6.Constants.I2B);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitI2B(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/I2C.java b/src/main/java/org/apache/commons/bcel6/generic/I2C.java
new file mode 100644
index 0000000..04a24e4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/I2C.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * I2C - Convert int to char
+ * <PRE>Stack: ..., value -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class I2C extends ConversionInstruction {
+
+    private static final long serialVersionUID = 7396507741159927455L;
+
+
+    /** Convert int to char
+     */
+    public I2C() {
+        super(org.apache.commons.bcel6.Constants.I2C);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitI2C(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/I2D.java b/src/main/java/org/apache/commons/bcel6/generic/I2D.java
new file mode 100644
index 0000000..95e1def
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/I2D.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * I2D - Convert int to double
+ * <PRE>Stack: ..., value -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class I2D extends ConversionInstruction {
+
+    private static final long serialVersionUID = 4267924152721121331L;
+
+
+    /** Convert int to double
+     */
+    public I2D() {
+        super(org.apache.commons.bcel6.Constants.I2D);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitI2D(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/I2F.java b/src/main/java/org/apache/commons/bcel6/generic/I2F.java
new file mode 100644
index 0000000..f2138ec
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/I2F.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * I2F - Convert int to float
+ * <PRE>Stack: ..., value -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class I2F extends ConversionInstruction {
+
+    private static final long serialVersionUID = -816875455957376859L;
+
+
+    /** Convert int to float
+     */
+    public I2F() {
+        super(org.apache.commons.bcel6.Constants.I2F);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitI2F(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/I2L.java b/src/main/java/org/apache/commons/bcel6/generic/I2L.java
new file mode 100644
index 0000000..cb053d4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/I2L.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * I2L - Convert int to long
+ * <PRE>Stack: ..., value -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class I2L extends ConversionInstruction {
+
+    private static final long serialVersionUID = 8923707875178789326L;
+
+
+    /** Convert int to long
+     */
+    public I2L() {
+        super(org.apache.commons.bcel6.Constants.I2L);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitI2L(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/I2S.java b/src/main/java/org/apache/commons/bcel6/generic/I2S.java
new file mode 100644
index 0000000..a556bc0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/I2S.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * I2S - Convert int to short
+ * <PRE>Stack: ..., value -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class I2S extends ConversionInstruction {
+
+    private static final long serialVersionUID = -2414292630144687091L;
+
+
+    public I2S() {
+        super(org.apache.commons.bcel6.Constants.I2S);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitI2S(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IADD.java b/src/main/java/org/apache/commons/bcel6/generic/IADD.java
new file mode 100644
index 0000000..6101fda
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IADD.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IADD - Add ints
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IADD extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 8749750216946526117L;
+
+
+    /** Add ints
+     */
+    public IADD() {
+        super(org.apache.commons.bcel6.Constants.IADD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitIADD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/IALOAD.java
new file mode 100644
index 0000000..611e3a2
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IALOAD.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IALOAD - Load int from array
+ * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IALOAD extends ArrayInstruction implements StackProducer {
+
+    private static final long serialVersionUID = -3275094472217586613L;
+
+
+    /** 
+     * Load int from array
+     */
+    public IALOAD() {
+        super(org.apache.commons.bcel6.Constants.IALOAD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitIALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IAND.java b/src/main/java/org/apache/commons/bcel6/generic/IAND.java
new file mode 100644
index 0000000..5a3beb6
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IAND.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IAND - Bitwise AND int
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IAND extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -3190292062305201816L;
+
+
+    public IAND() {
+        super(org.apache.commons.bcel6.Constants.IAND);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitIAND(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/IASTORE.java
new file mode 100644
index 0000000..80e6841
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IASTORE.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IASTORE -  Store into int array
+ * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IASTORE extends ArrayInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = -3570157505504012648L;
+
+
+    /** 
+     * Store into int array
+     */
+    public IASTORE() {
+        super(org.apache.commons.bcel6.Constants.IASTORE);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitIASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ICONST.java b/src/main/java/org/apache/commons/bcel6/generic/ICONST.java
new file mode 100644
index 0000000..679557d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ICONST.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ICONST - Push value between -1, ..., 5, other values cause an exception
+ *
+ * <PRE>Stack: ... -&gt; ..., </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ICONST extends Instruction implements ConstantPushInstruction {
+
+    private static final long serialVersionUID = -174595933747784635L;
+    private int value;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ICONST() {
+    }
+
+
+    public ICONST(int i) {
+        super(org.apache.commons.bcel6.Constants.ICONST_0, (short) 1);
+        if ((i >= -1) && (i <= 5)) {
+            opcode = (short) (org.apache.commons.bcel6.Constants.ICONST_0 + i); // Even works for i == -1
+        } else {
+            throw new ClassGenException("ICONST can be used only for value between -1 and 5: " + i);
+        }
+        value = i;
+    }
+
+
+    public Number getValue() {
+        return Integer.valueOf(value);
+    }
+
+
+    /** @return Type.INT
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.INT;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitPushInstruction(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitConstantPushInstruction(this);
+        v.visitICONST(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IDIV.java b/src/main/java/org/apache/commons/bcel6/generic/IDIV.java
new file mode 100644
index 0000000..0f90c46
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IDIV.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * IDIV - Divide ints
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IDIV extends ArithmeticInstruction implements ExceptionThrower {
+
+    private static final long serialVersionUID = -7104037931993634172L;
+
+
+    /** Divide ints
+     */
+    public IDIV() {
+        super(org.apache.commons.bcel6.Constants.IDIV);
+    }
+
+
+    /** @return exceptions this instruction may cause
+     */
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.ARITHMETIC_EXCEPTION
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitIDIV(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IFEQ.java b/src/main/java/org/apache/commons/bcel6/generic/IFEQ.java
new file mode 100644
index 0000000..60a5037
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IFEQ.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IFEQ - Branch if int comparison with zero succeeds
+ *
+ * <PRE>Stack: ..., value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IFEQ extends IfInstruction {
+
+    private static final long serialVersionUID = -6140576561545855324L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IFEQ() {
+    }
+
+
+    public IFEQ(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IFEQ, target);
+    }
+
+
+    /**
+     * @return negation of instruction, e.g. IFEQ.negate() == IFNE
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IFNE(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIFEQ(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IFGE.java b/src/main/java/org/apache/commons/bcel6/generic/IFGE.java
new file mode 100644
index 0000000..1ed87ad
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IFGE.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IFGE - Branch if int comparison with zero succeeds
+ *
+ * <PRE>Stack: ..., value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IFGE extends IfInstruction {
+
+    private static final long serialVersionUID = 8975527282985945729L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IFGE() {
+    }
+
+
+    public IFGE(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IFGE, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IFLT(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIFGE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IFGT.java b/src/main/java/org/apache/commons/bcel6/generic/IFGT.java
new file mode 100644
index 0000000..8ace647
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IFGT.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IFGT - Branch if int comparison with zero succeeds
+ *
+ * <PRE>Stack: ..., value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IFGT extends IfInstruction {
+
+    private static final long serialVersionUID = -6271055211127179697L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IFGT() {
+    }
+
+
+    public IFGT(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IFGT, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IFLE(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIFGT(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IFLE.java b/src/main/java/org/apache/commons/bcel6/generic/IFLE.java
new file mode 100644
index 0000000..8fc1e48
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IFLE.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IFLE - Branch if int comparison with zero succeeds
+ *
+ * <PRE>Stack: ..., value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IFLE extends IfInstruction {
+
+    private static final long serialVersionUID = 7916641859064664263L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IFLE() {
+    }
+
+
+    public IFLE(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IFLE, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IFGT(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIFLE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IFLT.java b/src/main/java/org/apache/commons/bcel6/generic/IFLT.java
new file mode 100644
index 0000000..e58e4e0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IFLT.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IFLT - Branch if int comparison with zero succeeds
+ *
+ * <PRE>Stack: ..., value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IFLT extends IfInstruction {
+
+    private static final long serialVersionUID = 2489268758129304231L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IFLT() {
+    }
+
+
+    public IFLT(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IFLT, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IFGE(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIFLT(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IFNE.java b/src/main/java/org/apache/commons/bcel6/generic/IFNE.java
new file mode 100644
index 0000000..a5f0688
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IFNE.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IFNE - Branch if int comparison with zero succeeds
+ *
+ * <PRE>Stack: ..., value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IFNE extends IfInstruction {
+
+    private static final long serialVersionUID = -5417647524534847152L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IFNE() {
+    }
+
+
+    public IFNE(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IFNE, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IFEQ(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIFNE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IFNONNULL.java b/src/main/java/org/apache/commons/bcel6/generic/IFNONNULL.java
new file mode 100644
index 0000000..be016ce
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IFNONNULL.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IFNONNULL - Branch if reference is not null
+ *
+ * <PRE>Stack: ..., reference -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IFNONNULL extends IfInstruction {
+
+    private static final long serialVersionUID = -6378085152112796792L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IFNONNULL() {
+    }
+
+
+    public IFNONNULL(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IFNONNULL, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IFNULL(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIFNONNULL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IFNULL.java b/src/main/java/org/apache/commons/bcel6/generic/IFNULL.java
new file mode 100644
index 0000000..36f7e47
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IFNULL.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IFNULL - Branch if reference is not null
+ *
+ * <PRE>Stack: ..., reference -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IFNULL extends IfInstruction {
+
+    private static final long serialVersionUID = 608514554995424349L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IFNULL() {
+    }
+
+
+    public IFNULL(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IFNULL, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IFNONNULL(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIFNULL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IF_ACMPEQ.java b/src/main/java/org/apache/commons/bcel6/generic/IF_ACMPEQ.java
new file mode 100644
index 0000000..1451b90
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IF_ACMPEQ.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IF_ACMPEQ - Branch if reference comparison succeeds
+ *
+ * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IF_ACMPEQ extends IfInstruction {
+
+    private static final long serialVersionUID = -4528733406576671849L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IF_ACMPEQ() {
+    }
+
+
+    public IF_ACMPEQ(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IF_ACMPEQ, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IF_ACMPNE(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIF_ACMPEQ(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IF_ACMPNE.java b/src/main/java/org/apache/commons/bcel6/generic/IF_ACMPNE.java
new file mode 100644
index 0000000..4fee177
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IF_ACMPNE.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IF_ACMPNE - Branch if reference comparison doesn't succeed
+ *
+ * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IF_ACMPNE extends IfInstruction {
+
+    private static final long serialVersionUID = -5532275839192747402L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IF_ACMPNE() {
+    }
+
+
+    public IF_ACMPNE(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IF_ACMPNE, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IF_ACMPEQ(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIF_ACMPNE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPEQ.java b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPEQ.java
new file mode 100644
index 0000000..776c1e0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPEQ.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IF_ICMPEQ - Branch if int comparison succeeds
+ *
+ * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IF_ICMPEQ extends IfInstruction {
+
+    private static final long serialVersionUID = -3149605608148417123L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IF_ICMPEQ() {
+    }
+
+
+    public IF_ICMPEQ(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IF_ICMPEQ, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IF_ICMPNE(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIF_ICMPEQ(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPGE.java b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPGE.java
new file mode 100644
index 0000000..73b4bb7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPGE.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IF_ICMPGE - Branch if int comparison succeeds
+ *
+ * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IF_ICMPGE extends IfInstruction {
+
+    private static final long serialVersionUID = -1887574519712008723L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IF_ICMPGE() {
+    }
+
+
+    public IF_ICMPGE(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IF_ICMPGE, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IF_ICMPLT(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIF_ICMPGE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPGT.java b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPGT.java
new file mode 100644
index 0000000..04d3171
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPGT.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IF_ICMPGT - Branch if int comparison succeeds
+ *
+ * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IF_ICMPGT extends IfInstruction {
+
+    private static final long serialVersionUID = -2569877744173094534L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IF_ICMPGT() {
+    }
+
+
+    public IF_ICMPGT(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IF_ICMPGT, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IF_ICMPLE(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIF_ICMPGT(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPLE.java b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPLE.java
new file mode 100644
index 0000000..c8f4b97
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPLE.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IF_ICMPLE - Branch if int comparison succeeds
+ *
+ * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IF_ICMPLE extends IfInstruction {
+
+    private static final long serialVersionUID = -6863915647505504868L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IF_ICMPLE() {
+    }
+
+
+    public IF_ICMPLE(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IF_ICMPLE, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IF_ICMPGT(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIF_ICMPLE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPLT.java b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPLT.java
new file mode 100644
index 0000000..af8b1dc
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPLT.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IF_ICMPLT - Branch if int comparison succeeds
+ *
+ * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IF_ICMPLT extends IfInstruction {
+
+    private static final long serialVersionUID = -6835991395337462478L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IF_ICMPLT() {
+    }
+
+
+    public IF_ICMPLT(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IF_ICMPLT, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IF_ICMPGE(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIF_ICMPLT(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPNE.java b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPNE.java
new file mode 100644
index 0000000..b211f42
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IF_ICMPNE.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IF_ICMPNE - Branch if int comparison doesn't succeed
+ *
+ * <PRE>Stack: ..., value1, value2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IF_ICMPNE extends IfInstruction {
+
+    private static final long serialVersionUID = -3908465635973274661L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IF_ICMPNE() {
+    }
+
+
+    public IF_ICMPNE(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.IF_ICMPNE, target);
+    }
+
+
+    /**
+     * @return negation of instruction
+     */
+    @Override
+    public IfInstruction negate() {
+        return new IF_ICMPEQ(target);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitIfInstruction(this);
+        v.visitIF_ICMPNE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IINC.java b/src/main/java/org/apache/commons/bcel6/generic/IINC.java
new file mode 100644
index 0000000..0f29088
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IINC.java
@@ -0,0 +1,167 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/**
+ * IINC - Increment local variable by constant
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IINC extends LocalVariableInstruction {
+
+    private static final long serialVersionUID = -8938364416647466869L;
+    private boolean wide;
+    private int c;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IINC() {
+    }
+
+
+    /**
+     * @param n index of local variable
+     * @param c increment factor
+     */
+    public IINC(int n, int c) {
+        super(); // Default behaviour of LocalVariableInstruction causes error
+        this.opcode = org.apache.commons.bcel6.Constants.IINC;
+        this.length = (short) 3;
+        setIndex(n); // May set wide as side effect
+        setIncrement(c);
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        if (wide) {
+            out.writeByte(org.apache.commons.bcel6.Constants.WIDE);
+        }
+        out.writeByte(opcode);
+        if (wide) {
+            out.writeShort(n);
+            out.writeShort(c);
+        } else {
+            out.writeByte(n);
+            out.writeByte(c);
+        }
+    }
+
+
+    private void setWide() {
+        wide = (n > org.apache.commons.bcel6.Constants.MAX_BYTE) || (Math.abs(c) > Byte.MAX_VALUE);
+        if (wide) {
+            length = 6; // wide byte included  
+        } else {
+            length = 3;
+        }
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        this.wide = wide;
+        if (wide) {
+            length = 6;
+            n = bytes.readUnsignedShort();
+            c = bytes.readShort();
+        } else {
+            length = 3;
+            n = bytes.readUnsignedByte();
+            c = bytes.readByte();
+        }
+    }
+
+
+    /**
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        return super.toString(verbose) + " " + c;
+    }
+
+
+    /**
+     * Set index of local variable.
+     */
+    @Override
+    public final void setIndex( int n ) {
+        if (n < 0) {
+            throw new ClassGenException("Negative index value: " + n);
+        }
+        this.n = n;
+        setWide();
+    }
+
+
+    /**
+     * @return increment factor
+     */
+    public final int getIncrement() {
+        return c;
+    }
+
+
+    /**
+     * Set increment factor.
+     */
+    public final void setIncrement( int c ) {
+        this.c = c;
+        setWide();
+    }
+
+
+    /** @return int type
+     */
+    @Override
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.INT;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitLocalVariableInstruction(this);
+        v.visitIINC(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ILOAD.java b/src/main/java/org/apache/commons/bcel6/generic/ILOAD.java
new file mode 100644
index 0000000..b517e55
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ILOAD.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ILOAD - Load int from local variable onto stack
+ * <PRE>Stack: ... -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ILOAD extends LoadInstruction {
+
+    private static final long serialVersionUID = 7568563453093184347L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ILOAD() {
+        super(org.apache.commons.bcel6.Constants.ILOAD, org.apache.commons.bcel6.Constants.ILOAD_0);
+    }
+
+
+    /** Load int from local variable
+     * @param n index of local variable
+     */
+    public ILOAD(int n) {
+        super(org.apache.commons.bcel6.Constants.ILOAD, org.apache.commons.bcel6.Constants.ILOAD_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitILOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IMPDEP1.java b/src/main/java/org/apache/commons/bcel6/generic/IMPDEP1.java
new file mode 100644
index 0000000..134689a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IMPDEP1.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * IMPDEP1 - Implementation dependent
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IMPDEP1 extends Instruction {
+
+    private static final long serialVersionUID = 134641616863598508L;
+
+
+    public IMPDEP1() {
+        super(org.apache.commons.bcel6.Constants.IMPDEP1, (short) 1);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitIMPDEP1(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IMPDEP2.java b/src/main/java/org/apache/commons/bcel6/generic/IMPDEP2.java
new file mode 100644
index 0000000..86fd578
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IMPDEP2.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * IMPDEP2 - Implementation dependent
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IMPDEP2 extends Instruction {
+
+    private static final long serialVersionUID = 4097564761941607538L;
+
+
+    public IMPDEP2() {
+        super(org.apache.commons.bcel6.Constants.IMPDEP2, (short) 1);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitIMPDEP2(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IMUL.java b/src/main/java/org/apache/commons/bcel6/generic/IMUL.java
new file mode 100644
index 0000000..ef28ee0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IMUL.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IMUL - Multiply ints
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IMUL extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -7475024981820292461L;
+
+
+    /** Multiply ints
+     */
+    public IMUL() {
+        super(org.apache.commons.bcel6.Constants.IMUL);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitIMUL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/INEG.java b/src/main/java/org/apache/commons/bcel6/generic/INEG.java
new file mode 100644
index 0000000..e0d1dc2
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/INEG.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * INEG - Negate int
+ * <PRE>Stack: ..., value -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class INEG extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 6175987548738672934L;
+
+
+    public INEG() {
+        super(org.apache.commons.bcel6.Constants.INEG);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitINEG(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/INSTANCEOF.java b/src/main/java/org/apache/commons/bcel6/generic/INSTANCEOF.java
new file mode 100644
index 0000000..72cd624
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/INSTANCEOF.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * INSTANCEOF - Determine if object is of given type
+ * <PRE>Stack: ..., objectref -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class INSTANCEOF extends CPInstruction implements LoadClass, ExceptionThrower,
+        StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = -1068668479062613915L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    INSTANCEOF() {
+    }
+
+
+    public INSTANCEOF(int index) {
+        super(org.apache.commons.bcel6.Constants.INSTANCEOF, index);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return org.apache.commons.bcel6.ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION;
+    }
+
+
+    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
+        Type t = getType(cpg);
+        if (t instanceof ArrayType) {
+            t = ((ArrayType) t).getBasicType();
+        }
+        return (t instanceof ObjectType) ? (ObjectType) t : null;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitLoadClass(this);
+        v.visitExceptionThrower(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitTypedInstruction(this);
+        v.visitCPInstruction(this);
+        v.visitINSTANCEOF(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/INVOKEDYNAMIC.java b/src/main/java/org/apache/commons/bcel6/generic/INVOKEDYNAMIC.java
new file mode 100644
index 0000000..2092b42
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/INVOKEDYNAMIC.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/**
+ * Class for INVOKEDYNAMIC. Not an instance of InvokeInstruction, since that class
+ * expects to be able to get the class of the method. Ignores the bootstrap
+ * mechanism entirely.
+ *
+ * @version $Id: InvokeInstruction.java 1152072 2011-07-29 01:54:05Z dbrosius $
+ * @since 6.0
+ */
+public class INVOKEDYNAMIC extends InvokeInstruction {
+
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    INVOKEDYNAMIC() {
+    }
+
+
+    public INVOKEDYNAMIC(int index) {
+        super(Constants.INVOKEDYNAMIC, index);
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode);
+        out.writeShort(index);
+        out.writeByte(0);
+        out.writeByte(0);
+       }
+
+
+    /**
+     * Read needed data (i.e., index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        super.initFromFile(bytes, wide);
+        length = 5;
+        bytes.readByte(); // Skip 0 byte
+        bytes.readByte(); // Skip 0 byte
+    }
+
+
+    /**
+     * @return mnemonic for instruction with symbolic references resolved
+     */
+    @Override
+    public String toString( ConstantPool cp ) {
+        return super.toString(cp);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 3] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ILLEGAL_ACCESS_ERROR;
+        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 1] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
+        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitStackProducer(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitInvokeInstruction(this);
+        v.visitINVOKEDYNAMIC(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/INVOKEINTERFACE.java b/src/main/java/org/apache/commons/bcel6/generic/INVOKEINTERFACE.java
new file mode 100644
index 0000000..77dae17
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/INVOKEINTERFACE.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * INVOKEINTERFACE - Invoke interface method
+ * <PRE>Stack: ..., objectref, [arg1, [arg2 ...]] -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class INVOKEINTERFACE extends InvokeInstruction {
+
+    private static final long serialVersionUID = 8198753714085379482L;
+    private int nargs; // Number of arguments on stack (number of stack slots), called "count" in vmspec2
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    INVOKEINTERFACE() {
+    }
+
+
+    public INVOKEINTERFACE(int index, int nargs) {
+        super(Constants.INVOKEINTERFACE, index);
+        length = 5;
+        if (nargs < 1) {
+            throw new ClassGenException("Number of arguments must be > 0 " + nargs);
+        }
+        this.nargs = nargs;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode);
+        out.writeShort(index);
+        out.writeByte(nargs);
+        out.writeByte(0);
+    }
+
+
+    /**
+     * The <B>count</B> argument according to the Java Language Specification,
+     * Second Edition.
+     */
+    public int getCount() {
+        return nargs;
+    }
+
+
+    /**
+     * Read needed data (i.e., index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        super.initFromFile(bytes, wide);
+        length = 5;
+        nargs = bytes.readUnsignedByte();
+        bytes.readByte(); // Skip 0 byte
+    }
+
+
+    /**
+     * @return mnemonic for instruction with symbolic references resolved
+     */
+    @Override
+    public String toString( ConstantPool cp ) {
+        return super.toString(cp) + " " + nargs;
+    }
+
+
+    @Override
+    public int consumeStack( ConstantPoolGen cpg ) { // nargs is given in byte-code
+        return nargs; // nargs includes this reference
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 3] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ILLEGAL_ACCESS_ERROR;
+        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 1] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
+        cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitStackProducer(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitInvokeInstruction(this);
+        v.visitINVOKEINTERFACE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/INVOKESPECIAL.java b/src/main/java/org/apache/commons/bcel6/generic/INVOKESPECIAL.java
new file mode 100644
index 0000000..7df166e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/INVOKESPECIAL.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * INVOKESPECIAL - Invoke instance method; special handling for superclass, private
+ * and instance initialization method invocations
+ *
+ * <PRE>Stack: ..., objectref, [arg1, [arg2 ...]] -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class INVOKESPECIAL extends InvokeInstruction {
+
+    private static final long serialVersionUID = -6615779239416262849L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    INVOKESPECIAL() {
+    }
+
+
+    public INVOKESPECIAL(int index) {
+        super(Constants.INVOKESPECIAL, index);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 3] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitStackProducer(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitInvokeInstruction(this);
+        v.visitINVOKESPECIAL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/INVOKESTATIC.java b/src/main/java/org/apache/commons/bcel6/generic/INVOKESTATIC.java
new file mode 100644
index 0000000..cbbd0d3
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/INVOKESTATIC.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * INVOKESTATIC - Invoke a class (static) method
+ *
+ * <PRE>Stack: ..., [arg1, [arg2 ...]] -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class INVOKESTATIC extends InvokeInstruction {
+
+    private static final long serialVersionUID = -2160020248508943620L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    INVOKESTATIC() {
+    }
+
+
+    public INVOKESTATIC(int index) {
+        super(Constants.INVOKESTATIC, index);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitStackProducer(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitInvokeInstruction(this);
+        v.visitINVOKESTATIC(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/INVOKEVIRTUAL.java b/src/main/java/org/apache/commons/bcel6/generic/INVOKEVIRTUAL.java
new file mode 100644
index 0000000..8c7ab86
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/INVOKEVIRTUAL.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * INVOKEVIRTUAL - Invoke instance method; dispatch based on class
+ *
+ * <PRE>Stack: ..., objectref, [arg1, [arg2 ...]] -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class INVOKEVIRTUAL extends InvokeInstruction {
+
+    private static final long serialVersionUID = -7355623307528443725L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    INVOKEVIRTUAL() {
+    }
+
+
+    public INVOKEVIRTUAL(int index) {
+        super(Constants.INVOKEVIRTUAL, index);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 3] = ExceptionConstants.UNSATISFIED_LINK_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 2] = ExceptionConstants.ABSTRACT_METHOD_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitStackProducer(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitInvokeInstruction(this);
+        v.visitINVOKEVIRTUAL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IOR.java b/src/main/java/org/apache/commons/bcel6/generic/IOR.java
new file mode 100644
index 0000000..a4f2cfa
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IOR.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IOR - Bitwise OR int
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IOR extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -6128609553204409153L;
+
+
+    public IOR() {
+        super(org.apache.commons.bcel6.Constants.IOR);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitIOR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IREM.java b/src/main/java/org/apache/commons/bcel6/generic/IREM.java
new file mode 100644
index 0000000..aa25559
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IREM.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * IREM - Remainder of int
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IREM extends ArithmeticInstruction implements ExceptionThrower {
+
+    private static final long serialVersionUID = 834504719616513910L;
+
+
+    /** Remainder of ints
+     */
+    public IREM() {
+        super(org.apache.commons.bcel6.Constants.IREM);
+    }
+
+
+    /** @return exceptions this instruction may cause
+     */
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.ARITHMETIC_EXCEPTION
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitIREM(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IRETURN.java b/src/main/java/org/apache/commons/bcel6/generic/IRETURN.java
new file mode 100644
index 0000000..b01d11e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IRETURN.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IRETURN -  Return int from method
+ * <PRE>Stack: ..., value -&gt; &lt;empty&gt;</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IRETURN extends ReturnInstruction {
+
+    private static final long serialVersionUID = 4067606299818510584L;
+
+
+    /** Return int from method
+     */
+    public IRETURN() {
+        super(org.apache.commons.bcel6.Constants.IRETURN);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitReturnInstruction(this);
+        v.visitIRETURN(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ISHL.java b/src/main/java/org/apache/commons/bcel6/generic/ISHL.java
new file mode 100644
index 0000000..d2288a7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ISHL.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * ISHL - Arithmetic shift left int
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ISHL extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -7440998118555505042L;
+
+
+    public ISHL() {
+        super(org.apache.commons.bcel6.Constants.ISHL);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitISHL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ISHR.java b/src/main/java/org/apache/commons/bcel6/generic/ISHR.java
new file mode 100644
index 0000000..98cb58c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ISHR.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * ISHR - Arithmetic shift right int
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ISHR extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 7401114050910307281L;
+
+
+    public ISHR() {
+        super(org.apache.commons.bcel6.Constants.ISHR);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitISHR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ISTORE.java b/src/main/java/org/apache/commons/bcel6/generic/ISTORE.java
new file mode 100644
index 0000000..2f0884c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ISTORE.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ISTORE - Store int from stack into local variable
+ * <PRE>Stack: ..., value -&gt; ... </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ISTORE extends StoreInstruction {
+
+    private static final long serialVersionUID = 6155373362393796303L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ISTORE() {
+        super(org.apache.commons.bcel6.Constants.ISTORE, org.apache.commons.bcel6.Constants.ISTORE_0);
+    }
+
+
+    /** Store int into local variable
+     * @param n index of local variable
+     */
+    public ISTORE(int n) {
+        super(org.apache.commons.bcel6.Constants.ISTORE, org.apache.commons.bcel6.Constants.ISTORE_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitISTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ISUB.java b/src/main/java/org/apache/commons/bcel6/generic/ISUB.java
new file mode 100644
index 0000000..5268e87
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ISUB.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * ISUB - Substract ints
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ISUB extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 1878271684888856459L;
+
+
+    /** Substract ints
+     */
+    public ISUB() {
+        super(org.apache.commons.bcel6.Constants.ISUB);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitISUB(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IUSHR.java b/src/main/java/org/apache/commons/bcel6/generic/IUSHR.java
new file mode 100644
index 0000000..ede2e9a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IUSHR.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IUSHR - Logical shift right int
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IUSHR extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -4507658555921269426L;
+
+
+    public IUSHR() {
+        super(org.apache.commons.bcel6.Constants.IUSHR);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitIUSHR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IXOR.java b/src/main/java/org/apache/commons/bcel6/generic/IXOR.java
new file mode 100644
index 0000000..579c453
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IXOR.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * IXOR - Bitwise XOR int
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class IXOR extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -6524415552072672532L;
+
+
+    public IXOR() {
+        super(org.apache.commons.bcel6.Constants.IXOR);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitIXOR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IfInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/IfInstruction.java
new file mode 100644
index 0000000..641ccb2
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IfInstruction.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Super class for the IFxxx family of instructions.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class IfInstruction extends BranchInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = -781053966413893941L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    IfInstruction() {
+    }
+
+
+    /**
+     * @param opcode opcode of instruction
+     * @param target Target instruction to branch to
+     */
+    protected IfInstruction(short opcode, InstructionHandle target) {
+        super(opcode, target);
+    }
+
+
+    /**
+     * @return negation of instruction, e.g. IFEQ.negate() == IFNE
+     */
+    public abstract IfInstruction negate();
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/IndexedInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/IndexedInstruction.java
new file mode 100644
index 0000000..50fd604
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/IndexedInstruction.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denote entity that refers to an index, e.g. local variable instructions,
+ * RET, CPInstruction, etc.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface IndexedInstruction {
+
+    int getIndex();
+
+
+    void setIndex( int index );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/Instruction.java b/src/main/java/org/apache/commons/bcel6/generic/Instruction.java
new file mode 100644
index 0000000..fb7709f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/Instruction.java
@@ -0,0 +1,568 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * Abstract super class for all Java byte codes.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class Instruction implements Cloneable, Serializable {
+
+    private static final long serialVersionUID = -2518741982574515847L;
+    protected short length = 1; // Length of instruction in bytes 
+    protected short opcode = -1; // Opcode number
+    private static InstructionComparator cmp = InstructionComparator.DEFAULT;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    Instruction() {
+    }
+
+
+    public Instruction(short opcode, short length) {
+        this.length = length;
+        this.opcode = opcode;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode); // Common for all instructions
+    }
+
+
+    /** @return name of instruction, i.e., opcode name
+     */
+    public String getName() {
+        return Constants.OPCODE_NAMES[opcode];
+    }
+
+
+    /**
+     * Long output format:
+     *
+     * &lt;name of opcode&gt; "["&lt;opcode number&gt;"]" 
+     * "("&lt;length of instruction&gt;")"
+     *
+     * @param verbose long/short format switch
+     * @return mnemonic for instruction
+     */
+    public String toString( boolean verbose ) {
+        if (verbose) {
+            return getName() + "[" + opcode + "](" + length + ")";
+        } else {
+            return getName();
+        }
+    }
+
+
+    /**
+     * @return mnemonic for instruction in verbose format
+     */
+    @Override
+    public String toString() {
+        return toString(true);
+    }
+
+
+    /**
+     * @return mnemonic for instruction with sumbolic references resolved
+     */
+    public String toString( ConstantPool cp ) {
+        return toString(false);
+    }
+
+
+    /**
+     * Use with caution, since `BranchInstruction's have a `target' reference which
+     * is not copied correctly (only basic types are). This also applies for 
+     * `Select' instructions with their multiple branch targets.
+     *
+     * @see BranchInstruction
+     * @return (shallow) copy of an instruction
+     */
+    public Instruction copy() {
+        Instruction i = null;
+        // "Constant" instruction, no need to duplicate
+        if (InstructionConstants.INSTRUCTIONS[this.getOpcode()] != null) {
+            i = this;
+        } else {
+            try {
+                i = (Instruction) clone();
+            } catch (CloneNotSupportedException e) {
+                System.err.println(e);
+            }
+        }
+        return i;
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     *
+     * @param bytes byte sequence to read from
+     * @param wide "wide" instruction flag
+     * @throws IOException may be thrown if the implementation needs to read data from the file
+     */
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+    }
+
+
+    /**
+     * Read an instruction from (byte code) input stream and return the
+     * appropiate object.
+     *
+     * @param bytes input stream bytes
+     * @return instruction object being read
+     */
+    public static Instruction readInstruction( ByteSequence bytes ) throws IOException {
+        boolean wide = false;
+        short opcode = (short) bytes.readUnsignedByte();
+        Instruction obj = null;
+        if (opcode == Constants.WIDE) { // Read next opcode after wide byte
+            wide = true;
+            opcode = (short) bytes.readUnsignedByte();
+        }
+        if (InstructionConstants.INSTRUCTIONS[opcode] != null) {
+            return InstructionConstants.INSTRUCTIONS[opcode]; // Used predefined immutable object, if available
+        }
+
+        switch (opcode) {
+            case Constants.BIPUSH:
+                obj = new BIPUSH();
+                break;
+            case Constants.SIPUSH:
+                obj = new SIPUSH();
+                break;
+            case Constants.LDC:
+                obj = new LDC();
+                break;
+            case Constants.LDC_W:
+                obj = new LDC_W();
+                break;
+            case Constants.LDC2_W:
+                obj = new LDC2_W();
+                break;
+            case Constants.ILOAD:
+                obj = new ILOAD();
+                break;
+            case Constants.LLOAD:
+                obj = new LLOAD();
+                break;
+            case Constants.FLOAD:
+                obj = new FLOAD();
+                break;
+            case Constants.DLOAD:
+                obj = new DLOAD();
+                break;
+            case Constants.ALOAD:
+                obj = new ALOAD();
+                break;
+            case Constants.ILOAD_0:
+                obj = new ILOAD(0);
+                break;
+            case Constants.ILOAD_1:
+                obj = new ILOAD(1);
+                break;
+            case Constants.ILOAD_2:
+                obj = new ILOAD(2);
+                break;
+            case Constants.ILOAD_3:
+                obj = new ILOAD(3);
+                break;
+            case Constants.LLOAD_0:
+                obj = new LLOAD(0);
+                break;
+            case Constants.LLOAD_1:
+                obj = new LLOAD(1);
+                break;
+            case Constants.LLOAD_2:
+                obj = new LLOAD(2);
+                break;
+            case Constants.LLOAD_3:
+                obj = new LLOAD(3);
+                break;
+            case Constants.FLOAD_0:
+                obj = new FLOAD(0);
+                break;
+            case Constants.FLOAD_1:
+                obj = new FLOAD(1);
+                break;
+            case Constants.FLOAD_2:
+                obj = new FLOAD(2);
+                break;
+            case Constants.FLOAD_3:
+                obj = new FLOAD(3);
+                break;
+            case Constants.DLOAD_0:
+                obj = new DLOAD(0);
+                break;
+            case Constants.DLOAD_1:
+                obj = new DLOAD(1);
+                break;
+            case Constants.DLOAD_2:
+                obj = new DLOAD(2);
+                break;
+            case Constants.DLOAD_3:
+                obj = new DLOAD(3);
+                break;
+            case Constants.ALOAD_0:
+                obj = new ALOAD(0);
+                break;
+            case Constants.ALOAD_1:
+                obj = new ALOAD(1);
+                break;
+            case Constants.ALOAD_2:
+                obj = new ALOAD(2);
+                break;
+            case Constants.ALOAD_3:
+                obj = new ALOAD(3);
+                break;
+            case Constants.ISTORE:
+                obj = new ISTORE();
+                break;
+            case Constants.LSTORE:
+                obj = new LSTORE();
+                break;
+            case Constants.FSTORE:
+                obj = new FSTORE();
+                break;
+            case Constants.DSTORE:
+                obj = new DSTORE();
+                break;
+            case Constants.ASTORE:
+                obj = new ASTORE();
+                break;
+            case Constants.ISTORE_0:
+                obj = new ISTORE(0);
+                break;
+            case Constants.ISTORE_1:
+                obj = new ISTORE(1);
+                break;
+            case Constants.ISTORE_2:
+                obj = new ISTORE(2);
+                break;
+            case Constants.ISTORE_3:
+                obj = new ISTORE(3);
+                break;
+            case Constants.LSTORE_0:
+                obj = new LSTORE(0);
+                break;
+            case Constants.LSTORE_1:
+                obj = new LSTORE(1);
+                break;
+            case Constants.LSTORE_2:
+                obj = new LSTORE(2);
+                break;
+            case Constants.LSTORE_3:
+                obj = new LSTORE(3);
+                break;
+            case Constants.FSTORE_0:
+                obj = new FSTORE(0);
+                break;
+            case Constants.FSTORE_1:
+                obj = new FSTORE(1);
+                break;
+            case Constants.FSTORE_2:
+                obj = new FSTORE(2);
+                break;
+            case Constants.FSTORE_3:
+                obj = new FSTORE(3);
+                break;
+            case Constants.DSTORE_0:
+                obj = new DSTORE(0);
+                break;
+            case Constants.DSTORE_1:
+                obj = new DSTORE(1);
+                break;
+            case Constants.DSTORE_2:
+                obj = new DSTORE(2);
+                break;
+            case Constants.DSTORE_3:
+                obj = new DSTORE(3);
+                break;
+            case Constants.ASTORE_0:
+                obj = new ASTORE(0);
+                break;
+            case Constants.ASTORE_1:
+                obj = new ASTORE(1);
+                break;
+            case Constants.ASTORE_2:
+                obj = new ASTORE(2);
+                break;
+            case Constants.ASTORE_3:
+                obj = new ASTORE(3);
+                break;
+            case Constants.IINC:
+                obj = new IINC();
+                break;
+            case Constants.IFEQ:
+                obj = new IFEQ();
+                break;
+            case Constants.IFNE:
+                obj = new IFNE();
+                break;
+            case Constants.IFLT:
+                obj = new IFLT();
+                break;
+            case Constants.IFGE:
+                obj = new IFGE();
+                break;
+            case Constants.IFGT:
+                obj = new IFGT();
+                break;
+            case Constants.IFLE:
+                obj = new IFLE();
+                break;
+            case Constants.IF_ICMPEQ:
+                obj = new IF_ICMPEQ();
+                break;
+            case Constants.IF_ICMPNE:
+                obj = new IF_ICMPNE();
+                break;
+            case Constants.IF_ICMPLT:
+                obj = new IF_ICMPLT();
+                break;
+            case Constants.IF_ICMPGE:
+                obj = new IF_ICMPGE();
+                break;
+            case Constants.IF_ICMPGT:
+                obj = new IF_ICMPGT();
+                break;
+            case Constants.IF_ICMPLE:
+                obj = new IF_ICMPLE();
+                break;
+            case Constants.IF_ACMPEQ:
+                obj = new IF_ACMPEQ();
+                break;
+            case Constants.IF_ACMPNE:
+                obj = new IF_ACMPNE();
+                break;
+            case Constants.GOTO:
+                obj = new GOTO();
+                break;
+            case Constants.JSR:
+                obj = new JSR();
+                break;
+            case Constants.RET:
+                obj = new RET();
+                break;
+            case Constants.TABLESWITCH:
+                obj = new TABLESWITCH();
+                break;
+            case Constants.LOOKUPSWITCH:
+                obj = new LOOKUPSWITCH();
+                break;
+            case Constants.GETSTATIC:
+                obj = new GETSTATIC();
+                break;
+            case Constants.PUTSTATIC:
+                obj = new PUTSTATIC();
+                break;
+            case Constants.GETFIELD:
+                obj = new GETFIELD();
+                break;
+            case Constants.PUTFIELD:
+                obj = new PUTFIELD();
+                break;
+            case Constants.INVOKEVIRTUAL:
+                obj = new INVOKEVIRTUAL();
+                break;
+            case Constants.INVOKESPECIAL:
+                obj = new INVOKESPECIAL();
+                break;
+            case Constants.INVOKESTATIC:
+                obj = new INVOKESTATIC();
+                break;
+            case Constants.INVOKEINTERFACE:
+                obj = new INVOKEINTERFACE();
+                break;
+            case Constants.INVOKEDYNAMIC:
+                obj = new INVOKEDYNAMIC();
+                break;
+            case Constants.NEW:
+                obj = new NEW();
+                break;
+            case Constants.NEWARRAY:
+                obj = new NEWARRAY();
+                break;
+            case Constants.ANEWARRAY:
+                obj = new ANEWARRAY();
+                break;
+            case Constants.CHECKCAST:
+                obj = new CHECKCAST();
+                break;
+            case Constants.INSTANCEOF:
+                obj = new INSTANCEOF();
+                break;
+            case Constants.MULTIANEWARRAY:
+                obj = new MULTIANEWARRAY();
+                break;
+            case Constants.IFNULL:
+                obj = new IFNULL();
+                break;
+            case Constants.IFNONNULL:
+                obj = new IFNONNULL();
+                break;
+            case Constants.GOTO_W:
+                obj = new GOTO_W();
+                break;
+            case Constants.JSR_W:
+                obj = new JSR_W();
+                break;
+            case Constants.BREAKPOINT:
+                obj = new BREAKPOINT();
+                break;
+            case Constants.IMPDEP1:
+                obj = new IMPDEP1();
+                break;
+            case Constants.IMPDEP2:
+                obj = new IMPDEP2();
+                break;
+            default:
+                throw new ClassGenException("Illegal opcode detected: " + opcode);
+
+        }
+
+        if (wide
+                && !((obj instanceof LocalVariableInstruction) || (obj instanceof IINC) || (obj instanceof RET))) {
+            throw new ClassGenException("Illegal opcode after wide: " + opcode);
+        }
+        obj.setOpcode(opcode);
+        obj.initFromFile(bytes, wide); // Do further initializations, if any
+        return obj;
+    }
+
+    /**
+     * This method also gives right results for instructions whose
+     * effect on the stack depends on the constant pool entry they
+     * reference.
+     *  @return Number of words consumed from stack by this instruction,
+     * or Constants.UNPREDICTABLE, if this can not be computed statically
+     */
+    public int consumeStack( ConstantPoolGen cpg ) {
+        return Constants.CONSUME_STACK[opcode];
+    }
+
+
+    /**
+     * This method also gives right results for instructions whose
+     * effect on the stack depends on the constant pool entry they
+     * reference.
+     * @return Number of words produced onto stack by this instruction,
+     * or Constants.UNPREDICTABLE, if this can not be computed statically
+     */
+    public int produceStack( ConstantPoolGen cpg ) {
+        return Constants.PRODUCE_STACK[opcode];
+    }
+
+
+    /**
+     * @return this instructions opcode
+     */
+    public short getOpcode() {
+        return opcode;
+    }
+
+
+    /**
+     * @return length (in bytes) of instruction
+     */
+    public int getLength() {
+        return length;
+    }
+
+
+    /**
+     * Needed in readInstruction.
+     */
+    private void setOpcode( short opcode ) {
+        this.opcode = opcode;
+    }
+
+
+    /** Some instructions may be reused, so don't do anything by default.
+     */
+    void dispose() {
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    public abstract void accept( Visitor v );
+
+
+    /** Get Comparator object used in the equals() method to determine
+     * equality of instructions.
+     *
+     * @return currently used comparator for equals()
+     * @deprecated use the built in comparator, or wrap this class in another object that implements these methods
+     */
+    @Deprecated
+    public static InstructionComparator getComparator() {
+        return cmp;
+    }
+
+
+    /** Set comparator to be used for equals().
+      * @deprecated use the built in comparator, or wrap this class in another object that implements these methods
+     */
+    @Deprecated
+    public static void setComparator( InstructionComparator c ) {
+        cmp = c;
+    }
+
+
+    /** Check for equality, delegated to comparator
+     * @return true if that is an Instruction and has the same opcode
+     */
+    @Override
+    public boolean equals( Object that ) {
+        return (that instanceof Instruction) ? cmp.equals(this, (Instruction) that) : false;
+    }
+
+    /** calculate the hashCode of this object
+     * @return the hashCode
+     */
+    @Override
+    public int hashCode() {
+        return opcode;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/InstructionComparator.java b/src/main/java/org/apache/commons/bcel6/generic/InstructionComparator.java
new file mode 100644
index 0000000..f42a6ea
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/InstructionComparator.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Equality of instructions isn't clearly to be defined. You might
+ * wish, for example, to compare whether instructions have the same
+ * meaning. E.g., whether two INVOKEVIRTUALs describe the same
+ * call.<br>The DEFAULT comparator however, considers two instructions
+ * to be equal if they have same opcode and point to the same indexes
+ * (if any) in the constant pool or the same local variable index. Branch
+ * instructions must have the same target.
+ *
+ * @see Instruction
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface InstructionComparator {
+
+    public static final InstructionComparator DEFAULT = new InstructionComparator() {
+
+        public boolean equals( Instruction i1, Instruction i2 ) {
+            if (i1.opcode == i2.opcode) {
+                if (i1 instanceof Select) {
+                    InstructionHandle[] t1 = ((Select) i1).getTargets();
+                    InstructionHandle[] t2 = ((Select) i2).getTargets();
+                    if (t1.length == t2.length) {
+                        for (int i = 0; i < t1.length; i++) {
+                            if (t1[i] != t2[i]) {
+                                return false;
+                            }
+                        }
+                        return true;
+                    }
+                } else if (i1 instanceof BranchInstruction) {
+                    return ((BranchInstruction) i1).target == ((BranchInstruction) i2).target;
+                } else if (i1 instanceof ConstantPushInstruction) {
+                    return ((ConstantPushInstruction) i1).getValue().equals(
+                            ((ConstantPushInstruction) i2).getValue());
+                } else if (i1 instanceof IndexedInstruction) {
+                    return ((IndexedInstruction) i1).getIndex() == ((IndexedInstruction) i2)
+                            .getIndex();
+                } else if (i1 instanceof NEWARRAY) {
+                    return ((NEWARRAY) i1).getTypecode() == ((NEWARRAY) i2).getTypecode();
+                } else {
+                    return true;
+                }
+            }
+            return false;
+        }
+    };
+
+
+    boolean equals( Instruction i1, Instruction i2 );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/InstructionConstants.java b/src/main/java/org/apache/commons/bcel6/generic/InstructionConstants.java
new file mode 100644
index 0000000..196ac9d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/InstructionConstants.java
@@ -0,0 +1,287 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * This interface contains shareable instruction objects.
+ *
+ * In order to save memory you can use some instructions multiply,
+ * since they have an immutable state and are directly derived from
+ * Instruction.  I.e. they have no instance fields that could be
+ * changed. Since some of these instructions like ICONST_0 occur
+ * very frequently this can save a lot of time and space. This
+ * feature is an adaptation of the FlyWeight design pattern, we
+ * just use an array instead of a factory.
+ *
+ * The Instructions can also accessed directly under their names, so
+ * it's possible to write il.append(Instruction.ICONST_0);
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface InstructionConstants {
+
+    /** Predefined instruction objects
+     */
+    public static final Instruction NOP = new NOP();
+    public static final Instruction ACONST_NULL = new ACONST_NULL();
+    public static final Instruction ICONST_M1 = new ICONST(-1);
+    public static final Instruction ICONST_0 = new ICONST(0);
+    public static final Instruction ICONST_1 = new ICONST(1);
+    public static final Instruction ICONST_2 = new ICONST(2);
+    public static final Instruction ICONST_3 = new ICONST(3);
+    public static final Instruction ICONST_4 = new ICONST(4);
+    public static final Instruction ICONST_5 = new ICONST(5);
+    public static final Instruction LCONST_0 = new LCONST(0);
+    public static final Instruction LCONST_1 = new LCONST(1);
+    public static final Instruction FCONST_0 = new FCONST(0);
+    public static final Instruction FCONST_1 = new FCONST(1);
+    public static final Instruction FCONST_2 = new FCONST(2);
+    public static final Instruction DCONST_0 = new DCONST(0);
+    public static final Instruction DCONST_1 = new DCONST(1);
+    public static final ArrayInstruction IALOAD = new IALOAD();
+    public static final ArrayInstruction LALOAD = new LALOAD();
+    public static final ArrayInstruction FALOAD = new FALOAD();
+    public static final ArrayInstruction DALOAD = new DALOAD();
+    public static final ArrayInstruction AALOAD = new AALOAD();
+    public static final ArrayInstruction BALOAD = new BALOAD();
+    public static final ArrayInstruction CALOAD = new CALOAD();
+    public static final ArrayInstruction SALOAD = new SALOAD();
+    public static final ArrayInstruction IASTORE = new IASTORE();
+    public static final ArrayInstruction LASTORE = new LASTORE();
+    public static final ArrayInstruction FASTORE = new FASTORE();
+    public static final ArrayInstruction DASTORE = new DASTORE();
+    public static final ArrayInstruction AASTORE = new AASTORE();
+    public static final ArrayInstruction BASTORE = new BASTORE();
+    public static final ArrayInstruction CASTORE = new CASTORE();
+    public static final ArrayInstruction SASTORE = new SASTORE();
+    public static final StackInstruction POP = new POP();
+    public static final StackInstruction POP2 = new POP2();
+    public static final StackInstruction DUP = new DUP();
+    public static final StackInstruction DUP_X1 = new DUP_X1();
+    public static final StackInstruction DUP_X2 = new DUP_X2();
+    public static final StackInstruction DUP2 = new DUP2();
+    public static final StackInstruction DUP2_X1 = new DUP2_X1();
+    public static final StackInstruction DUP2_X2 = new DUP2_X2();
+    public static final StackInstruction SWAP = new SWAP();
+    public static final ArithmeticInstruction IADD = new IADD();
+    public static final ArithmeticInstruction LADD = new LADD();
+    public static final ArithmeticInstruction FADD = new FADD();
+    public static final ArithmeticInstruction DADD = new DADD();
+    public static final ArithmeticInstruction ISUB = new ISUB();
+    public static final ArithmeticInstruction LSUB = new LSUB();
+    public static final ArithmeticInstruction FSUB = new FSUB();
+    public static final ArithmeticInstruction DSUB = new DSUB();
+    public static final ArithmeticInstruction IMUL = new IMUL();
+    public static final ArithmeticInstruction LMUL = new LMUL();
+    public static final ArithmeticInstruction FMUL = new FMUL();
+    public static final ArithmeticInstruction DMUL = new DMUL();
+    public static final ArithmeticInstruction IDIV = new IDIV();
+    public static final ArithmeticInstruction LDIV = new LDIV();
+    public static final ArithmeticInstruction FDIV = new FDIV();
+    public static final ArithmeticInstruction DDIV = new DDIV();
+    public static final ArithmeticInstruction IREM = new IREM();
+    public static final ArithmeticInstruction LREM = new LREM();
+    public static final ArithmeticInstruction FREM = new FREM();
+    public static final ArithmeticInstruction DREM = new DREM();
+    public static final ArithmeticInstruction INEG = new INEG();
+    public static final ArithmeticInstruction LNEG = new LNEG();
+    public static final ArithmeticInstruction FNEG = new FNEG();
+    public static final ArithmeticInstruction DNEG = new DNEG();
+    public static final ArithmeticInstruction ISHL = new ISHL();
+    public static final ArithmeticInstruction LSHL = new LSHL();
+    public static final ArithmeticInstruction ISHR = new ISHR();
+    public static final ArithmeticInstruction LSHR = new LSHR();
+    public static final ArithmeticInstruction IUSHR = new IUSHR();
+    public static final ArithmeticInstruction LUSHR = new LUSHR();
+    public static final ArithmeticInstruction IAND = new IAND();
+    public static final ArithmeticInstruction LAND = new LAND();
+    public static final ArithmeticInstruction IOR = new IOR();
+    public static final ArithmeticInstruction LOR = new LOR();
+    public static final ArithmeticInstruction IXOR = new IXOR();
+    public static final ArithmeticInstruction LXOR = new LXOR();
+    public static final ConversionInstruction I2L = new I2L();
+    public static final ConversionInstruction I2F = new I2F();
+    public static final ConversionInstruction I2D = new I2D();
+    public static final ConversionInstruction L2I = new L2I();
+    public static final ConversionInstruction L2F = new L2F();
+    public static final ConversionInstruction L2D = new L2D();
+    public static final ConversionInstruction F2I = new F2I();
+    public static final ConversionInstruction F2L = new F2L();
+    public static final ConversionInstruction F2D = new F2D();
+    public static final ConversionInstruction D2I = new D2I();
+    public static final ConversionInstruction D2L = new D2L();
+    public static final ConversionInstruction D2F = new D2F();
+    public static final ConversionInstruction I2B = new I2B();
+    public static final ConversionInstruction I2C = new I2C();
+    public static final ConversionInstruction I2S = new I2S();
+    public static final Instruction LCMP = new LCMP();
+    public static final Instruction FCMPL = new FCMPL();
+    public static final Instruction FCMPG = new FCMPG();
+    public static final Instruction DCMPL = new DCMPL();
+    public static final Instruction DCMPG = new DCMPG();
+    public static final ReturnInstruction IRETURN = new IRETURN();
+    public static final ReturnInstruction LRETURN = new LRETURN();
+    public static final ReturnInstruction FRETURN = new FRETURN();
+    public static final ReturnInstruction DRETURN = new DRETURN();
+    public static final ReturnInstruction ARETURN = new ARETURN();
+    public static final ReturnInstruction RETURN = new RETURN();
+    public static final Instruction ARRAYLENGTH = new ARRAYLENGTH();
+    public static final Instruction ATHROW = new ATHROW();
+    public static final Instruction MONITORENTER = new MONITORENTER();
+    public static final Instruction MONITOREXIT = new MONITOREXIT();
+    /** You can use these constants in multiple places safely, if you can guarantee
+     * that you will never alter their internal values, e.g. call setIndex().
+     */
+    public static final LocalVariableInstruction THIS = new ALOAD(0);
+    public static final LocalVariableInstruction ALOAD_0 = THIS;
+    public static final LocalVariableInstruction ALOAD_1 = new ALOAD(1);
+    public static final LocalVariableInstruction ALOAD_2 = new ALOAD(2);
+    public static final LocalVariableInstruction ILOAD_0 = new ILOAD(0);
+    public static final LocalVariableInstruction ILOAD_1 = new ILOAD(1);
+    public static final LocalVariableInstruction ILOAD_2 = new ILOAD(2);
+    public static final LocalVariableInstruction ASTORE_0 = new ASTORE(0);
+    public static final LocalVariableInstruction ASTORE_1 = new ASTORE(1);
+    public static final LocalVariableInstruction ASTORE_2 = new ASTORE(2);
+    public static final LocalVariableInstruction ISTORE_0 = new ISTORE(0);
+    public static final LocalVariableInstruction ISTORE_1 = new ISTORE(1);
+    public static final LocalVariableInstruction ISTORE_2 = new ISTORE(2);
+    /** Get object via its opcode, for immutable instructions like
+     * branch instructions entries are set to null.
+     */
+    public static final Instruction[] INSTRUCTIONS = new Instruction[256];
+    /** Interfaces may have no static initializers, so we simulate this
+     * with an inner class.
+     */
+    static final Clinit bla = new Clinit();
+
+    static class Clinit {
+
+        Clinit() {
+            INSTRUCTIONS[Constants.NOP] = NOP;
+            INSTRUCTIONS[Constants.ACONST_NULL] = ACONST_NULL;
+            INSTRUCTIONS[Constants.ICONST_M1] = ICONST_M1;
+            INSTRUCTIONS[Constants.ICONST_0] = ICONST_0;
+            INSTRUCTIONS[Constants.ICONST_1] = ICONST_1;
+            INSTRUCTIONS[Constants.ICONST_2] = ICONST_2;
+            INSTRUCTIONS[Constants.ICONST_3] = ICONST_3;
+            INSTRUCTIONS[Constants.ICONST_4] = ICONST_4;
+            INSTRUCTIONS[Constants.ICONST_5] = ICONST_5;
+            INSTRUCTIONS[Constants.LCONST_0] = LCONST_0;
+            INSTRUCTIONS[Constants.LCONST_1] = LCONST_1;
+            INSTRUCTIONS[Constants.FCONST_0] = FCONST_0;
+            INSTRUCTIONS[Constants.FCONST_1] = FCONST_1;
+            INSTRUCTIONS[Constants.FCONST_2] = FCONST_2;
+            INSTRUCTIONS[Constants.DCONST_0] = DCONST_0;
+            INSTRUCTIONS[Constants.DCONST_1] = DCONST_1;
+            INSTRUCTIONS[Constants.IALOAD] = IALOAD;
+            INSTRUCTIONS[Constants.LALOAD] = LALOAD;
+            INSTRUCTIONS[Constants.FALOAD] = FALOAD;
+            INSTRUCTIONS[Constants.DALOAD] = DALOAD;
+            INSTRUCTIONS[Constants.AALOAD] = AALOAD;
+            INSTRUCTIONS[Constants.BALOAD] = BALOAD;
+            INSTRUCTIONS[Constants.CALOAD] = CALOAD;
+            INSTRUCTIONS[Constants.SALOAD] = SALOAD;
+            INSTRUCTIONS[Constants.IASTORE] = IASTORE;
+            INSTRUCTIONS[Constants.LASTORE] = LASTORE;
+            INSTRUCTIONS[Constants.FASTORE] = FASTORE;
+            INSTRUCTIONS[Constants.DASTORE] = DASTORE;
+            INSTRUCTIONS[Constants.AASTORE] = AASTORE;
+            INSTRUCTIONS[Constants.BASTORE] = BASTORE;
+            INSTRUCTIONS[Constants.CASTORE] = CASTORE;
+            INSTRUCTIONS[Constants.SASTORE] = SASTORE;
+            INSTRUCTIONS[Constants.POP] = POP;
+            INSTRUCTIONS[Constants.POP2] = POP2;
+            INSTRUCTIONS[Constants.DUP] = DUP;
+            INSTRUCTIONS[Constants.DUP_X1] = DUP_X1;
+            INSTRUCTIONS[Constants.DUP_X2] = DUP_X2;
+            INSTRUCTIONS[Constants.DUP2] = DUP2;
+            INSTRUCTIONS[Constants.DUP2_X1] = DUP2_X1;
+            INSTRUCTIONS[Constants.DUP2_X2] = DUP2_X2;
+            INSTRUCTIONS[Constants.SWAP] = SWAP;
+            INSTRUCTIONS[Constants.IADD] = IADD;
+            INSTRUCTIONS[Constants.LADD] = LADD;
+            INSTRUCTIONS[Constants.FADD] = FADD;
+            INSTRUCTIONS[Constants.DADD] = DADD;
+            INSTRUCTIONS[Constants.ISUB] = ISUB;
+            INSTRUCTIONS[Constants.LSUB] = LSUB;
+            INSTRUCTIONS[Constants.FSUB] = FSUB;
+            INSTRUCTIONS[Constants.DSUB] = DSUB;
+            INSTRUCTIONS[Constants.IMUL] = IMUL;
+            INSTRUCTIONS[Constants.LMUL] = LMUL;
+            INSTRUCTIONS[Constants.FMUL] = FMUL;
+            INSTRUCTIONS[Constants.DMUL] = DMUL;
+            INSTRUCTIONS[Constants.IDIV] = IDIV;
+            INSTRUCTIONS[Constants.LDIV] = LDIV;
+            INSTRUCTIONS[Constants.FDIV] = FDIV;
+            INSTRUCTIONS[Constants.DDIV] = DDIV;
+            INSTRUCTIONS[Constants.IREM] = IREM;
+            INSTRUCTIONS[Constants.LREM] = LREM;
+            INSTRUCTIONS[Constants.FREM] = FREM;
+            INSTRUCTIONS[Constants.DREM] = DREM;
+            INSTRUCTIONS[Constants.INEG] = INEG;
+            INSTRUCTIONS[Constants.LNEG] = LNEG;
+            INSTRUCTIONS[Constants.FNEG] = FNEG;
+            INSTRUCTIONS[Constants.DNEG] = DNEG;
+            INSTRUCTIONS[Constants.ISHL] = ISHL;
+            INSTRUCTIONS[Constants.LSHL] = LSHL;
+            INSTRUCTIONS[Constants.ISHR] = ISHR;
+            INSTRUCTIONS[Constants.LSHR] = LSHR;
+            INSTRUCTIONS[Constants.IUSHR] = IUSHR;
+            INSTRUCTIONS[Constants.LUSHR] = LUSHR;
+            INSTRUCTIONS[Constants.IAND] = IAND;
+            INSTRUCTIONS[Constants.LAND] = LAND;
+            INSTRUCTIONS[Constants.IOR] = IOR;
+            INSTRUCTIONS[Constants.LOR] = LOR;
+            INSTRUCTIONS[Constants.IXOR] = IXOR;
+            INSTRUCTIONS[Constants.LXOR] = LXOR;
+            INSTRUCTIONS[Constants.I2L] = I2L;
+            INSTRUCTIONS[Constants.I2F] = I2F;
+            INSTRUCTIONS[Constants.I2D] = I2D;
+            INSTRUCTIONS[Constants.L2I] = L2I;
+            INSTRUCTIONS[Constants.L2F] = L2F;
+            INSTRUCTIONS[Constants.L2D] = L2D;
+            INSTRUCTIONS[Constants.F2I] = F2I;
+            INSTRUCTIONS[Constants.F2L] = F2L;
+            INSTRUCTIONS[Constants.F2D] = F2D;
+            INSTRUCTIONS[Constants.D2I] = D2I;
+            INSTRUCTIONS[Constants.D2L] = D2L;
+            INSTRUCTIONS[Constants.D2F] = D2F;
+            INSTRUCTIONS[Constants.I2B] = I2B;
+            INSTRUCTIONS[Constants.I2C] = I2C;
+            INSTRUCTIONS[Constants.I2S] = I2S;
+            INSTRUCTIONS[Constants.LCMP] = LCMP;
+            INSTRUCTIONS[Constants.FCMPL] = FCMPL;
+            INSTRUCTIONS[Constants.FCMPG] = FCMPG;
+            INSTRUCTIONS[Constants.DCMPL] = DCMPL;
+            INSTRUCTIONS[Constants.DCMPG] = DCMPG;
+            INSTRUCTIONS[Constants.IRETURN] = IRETURN;
+            INSTRUCTIONS[Constants.LRETURN] = LRETURN;
+            INSTRUCTIONS[Constants.FRETURN] = FRETURN;
+            INSTRUCTIONS[Constants.DRETURN] = DRETURN;
+            INSTRUCTIONS[Constants.ARETURN] = ARETURN;
+            INSTRUCTIONS[Constants.RETURN] = RETURN;
+            INSTRUCTIONS[Constants.ARRAYLENGTH] = ARRAYLENGTH;
+            INSTRUCTIONS[Constants.ATHROW] = ATHROW;
+            INSTRUCTIONS[Constants.MONITORENTER] = MONITORENTER;
+            INSTRUCTIONS[Constants.MONITOREXIT] = MONITOREXIT;
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/InstructionFactory.java b/src/main/java/org/apache/commons/bcel6/generic/InstructionFactory.java
new file mode 100644
index 0000000..2cb0d5b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/InstructionFactory.java
@@ -0,0 +1,771 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * Instances of this class may be used, e.g., to generate typed
+ * versions of instructions. Its main purpose is to be used as the
+ * byte code generating backend of a compiler. You can subclass it to
+ * add your own create methods.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see Constants
+ */
+public class InstructionFactory implements InstructionConstants, java.io.Serializable {
+
+    private static final long serialVersionUID = -1210011499635580258L;
+
+    private static final String[] short_names = {
+            "C", "F", "D", "B", "S", "I", "L"
+    };
+
+    protected ClassGen cg;
+    protected ConstantPoolGen cp;
+
+
+    public InstructionFactory(ClassGen cg, ConstantPoolGen cp) {
+        this.cg = cg;
+        this.cp = cp;
+    }
+
+
+    /** Initialize with ClassGen object
+     */
+    public InstructionFactory(ClassGen cg) {
+        this(cg, cg.getConstantPool());
+    }
+
+
+    /** Initialize just with ConstantPoolGen object
+     */
+    public InstructionFactory(ConstantPoolGen cp) {
+        this(null, cp);
+    }
+
+
+    /** Create an invoke instruction. (Except for invokedynamic.)
+     *
+     * @param class_name name of the called class
+     * @param name name of the called method
+     * @param ret_type return type of method
+     * @param arg_types argument types of method
+     * @param kind how to invoke, i.e., INVOKEINTERFACE, INVOKESTATIC, INVOKEVIRTUAL,
+     * or INVOKESPECIAL
+     * @see Constants
+     */
+    public InvokeInstruction createInvoke( String class_name, String name, Type ret_type,
+            Type[] arg_types, short kind ) {
+        int index;
+        int nargs = 0;
+        String signature = Type.getMethodSignature(ret_type, arg_types);
+        for (Type arg_type : arg_types) {
+            nargs += arg_type.getSize();
+        }
+        if (kind == Constants.INVOKEINTERFACE) {
+            index = cp.addInterfaceMethodref(class_name, name, signature);
+        } else {
+            index = cp.addMethodref(class_name, name, signature);
+        }
+        switch (kind) {
+            case Constants.INVOKESPECIAL:
+                return new INVOKESPECIAL(index);
+            case Constants.INVOKEVIRTUAL:
+                return new INVOKEVIRTUAL(index);
+            case Constants.INVOKESTATIC:
+                return new INVOKESTATIC(index);
+            case Constants.INVOKEINTERFACE:
+                return new INVOKEINTERFACE(index, nargs + 1);
+            default:
+                throw new RuntimeException("Oops: Unknown invoke kind:" + kind);
+        }
+    }
+
+    /** Create an invokedynamic instruction.
+     *
+     * @param bootstrap_index index into the bootstrap_methods array
+     * @param name name of the called method
+     * @param ret_type return type of method
+     * @param arg_types argument types of method
+     * @see Constants
+     */
+/*
+ * createInvokeDynamic only needed if instrumention code wants to generate
+ * a new invokedynamic instruction.  I don't think we need.  (markro)
+ *
+    public InvokeInstruction createInvokeDynamic( int bootstrap_index, String name, Type ret_type,
+            Type[] arg_types) {
+        int index;
+        int nargs = 0;
+        String signature = Type.getMethodSignature(ret_type, arg_types);
+        for (int i = 0; i < arg_types.length; i++) {
+            nargs += arg_types[i].getSize();
+        }
+        // UNDONE - needs to be added to ConstantPoolGen
+        //index = cp.addInvokeDynamic(bootstrap_index, name, signature);
+        index = 0;
+        return new INVOKEDYNAMIC(index);
+    }
+ */
+
+    /** Create a call to the most popular System.out.println() method.
+     *
+     * @param s the string to print
+     */
+    public InstructionList createPrintln( String s ) {
+        InstructionList il = new InstructionList();
+        int out = cp.addFieldref("java.lang.System", "out", "Ljava/io/PrintStream;");
+        int println = cp.addMethodref("java.io.PrintStream", "println", "(Ljava/lang/String;)V");
+        il.append(new GETSTATIC(out));
+        il.append(new PUSH(cp, s));
+        il.append(new INVOKEVIRTUAL(println));
+        return il;
+    }
+
+
+    /** Uses PUSH to push a constant value onto the stack.
+     * @param value must be of type Number, Boolean, Character or String
+     */
+    public Instruction createConstant( Object value ) {
+        PUSH push;
+        if (value instanceof Number) {
+            push = new PUSH(cp, (Number) value);
+        } else if (value instanceof String) {
+            push = new PUSH(cp, (String) value);
+        } else if (value instanceof Boolean) {
+            push = new PUSH(cp, (Boolean) value);
+        } else if (value instanceof Character) {
+            push = new PUSH(cp, (Character) value);
+        } else {
+            throw new ClassGenException("Illegal type: " + value.getClass());
+        }
+        return push.getInstruction();
+    }
+
+    private static class MethodObject {
+
+        Type[] arg_types;
+        Type result_type;
+        String class_name;
+        String name;
+
+
+        MethodObject(String c, String n, Type r, Type[] a) {
+            class_name = c;
+            name = n;
+            result_type = r;
+            arg_types = a;
+        }
+    }
+
+
+    private InvokeInstruction createInvoke( MethodObject m, short kind ) {
+        return createInvoke(m.class_name, m.name, m.result_type, m.arg_types, kind);
+    }
+
+    private static final MethodObject[] append_mos = {
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
+                Type.STRING
+            }),
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
+                Type.OBJECT
+            }),
+            null,
+            null, // indices 2, 3
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
+                Type.BOOLEAN
+            }),
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
+                Type.CHAR
+            }),
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
+                Type.FLOAT
+            }),
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
+                Type.DOUBLE
+            }),
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
+                Type.INT
+            }),
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, // No append(byte)
+                    new Type[] {
+                        Type.INT
+                    }),
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, // No append(short)
+                    new Type[] {
+                        Type.INT
+                    }),
+            new MethodObject("java.lang.StringBuffer", "append", Type.STRINGBUFFER, new Type[] {
+                Type.LONG
+            })
+    };
+
+
+    private static boolean isString( Type type ) {
+        return ((type instanceof ObjectType) && ((ObjectType) type).getClassName().equals(
+                "java.lang.String"));
+    }
+
+
+    public Instruction createAppend( Type type ) {
+        byte t = type.getType();
+        if (isString(type)) {
+            return createInvoke(append_mos[0], Constants.INVOKEVIRTUAL);
+        }
+        switch (t) {
+            case Constants.T_BOOLEAN:
+            case Constants.T_CHAR:
+            case Constants.T_FLOAT:
+            case Constants.T_DOUBLE:
+            case Constants.T_BYTE:
+            case Constants.T_SHORT:
+            case Constants.T_INT:
+            case Constants.T_LONG:
+                return createInvoke(append_mos[t], Constants.INVOKEVIRTUAL);
+            case Constants.T_ARRAY:
+            case Constants.T_OBJECT:
+                return createInvoke(append_mos[1], Constants.INVOKEVIRTUAL);
+            default:
+                throw new RuntimeException("Oops: No append for this type? " + type);
+        }
+    }
+
+
+    /** Create a field instruction.
+     *
+     * @param class_name name of the accessed class
+     * @param name name of the referenced field
+     * @param type  type of field
+     * @param kind how to access, i.e., GETFIELD, PUTFIELD, GETSTATIC, PUTSTATIC
+     * @see Constants
+     */
+    public FieldInstruction createFieldAccess( String class_name, String name, Type type, short kind ) {
+        int index;
+        String signature = type.getSignature();
+        index = cp.addFieldref(class_name, name, signature);
+        switch (kind) {
+            case Constants.GETFIELD:
+                return new GETFIELD(index);
+            case Constants.PUTFIELD:
+                return new PUTFIELD(index);
+            case Constants.GETSTATIC:
+                return new GETSTATIC(index);
+            case Constants.PUTSTATIC:
+                return new PUTSTATIC(index);
+            default:
+                throw new RuntimeException("Oops: Unknown getfield kind:" + kind);
+        }
+    }
+
+
+    /** Create reference to `this'
+     */
+    public static Instruction createThis() {
+        return new ALOAD(0);
+    }
+
+
+    /** Create typed return
+     */
+    public static ReturnInstruction createReturn( Type type ) {
+        switch (type.getType()) {
+            case Constants.T_ARRAY:
+            case Constants.T_OBJECT:
+                return ARETURN;
+            case Constants.T_INT:
+            case Constants.T_SHORT:
+            case Constants.T_BOOLEAN:
+            case Constants.T_CHAR:
+            case Constants.T_BYTE:
+                return IRETURN;
+            case Constants.T_FLOAT:
+                return FRETURN;
+            case Constants.T_DOUBLE:
+                return DRETURN;
+            case Constants.T_LONG:
+                return LRETURN;
+            case Constants.T_VOID:
+                return RETURN;
+            default:
+                throw new RuntimeException("Invalid type: " + type);
+        }
+    }
+
+
+    private static ArithmeticInstruction createBinaryIntOp( char first, String op ) {
+        switch (first) {
+            case '-':
+                return ISUB;
+            case '+':
+                return IADD;
+            case '%':
+                return IREM;
+            case '*':
+                return IMUL;
+            case '/':
+                return IDIV;
+            case '&':
+                return IAND;
+            case '|':
+                return IOR;
+            case '^':
+                return IXOR;
+            case '<':
+                return ISHL;
+            case '>':
+                return op.equals(">>>") ? IUSHR : ISHR;
+            default:
+                throw new RuntimeException("Invalid operand " + op);
+        }
+    }
+
+
+    private static ArithmeticInstruction createBinaryLongOp( char first, String op ) {
+        switch (first) {
+            case '-':
+                return LSUB;
+            case '+':
+                return LADD;
+            case '%':
+                return LREM;
+            case '*':
+                return LMUL;
+            case '/':
+                return LDIV;
+            case '&':
+                return LAND;
+            case '|':
+                return LOR;
+            case '^':
+                return LXOR;
+            case '<':
+                return LSHL;
+            case '>':
+                return op.equals(">>>") ? LUSHR : LSHR;
+            default:
+                throw new RuntimeException("Invalid operand " + op);
+        }
+    }
+
+
+    private static ArithmeticInstruction createBinaryFloatOp( char op ) {
+        switch (op) {
+            case '-':
+                return FSUB;
+            case '+':
+                return FADD;
+            case '*':
+                return FMUL;
+            case '/':
+                return FDIV;
+            case '%':
+                return FREM;
+            default:
+                throw new RuntimeException("Invalid operand " + op);
+        }
+    }
+
+
+    private static ArithmeticInstruction createBinaryDoubleOp( char op ) {
+        switch (op) {
+            case '-':
+                return DSUB;
+            case '+':
+                return DADD;
+            case '*':
+                return DMUL;
+            case '/':
+                return DDIV;
+            case '%':
+                return DREM;
+            default:
+                throw new RuntimeException("Invalid operand " + op);
+        }
+    }
+
+
+    /**
+     * Create binary operation for simple basic types, such as int and float.
+     *
+     * @param op operation, such as "+", "*", "&lt;&lt;", etc.
+     */
+    public static ArithmeticInstruction createBinaryOperation( String op, Type type ) {
+        char first = op.toCharArray()[0];
+        switch (type.getType()) {
+            case Constants.T_BYTE:
+            case Constants.T_SHORT:
+            case Constants.T_INT:
+            case Constants.T_CHAR:
+                return createBinaryIntOp(first, op);
+            case Constants.T_LONG:
+                return createBinaryLongOp(first, op);
+            case Constants.T_FLOAT:
+                return createBinaryFloatOp(first);
+            case Constants.T_DOUBLE:
+                return createBinaryDoubleOp(first);
+            default:
+                throw new RuntimeException("Invalid type " + type);
+        }
+    }
+
+
+    /**
+     * @param size size of operand, either 1 (int, e.g.) or 2 (double)
+     */
+    public static StackInstruction createPop( int size ) {
+        return (size == 2) ? POP2 : POP;
+    }
+
+
+    /**
+     * @param size size of operand, either 1 (int, e.g.) or 2 (double)
+     */
+    public static StackInstruction createDup( int size ) {
+        return (size == 2) ? DUP2 : DUP;
+    }
+
+
+    /**
+     * @param size size of operand, either 1 (int, e.g.) or 2 (double)
+     */
+    public static StackInstruction createDup_2( int size ) {
+        return (size == 2) ? DUP2_X2 : DUP_X2;
+    }
+
+
+    /**
+     * @param size size of operand, either 1 (int, e.g.) or 2 (double)
+     */
+    public static StackInstruction createDup_1( int size ) {
+        return (size == 2) ? DUP2_X1 : DUP_X1;
+    }
+
+
+    /**
+     * @param index index of local variable
+     */
+    public static LocalVariableInstruction createStore( Type type, int index ) {
+        switch (type.getType()) {
+            case Constants.T_BOOLEAN:
+            case Constants.T_CHAR:
+            case Constants.T_BYTE:
+            case Constants.T_SHORT:
+            case Constants.T_INT:
+                return new ISTORE(index);
+            case Constants.T_FLOAT:
+                return new FSTORE(index);
+            case Constants.T_DOUBLE:
+                return new DSTORE(index);
+            case Constants.T_LONG:
+                return new LSTORE(index);
+            case Constants.T_ARRAY:
+            case Constants.T_OBJECT:
+                return new ASTORE(index);
+            default:
+                throw new RuntimeException("Invalid type " + type);
+        }
+    }
+
+
+    /**
+     * @param index index of local variable
+     */
+    public static LocalVariableInstruction createLoad( Type type, int index ) {
+        switch (type.getType()) {
+            case Constants.T_BOOLEAN:
+            case Constants.T_CHAR:
+            case Constants.T_BYTE:
+            case Constants.T_SHORT:
+            case Constants.T_INT:
+                return new ILOAD(index);
+            case Constants.T_FLOAT:
+                return new FLOAD(index);
+            case Constants.T_DOUBLE:
+                return new DLOAD(index);
+            case Constants.T_LONG:
+                return new LLOAD(index);
+            case Constants.T_ARRAY:
+            case Constants.T_OBJECT:
+                return new ALOAD(index);
+            default:
+                throw new RuntimeException("Invalid type " + type);
+        }
+    }
+
+
+    /**
+     * @param type type of elements of array, i.e., array.getElementType()
+     */
+    public static ArrayInstruction createArrayLoad( Type type ) {
+        switch (type.getType()) {
+            case Constants.T_BOOLEAN:
+            case Constants.T_BYTE:
+                return BALOAD;
+            case Constants.T_CHAR:
+                return CALOAD;
+            case Constants.T_SHORT:
+                return SALOAD;
+            case Constants.T_INT:
+                return IALOAD;
+            case Constants.T_FLOAT:
+                return FALOAD;
+            case Constants.T_DOUBLE:
+                return DALOAD;
+            case Constants.T_LONG:
+                return LALOAD;
+            case Constants.T_ARRAY:
+            case Constants.T_OBJECT:
+                return AALOAD;
+            default:
+                throw new RuntimeException("Invalid type " + type);
+        }
+    }
+
+
+    /**
+     * @param type type of elements of array, i.e., array.getElementType()
+     */
+    public static ArrayInstruction createArrayStore( Type type ) {
+        switch (type.getType()) {
+            case Constants.T_BOOLEAN:
+            case Constants.T_BYTE:
+                return BASTORE;
+            case Constants.T_CHAR:
+                return CASTORE;
+            case Constants.T_SHORT:
+                return SASTORE;
+            case Constants.T_INT:
+                return IASTORE;
+            case Constants.T_FLOAT:
+                return FASTORE;
+            case Constants.T_DOUBLE:
+                return DASTORE;
+            case Constants.T_LONG:
+                return LASTORE;
+            case Constants.T_ARRAY:
+            case Constants.T_OBJECT:
+                return AASTORE;
+            default:
+                throw new RuntimeException("Invalid type " + type);
+        }
+    }
+
+
+    /** Create conversion operation for two stack operands, this may be an I2C, instruction, e.g.,
+     * if the operands are basic types and CHECKCAST if they are reference types.
+     */
+    public Instruction createCast( Type src_type, Type dest_type ) {
+        if ((src_type instanceof BasicType) && (dest_type instanceof BasicType)) {
+            byte dest = dest_type.getType();
+            byte src = src_type.getType();
+            if (dest == Constants.T_LONG
+                    && (src == Constants.T_CHAR || src == Constants.T_BYTE || src == Constants.T_SHORT)) {
+                src = Constants.T_INT;
+            }
+            String name = "org.apache.commons.bcel6.generic." + short_names[src - Constants.T_CHAR] + "2"
+                    + short_names[dest - Constants.T_CHAR];
+            Instruction i = null;
+            try {
+                i = (Instruction) java.lang.Class.forName(name).newInstance();
+            } catch (Exception e) {
+                throw new RuntimeException("Could not find instruction: " + name, e);
+            }
+            return i;
+        } else if ((src_type instanceof ReferenceType) && (dest_type instanceof ReferenceType)) {
+            if (dest_type instanceof ArrayType) {
+                return new CHECKCAST(cp.addArrayClass((ArrayType) dest_type));
+            } else {
+                return new CHECKCAST(cp.addClass(((ObjectType) dest_type).getClassName()));
+            }
+        } else {
+            throw new RuntimeException("Can not cast " + src_type + " to " + dest_type);
+        }
+    }
+
+
+    public GETFIELD createGetField( String class_name, String name, Type t ) {
+        return new GETFIELD(cp.addFieldref(class_name, name, t.getSignature()));
+    }
+
+
+    public GETSTATIC createGetStatic( String class_name, String name, Type t ) {
+        return new GETSTATIC(cp.addFieldref(class_name, name, t.getSignature()));
+    }
+
+
+    public PUTFIELD createPutField( String class_name, String name, Type t ) {
+        return new PUTFIELD(cp.addFieldref(class_name, name, t.getSignature()));
+    }
+
+
+    public PUTSTATIC createPutStatic( String class_name, String name, Type t ) {
+        return new PUTSTATIC(cp.addFieldref(class_name, name, t.getSignature()));
+    }
+
+
+    public CHECKCAST createCheckCast( ReferenceType t ) {
+        if (t instanceof ArrayType) {
+            return new CHECKCAST(cp.addArrayClass((ArrayType) t));
+        } else {
+            return new CHECKCAST(cp.addClass((ObjectType) t));
+        }
+    }
+
+
+    public INSTANCEOF createInstanceOf( ReferenceType t ) {
+        if (t instanceof ArrayType) {
+            return new INSTANCEOF(cp.addArrayClass((ArrayType) t));
+        } else {
+            return new INSTANCEOF(cp.addClass((ObjectType) t));
+        }
+    }
+
+
+    public NEW createNew( ObjectType t ) {
+        return new NEW(cp.addClass(t));
+    }
+
+
+    public NEW createNew( String s ) {
+        return createNew(ObjectType.getInstance(s));
+    }
+
+
+    /** Create new array of given size and type.
+     * @return an instruction that creates the corresponding array at runtime, i.e. is an AllocationInstruction
+     */
+    public Instruction createNewArray( Type t, short dim ) {
+        if (dim == 1) {
+            if (t instanceof ObjectType) {
+                return new ANEWARRAY(cp.addClass((ObjectType) t));
+            } else if (t instanceof ArrayType) {
+                return new ANEWARRAY(cp.addArrayClass((ArrayType) t));
+            } else {
+                return new NEWARRAY(t.getType());
+            }
+        } else {
+            ArrayType at;
+            if (t instanceof ArrayType) {
+                at = (ArrayType) t;
+            } else {
+                at = new ArrayType(t, dim);
+            }
+            return new MULTIANEWARRAY(cp.addArrayClass(at), dim);
+        }
+    }
+
+
+    /** Create "null" value for reference types, 0 for basic types like int
+     */
+    public static Instruction createNull( Type type ) {
+        switch (type.getType()) {
+            case Constants.T_ARRAY:
+            case Constants.T_OBJECT:
+                return ACONST_NULL;
+            case Constants.T_INT:
+            case Constants.T_SHORT:
+            case Constants.T_BOOLEAN:
+            case Constants.T_CHAR:
+            case Constants.T_BYTE:
+                return ICONST_0;
+            case Constants.T_FLOAT:
+                return FCONST_0;
+            case Constants.T_DOUBLE:
+                return DCONST_0;
+            case Constants.T_LONG:
+                return LCONST_0;
+            case Constants.T_VOID:
+                return NOP;
+            default:
+                throw new RuntimeException("Invalid type: " + type);
+        }
+    }
+
+
+    /** Create branch instruction by given opcode, except LOOKUPSWITCH and TABLESWITCH.
+     * For those you should use the SWITCH compound instruction.
+     */
+    public static BranchInstruction createBranchInstruction( short opcode, InstructionHandle target ) {
+        switch (opcode) {
+            case Constants.IFEQ:
+                return new IFEQ(target);
+            case Constants.IFNE:
+                return new IFNE(target);
+            case Constants.IFLT:
+                return new IFLT(target);
+            case Constants.IFGE:
+                return new IFGE(target);
+            case Constants.IFGT:
+                return new IFGT(target);
+            case Constants.IFLE:
+                return new IFLE(target);
+            case Constants.IF_ICMPEQ:
+                return new IF_ICMPEQ(target);
+            case Constants.IF_ICMPNE:
+                return new IF_ICMPNE(target);
+            case Constants.IF_ICMPLT:
+                return new IF_ICMPLT(target);
+            case Constants.IF_ICMPGE:
+                return new IF_ICMPGE(target);
+            case Constants.IF_ICMPGT:
+                return new IF_ICMPGT(target);
+            case Constants.IF_ICMPLE:
+                return new IF_ICMPLE(target);
+            case Constants.IF_ACMPEQ:
+                return new IF_ACMPEQ(target);
+            case Constants.IF_ACMPNE:
+                return new IF_ACMPNE(target);
+            case Constants.GOTO:
+                return new GOTO(target);
+            case Constants.JSR:
+                return new JSR(target);
+            case Constants.IFNULL:
+                return new IFNULL(target);
+            case Constants.IFNONNULL:
+                return new IFNONNULL(target);
+            case Constants.GOTO_W:
+                return new GOTO_W(target);
+            case Constants.JSR_W:
+                return new JSR_W(target);
+            default:
+                throw new RuntimeException("Invalid opcode: " + opcode);
+        }
+    }
+
+
+    public void setClassGen( ClassGen c ) {
+        cg = c;
+    }
+
+
+    public ClassGen getClassGen() {
+        return cg;
+    }
+
+
+    public void setConstantPool( ConstantPoolGen c ) {
+        cp = c;
+    }
+
+
+    public ConstantPoolGen getConstantPool() {
+        return cp;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/InstructionHandle.java b/src/main/java/org/apache/commons/bcel6/generic/InstructionHandle.java
new file mode 100644
index 0000000..fc4acec
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/InstructionHandle.java
@@ -0,0 +1,294 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.bcel6.classfile.Utility;
+
+/**
+ * Instances of this class give users a handle to the instructions contained in
+ * an InstructionList. Instruction objects may be used more than once within a
+ * list, this is useful because it saves memory and may be much faster.
+ *
+ * Within an InstructionList an InstructionHandle object is wrapped
+ * around all instructions, i.e., it implements a cell in a
+ * doubly-linked list. From the outside only the next and the
+ * previous instruction (handle) are accessible. One
+ * can traverse the list via an Enumeration returned by
+ * InstructionList.elements().
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see Instruction
+ * @see BranchHandle
+ * @see InstructionList 
+ */
+public class InstructionHandle implements java.io.Serializable {
+
+    private static final long serialVersionUID = -3585254135692924106L;
+    InstructionHandle next, prev; // Will be set from the outside
+    Instruction instruction;
+    protected int i_position = -1; // byte code offset of instruction
+    private Set<InstructionTargeter> targeters;
+    private Map<Object, Object> attributes;
+
+
+    public final InstructionHandle getNext() {
+        return next;
+    }
+
+
+    public final InstructionHandle getPrev() {
+        return prev;
+    }
+
+
+    public final Instruction getInstruction() {
+        return instruction;
+    }
+
+
+    /**
+     * Replace current instruction contained in this handle.
+     * Old instruction is disposed using Instruction.dispose().
+     */
+    public void setInstruction( Instruction i ) { // Overridden in BranchHandle
+        if (i == null) {
+            throw new ClassGenException("Assigning null to handle");
+        }
+        if ((this.getClass() != BranchHandle.class) && (i instanceof BranchInstruction)) {
+            throw new ClassGenException("Assigning branch instruction " + i + " to plain handle");
+        }
+        if (instruction != null) {
+            instruction.dispose();
+        }
+        instruction = i;
+    }
+
+
+    /**
+     * Temporarily swap the current instruction, without disturbing
+     * anything. Meant to be used by a debugger, implementing
+     * breakpoints. Current instruction is returned.
+     */
+    public Instruction swapInstruction( Instruction i ) {
+        Instruction oldInstruction = instruction;
+        instruction = i;
+        return oldInstruction;
+    }
+
+
+    /*private*/protected InstructionHandle(Instruction i) {
+        setInstruction(i);
+    }
+
+    private static InstructionHandle ih_list = null; // List of reusable handles
+
+
+    /** Factory method.
+     */
+    static InstructionHandle getInstructionHandle( Instruction i ) {
+        if (ih_list == null) {
+            return new InstructionHandle(i);
+        } else {
+            InstructionHandle ih = ih_list;
+            ih_list = ih.next;
+            ih.setInstruction(i);
+            return ih;
+        }
+    }
+
+
+    /**
+     * Called by InstructionList.setPositions when setting the position for every
+     * instruction. In the presence of variable length instructions `setPositions()'
+     * performs multiple passes over the instruction list to calculate the
+     * correct (byte) positions and offsets by calling this function.
+     *
+     * @param offset additional offset caused by preceding (variable length) instructions
+     * @param max_offset the maximum offset that may be caused by these instructions
+     * @return additional offset caused by possible change of this instruction's length
+     */
+    protected int updatePosition( int offset, int max_offset ) {
+        i_position += offset;
+        return 0;
+    }
+
+
+    /** @return the position, i.e., the byte code offset of the contained
+     * instruction. This is accurate only after
+     * InstructionList.setPositions() has been called.
+     */
+    public int getPosition() {
+        return i_position;
+    }
+
+
+    /** Set the position, i.e., the byte code offset of the contained
+     * instruction.
+     */
+    void setPosition( int pos ) {
+        i_position = pos;
+    }
+
+
+    /** Overridden in BranchHandle
+     */
+    protected void addHandle() {
+        next = ih_list;
+        ih_list = this;
+    }
+
+
+    /**
+     * Delete contents, i.e., remove user access and make handle reusable.
+     */
+    void dispose() {
+        next = prev = null;
+        instruction.dispose();
+        instruction = null;
+        i_position = -1;
+        attributes = null;
+        removeAllTargeters();
+        addHandle();
+    }
+
+
+    /** Remove all targeters, if any.
+     */
+    public void removeAllTargeters() {
+        if (targeters != null) {
+            targeters.clear();
+        }
+    }
+
+
+    /**
+     * Denote this handle isn't referenced anymore by t.
+     */
+    public void removeTargeter( InstructionTargeter t ) {
+        if (targeters != null) {
+            targeters.remove(t);
+        }
+    }
+
+
+    /**
+     * Denote this handle is being referenced by t.
+     */
+    public void addTargeter( InstructionTargeter t ) {
+        if (targeters == null) {
+            targeters = new HashSet<InstructionTargeter>();
+        }
+        //if(!targeters.contains(t))
+        targeters.add(t);
+    }
+
+
+    public boolean hasTargeters() {
+        return (targeters != null) && (targeters.size() > 0);
+    }
+
+
+    /**
+     * @return null, if there are no targeters
+     */
+    public InstructionTargeter[] getTargeters() {
+        if (!hasTargeters()) {
+            return new InstructionTargeter[0];
+        }
+        InstructionTargeter[] t = new InstructionTargeter[targeters.size()];
+        targeters.toArray(t);
+        return t;
+    }
+
+
+    /** @return a (verbose) string representation of the contained instruction. 
+     */
+    public String toString( boolean verbose ) {
+        return Utility.format(i_position, 4, false, ' ') + ": " + instruction.toString(verbose);
+    }
+
+
+    /** @return a string representation of the contained instruction. 
+     */
+    @Override
+    public String toString() {
+        return toString(true);
+    }
+
+
+    /** Add an attribute to an instruction handle.
+     *
+     * @param key the key object to store/retrieve the attribute
+     * @param attr the attribute to associate with this handle
+     */
+    public void addAttribute( Object key, Object attr ) {
+        if (attributes == null) {
+            attributes = new HashMap<Object, Object>(3);
+        }
+        attributes.put(key, attr);
+    }
+
+
+    /** Delete an attribute of an instruction handle.
+     *
+     * @param key the key object to retrieve the attribute
+     */
+    public void removeAttribute( Object key ) {
+        if (attributes != null) {
+            attributes.remove(key);
+        }
+    }
+
+
+    /** Get attribute of an instruction handle.
+     *
+     * @param key the key object to store/retrieve the attribute
+     */
+    public Object getAttribute( Object key ) {
+        if (attributes != null) {
+            return attributes.get(key);
+        }
+        return null;
+    }
+
+
+    /** @return all attributes associated with this handle
+     */
+    public Collection<Object> getAttributes() {
+        if (attributes == null) {
+            attributes = new HashMap<Object, Object>(3);
+        }
+        return attributes.values();
+    }
+
+
+    /** Convenience method, simply calls accept() on the contained instruction.
+     *
+     * @param v Visitor object
+     */
+    public void accept( Visitor v ) {
+        instruction.accept(v);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/InstructionList.java b/src/main/java/org/apache/commons/bcel6/generic/InstructionList.java
new file mode 100644
index 0000000..cc0b9a4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/InstructionList.java
@@ -0,0 +1,1280 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * This class is a container for a list of <a
+ * href="Instruction.html">Instruction</a> objects. Instructions can
+ * be appended, inserted, moved, deleted, etc.. Instructions are being
+ * wrapped into <a
+ * href="InstructionHandle.html">InstructionHandles</a> objects that
+ * are returned upon append/insert operations. They give the user
+ * (read only) access to the list structure, such that it can be traversed and
+ * manipulated in a controlled way.
+ *
+ * A list is finally dumped to a byte code array with <a
+ * href="#getByteCode()">getByteCode</a>.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     Instruction
+ * @see     InstructionHandle
+ * @see BranchHandle
+ */
+public class InstructionList implements Serializable {
+
+    private static final long serialVersionUID = 2651389055345707857L;
+    private InstructionHandle start = null, end = null;
+    private int length = 0; // number of elements in list
+    private int[] byte_positions; // byte code offsets corresponding to instructions
+
+
+    /**
+     * Create (empty) instruction list.
+     */
+    public InstructionList() {
+    }
+
+
+    /**
+     * Create instruction list containing one instruction.
+     * @param i initial instruction
+     */
+    public InstructionList(Instruction i) {
+        append(i);
+    }
+
+
+    /**
+     * Create instruction list containing one instruction.
+     * @param i initial instruction
+     */
+    public InstructionList(BranchInstruction i) {
+        append(i);
+    }
+
+
+    /**
+     * Initialize list with (nonnull) compound instruction. Consumes argument
+     * list, i.e., it becomes empty.
+     *
+     * @param c compound instruction (list)
+     */
+    public InstructionList(CompoundInstruction c) {
+        append(c.getInstructionList());
+    }
+
+
+    /**
+     * Test for empty list.
+     */
+    public boolean isEmpty() {
+        return start == null;
+    } // && end == null
+
+
+    /**
+     * Find the target instruction (handle) that corresponds to the given target
+     * position (byte code offset).
+     *
+     * @param ihs array of instruction handles, i.e. il.getInstructionHandles()
+     * @param pos array of positions corresponding to ihs, i.e. il.getInstructionPositions()
+     * @param count length of arrays
+     * @param target target position to search for
+     * @return target position's instruction handle if available
+     */
+    public static InstructionHandle findHandle( InstructionHandle[] ihs, int[] pos, int count,
+            int target ) {
+        int l = 0, r = count - 1;
+        /* Do a binary search since the pos array is orderd.
+         */
+        do {
+            int i = (l + r) / 2;
+            int j = pos[i];
+            if (j == target) {
+                return ihs[i];
+            } else if (target < j) {
+                r = i - 1;
+            } else {
+                l = i + 1;
+            }
+        } while (l <= r);
+        return null;
+    }
+
+
+    /**
+     * Get instruction handle for instruction at byte code position pos.
+     * This only works properly, if the list is freshly initialized from a byte array or
+     * setPositions() has been called before this method.
+     *
+     * @param pos byte code position to search for
+     * @return target position's instruction handle if available
+     */
+    public InstructionHandle findHandle( int pos ) {
+        int[] positions = byte_positions;
+        InstructionHandle ih = start;
+        for (int i = 0; i < length; i++) { 
+            if(positions[i] == pos) {
+                return ih;
+            }
+            ih = ih.next;
+        }
+        return null;
+    }
+
+
+    /**
+     * Initialize instruction list from byte array.
+     *
+     * @param code byte array containing the instructions
+     */
+    public InstructionList(byte[] code) {
+        ByteSequence bytes = new ByteSequence(code);
+        InstructionHandle[] ihs = new InstructionHandle[code.length];
+        int[] pos = new int[code.length]; // Can't be more than that
+        int count = 0; // Contains actual length
+        /* Pass 1: Create an object for each byte code and append them
+         * to the list.
+         */
+        try {
+            while (bytes.available() > 0) {
+                // Remember byte offset and associate it with the instruction
+                int off = bytes.getIndex();
+                pos[count] = off;
+                /* Read one instruction from the byte stream, the byte position is set
+                 * accordingly.
+                 */
+                Instruction i = Instruction.readInstruction(bytes);
+                InstructionHandle ih;
+                if (i instanceof BranchInstruction) {
+                    ih = append((BranchInstruction) i);
+                } else {
+                    ih = append(i);
+                }
+                ih.setPosition(off);
+                ihs[count] = ih;
+                count++;
+            }
+        } catch (IOException e) {
+            throw new ClassGenException(e.toString(), e);
+        }
+        byte_positions = new int[count]; // Trim to proper size
+        System.arraycopy(pos, 0, byte_positions, 0, count);
+        /* Pass 2: Look for BranchInstruction and update their targets, i.e.,
+         * convert offsets to instruction handles.
+         */
+        for (int i = 0; i < count; i++) {
+            if (ihs[i] instanceof BranchHandle) {
+                BranchInstruction bi = (BranchInstruction) ihs[i].instruction;
+                int target = bi.position + bi.getIndex(); /* Byte code position:
+                 * relative -> absolute. */
+                // Search for target position
+                InstructionHandle ih = findHandle(ihs, pos, count, target);
+                if (ih == null) {
+                    throw new ClassGenException("Couldn't find target for branch: " + bi);
+                }
+                bi.setTarget(ih); // Update target
+                // If it is a Select instruction, update all branch targets
+                if (bi instanceof Select) { // Either LOOKUPSWITCH or TABLESWITCH
+                    Select s = (Select) bi;
+                    int[] indices = s.getIndices();
+                    for (int j = 0; j < indices.length; j++) {
+                        target = bi.position + indices[j];
+                        ih = findHandle(ihs, pos, count, target);
+                        if (ih == null) {
+                            throw new ClassGenException("Couldn't find target for switch: " + bi);
+                        }
+                        s.setTarget(j, ih); // Update target      
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Append another list after instruction (handle) ih contained in this list.
+     * Consumes argument list, i.e., it becomes empty.
+     *
+     * @param ih where to append the instruction list 
+     * @param il Instruction list to append to this one
+     * @return instruction handle pointing to the <B>first</B> appended instruction
+     */
+    public InstructionHandle append( InstructionHandle ih, InstructionList il ) {
+        if (il == null) {
+            throw new ClassGenException("Appending null InstructionList");
+        }
+        if (il.isEmpty()) {
+            return ih;
+        }
+        InstructionHandle next = ih.next, ret = il.start;
+        ih.next = il.start;
+        il.start.prev = ih;
+        il.end.next = next;
+        if (next != null) {
+            next.prev = il.end;
+        } else {
+            end = il.end; // Update end ...
+        }
+        length += il.length; // Update length
+        il.clear();
+        return ret;
+    }
+
+
+    /**
+     * Append another list after instruction i contained in this list.
+     * Consumes argument list, i.e., it becomes empty.
+     *
+     * @param i  where to append the instruction list 
+     * @param il Instruction list to append to this one
+     * @return instruction handle pointing to the <B>first</B> appended instruction
+     */
+    public InstructionHandle append( Instruction i, InstructionList il ) {
+        InstructionHandle ih;
+        if ((ih = findInstruction2(i)) == null) {
+            throw new ClassGenException("Instruction " + i + " is not contained in this list.");
+        }
+        return append(ih, il);
+    }
+
+
+    /**
+     * Append another list to this one.
+     * Consumes argument list, i.e., it becomes empty.
+     *
+     * @param il list to append to end of this list
+     * @return instruction handle of the <B>first</B> appended instruction
+     */
+    public InstructionHandle append( InstructionList il ) {
+        if (il == null) {
+            throw new ClassGenException("Appending null InstructionList");
+        }
+        if (il.isEmpty()) {
+            return null;
+        }
+        if (isEmpty()) {
+            start = il.start;
+            end = il.end;
+            length = il.length;
+            il.clear();
+            return start;
+        } else {
+            return append(end, il); // was end.instruction
+        }
+    }
+
+
+    /**
+     * Append an instruction to the end of this list.
+     *
+     * @param ih instruction to append
+     */
+    private void append( InstructionHandle ih ) {
+        if (isEmpty()) {
+            start = end = ih;
+            ih.next = ih.prev = null;
+        } else {
+            end.next = ih;
+            ih.prev = end;
+            ih.next = null;
+            end = ih;
+        }
+        length++; // Update length
+    }
+
+
+    /**
+     * Append an instruction to the end of this list.
+     *
+     * @param i instruction to append
+     * @return instruction handle of the appended instruction
+     */
+    public InstructionHandle append( Instruction i ) {
+        InstructionHandle ih = InstructionHandle.getInstructionHandle(i);
+        append(ih);
+        return ih;
+    }
+
+
+    /**
+     * Append a branch instruction to the end of this list.
+     *
+     * @param i branch instruction to append
+     * @return branch instruction handle of the appended instruction
+     */
+    public BranchHandle append( BranchInstruction i ) {
+        BranchHandle ih = BranchHandle.getBranchHandle(i);
+        append(ih);
+        return ih;
+    }
+
+
+    /**
+     * Append a single instruction j after another instruction i, which
+     * must be in this list of course!
+     *
+     * @param i Instruction in list
+     * @param j Instruction to append after i in list
+     * @return instruction handle of the first appended instruction
+     */
+    public InstructionHandle append( Instruction i, Instruction j ) {
+        return append(i, new InstructionList(j));
+    }
+
+
+    /**
+     * Append a compound instruction, after instruction i.
+     *
+     * @param i Instruction in list
+     * @param c The composite instruction (containing an InstructionList)
+     * @return instruction handle of the first appended instruction
+     */
+    public InstructionHandle append( Instruction i, CompoundInstruction c ) {
+        return append(i, c.getInstructionList());
+    }
+
+
+    /**
+     * Append a compound instruction.
+     *
+     * @param c The composite instruction (containing an InstructionList)
+     * @return instruction handle of the first appended instruction
+     */
+    public InstructionHandle append( CompoundInstruction c ) {
+        return append(c.getInstructionList());
+    }
+
+
+    /**
+     * Append a compound instruction.
+     *
+     * @param ih where to append the instruction list 
+     * @param c The composite instruction (containing an InstructionList)
+     * @return instruction handle of the first appended instruction
+     */
+    public InstructionHandle append( InstructionHandle ih, CompoundInstruction c ) {
+        return append(ih, c.getInstructionList());
+    }
+
+
+    /**
+     * Append an instruction after instruction (handle) ih contained in this list.
+     *
+     * @param ih where to append the instruction list 
+     * @param i Instruction to append
+     * @return instruction handle pointing to the <B>first</B> appended instruction
+     */
+    public InstructionHandle append( InstructionHandle ih, Instruction i ) {
+        return append(ih, new InstructionList(i));
+    }
+
+
+    /**
+     * Append an instruction after instruction (handle) ih contained in this list.
+     *
+     * @param ih where to append the instruction list 
+     * @param i Instruction to append
+     * @return instruction handle pointing to the <B>first</B> appended instruction
+     */
+    public BranchHandle append( InstructionHandle ih, BranchInstruction i ) {
+        BranchHandle bh = BranchHandle.getBranchHandle(i);
+        InstructionList il = new InstructionList();
+        il.append(bh);
+        append(ih, il);
+        return bh;
+    }
+
+
+    /**
+     * Insert another list before Instruction handle ih contained in this list.
+     * Consumes argument list, i.e., it becomes empty.
+     *
+     * @param ih  where to append the instruction list 
+     * @param il Instruction list to insert
+     * @return instruction handle of the first inserted instruction
+     */
+    public InstructionHandle insert( InstructionHandle ih, InstructionList il ) {
+        if (il == null) {
+            throw new ClassGenException("Inserting null InstructionList");
+        }
+        if (il.isEmpty()) {
+            return ih;
+        }
+        InstructionHandle prev = ih.prev, ret = il.start;
+        ih.prev = il.end;
+        il.end.next = ih;
+        il.start.prev = prev;
+        if (prev != null) {
+            prev.next = il.start;
+        } else {
+            start = il.start; // Update start ...
+        }
+        length += il.length; // Update length
+        il.clear();
+        return ret;
+    }
+
+
+    /**
+     * Insert another list.   
+     *
+     * @param il list to insert before start of this list
+     * @return instruction handle of the first inserted instruction
+     */
+    public InstructionHandle insert( InstructionList il ) {
+        if (isEmpty()) {
+            append(il); // Code is identical for this case
+            return start;
+        } else {
+            return insert(start, il);
+        }
+    }
+
+
+    /**
+     * Insert an instruction at start of this list.
+     *
+     * @param ih instruction to insert
+     */
+    private void insert( InstructionHandle ih ) {
+        if (isEmpty()) {
+            start = end = ih;
+            ih.next = ih.prev = null;
+        } else {
+            start.prev = ih;
+            ih.next = start;
+            ih.prev = null;
+            start = ih;
+        }
+        length++;
+    }
+
+
+    /**
+     * Insert another list before Instruction i contained in this list.
+     * Consumes argument list, i.e., it becomes empty.
+     *
+     * @param i  where to append the instruction list 
+     * @param il Instruction list to insert
+     * @return instruction handle pointing to the first inserted instruction,
+     * i.e., il.getStart()
+     */
+    public InstructionHandle insert( Instruction i, InstructionList il ) {
+        InstructionHandle ih;
+        if ((ih = findInstruction1(i)) == null) {
+            throw new ClassGenException("Instruction " + i + " is not contained in this list.");
+        }
+        return insert(ih, il);
+    }
+
+
+    /**
+     * Insert an instruction at start of this list.
+     *
+     * @param i instruction to insert
+     * @return instruction handle of the inserted instruction
+     */
+    public InstructionHandle insert( Instruction i ) {
+        InstructionHandle ih = InstructionHandle.getInstructionHandle(i);
+        insert(ih);
+        return ih;
+    }
+
+
+    /**
+     * Insert a branch instruction at start of this list.
+     *
+     * @param i branch instruction to insert
+     * @return branch instruction handle of the appended instruction
+     */
+    public BranchHandle insert( BranchInstruction i ) {
+        BranchHandle ih = BranchHandle.getBranchHandle(i);
+        insert(ih);
+        return ih;
+    }
+
+
+    /**
+     * Insert a single instruction j before another instruction i, which
+     * must be in this list of course!
+     *
+     * @param i Instruction in list
+     * @param j Instruction to insert before i in list
+     * @return instruction handle of the first inserted instruction
+     */
+    public InstructionHandle insert( Instruction i, Instruction j ) {
+        return insert(i, new InstructionList(j));
+    }
+
+
+    /**
+     * Insert a compound instruction before instruction i.
+     *
+     * @param i Instruction in list
+     * @param c The composite instruction (containing an InstructionList)
+     * @return instruction handle of the first inserted instruction
+     */
+    public InstructionHandle insert( Instruction i, CompoundInstruction c ) {
+        return insert(i, c.getInstructionList());
+    }
+
+
+    /**
+     * Insert a compound instruction.
+     *
+     * @param c The composite instruction (containing an InstructionList)
+     * @return instruction handle of the first inserted instruction
+     */
+    public InstructionHandle insert( CompoundInstruction c ) {
+        return insert(c.getInstructionList());
+    }
+
+
+    /**
+     * Insert an instruction before instruction (handle) ih contained in this list.
+     *
+     * @param ih where to insert to the instruction list 
+     * @param i Instruction to insert
+     * @return instruction handle of the first inserted instruction
+     */
+    public InstructionHandle insert( InstructionHandle ih, Instruction i ) {
+        return insert(ih, new InstructionList(i));
+    }
+
+
+    /**
+     * Insert a compound instruction.
+     *
+     * @param ih where to insert the instruction list 
+     * @param c The composite instruction (containing an InstructionList)
+     * @return instruction handle of the first inserted instruction
+     */
+    public InstructionHandle insert( InstructionHandle ih, CompoundInstruction c ) {
+        return insert(ih, c.getInstructionList());
+    }
+
+
+    /**
+     * Insert an instruction before instruction (handle) ih contained in this list.
+     *
+     * @param ih where to insert to the instruction list 
+     * @param i Instruction to insert
+     * @return instruction handle of the first inserted instruction
+     */
+    public BranchHandle insert( InstructionHandle ih, BranchInstruction i ) {
+        BranchHandle bh = BranchHandle.getBranchHandle(i);
+        InstructionList il = new InstructionList();
+        il.append(bh);
+        insert(ih, il);
+        return bh;
+    }
+
+
+    /**
+     * Take all instructions (handles) from "start" to "end" and append them after the
+     * new location "target". Of course, "end" must be after "start" and target must
+     * not be located withing this range. If you want to move something to the start of
+     * the list use null as value for target.<br>
+     * Any instruction targeters pointing to handles within the block, keep their targets.
+     *
+     * @param start  of moved block
+     * @param end    of moved block
+     * @param target of moved block
+     */
+    public void move( InstructionHandle start, InstructionHandle end, InstructionHandle target ) {
+        // Step 1: Check constraints
+        if ((start == null) || (end == null)) {
+            throw new ClassGenException("Invalid null handle: From " + start + " to " + end);
+        }
+        if ((target == start) || (target == end)) {
+            throw new ClassGenException("Invalid range: From " + start + " to " + end
+                    + " contains target " + target);
+        }
+        for (InstructionHandle ih = start; ih != end.next; ih = ih.next) {
+            if (ih == null) {
+                throw new ClassGenException("Invalid range: From " + start + " to " + end);
+            } else if (ih == target) {
+                throw new ClassGenException("Invalid range: From " + start + " to " + end
+                        + " contains target " + target);
+            }
+        }
+        // Step 2: Temporarily remove the given instructions from the list
+        InstructionHandle prev = start.prev, next = end.next;
+        if (prev != null) {
+            prev.next = next;
+        } else {
+            this.start = next;
+        }
+        if (next != null) {
+            next.prev = prev;
+        } else {
+            this.end = prev;
+        }
+        start.prev = end.next = null;
+        // Step 3: append after target
+        if (target == null) { // append to start of list
+            if (this.start != null) {
+                this.start.prev = end;
+            }
+            end.next = this.start;
+            this.start = start;
+        } else {
+            next = target.next;
+            target.next = start;
+            start.prev = target;
+            end.next = next;
+            if (next != null) {
+                next.prev = end;
+            } else {
+                this.end = end;
+            }
+        }
+    }
+
+
+    /**
+     * Move a single instruction (handle) to a new location.
+     *
+     * @param ih     moved instruction
+     * @param target new location of moved instruction
+     */
+    public void move( InstructionHandle ih, InstructionHandle target ) {
+        move(ih, ih, target);
+    }
+
+
+    /**
+     * Remove from instruction `prev' to instruction `next' both contained
+     * in this list. Throws TargetLostException when one of the removed instruction handles
+     * is still being targeted.
+     *
+     * @param prev where to start deleting (predecessor, exclusive)
+     * @param next where to end deleting (successor, exclusive)
+     */
+    private void remove( InstructionHandle prev, InstructionHandle next )
+            throws TargetLostException {
+        InstructionHandle first, last; // First and last deleted instruction
+        if ((prev == null) && (next == null)) {
+            first = start;
+            last = end;
+            start = end = null;
+        } else {
+            if (prev == null) { // At start of list
+                first = start;
+                start = next;
+            } else {
+                first = prev.next;
+                prev.next = next;
+            }
+            if (next == null) { // At end of list
+                last = end;
+                end = prev;
+            } else {
+                last = next.prev;
+                next.prev = prev;
+            }
+        }
+        first.prev = null; // Completely separated from rest of list
+        last.next = null;
+        List<InstructionHandle> target_vec = new ArrayList<InstructionHandle>();
+        for (InstructionHandle ih = first; ih != null; ih = ih.next) {
+            ih.getInstruction().dispose(); // e.g. BranchInstructions release their targets
+        }
+        StringBuilder buf = new StringBuilder("{ ");
+        for (InstructionHandle ih = first; ih != null; ih = next) {
+            next = ih.next;
+            length--;
+            if (ih.hasTargeters()) { // Still got targeters?
+                target_vec.add(ih);
+                buf.append(ih.toString(true) + " ");
+                ih.next = ih.prev = null;
+            } else {
+                ih.dispose();
+            }
+        }
+        buf.append("}");
+        if (!target_vec.isEmpty()) {
+            InstructionHandle[] targeted = new InstructionHandle[target_vec.size()];
+            target_vec.toArray(targeted);
+            throw new TargetLostException(targeted, buf.toString());
+        }
+    }
+
+
+    /**
+     * Remove instruction from this list. The corresponding Instruction
+     * handles must not be reused!
+     *
+     * @param ih instruction (handle) to remove 
+     */
+    public void delete( InstructionHandle ih ) throws TargetLostException {
+        remove(ih.prev, ih.next);
+    }
+
+
+    /**
+     * Remove instruction from this list. The corresponding Instruction
+     * handles must not be reused!
+     *
+     * @param i instruction to remove
+     */
+    public void delete( Instruction i ) throws TargetLostException {
+        InstructionHandle ih;
+        if ((ih = findInstruction1(i)) == null) {
+            throw new ClassGenException("Instruction " + i + " is not contained in this list.");
+        }
+        delete(ih);
+    }
+
+
+    /**
+     * Remove instructions from instruction `from' to instruction `to' contained
+     * in this list. The user must ensure that `from' is an instruction before
+     * `to', or risk havoc. The corresponding Instruction handles must not be reused!
+     *
+     * @param from where to start deleting (inclusive)
+     * @param to   where to end deleting (inclusive)
+     */
+    public void delete( InstructionHandle from, InstructionHandle to ) throws TargetLostException {
+        remove(from.prev, to.next);
+    }
+
+
+    /**
+     * Remove instructions from instruction `from' to instruction `to' contained
+     * in this list. The user must ensure that `from' is an instruction before
+     * `to', or risk havoc. The corresponding Instruction handles must not be reused!
+     *
+     * @param from where to start deleting (inclusive)
+     * @param to   where to end deleting (inclusive)
+     */
+    public void delete( Instruction from, Instruction to ) throws TargetLostException {
+        InstructionHandle from_ih, to_ih;
+        if ((from_ih = findInstruction1(from)) == null) {
+            throw new ClassGenException("Instruction " + from + " is not contained in this list.");
+        }
+        if ((to_ih = findInstruction2(to)) == null) {
+            throw new ClassGenException("Instruction " + to + " is not contained in this list.");
+        }
+        delete(from_ih, to_ih);
+    }
+
+
+    /**
+     * Search for given Instruction reference, start at beginning of list.
+     *
+     * @param i instruction to search for
+     * @return instruction found on success, null otherwise
+     */
+    private InstructionHandle findInstruction1( Instruction i ) {
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            if (ih.instruction == i) {
+                return ih;
+            }
+        }
+        return null;
+    }
+
+
+    /**
+     * Search for given Instruction reference, start at end of list
+     *
+     * @param i instruction to search for
+     * @return instruction found on success, null otherwise
+     */
+    private InstructionHandle findInstruction2( Instruction i ) {
+        for (InstructionHandle ih = end; ih != null; ih = ih.prev) {
+            if (ih.instruction == i) {
+                return ih;
+            }
+        }
+        return null;
+    }
+
+
+    public boolean contains( InstructionHandle i ) {
+        if (i == null) {
+            return false;
+        }
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            if (ih == i) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    public boolean contains( Instruction i ) {
+        return findInstruction1(i) != null;
+    }
+
+
+    public void setPositions() {
+        setPositions(false);
+    }
+
+
+    /**
+     * Give all instructions their position number (offset in byte stream), i.e.,
+     * make the list ready to be dumped.
+     *
+     * @param check Perform sanity checks, e.g. if all targeted instructions really belong
+     * to this list
+     */
+    public void setPositions( boolean check ) {
+        int max_additional_bytes = 0, additional_bytes = 0;
+        int index = 0, count = 0;
+        int[] pos = new int[length];
+        /* Pass 0: Sanity checks
+         */
+        if (check) {
+            for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+                Instruction i = ih.instruction;
+                if (i instanceof BranchInstruction) { // target instruction within list?
+                    Instruction inst = ((BranchInstruction) i).getTarget().instruction;
+                    if (!contains(inst)) {
+                        throw new ClassGenException("Branch target of "
+                                + Constants.OPCODE_NAMES[i.opcode] + ":" + inst
+                                + " not in instruction list");
+                    }
+                    if (i instanceof Select) {
+                        InstructionHandle[] targets = ((Select) i).getTargets();
+                        for (InstructionHandle target : targets) {
+                            inst = target.instruction;
+                            if (!contains(inst)) {
+                                throw new ClassGenException("Branch target of "
+                                        + Constants.OPCODE_NAMES[i.opcode] + ":" + inst
+                                        + " not in instruction list");
+                            }
+                        }
+                    }
+                    if (!(ih instanceof BranchHandle)) {
+                        throw new ClassGenException("Branch instruction "
+                                + Constants.OPCODE_NAMES[i.opcode] + ":" + inst
+                                + " not contained in BranchHandle.");
+                    }
+                }
+            }
+        }
+        /* Pass 1: Set position numbers and sum up the maximum number of bytes an
+         * instruction may be shifted.
+         */
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            Instruction i = ih.instruction;
+            ih.setPosition(index);
+            pos[count++] = index;
+            /* Get an estimate about how many additional bytes may be added, because
+             * BranchInstructions may have variable length depending on the target
+             * offset (short vs. int) or alignment issues (TABLESWITCH and
+             * LOOKUPSWITCH).
+             */
+            switch (i.getOpcode()) {
+                case Constants.JSR:
+                case Constants.GOTO:
+                    max_additional_bytes += 2;
+                    break;
+                case Constants.TABLESWITCH:
+                case Constants.LOOKUPSWITCH:
+                    max_additional_bytes += 3;
+                    break;
+            }
+            index += i.getLength();
+        }
+        /* Pass 2: Expand the variable-length (Branch)Instructions depending on
+         * the target offset (short or int) and ensure that branch targets are
+         * within this list.
+         */
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            additional_bytes += ih.updatePosition(additional_bytes, max_additional_bytes);
+        }
+        /* Pass 3: Update position numbers (which may have changed due to the
+         * preceding expansions), like pass 1.
+         */
+        index = count = 0;
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            Instruction i = ih.instruction;
+            ih.setPosition(index);
+            pos[count++] = index;
+            index += i.getLength();
+        }
+        byte_positions = new int[count]; // Trim to proper size
+        System.arraycopy(pos, 0, byte_positions, 0, count);
+    }
+
+
+    /**
+     * When everything is finished, use this method to convert the instruction
+     * list into an array of bytes.
+     *
+     * @return the byte code ready to be dumped
+     */
+    public byte[] getByteCode() {
+        // Update position indices of instructions
+        setPositions();
+        ByteArrayOutputStream b = new ByteArrayOutputStream();
+        DataOutputStream out = new DataOutputStream(b);
+        try {
+            for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+                Instruction i = ih.instruction;
+                i.dump(out); // Traverse list
+            }
+        } catch (IOException e) {
+            System.err.println(e);
+            return new byte[0];
+        }
+        return b.toByteArray();
+    }
+
+
+    /**
+     * @return an array of instructions without target information for branch instructions.
+     */
+    public Instruction[] getInstructions() {
+        ByteSequence bytes = new ByteSequence(getByteCode());
+        List<Instruction> instructions = new ArrayList<Instruction>();
+        try {
+            while (bytes.available() > 0) {
+                instructions.add(Instruction.readInstruction(bytes));
+            }
+        } catch (IOException e) {
+            throw new ClassGenException(e.toString(), e);
+        }
+        return instructions.toArray(new Instruction[instructions.size()]);
+    }
+
+
+    @Override
+    public String toString() {
+        return toString(true);
+    }
+
+
+    /**
+     * @param verbose toggle output format
+     * @return String containing all instructions in this list.
+     */
+    public String toString( boolean verbose ) {
+        StringBuilder buf = new StringBuilder();
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            buf.append(ih.toString(verbose)).append("\n");
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return iterator that lists all instructions (handles)
+     */
+    public Iterator<InstructionHandle> iterator() {
+        return new Iterator<InstructionHandle>() {
+
+            private InstructionHandle ih = start;
+
+
+            public InstructionHandle next() throws NoSuchElementException {
+                if (ih == null) {
+                    throw new NoSuchElementException();
+                }
+                InstructionHandle i = ih;
+                ih = ih.next;
+                return i;
+            }
+
+
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
+
+
+            public boolean hasNext() {
+                return ih != null;
+            }
+        };
+    }
+
+
+    /**
+     * @return array containing all instructions (handles)
+     */
+    public InstructionHandle[] getInstructionHandles() {
+        InstructionHandle[] ihs = new InstructionHandle[length];
+        InstructionHandle ih = start;
+        for (int i = 0; i < length; i++) {
+            ihs[i] = ih;
+            ih = ih.next;
+        }
+        return ihs;
+    }
+
+
+    /**
+     * Get positions (offsets) of all instructions in the list. This relies on that
+     * the list has been freshly created from an byte code array, or that setPositions()
+     * has been called. Otherwise this may be inaccurate.
+     *
+     * @return array containing all instruction's offset in byte code
+     */
+    public int[] getInstructionPositions() {
+        return byte_positions;
+    }
+
+
+    /**
+     * @return complete, i.e., deep copy of this list
+     */
+    public InstructionList copy() {
+        Map<InstructionHandle, InstructionHandle> map = new HashMap<InstructionHandle, InstructionHandle>();
+        InstructionList il = new InstructionList();
+        /* Pass 1: Make copies of all instructions, append them to the new list
+         * and associate old instruction references with the new ones, i.e.,
+         * a 1:1 mapping.
+         */
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            Instruction i = ih.instruction;
+            Instruction c = i.copy(); // Use clone for shallow copy
+            if (c instanceof BranchInstruction) {
+                map.put(ih, il.append((BranchInstruction) c));
+            } else {
+                map.put(ih, il.append(c));
+            }
+        }
+        /* Pass 2: Update branch targets.
+         */
+        InstructionHandle ih = start;
+        InstructionHandle ch = il.start;
+        while (ih != null) {
+            Instruction i = ih.instruction;
+            Instruction c = ch.instruction;
+            if (i instanceof BranchInstruction) {
+                BranchInstruction bi = (BranchInstruction) i;
+                BranchInstruction bc = (BranchInstruction) c;
+                InstructionHandle itarget = bi.getTarget(); // old target
+                // New target is in hash map
+                bc.setTarget(map.get(itarget));
+                if (bi instanceof Select) { // Either LOOKUPSWITCH or TABLESWITCH
+                    InstructionHandle[] itargets = ((Select) bi).getTargets();
+                    InstructionHandle[] ctargets = ((Select) bc).getTargets();
+                    for (int j = 0; j < itargets.length; j++) { // Update all targets
+                        ctargets[j] = map.get(itargets[j]);
+                    }
+                }
+            }
+            ih = ih.next;
+            ch = ch.next;
+        }
+        return il;
+    }
+
+
+    /** Replace all references to the old constant pool with references to the new
+     *  constant pool
+     */
+    public void replaceConstantPool( ConstantPoolGen old_cp, ConstantPoolGen new_cp ) {
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            Instruction i = ih.instruction;
+            if (i instanceof CPInstruction) {
+                CPInstruction ci = (CPInstruction) i;
+                Constant c = old_cp.getConstant(ci.getIndex());
+                ci.setIndex(new_cp.addConstant(c, old_cp));
+            }
+        }
+    }
+
+
+    private void clear() {
+        start = end = null;
+        length = 0;
+    }
+
+
+    /**
+     * Delete contents of list. Provides better memory utilization,
+     * because the system then may reuse the instruction handles. This
+     * method is typically called right after {@link MethodGen#getMethod()}.
+     */
+    public void dispose() {
+        // Traverse in reverse order, because ih.next is overwritten
+        for (InstructionHandle ih = end; ih != null; ih = ih.prev) {
+            /* Causes BranchInstructions to release target and targeters, because it
+             * calls dispose() on the contained instruction.
+             */
+            ih.dispose();
+        }
+        clear();
+    }
+
+
+    /**
+     * @return start of list
+     */
+    public InstructionHandle getStart() {
+        return start;
+    }
+
+
+    /**
+     * @return end of list
+     */
+    public InstructionHandle getEnd() {
+        return end;
+    }
+
+
+    /**
+     * @return length of list (Number of instructions, not bytes)
+     */
+    public int getLength() {
+        return length;
+    }
+
+
+    /**
+     * @return length of list (Number of instructions, not bytes)
+     */
+    public int size() {
+        return length;
+    }
+
+
+    /**
+     * Redirect all references from old_target to new_target, i.e., update targets 
+     * of branch instructions.
+     *
+     * @param old_target the old target instruction handle
+     * @param new_target the new target instruction handle
+     */
+    public void redirectBranches( InstructionHandle old_target, InstructionHandle new_target ) {
+        for (InstructionHandle ih = start; ih != null; ih = ih.next) {
+            Instruction i = ih.getInstruction();
+            if (i instanceof BranchInstruction) {
+                BranchInstruction b = (BranchInstruction) i;
+                InstructionHandle target = b.getTarget();
+                if (target == old_target) {
+                    b.setTarget(new_target);
+                }
+                if (b instanceof Select) { // Either LOOKUPSWITCH or TABLESWITCH
+                    InstructionHandle[] targets = ((Select) b).getTargets();
+                    for (int j = 0; j < targets.length; j++) {
+                        if (targets[j] == old_target) {
+                            ((Select) b).setTarget(j, new_target);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Redirect all references of local variables from old_target to new_target.
+     *
+     * @param lg array of local variables
+     * @param old_target the old target instruction handle
+     * @param new_target the new target instruction handle
+     * @see MethodGen
+     */
+    public void redirectLocalVariables( LocalVariableGen[] lg, InstructionHandle old_target,
+            InstructionHandle new_target ) {
+        for (LocalVariableGen element : lg) {
+            InstructionHandle start = element.getStart();
+            InstructionHandle end = element.getEnd();
+            if (start == old_target) {
+                element.setStart(new_target);
+            }
+            if (end == old_target) {
+                element.setEnd(new_target);
+            }
+        }
+    }
+
+
+    /**
+     * Redirect all references of exception handlers from old_target to new_target.
+     *
+     * @param exceptions array of exception handlers
+     * @param old_target the old target instruction handle
+     * @param new_target the new target instruction handle
+     * @see MethodGen
+     */
+    public void redirectExceptionHandlers( CodeExceptionGen[] exceptions,
+            InstructionHandle old_target, InstructionHandle new_target ) {
+        for (CodeExceptionGen exception : exceptions) {
+            if (exception.getStartPC() == old_target) {
+                exception.setStartPC(new_target);
+            }
+            if (exception.getEndPC() == old_target) {
+                exception.setEndPC(new_target);
+            }
+            if (exception.getHandlerPC() == old_target) {
+                exception.setHandlerPC(new_target);
+            }
+        }
+    }
+
+    private List<InstructionListObserver> observers;
+
+
+    /** Add observer for this object.
+     */
+    public void addObserver( InstructionListObserver o ) {
+        if (observers == null) {
+            observers = new ArrayList<InstructionListObserver>();
+        }
+        observers.add(o);
+    }
+
+
+    /** Remove observer for this object.
+     */
+    public void removeObserver( InstructionListObserver o ) {
+        if (observers != null) {
+            observers.remove(o);
+        }
+    }
+
+
+    /** Call notify() method on all observers. This method is not called
+     * automatically whenever the state has changed, but has to be
+     * called by the user after he has finished editing the object.
+     */
+    public void update() {
+        if (observers != null) {
+            for (InstructionListObserver observer : observers) {
+                observer.notify(this);
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/InstructionListObserver.java b/src/main/java/org/apache/commons/bcel6/generic/InstructionListObserver.java
new file mode 100644
index 0000000..fb97882
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/InstructionListObserver.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Implement this interface if you're interested in changes to an InstructionList object
+ * and register yourself with addObserver().
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface InstructionListObserver {
+
+    void notify( InstructionList list );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/InstructionTargeter.java b/src/main/java/org/apache/commons/bcel6/generic/InstructionTargeter.java
new file mode 100644
index 0000000..f1a2c77
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/InstructionTargeter.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denote that a class targets InstructionHandles within an InstructionList. Namely
+ * the following implementers:
+ *
+ * @see BranchHandle
+ * @see LocalVariableGen
+ * @see CodeExceptionGen
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface InstructionTargeter {
+
+    /**
+     * Checks whether this targeter targets the specified instruction handle.
+     */
+    boolean containsTarget(InstructionHandle ih);
+
+    /**
+     * Replaces the target of this targeter from this old handle to the new handle.
+     *
+     * @param old_ih the old handle
+     * @param new_ih the new handle
+     * @throws ClassGenException if old_ih is not targeted by this object
+     */
+    void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih) throws ClassGenException;
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/InvokeInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/InvokeInstruction.java
new file mode 100644
index 0000000..1d7993d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/InvokeInstruction.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.util.StringTokenizer;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+
+/**
+ * Super class for the INVOKExxx family of instructions.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class InvokeInstruction extends FieldOrMethod implements ExceptionThrower,
+        StackConsumer, StackProducer {
+
+    private static final long serialVersionUID = 6089031137856650442L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    InvokeInstruction() {
+    }
+
+
+    /**
+     * @param index to constant pool
+     */
+    protected InvokeInstruction(short opcode, int index) {
+        super(opcode, index);
+    }
+
+
+    /**
+     * @return mnemonic for instruction with symbolic references resolved
+     */
+    @Override
+    public String toString( ConstantPool cp ) {
+        Constant c = cp.getConstant(index);
+        StringTokenizer tok = new StringTokenizer(cp.constantToString(c));
+        return Constants.OPCODE_NAMES[opcode] + " " + tok.nextToken().replace('.', '/')
+                + tok.nextToken();
+    }
+
+
+    /**
+     * Also works for instructions whose stack effect depends on the
+     * constant pool entry they reference.
+     * @return Number of words consumed from stack by this instruction
+     */
+    @Override
+    public int consumeStack( ConstantPoolGen cpg ) {
+        int sum;
+        if ((opcode == Constants.INVOKESTATIC) || (opcode == Constants.INVOKEDYNAMIC)) {
+            sum = 0;
+        } else {
+            sum = 1; // this reference
+        }
+
+        String signature = getSignature(cpg);
+        sum += Type.getArgumentTypesSize(signature);
+        return sum;
+    }
+
+
+    /**
+     * Also works for instructions whose stack effect depends on the
+     * constant pool entry they reference.
+     * @return Number of words produced onto stack by this instruction
+     */
+    @Override
+    public int produceStack( ConstantPoolGen cpg ) {
+        String signature = getSignature(cpg);
+        return Type.getReturnTypeSize(signature);
+    }
+
+
+    /** @return return type of referenced method.
+     */
+    @Override
+    public Type getType( ConstantPoolGen cpg ) {
+        return getReturnType(cpg);
+    }
+
+
+    /** @return name of referenced method.
+     */
+    public String getMethodName( ConstantPoolGen cpg ) {
+        return getName(cpg);
+    }
+
+
+    /** @return return type of referenced method.
+     */
+    public Type getReturnType( ConstantPoolGen cpg ) {
+        return Type.getReturnType(getSignature(cpg));
+    }
+
+
+    /** @return argument types of referenced method.
+     */
+    public Type[] getArgumentTypes( ConstantPoolGen cpg ) {
+        return Type.getArgumentTypes(getSignature(cpg));
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/JSR.java b/src/main/java/org/apache/commons/bcel6/generic/JSR.java
new file mode 100644
index 0000000..1c24429
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/JSR.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/** 
+ * JSR - Jump to subroutine
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class JSR extends JsrInstruction implements VariableLengthInstruction {
+
+    private static final long serialVersionUID = 7425681395340093184L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    JSR() {
+    }
+
+
+    public JSR(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.JSR, target);
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        index = getTargetOffset();
+        if (opcode == org.apache.commons.bcel6.Constants.JSR) {
+            super.dump(out);
+        } else { // JSR_W
+            index = getTargetOffset();
+            out.writeByte(opcode);
+            out.writeInt(index);
+        }
+    }
+
+
+    @Override
+    protected int updatePosition( int offset, int max_offset ) {
+        int i = getTargetOffset(); // Depending on old position value
+        position += offset; // Position may be shifted by preceding expansions
+        if (Math.abs(i) >= (32767 - max_offset)) { // to large for short (estimate)
+            opcode = org.apache.commons.bcel6.Constants.JSR_W;
+            short old_length = length;
+            length = 5;
+            return length - old_length;
+        }
+        return 0;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitVariableLengthInstruction(this);
+        v.visitBranchInstruction(this);
+        v.visitJsrInstruction(this);
+        v.visitJSR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/JSR_W.java b/src/main/java/org/apache/commons/bcel6/generic/JSR_W.java
new file mode 100644
index 0000000..664c803
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/JSR_W.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * JSR_W - Jump to subroutine
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class JSR_W extends JsrInstruction {
+
+    private static final long serialVersionUID = -7352049131416924650L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    JSR_W() {
+    }
+
+
+    public JSR_W(InstructionHandle target) {
+        super(org.apache.commons.bcel6.Constants.JSR_W, target);
+        length = 5;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        index = getTargetOffset();
+        out.writeByte(opcode);
+        out.writeInt(index);
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        index = bytes.readInt();
+        length = 5;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitBranchInstruction(this);
+        v.visitJsrInstruction(this);
+        v.visitJSR_W(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/JsrInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/JsrInstruction.java
new file mode 100644
index 0000000..2d700d1
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/JsrInstruction.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * Super class for JSR - Jump to subroutine
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class JsrInstruction extends BranchInstruction implements UnconditionalBranch,
+        TypedInstruction, StackProducer {
+
+    private static final long serialVersionUID = -6438850002848773481L;
+
+
+    JsrInstruction(short opcode, InstructionHandle target) {
+        super(opcode, target);
+    }
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    JsrInstruction() {
+    }
+
+
+    /** @return return address type
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return new ReturnaddressType(physicalSuccessor());
+    }
+
+
+    /**
+     * Returns an InstructionHandle to the physical successor
+     * of this JsrInstruction. <B>For this method to work,
+     * this JsrInstruction object must not be shared between
+     * multiple InstructionHandle objects!</B>
+     * Formally, there must not be InstructionHandle objects
+     * i, j where i != j and i.getInstruction() == this ==
+     * j.getInstruction().
+     * @return an InstructionHandle to the "next" instruction that
+     * will be executed when RETurned from a subroutine.
+     */
+    public InstructionHandle physicalSuccessor() {
+        InstructionHandle ih = this.target;
+        // Rewind!
+        while (ih.getPrev() != null) {
+            ih = ih.getPrev();
+        }
+        // Find the handle for "this" JsrInstruction object.
+        while (ih.getInstruction() != this) {
+            ih = ih.getNext();
+        }
+        InstructionHandle toThis = ih;
+        while (ih != null) {
+            ih = ih.getNext();
+            if ((ih != null) && (ih.getInstruction() == this)) {
+                throw new RuntimeException("physicalSuccessor() called on a shared JsrInstruction.");
+            }
+        }
+        // Return the physical successor        
+        return toThis.getNext();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/L2D.java b/src/main/java/org/apache/commons/bcel6/generic/L2D.java
new file mode 100644
index 0000000..ac7af43
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/L2D.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * L2D - Convert long to double
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class L2D extends ConversionInstruction {
+
+    private static final long serialVersionUID = 1166552346340922659L;
+
+
+    public L2D() {
+        super(org.apache.commons.bcel6.Constants.L2D);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitL2D(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/L2F.java b/src/main/java/org/apache/commons/bcel6/generic/L2F.java
new file mode 100644
index 0000000..ebff074
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/L2F.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * L2F - Convert long to float
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class L2F extends ConversionInstruction {
+
+    private static final long serialVersionUID = -7181529985408901328L;
+
+
+    public L2F() {
+        super(org.apache.commons.bcel6.Constants.L2F);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitL2F(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/L2I.java b/src/main/java/org/apache/commons/bcel6/generic/L2I.java
new file mode 100644
index 0000000..f83a416
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/L2I.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * L2I - Convert long to int
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class L2I extends ConversionInstruction {
+
+    private static final long serialVersionUID = -3263285222028195535L;
+
+
+    public L2I() {
+        super(org.apache.commons.bcel6.Constants.L2I);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitConversionInstruction(this);
+        v.visitL2I(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LADD.java b/src/main/java/org/apache/commons/bcel6/generic/LADD.java
new file mode 100644
index 0000000..8b32800
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LADD.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LADD - Add longs
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LADD extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 2093272772688460551L;
+
+
+    public LADD() {
+        super(org.apache.commons.bcel6.Constants.LADD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLADD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/LALOAD.java
new file mode 100644
index 0000000..1d0833a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LALOAD.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LALOAD - Load long from array
+ * <PRE>Stack: ..., arrayref, index -&gt; ..., value1, value2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LALOAD extends ArrayInstruction implements StackProducer {
+
+    private static final long serialVersionUID = -3687594761485525620L;
+
+
+    /** Load long from array
+     */
+    public LALOAD() {
+        super(org.apache.commons.bcel6.Constants.LALOAD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitLALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LAND.java b/src/main/java/org/apache/commons/bcel6/generic/LAND.java
new file mode 100644
index 0000000..bc9cdd6
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LAND.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LAND - Bitwise AND longs
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LAND extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 2429077463161192057L;
+
+
+    public LAND() {
+        super(org.apache.commons.bcel6.Constants.LAND);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLAND(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/LASTORE.java
new file mode 100644
index 0000000..22a8713
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LASTORE.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LASTORE -  Store into long array
+ * <PRE>Stack: ..., arrayref, index, value.word1, value.word2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LASTORE extends ArrayInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = -6758326777570451990L;
+
+
+    /** Store long into array
+     */
+    public LASTORE() {
+        super(org.apache.commons.bcel6.Constants.LASTORE);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitLASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LCMP.java b/src/main/java/org/apache/commons/bcel6/generic/LCMP.java
new file mode 100644
index 0000000..8686c7d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LCMP.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * LCMP - Compare longs:
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt; ..., result &lt;= -1, 0, 1&gt;</PRE>
+ *        
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LCMP extends Instruction implements TypedInstruction, StackProducer, StackConsumer {
+
+    private static final long serialVersionUID = 2981727810276161294L;
+
+
+    public LCMP() {
+        super(org.apache.commons.bcel6.Constants.LCMP, (short) 1);
+    }
+
+
+    /** @return Type.LONG
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.LONG;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitLCMP(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LCONST.java b/src/main/java/org/apache/commons/bcel6/generic/LCONST.java
new file mode 100644
index 0000000..95e9cb3
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LCONST.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LCONST - Push 0 or 1, other values cause an exception
+ *
+ * <PRE>Stack: ... -&gt; ..., </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LCONST extends Instruction implements ConstantPushInstruction {
+
+    private static final long serialVersionUID = 909025807621177822L;
+    private long value;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    LCONST() {
+    }
+
+
+    public LCONST(long l) {
+        super(org.apache.commons.bcel6.Constants.LCONST_0, (short) 1);
+        if (l == 0) {
+            opcode = org.apache.commons.bcel6.Constants.LCONST_0;
+        } else if (l == 1) {
+            opcode = org.apache.commons.bcel6.Constants.LCONST_1;
+        } else {
+            throw new ClassGenException("LCONST can be used only for 0 and 1: " + l);
+        }
+        value = l;
+    }
+
+
+    public Number getValue() {
+        return Long.valueOf(value);
+    }
+
+
+    /** @return Type.LONG
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.LONG;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitPushInstruction(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitConstantPushInstruction(this);
+        v.visitLCONST(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LDC.java b/src/main/java/org/apache/commons/bcel6/generic/LDC.java
new file mode 100644
index 0000000..adcba41
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LDC.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * LDC - Push item from constant pool.
+ *
+ * <PRE>Stack: ... -&gt; ..., item</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LDC extends CPInstruction implements PushInstruction, ExceptionThrower {
+
+    private static final long serialVersionUID = -972820476154330719L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    LDC() {
+    }
+
+
+    public LDC(int index) {
+        super(org.apache.commons.bcel6.Constants.LDC_W, index);
+        setSize();
+    }
+
+
+    // Adjust to proper size
+    protected final void setSize() {
+        if (index <= org.apache.commons.bcel6.Constants.MAX_BYTE) { // Fits in one byte?
+            opcode = org.apache.commons.bcel6.Constants.LDC;
+            length = 2;
+        } else {
+            opcode = org.apache.commons.bcel6.Constants.LDC_W;
+            length = 3;
+        }
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode);
+        if (length == 2) {
+            out.writeByte(index);
+        } else {
+            out.writeShort(index);
+        }
+    }
+
+
+    /**
+     * Set the index to constant pool and adjust size.
+     */
+    @Override
+    public final void setIndex( int index ) {
+        super.setIndex(index);
+        setSize();
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        length = 2;
+        index = bytes.readUnsignedByte();
+    }
+
+
+    public Object getValue( ConstantPoolGen cpg ) {
+        org.apache.commons.bcel6.classfile.Constant c = cpg.getConstantPool().getConstant(index);
+        switch (c.getTag()) {
+            case org.apache.commons.bcel6.Constants.CONSTANT_String:
+                int i = ((org.apache.commons.bcel6.classfile.ConstantString) c).getStringIndex();
+                c = cpg.getConstantPool().getConstant(i);
+                return ((org.apache.commons.bcel6.classfile.ConstantUtf8) c).getBytes();
+            case org.apache.commons.bcel6.Constants.CONSTANT_Float:
+                return new Float(((org.apache.commons.bcel6.classfile.ConstantFloat) c).getBytes());
+            case org.apache.commons.bcel6.Constants.CONSTANT_Integer:
+                return Integer.valueOf(((org.apache.commons.bcel6.classfile.ConstantInteger) c).getBytes());
+            case org.apache.commons.bcel6.Constants.CONSTANT_Class:
+                int nameIndex = ((org.apache.commons.bcel6.classfile.ConstantClass) c).getNameIndex();
+                c = cpg.getConstantPool().getConstant(nameIndex);
+                return new ObjectType(((org.apache.commons.bcel6.classfile.ConstantUtf8) c).getBytes());
+            default: // Never reached
+                throw new RuntimeException("Unknown or invalid constant type at " + index);
+        }
+    }
+
+
+    @Override
+    public Type getType( ConstantPoolGen cpg ) {
+        switch (cpg.getConstantPool().getConstant(index).getTag()) {
+            case org.apache.commons.bcel6.Constants.CONSTANT_String:
+                return Type.STRING;
+            case org.apache.commons.bcel6.Constants.CONSTANT_Float:
+                return Type.FLOAT;
+            case org.apache.commons.bcel6.Constants.CONSTANT_Integer:
+                return Type.INT;
+            case org.apache.commons.bcel6.Constants.CONSTANT_Class:
+                return Type.CLASS;
+            default: // Never reached
+                throw new RuntimeException("Unknown or invalid constant type at " + index);
+        }
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return org.apache.commons.bcel6.ExceptionConstants.EXCS_STRING_RESOLUTION;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitPushInstruction(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitCPInstruction(this);
+        v.visitLDC(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LDC2_W.java b/src/main/java/org/apache/commons/bcel6/generic/LDC2_W.java
new file mode 100644
index 0000000..21a943b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LDC2_W.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LDC2_W - Push long or double from constant pool
+ *
+ * <PRE>Stack: ... -&gt; ..., item.word1, item.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LDC2_W extends CPInstruction implements PushInstruction {
+
+    private static final long serialVersionUID = 7403326732924539892L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    LDC2_W() {
+    }
+
+
+    public LDC2_W(int index) {
+        super(org.apache.commons.bcel6.Constants.LDC2_W, index);
+    }
+
+
+    @Override
+    public Type getType( ConstantPoolGen cpg ) {
+        switch (cpg.getConstantPool().getConstant(index).getTag()) {
+            case org.apache.commons.bcel6.Constants.CONSTANT_Long:
+                return Type.LONG;
+            case org.apache.commons.bcel6.Constants.CONSTANT_Double:
+                return Type.DOUBLE;
+            default: // Never reached
+                throw new RuntimeException("Unknown constant type " + opcode);
+        }
+    }
+
+
+    public Number getValue( ConstantPoolGen cpg ) {
+        org.apache.commons.bcel6.classfile.Constant c = cpg.getConstantPool().getConstant(index);
+        switch (c.getTag()) {
+            case org.apache.commons.bcel6.Constants.CONSTANT_Long:
+                return Long.valueOf(((org.apache.commons.bcel6.classfile.ConstantLong) c).getBytes());
+            case org.apache.commons.bcel6.Constants.CONSTANT_Double:
+                return new Double(((org.apache.commons.bcel6.classfile.ConstantDouble) c).getBytes());
+            default: // Never reached
+                throw new RuntimeException("Unknown or invalid constant type at " + index);
+        }
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitPushInstruction(this);
+        v.visitTypedInstruction(this);
+        v.visitCPInstruction(this);
+        v.visitLDC2_W(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LDC_W.java b/src/main/java/org/apache/commons/bcel6/generic/LDC_W.java
new file mode 100644
index 0000000..3daa058
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LDC_W.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * LDC_W - Push item from constant pool (wide index)
+ *
+ * <PRE>Stack: ... -&gt; ..., item.word1, item.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LDC_W extends LDC {
+
+    private static final long serialVersionUID = -8040188785844554411L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    LDC_W() {
+    }
+
+
+    public LDC_W(int index) {
+        super(index);
+    }
+
+
+    /**
+     * Read needed data (i.e., index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        setIndex(bytes.readUnsignedShort());
+        // Override just in case it has been changed
+        opcode = org.apache.commons.bcel6.Constants.LDC_W;
+        length = 3;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LDIV.java b/src/main/java/org/apache/commons/bcel6/generic/LDIV.java
new file mode 100644
index 0000000..307a58e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LDIV.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * LDIV - Divide longs
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LDIV extends ArithmeticInstruction implements ExceptionThrower {
+
+    private static final long serialVersionUID = 8188185695825749727L;
+
+
+    public LDIV() {
+        super(org.apache.commons.bcel6.Constants.LDIV);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.ARITHMETIC_EXCEPTION
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLDIV(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LLOAD.java b/src/main/java/org/apache/commons/bcel6/generic/LLOAD.java
new file mode 100644
index 0000000..6832d1b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LLOAD.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LLOAD - Load long from local variable
+ *<PRE>Stack ... -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LLOAD extends LoadInstruction {
+
+    private static final long serialVersionUID = 379331602405124174L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    LLOAD() {
+        super(org.apache.commons.bcel6.Constants.LLOAD, org.apache.commons.bcel6.Constants.LLOAD_0);
+    }
+
+
+    public LLOAD(int n) {
+        super(org.apache.commons.bcel6.Constants.LLOAD, org.apache.commons.bcel6.Constants.LLOAD_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitLLOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LMUL.java b/src/main/java/org/apache/commons/bcel6/generic/LMUL.java
new file mode 100644
index 0000000..30f51b9
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LMUL.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LMUL - Multiply longs
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LMUL extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 3538398481425889023L;
+
+
+    public LMUL() {
+        super(org.apache.commons.bcel6.Constants.LMUL);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLMUL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LNEG.java b/src/main/java/org/apache/commons/bcel6/generic/LNEG.java
new file mode 100644
index 0000000..a295b64
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LNEG.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LNEG - Negate long
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LNEG extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 7749253327528155126L;
+
+
+    public LNEG() {
+        super(org.apache.commons.bcel6.Constants.LNEG);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLNEG(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LOOKUPSWITCH.java b/src/main/java/org/apache/commons/bcel6/generic/LOOKUPSWITCH.java
new file mode 100644
index 0000000..d54d9e1
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LOOKUPSWITCH.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * LOOKUPSWITCH - Switch with unordered set of values
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see SWITCH
+ */
+public class LOOKUPSWITCH extends Select {
+
+    private static final long serialVersionUID = -8263209830709467636L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    LOOKUPSWITCH() {
+    }
+
+
+    public LOOKUPSWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget) {
+        super(org.apache.commons.bcel6.Constants.LOOKUPSWITCH, match, targets, defaultTarget);
+        length = (short) (9 + match_length * 8); /* alignment remainder assumed
+         * 0 here, until dump time. */
+        fixed_length = length;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        super.dump(out);
+        out.writeInt(match_length); // npairs
+        for (int i = 0; i < match_length; i++) {
+            out.writeInt(match[i]); // match-offset pairs
+            out.writeInt(indices[i] = getTargetOffset(targets[i]));
+        }
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        super.initFromFile(bytes, wide); // reads padding
+        match_length = bytes.readInt();
+        fixed_length = (short) (9 + match_length * 8);
+        length = (short) (fixed_length + padding);
+        match = new int[match_length];
+        indices = new int[match_length];
+        targets = new InstructionHandle[match_length];
+        for (int i = 0; i < match_length; i++) {
+            match[i] = bytes.readInt();
+            indices[i] = bytes.readInt();
+        }
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitVariableLengthInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitSelect(this);
+        v.visitLOOKUPSWITCH(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LOR.java b/src/main/java/org/apache/commons/bcel6/generic/LOR.java
new file mode 100644
index 0000000..06b2703
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LOR.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LOR - Bitwise OR long
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LOR extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 7862213176431021916L;
+
+
+    public LOR() {
+        super(org.apache.commons.bcel6.Constants.LOR);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLOR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LREM.java b/src/main/java/org/apache/commons/bcel6/generic/LREM.java
new file mode 100644
index 0000000..252d41d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LREM.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * LREM - Remainder of long
+ * <PRE>Stack: ..., value1, value2 -&gt; result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LREM extends ArithmeticInstruction implements ExceptionThrower {
+
+    private static final long serialVersionUID = -3646771608200042527L;
+
+
+    public LREM() {
+        super(org.apache.commons.bcel6.Constants.LREM);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.ARITHMETIC_EXCEPTION
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLREM(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LRETURN.java b/src/main/java/org/apache/commons/bcel6/generic/LRETURN.java
new file mode 100644
index 0000000..85e41eb
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LRETURN.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LRETURN -  Return long from method
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; &lt;empty&gt;</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LRETURN extends ReturnInstruction {
+
+    private static final long serialVersionUID = 6173148526583167918L;
+
+
+    public LRETURN() {
+        super(org.apache.commons.bcel6.Constants.LRETURN);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitReturnInstruction(this);
+        v.visitLRETURN(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LSHL.java b/src/main/java/org/apache/commons/bcel6/generic/LSHL.java
new file mode 100644
index 0000000..7d82c0b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LSHL.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LSHL - Arithmetic shift left long
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2 -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LSHL extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 7855322471731877312L;
+
+
+    public LSHL() {
+        super(org.apache.commons.bcel6.Constants.LSHL);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLSHL(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LSHR.java b/src/main/java/org/apache/commons/bcel6/generic/LSHR.java
new file mode 100644
index 0000000..038afcb
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LSHR.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LSHR - Arithmetic shift right long
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2 -&gt; ..., result.word1, result.word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LSHR extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -6376870568784516963L;
+
+
+    public LSHR() {
+        super(org.apache.commons.bcel6.Constants.LSHR);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLSHR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LSTORE.java b/src/main/java/org/apache/commons/bcel6/generic/LSTORE.java
new file mode 100644
index 0000000..358dd11
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LSTORE.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LSTORE - Store long into local variable
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ... </PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LSTORE extends StoreInstruction {
+
+    private static final long serialVersionUID = 1309214714647416201L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    LSTORE() {
+        super(org.apache.commons.bcel6.Constants.LSTORE, org.apache.commons.bcel6.Constants.LSTORE_0);
+    }
+
+
+    public LSTORE(int n) {
+        super(org.apache.commons.bcel6.Constants.LSTORE, org.apache.commons.bcel6.Constants.LSTORE_0, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        super.accept(v);
+        v.visitLSTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LSUB.java b/src/main/java/org/apache/commons/bcel6/generic/LSUB.java
new file mode 100644
index 0000000..98e779f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LSUB.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LSUB - Substract longs
+ * <PRE>Stack: ..., value1.word1, value1.word2, value2.word1, value2.word2 -&gt;</PRE>
+ *        ..., result.word1, result.word2
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LSUB extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -8379864362938353932L;
+
+
+    public LSUB() {
+        super(org.apache.commons.bcel6.Constants.LSUB);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLSUB(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LUSHR.java b/src/main/java/org/apache/commons/bcel6/generic/LUSHR.java
new file mode 100644
index 0000000..0c682d7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LUSHR.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LUSHR - Logical shift right long
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LUSHR extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = 9184663422046843885L;
+
+
+    public LUSHR() {
+        super(org.apache.commons.bcel6.Constants.LUSHR);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLUSHR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LXOR.java b/src/main/java/org/apache/commons/bcel6/generic/LXOR.java
new file mode 100644
index 0000000..25cdaf2
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LXOR.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * LXOR - Bitwise XOR long
+ * <PRE>Stack: ..., value1, value2 -&gt; ..., result</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class LXOR extends ArithmeticInstruction {
+
+    private static final long serialVersionUID = -3031187042785170579L;
+
+
+    public LXOR() {
+        super(org.apache.commons.bcel6.Constants.LXOR);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitTypedInstruction(this);
+        v.visitStackProducer(this);
+        v.visitStackConsumer(this);
+        v.visitArithmeticInstruction(this);
+        v.visitLXOR(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LineNumberGen.java b/src/main/java/org/apache/commons/bcel6/generic/LineNumberGen.java
new file mode 100644
index 0000000..c4d26b5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LineNumberGen.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.classfile.LineNumber;
+
+/** 
+ * This class represents a line number within a method, i.e., give an instruction
+ * a line number corresponding to the source code line.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     LineNumber
+ * @see     MethodGen
+ */
+public class LineNumberGen implements InstructionTargeter, Cloneable, java.io.Serializable {
+
+    private static final long serialVersionUID = 4939965573936108738L;
+    private InstructionHandle ih;
+    private int src_line;
+
+
+    /**
+     * Create a line number.
+     *
+     * @param ih instruction handle to reference
+     */
+    public LineNumberGen(InstructionHandle ih, int src_line) {
+        setInstruction(ih);
+        setSourceLine(src_line);
+    }
+
+
+    /**
+     * @return true, if ih is target of this line number
+     */
+    public boolean containsTarget( InstructionHandle ih ) {
+        return this.ih == ih;
+    }
+
+
+    /**
+     * @param old_ih old target
+     * @param new_ih new target
+     */
+    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
+        if (old_ih != ih) {
+            throw new ClassGenException("Not targeting " + old_ih + ", but " + ih + "}");
+        } else {
+            setInstruction(new_ih);
+        }
+    }
+
+
+    /**
+     * Get LineNumber attribute .
+     *
+     * This relies on that the instruction list has already been dumped to byte code or
+     * or that the `setPositions' methods has been called for the instruction list.
+     */
+    public LineNumber getLineNumber() {
+        return new LineNumber(ih.getPosition(), src_line);
+    }
+
+
+    public void setInstruction( InstructionHandle ih ) {
+        if (ih == null) {
+            throw new NullPointerException("InstructionHandle may not be null");
+        }
+        BranchInstruction.notifyTarget(this.ih, ih, this);
+        this.ih = ih;
+    }
+
+
+    @Override
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new Error("Clone Not Supported"); // never happens
+        }
+    }
+
+
+    public InstructionHandle getInstruction() {
+        return ih;
+    }
+
+
+    public void setSourceLine( int src_line ) {
+        this.src_line = src_line;
+    }
+
+
+    public int getSourceLine() {
+        return src_line;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LoadClass.java b/src/main/java/org/apache/commons/bcel6/generic/LoadClass.java
new file mode 100644
index 0000000..4805e51
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LoadClass.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denotes that an instruction may start the process of loading and resolving 
+ * the referenced class in the Virtual Machine.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface LoadClass {
+
+    /**
+     * Returns the ObjectType of the referenced class or interface
+     * that may be loaded and resolved.
+     * @return object type that may be loaded or null if a primitive is
+     * referenced
+     */
+    public ObjectType getLoadClassType( ConstantPoolGen cpg );
+
+
+    /**
+     * Returns the type associated with this instruction.
+     * LoadClass instances are always typed, but this type
+     * does not always refer to the type of the class or interface
+     * that it possibly forces to load. For example, GETFIELD would
+     * return the type of the field and not the type of the class
+     * where the field is defined.
+     * If no class is forced to be loaded, <B>null</B> is returned.
+     * An example for this is an ANEWARRAY instruction that creates
+     * an int[][].
+     * @see #getLoadClassType(ConstantPoolGen)
+     */
+    public Type getType( ConstantPoolGen cpg );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LoadInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/LoadInstruction.java
new file mode 100644
index 0000000..31635df
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LoadInstruction.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denotes an unparameterized instruction to load a value from a local
+ * variable, e.g. ILOAD.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class LoadInstruction extends LocalVariableInstruction implements PushInstruction {
+
+    private static final long serialVersionUID = 3661924741022212247L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     * tag and length are defined in readInstruction and initFromFile, respectively.
+     */
+    LoadInstruction(short canon_tag, short c_tag) {
+        super(canon_tag, c_tag);
+    }
+
+
+    /**
+     * @param opcode Instruction opcode
+     * @param c_tag Instruction number for compact version, ALOAD_0, e.g.
+     * @param n local variable index (unsigned short)
+     */
+    protected LoadInstruction(short opcode, short c_tag, int n) {
+        super(opcode, c_tag, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitPushInstruction(this);
+        v.visitTypedInstruction(this);
+        v.visitLocalVariableInstruction(this);
+        v.visitLoadInstruction(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LocalVariableGen.java b/src/main/java/org/apache/commons/bcel6/generic/LocalVariableGen.java
new file mode 100644
index 0000000..13914ac
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LocalVariableGen.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.LocalVariable;
+
+/** 
+ * This class represents a local variable within a method. It contains its
+ * scope, name and type. The generated LocalVariable object can be obtained
+ * with getLocalVariable which needs the instruction list and the constant
+ * pool as parameters.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see     LocalVariable
+ * @see     MethodGen
+ */
+public class LocalVariableGen implements InstructionTargeter, NamedAndTyped, Cloneable,
+        java.io.Serializable {
+
+    private static final long serialVersionUID = -3810966319065955534L;
+    private int index;
+    private String name;
+    private Type type;
+    private InstructionHandle start, end;
+
+
+    /**
+     * Generate a local variable that with index `index'. Note that double and long
+     * variables need two indexs. Index indices have to be provided by the user.
+     *
+     * @param index index of local variable
+     * @param name its name
+     * @param type its type
+     * @param start from where the instruction is valid (null means from the start)
+     * @param end until where the instruction is valid (null means to the end)
+     */
+    public LocalVariableGen(int index, String name, Type type, InstructionHandle start,
+            InstructionHandle end) {
+        if ((index < 0) || (index > Constants.MAX_SHORT)) {
+            throw new ClassGenException("Invalid index index: " + index);
+        }
+        this.name = name;
+        this.type = type;
+        this.index = index;
+        setStart(start);
+        setEnd(end);
+    }
+
+
+    /**
+     * Get LocalVariable object.
+     *
+     * This relies on that the instruction list has already been dumped to byte code or
+     * or that the `setPositions' methods has been called for the instruction list.
+     *
+     * Note that for local variables whose scope end at the last
+     * instruction of the method's code, the JVM specification is ambiguous:
+     * both a start_pc+length ending at the last instruction and
+     * start_pc+length ending at first index beyond the end of the code are
+     * valid.
+     *
+     * @param cp constant pool
+     */
+    public LocalVariable getLocalVariable( ConstantPoolGen cp ) {
+        int start_pc = start.getPosition();
+        int length = end.getPosition() - start_pc;
+        if (end.getNext() == null) {
+            length += end.getInstruction().getLength();
+        }
+        int name_index = cp.addUtf8(name);
+        int signature_index = cp.addUtf8(type.getSignature());
+        return new LocalVariable(start_pc, length, name_index, signature_index, index, cp
+                .getConstantPool());
+    }
+
+
+    public void setIndex( int index ) {
+        this.index = index;
+    }
+
+
+    public int getIndex() {
+        return index;
+    }
+
+
+    public void setName( String name ) {
+        this.name = name;
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+
+    public void setType( Type type ) {
+        this.type = type;
+    }
+
+
+    public Type getType() {
+        return type;
+    }
+
+
+    public InstructionHandle getStart() {
+        return start;
+    }
+
+
+    public InstructionHandle getEnd() {
+        return end;
+    }
+
+
+    public void setStart( InstructionHandle start ) {
+        BranchInstruction.notifyTarget(this.start, start, this);
+        this.start = start;
+    }
+
+
+    public void setEnd( InstructionHandle end ) {
+        BranchInstruction.notifyTarget(this.end, end, this);
+        this.end = end;
+    }
+
+
+    /**
+     * @param old_ih old target, either start or end
+     * @param new_ih new target
+     */
+    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
+        boolean targeted = false;
+        if (start == old_ih) {
+            targeted = true;
+            setStart(new_ih);
+        }
+        if (end == old_ih) {
+            targeted = true;
+            setEnd(new_ih);
+        }
+        if (!targeted) {
+            throw new ClassGenException("Not targeting " + old_ih + ", but {" + start + ", " + end
+                    + "}");
+        }
+    }
+
+    /**
+     * Clear the references from and to this variable when it's removed.
+     */
+    void dispose() {
+        setStart(null);
+        setEnd(null);
+    }
+
+    /**
+     * @return true, if ih is target of this variable
+     */
+    public boolean containsTarget( InstructionHandle ih ) {
+        return (start == ih) || (end == ih);
+    }
+
+
+    @Override
+    public int hashCode() {
+        // If the user changes the name or type, problems with the targeter hashmap will occur.
+        // Note: index cannot be part of hash as it may be changed by the user.
+        return name.hashCode() ^ type.hashCode();
+    }
+
+
+    /**
+     * We consider to local variables to be equal, if the use the same index and
+     * are valid in the same range.
+     */
+    @Override
+    public boolean equals( Object o ) {
+        if (!(o instanceof LocalVariableGen)) {
+            return false;
+        }
+        LocalVariableGen l = (LocalVariableGen) o;
+        return (l.index == index) && (l.start == start) && (l.end == end);
+    }
+
+
+    @Override
+    public String toString() {
+        return "LocalVariableGen(" + name + ", " + type + ", " + start + ", " + end + ")";
+    }
+
+
+    @Override
+    public Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new Error("Clone Not Supported"); // never happens
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java
new file mode 100644
index 0000000..33d8be0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/LocalVariableInstruction.java
@@ -0,0 +1,210 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/**
+ * Abstract super class for instructions dealing with local variables.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class LocalVariableInstruction extends Instruction implements TypedInstruction,
+        IndexedInstruction {
+
+    private static final long serialVersionUID = 8322269736316122743L;
+    protected int n = -1; // index of referenced variable
+    private short c_tag = -1; // compact version, such as ILOAD_0
+    private short canon_tag = -1; // canonical tag such as ILOAD
+
+
+    private boolean wide() {
+        return n > Constants.MAX_BYTE;
+    }
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     * tag and length are defined in readInstruction and initFromFile, respectively.
+     */
+    LocalVariableInstruction(short canon_tag, short c_tag) {
+        super();
+        this.canon_tag = canon_tag;
+        this.c_tag = c_tag;
+    }
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Also used by IINC()!
+     */
+    LocalVariableInstruction() {
+    }
+
+
+    /**
+     * @param opcode Instruction opcode
+     * @param c_tag Instruction number for compact version, ALOAD_0, e.g.
+     * @param n local variable index (unsigned short)
+     */
+    protected LocalVariableInstruction(short opcode, short c_tag, int n) {
+        super(opcode, (short) 2);
+        this.c_tag = c_tag;
+        canon_tag = opcode;
+        setIndex(n);
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        if (wide()) {
+            out.writeByte(Constants.WIDE);
+        }
+        out.writeByte(opcode);
+        if (length > 1) { // Otherwise ILOAD_n, instruction, e.g.
+            if (wide()) {
+                out.writeShort(n);
+            } else {
+                out.writeByte(n);
+            }
+        }
+    }
+
+
+    /**
+     * Long output format:
+     *
+     * &lt;name of opcode&gt; "["&lt;opcode number&gt;"]" 
+     * "("&lt;length of instruction&gt;")" "&lt;"&lt; local variable index&gt;"&gt;"
+     *
+     * @param verbose long/short format switch
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        if (((opcode >= Constants.ILOAD_0) && (opcode <= Constants.ALOAD_3))
+                || ((opcode >= Constants.ISTORE_0) && (opcode <= Constants.ASTORE_3))) {
+            return super.toString(verbose);
+        } else {
+            return super.toString(verbose) + " " + n;
+        }
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     * <pre>
+     * (ILOAD &lt;= tag &lt;= ALOAD_3) || (ISTORE &lt;= tag &lt;= ASTORE_3)
+     * </pre>
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        if (wide) {
+            n = bytes.readUnsignedShort();
+            length = 4;
+        } else if (((opcode >= Constants.ILOAD) && (opcode <= Constants.ALOAD))
+                || ((opcode >= Constants.ISTORE) && (opcode <= Constants.ASTORE))) {
+            n = bytes.readUnsignedByte();
+            length = 2;
+        } else if (opcode <= Constants.ALOAD_3) { // compact load instruction such as ILOAD_2
+            n = (opcode - Constants.ILOAD_0) % 4;
+            length = 1;
+        } else { // Assert ISTORE_0 <= tag <= ASTORE_3
+            n = (opcode - Constants.ISTORE_0) % 4;
+            length = 1;
+        }
+    }
+
+
+    /**
+     * @return local variable index  referred by this instruction.
+     */
+    public final int getIndex() {
+        return n;
+    }
+
+
+    /**
+     * Set the local variable index
+     */
+    public void setIndex( int n ) {
+        if ((n < 0) || (n > Constants.MAX_SHORT)) {
+            throw new ClassGenException("Illegal value: " + n);
+        }
+        this.n = n;
+        if (n >= 0 && n <= 3) { // Use more compact instruction xLOAD_n
+            opcode = (short) (c_tag + n);
+            length = 1;
+        } else {
+            opcode = canon_tag;
+            if (wide()) {
+                length = 4;
+            } else {
+                length = 2;
+            }
+        }
+    }
+
+
+    /** @return canonical tag for instruction, e.g., ALOAD for ALOAD_0
+     */
+    public short getCanonicalTag() {
+        return canon_tag;
+    }
+
+
+    /**
+     * Returns the type associated with the instruction - 
+     * in case of ALOAD or ASTORE Type.OBJECT is returned.
+     * This is just a bit incorrect, because ALOAD and ASTORE
+     * may work on every ReferenceType (including Type.NULL) and
+     * ASTORE may even work on a ReturnaddressType .
+     * @return type associated with the instruction
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        switch (canon_tag) {
+            case Constants.ILOAD:
+            case Constants.ISTORE:
+                return Type.INT;
+            case Constants.LLOAD:
+            case Constants.LSTORE:
+                return Type.LONG;
+            case Constants.DLOAD:
+            case Constants.DSTORE:
+                return Type.DOUBLE;
+            case Constants.FLOAD:
+            case Constants.FSTORE:
+                return Type.FLOAT;
+            case Constants.ALOAD:
+            case Constants.ASTORE:
+                return Type.OBJECT;
+            default:
+                throw new ClassGenException("Oops: unknown case in switch" + canon_tag);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/MONITORENTER.java b/src/main/java/org/apache/commons/bcel6/generic/MONITORENTER.java
new file mode 100644
index 0000000..297a7ad
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/MONITORENTER.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * MONITORENTER - Enter monitor for object
+ * <PRE>Stack: ..., objectref -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class MONITORENTER extends Instruction implements ExceptionThrower, StackConsumer {
+
+    private static final long serialVersionUID = 4537302966975402521L;
+
+
+    public MONITORENTER() {
+        super(org.apache.commons.bcel6.Constants.MONITORENTER, (short) 1);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.NULL_POINTER_EXCEPTION
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitStackConsumer(this);
+        v.visitMONITORENTER(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/MONITOREXIT.java b/src/main/java/org/apache/commons/bcel6/generic/MONITOREXIT.java
new file mode 100644
index 0000000..a2f0e31
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/MONITOREXIT.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * MONITOREXIT - Exit monitor for object
+ * <PRE>Stack: ..., objectref -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class MONITOREXIT extends Instruction implements ExceptionThrower, StackConsumer {
+
+    private static final long serialVersionUID = -1499496577099659601L;
+
+
+    public MONITOREXIT() {
+        super(org.apache.commons.bcel6.Constants.MONITOREXIT, (short) 1);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.NULL_POINTER_EXCEPTION
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitStackConsumer(this);
+        v.visitMONITOREXIT(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/MULTIANEWARRAY.java b/src/main/java/org/apache/commons/bcel6/generic/MULTIANEWARRAY.java
new file mode 100644
index 0000000..760b6d6
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/MULTIANEWARRAY.java
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.ExceptionConstants;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * MULTIANEWARRAY - Create new mutidimensional array of references
+ * <PRE>Stack: ..., count1, [count2, ...] -&gt; ..., arrayref</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class MULTIANEWARRAY extends CPInstruction implements LoadClass, AllocationInstruction,
+        ExceptionThrower {
+
+    private static final long serialVersionUID = -7439639244808941662L;
+    private short dimensions;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    MULTIANEWARRAY() {
+    }
+
+
+    public MULTIANEWARRAY(int index, short dimensions) {
+        super(org.apache.commons.bcel6.Constants.MULTIANEWARRAY, index);
+        if (dimensions < 1) {
+            throw new ClassGenException("Invalid dimensions value: " + dimensions);
+        }
+        this.dimensions = dimensions;
+        length = 4;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode);
+        out.writeShort(index);
+        out.writeByte(dimensions);
+    }
+
+
+    /**
+     * Read needed data (i.e., no. dimension) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        super.initFromFile(bytes, wide);
+        dimensions = bytes.readByte();
+        length = 4;
+    }
+
+
+    /**
+     * @return number of dimensions to be created
+     */
+    public final short getDimensions() {
+        return dimensions;
+    }
+
+
+    /**
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        return super.toString(verbose) + " " + index + " " + dimensions;
+    }
+
+
+    /**
+     * @return mnemonic for instruction with symbolic references resolved
+     */
+    @Override
+    public String toString( ConstantPool cp ) {
+        return super.toString(cp) + " " + dimensions;
+    }
+
+
+    /**
+     * Also works for instructions whose stack effect depends on the
+     * constant pool entry they reference.
+     * @return Number of words consumed from stack by this instruction
+     */
+    @Override
+    public int consumeStack( ConstantPoolGen cpg ) {
+        return dimensions;
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length + 1] = ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION;
+        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.ILLEGAL_ACCESS_ERROR;
+        return cs;
+    }
+
+
+    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
+        Type t = getType(cpg);
+        if (t instanceof ArrayType) {
+            t = ((ArrayType) t).getBasicType();
+        }
+        return (t instanceof ObjectType) ? (ObjectType) t : null;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitLoadClass(this);
+        v.visitAllocationInstruction(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitCPInstruction(this);
+        v.visitMULTIANEWARRAY(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java b/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java
new file mode 100644
index 0000000..1f59f8f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/MethodGen.java
@@ -0,0 +1,1229 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Stack;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.Annotations;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.CodeException;
+import org.apache.commons.bcel6.classfile.ExceptionTable;
+import org.apache.commons.bcel6.classfile.LineNumber;
+import org.apache.commons.bcel6.classfile.LineNumberTable;
+import org.apache.commons.bcel6.classfile.LocalVariable;
+import org.apache.commons.bcel6.classfile.LocalVariableTable;
+import org.apache.commons.bcel6.classfile.LocalVariableTypeTable;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.ParameterAnnotationEntry;
+import org.apache.commons.bcel6.classfile.ParameterAnnotations;
+import org.apache.commons.bcel6.classfile.RuntimeVisibleParameterAnnotations;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.util.BCELComparator;
+
+/** 
+ * Template class for building up a method. This is done by defining exception
+ * handlers, adding thrown exceptions, local variables and attributes, whereas
+ * the `LocalVariableTable' and `LineNumberTable' attributes will be set
+ * automatically for the code. Use stripAttributes() if you don't like this.
+ *
+ * While generating code it may be necessary to insert NOP operations. You can
+ * use the `removeNOPs' method to get rid off them.
+ * The resulting method object can be obtained via the `getMethod()' method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @author  <A HREF="http://www.vmeng.com/beard">Patrick C. Beard</A> [setMaxStack()]
+ * @see     InstructionList
+ * @see     Method
+ */
+public class MethodGen extends FieldGenOrMethodGen {
+
+    private static final long serialVersionUID = -3924667713338957720L;
+    private String class_name;
+    private Type[] arg_types;
+    private String[] arg_names;
+    private int max_locals;
+    private int max_stack;
+    private InstructionList il;
+    private boolean strip_attributes;
+    private final List<LocalVariableGen> variable_vec = new ArrayList<LocalVariableGen>();
+    private final List<LineNumberGen> line_number_vec = new ArrayList<LineNumberGen>();
+    private final List<CodeExceptionGen> exception_vec = new ArrayList<CodeExceptionGen>();
+    private final List<String> throws_vec = new ArrayList<String>();
+    private final List<Attribute> code_attrs_vec = new ArrayList<Attribute>();
+
+    private List<AnnotationEntryGen>[] param_annotations; // Array of lists containing AnnotationGen objects
+    private boolean hasParameterAnnotations = false;
+    private boolean haveUnpackedParameterAnnotations = false;
+
+    private static BCELComparator _cmp = new BCELComparator() {
+
+        public boolean equals( Object o1, Object o2 ) {
+            MethodGen THIS = (MethodGen) o1;
+            MethodGen THAT = (MethodGen) o2;
+            return THIS.getName().equals(THAT.getName())
+                    && THIS.getSignature().equals(THAT.getSignature());
+        }
+
+
+        public int hashCode( Object o ) {
+            MethodGen THIS = (MethodGen) o;
+            return THIS.getSignature().hashCode() ^ THIS.getName().hashCode();
+        }
+    };
+
+
+    /**
+     * Declare method. If the method is non-static the constructor
+     * automatically declares a local variable `$this' in slot 0. The
+     * actual code is contained in the `il' parameter, which may further
+     * manipulated by the user. But he must take care not to remove any
+     * instruction (handles) that are still referenced from this object.
+     *
+     * For example one may not add a local variable and later remove the
+     * instructions it refers to without causing havoc. It is safe
+     * however if you remove that local variable, too.
+     *
+     * @param access_flags access qualifiers
+     * @param return_type  method type
+     * @param arg_types argument types
+     * @param arg_names argument names (if this is null, default names will be provided
+     * for them)
+     * @param method_name name of method
+     * @param class_name class name containing this method (may be null, if you don't care)
+     * @param il instruction list associated with this method, may be null only for
+     * abstract or native methods
+     * @param cp constant pool
+     */
+    public MethodGen(int access_flags, Type return_type, Type[] arg_types, String[] arg_names,
+            String method_name, String class_name, InstructionList il, ConstantPoolGen cp) {
+        setAccessFlags(access_flags);
+        setType(return_type);
+        setArgumentTypes(arg_types);
+        setArgumentNames(arg_names);
+        setName(method_name);
+        setClassName(class_name);
+        setInstructionList(il);
+        setConstantPool(cp);
+        boolean abstract_ = isAbstract() || isNative();
+        InstructionHandle start = null;
+        InstructionHandle end = null;
+        if (!abstract_) {
+            start = il.getStart();
+            end = il.getEnd();
+            /* Add local variables, namely the implicit `this' and the arguments
+             */
+            if (!isStatic() && (class_name != null)) { // Instance method -> `this' is local var 0
+                addLocalVariable("this",  ObjectType.getInstance(class_name), start, end);
+            }
+        }
+        if (arg_types != null) {
+            int size = arg_types.length;
+            for (Type arg_type : arg_types) {
+                if (Type.VOID == arg_type) {
+                    throw new ClassGenException("'void' is an illegal argument type for a method");
+                }
+            }
+            if (arg_names != null) { // Names for variables provided?
+                if (size != arg_names.length) {
+                    throw new ClassGenException("Mismatch in argument array lengths: " + size
+                            + " vs. " + arg_names.length);
+                }
+            } else { // Give them dummy names
+                arg_names = new String[size];
+                for (int i = 0; i < size; i++) {
+                    arg_names[i] = "arg" + i;
+                }
+                setArgumentNames(arg_names);
+            }
+            if (!abstract_) {
+                for (int i = 0; i < size; i++) {
+                    addLocalVariable(arg_names[i], arg_types[i], start, end);
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Instantiate from existing method.
+     *
+     * @param m method
+     * @param class_name class name containing this method
+     * @param cp constant pool
+     */
+    public MethodGen(Method m, String class_name, ConstantPoolGen cp) {
+        this(m.getAccessFlags(), Type.getReturnType(m.getSignature()), Type.getArgumentTypes(m
+                .getSignature()), null /* may be overridden anyway */
+        , m.getName(), class_name,
+                ((m.getAccessFlags() & (Constants.ACC_ABSTRACT | Constants.ACC_NATIVE)) == 0)
+                        ? new InstructionList(m.getCode().getCode())
+                        : null, cp);
+        Attribute[] attributes = m.getAttributes();
+        for (Attribute attribute : attributes) {
+            Attribute a = attribute;
+            if (a instanceof Code) {
+                Code c = (Code) a;
+                setMaxStack(c.getMaxStack());
+                setMaxLocals(c.getMaxLocals());
+                CodeException[] ces = c.getExceptionTable();
+                if (ces != null) {
+                    for (CodeException ce : ces) {
+                        int type = ce.getCatchType();
+                        ObjectType c_type = null;
+                        if (type > 0) {
+                            String cen = m.getConstantPool().getConstantString(type,
+                                    Constants.CONSTANT_Class);
+                            c_type =  ObjectType.getInstance(cen);
+                        }
+                        int end_pc = ce.getEndPC();
+                        int length = m.getCode().getCode().length;
+                        InstructionHandle end;
+                        if (length == end_pc) { // May happen, because end_pc is exclusive
+                            end = il.getEnd();
+                        } else {
+                            end = il.findHandle(end_pc);
+                            end = end.getPrev(); // Make it inclusive
+                        }
+                        addExceptionHandler(il.findHandle(ce.getStartPC()), end, il.findHandle(ce
+                                .getHandlerPC()), c_type);
+                    }
+                }
+                Attribute[] c_attributes = c.getAttributes();
+                for (Attribute c_attribute : c_attributes) {
+                    a = c_attribute;
+                    if (a instanceof LineNumberTable) {
+                        LineNumber[] ln = ((LineNumberTable) a).getLineNumberTable();
+                        for (LineNumber l : ln) {
+                            InstructionHandle ih = il.findHandle(l.getStartPC());
+                            if (ih != null) {
+                                addLineNumber(ih, l.getLineNumber());
+                            }
+                        }
+                    } else if (a instanceof LocalVariableTable) {
+                        LocalVariable[] lv = ((LocalVariableTable) a).getLocalVariableTable();
+                        removeLocalVariables();
+                        for (LocalVariable l : lv) {
+                            InstructionHandle start = il.findHandle(l.getStartPC());
+                            InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength());
+                            // Repair malformed handles
+                            if (null == start) {
+                                start = il.getStart();
+                            }
+                            if (null == end) {
+                                end = il.getEnd();
+                            }
+                            addLocalVariable(l.getName(), Type.getType(l.getSignature()), l
+                                    .getIndex(), start, end);
+                        }
+                    } else if (a instanceof LocalVariableTypeTable) {
+                        LocalVariable[] lv = ((LocalVariableTypeTable) a).getLocalVariableTypeTable();
+                        removeLocalVariables();
+                        for (LocalVariable l : lv) {
+                            InstructionHandle start = il.findHandle(l.getStartPC());
+                            InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength());
+                            // Repair malformed handles
+                            if (null == start) {
+                                start = il.getStart();
+                            }
+                            if (null == end) {
+                                end = il.getEnd();
+                            }
+                            addLocalVariable(l.getName(), Type.getType(l.getSignature()), l
+                                    .getIndex(), start, end);
+                        }
+                    } else {
+                        addCodeAttribute(a);
+                    }
+                }
+            } else if (a instanceof ExceptionTable) {
+                String[] names = ((ExceptionTable) a).getExceptionNames();
+                for (String name2 : names) {
+                    addException(name2);
+                }
+            } else if (a instanceof Annotations) {
+                Annotations runtimeAnnotations = (Annotations) a;
+                AnnotationEntry[] aes = runtimeAnnotations.getAnnotationEntries();
+                for (AnnotationEntry element : aes) {
+                    addAnnotationEntry(new AnnotationEntryGen(element, cp, false));
+                }
+            } else {
+                addAttribute(a);
+            }
+        }
+    }
+
+
+    /**
+     * Adds a local variable to this method.
+     *
+     * @param name variable name
+     * @param type variable type
+     * @param slot the index of the local variable, if type is long or double, the next available
+     * index is slot+2
+     * @param start from where the variable is valid
+     * @param end until where the variable is valid
+     * @return new local variable object
+     * @see LocalVariable
+     */
+    public LocalVariableGen addLocalVariable( String name, Type type, int slot,
+            InstructionHandle start, InstructionHandle end ) {
+        byte t = type.getType();
+        if (t != Constants.T_ADDRESS) {
+            int add = type.getSize();
+            if (slot + add > max_locals) {
+                max_locals = slot + add;
+            }
+            LocalVariableGen l = new LocalVariableGen(slot, name, type, start, end);
+            int i;
+            if ((i = variable_vec.indexOf(l)) >= 0) {
+                variable_vec.set(i, l);
+            } else {
+                variable_vec.add(l);
+            }
+            return l;
+        } else {
+            throw new IllegalArgumentException("Can not use " + type
+                    + " as type for local variable");
+        }
+    }
+
+
+    /**
+     * Adds a local variable to this method and assigns an index automatically.
+     *
+     * @param name variable name
+     * @param type variable type
+     * @param start from where the variable is valid, if this is null,
+     * it is valid from the start
+     * @param end until where the variable is valid, if this is null,
+     * it is valid to the end
+     * @return new local variable object
+     * @see LocalVariable
+     */
+    public LocalVariableGen addLocalVariable( String name, Type type, InstructionHandle start,
+            InstructionHandle end ) {
+        return addLocalVariable(name, type, max_locals, start, end);
+    }
+
+
+    /**
+     * Remove a local variable, its slot will not be reused, if you do not use addLocalVariable
+     * with an explicit index argument.
+     */
+    public void removeLocalVariable( LocalVariableGen l ) {
+        l.dispose();
+        variable_vec.remove(l);
+    }
+
+
+    /**
+     * Remove all local variables.
+     */
+    public void removeLocalVariables() {
+        for (LocalVariableGen lv : variable_vec) {
+            lv.dispose();
+        }
+        variable_vec.clear();
+    }
+
+
+    /*
+     * If the range of the variable has not been set yet, it will be set to be valid from
+     * the start to the end of the instruction list.
+     * 
+     * @return array of declared local variables sorted by index
+     */
+    public LocalVariableGen[] getLocalVariables() {
+        int size = variable_vec.size();
+        LocalVariableGen[] lg = new LocalVariableGen[size];
+        variable_vec.toArray(lg);
+        for (int i = 0; i < size; i++) {
+            if (lg[i].getStart() == null) {
+                lg[i].setStart(il.getStart());
+            }
+            if (lg[i].getEnd() == null) {
+                lg[i].setEnd(il.getEnd());
+            }
+        }
+        if (size > 1) {
+            Arrays.sort(lg, new Comparator<LocalVariableGen>() {
+                public int compare(LocalVariableGen o1, LocalVariableGen o2) {
+                    return o1.getIndex() - o2.getIndex();
+                }
+            });
+        }
+        return lg;
+    }
+
+
+    /**
+     * @return `LocalVariableTable' attribute of all the local variables of this method.
+     */
+    public LocalVariableTable getLocalVariableTable( ConstantPoolGen cp ) {
+        LocalVariableGen[] lg = getLocalVariables();
+        int size = lg.length;
+        LocalVariable[] lv = new LocalVariable[size];
+        for (int i = 0; i < size; i++) {
+            lv[i] = lg[i].getLocalVariable(cp);
+        }
+        return new LocalVariableTable(cp.addUtf8("LocalVariableTable"), 2 + lv.length * 10, lv, cp
+                .getConstantPool());
+    }
+
+
+    /**
+     * Give an instruction a line number corresponding to the source code line.
+     *
+     * @param ih instruction to tag
+     * @return new line number object
+     * @see LineNumber
+     */
+    public LineNumberGen addLineNumber( InstructionHandle ih, int src_line ) {
+        LineNumberGen l = new LineNumberGen(ih, src_line);
+        line_number_vec.add(l);
+        return l;
+    }
+
+
+    /**
+     * Remove a line number.
+     */
+    public void removeLineNumber( LineNumberGen l ) {
+        line_number_vec.remove(l);
+    }
+
+
+    /**
+     * Remove all line numbers.
+     */
+    public void removeLineNumbers() {
+        line_number_vec.clear();
+    }
+
+
+    /*
+     * @return array of line numbers
+     */
+    public LineNumberGen[] getLineNumbers() {
+        LineNumberGen[] lg = new LineNumberGen[line_number_vec.size()];
+        line_number_vec.toArray(lg);
+        return lg;
+    }
+
+
+    /**
+     * @return `LineNumberTable' attribute of all the local variables of this method.
+     */
+    public LineNumberTable getLineNumberTable( ConstantPoolGen cp ) {
+        int size = line_number_vec.size();
+        LineNumber[] ln = new LineNumber[size];
+        try {
+            for (int i = 0; i < size; i++) {
+                ln[i] = line_number_vec.get(i).getLineNumber();
+            }
+        } catch (ArrayIndexOutOfBoundsException e) {
+        } // Never occurs
+        return new LineNumberTable(cp.addUtf8("LineNumberTable"), 2 + ln.length * 4, ln, cp
+                .getConstantPool());
+    }
+
+
+    /**
+     * Add an exception handler, i.e., specify region where a handler is active and an
+     * instruction where the actual handling is done.
+     *
+     * @param start_pc Start of region (inclusive)
+     * @param end_pc End of region (inclusive)
+     * @param handler_pc Where handling is done
+     * @param catch_type class type of handled exception or null if any
+     * exception is handled
+     * @return new exception handler object
+     */
+    public CodeExceptionGen addExceptionHandler( InstructionHandle start_pc,
+            InstructionHandle end_pc, InstructionHandle handler_pc, ObjectType catch_type ) {
+        if ((start_pc == null) || (end_pc == null) || (handler_pc == null)) {
+            throw new ClassGenException("Exception handler target is null instruction");
+        }
+        CodeExceptionGen c = new CodeExceptionGen(start_pc, end_pc, handler_pc, catch_type);
+        exception_vec.add(c);
+        return c;
+    }
+
+
+    /**
+     * Remove an exception handler.
+     */
+    public void removeExceptionHandler( CodeExceptionGen c ) {
+        exception_vec.remove(c);
+    }
+
+
+    /**
+     * Remove all line numbers.
+     */
+    public void removeExceptionHandlers() {
+        exception_vec.clear();
+    }
+
+
+    /*
+     * @return array of declared exception handlers
+     */
+    public CodeExceptionGen[] getExceptionHandlers() {
+        CodeExceptionGen[] cg = new CodeExceptionGen[exception_vec.size()];
+        exception_vec.toArray(cg);
+        return cg;
+    }
+
+
+    /**
+     * @return code exceptions for `Code' attribute
+     */
+    private CodeException[] getCodeExceptions() {
+        int size = exception_vec.size();
+        CodeException[] c_exc = new CodeException[size];
+        try {
+            for (int i = 0; i < size; i++) {
+                CodeExceptionGen c =  exception_vec.get(i);
+                c_exc[i] = c.getCodeException(cp);
+            }
+        } catch (ArrayIndexOutOfBoundsException e) {
+        }
+        return c_exc;
+    }
+
+
+    /**
+     * Add an exception possibly thrown by this method.
+     *
+     * @param class_name (fully qualified) name of exception
+     */
+    public void addException( String class_name ) {
+        throws_vec.add(class_name);
+    }
+
+
+    /**
+     * Remove an exception.
+     */
+    public void removeException( String c ) {
+        throws_vec.remove(c);
+    }
+
+
+    /**
+     * Remove all exceptions.
+     */
+    public void removeExceptions() {
+        throws_vec.clear();
+    }
+
+
+    /*
+     * @return array of thrown exceptions
+     */
+    public String[] getExceptions() {
+        String[] e = new String[throws_vec.size()];
+        throws_vec.toArray(e);
+        return e;
+    }
+
+
+    /**
+     * @return `Exceptions' attribute of all the exceptions thrown by this method.
+     */
+    private ExceptionTable getExceptionTable( ConstantPoolGen cp ) {
+        int size = throws_vec.size();
+        int[] ex = new int[size];
+        try {
+            for (int i = 0; i < size; i++) {
+                ex[i] = cp.addClass(throws_vec.get(i));
+            }
+        } catch (ArrayIndexOutOfBoundsException e) {
+        }
+        return new ExceptionTable(cp.addUtf8("Exceptions"), 2 + 2 * size, ex, cp.getConstantPool());
+    }
+
+
+    /**
+     * Add an attribute to the code. Currently, the JVM knows about the
+     * LineNumberTable, LocalVariableTable and StackMap attributes,
+     * where the former two will be generated automatically and the
+     * latter is used for the MIDP only. Other attributes will be
+     * ignored by the JVM but do no harm.
+     *
+     * @param a attribute to be added
+     */
+    public void addCodeAttribute( Attribute a ) {
+        code_attrs_vec.add(a);
+    }
+
+
+    /**
+     * Remove a code attribute.
+     */
+    public void removeCodeAttribute( Attribute a ) {
+        code_attrs_vec.remove(a);
+    }
+
+
+    /**
+     * Remove all code attributes.
+     */
+    public void removeCodeAttributes() {
+        code_attrs_vec.clear();
+    }
+
+
+    /**
+     * @return all attributes of this method.
+     */
+    public Attribute[] getCodeAttributes() {
+        Attribute[] attributes = new Attribute[code_attrs_vec.size()];
+        code_attrs_vec.toArray(attributes);
+        return attributes;
+    }
+
+    public void addAnnotationsAsAttribute(ConstantPoolGen cp) {
+          Attribute[] attrs = AnnotationEntryGen.getAnnotationAttributes(cp,annotation_vec);
+        for (Attribute attr : attrs) {
+            addAttribute(attr);
+        }
+      }
+
+      public void addParameterAnnotationsAsAttribute(ConstantPoolGen cp) {
+          if (!hasParameterAnnotations) {
+            return;
+        }
+          Attribute[] attrs = AnnotationEntryGen.getParameterAnnotationAttributes(cp,param_annotations);
+          if (attrs!=null) {
+          for (Attribute attr : attrs) {
+              addAttribute(attr);
+          }
+          }
+      }
+
+
+    /**
+     * Get method object. Never forget to call setMaxStack() or setMaxStack(max), respectively,
+     * before calling this method (the same applies for max locals).
+     *
+     * @return method object
+     */
+    public Method getMethod() {
+        String signature = getSignature();
+        int name_index = cp.addUtf8(name);
+        int signature_index = cp.addUtf8(signature);
+        /* Also updates positions of instructions, i.e., their indices
+         */
+        byte[] byte_code = null;
+        if (il != null) {
+            byte_code = il.getByteCode();
+        }
+        LineNumberTable lnt = null;
+        LocalVariableTable lvt = null;
+        /* Create LocalVariableTable and LineNumberTable attributes (for debuggers, e.g.)
+         */
+        if ((variable_vec.size() > 0) && !strip_attributes) {
+            addCodeAttribute(lvt = getLocalVariableTable(cp));
+        }
+        if ((line_number_vec.size() > 0) && !strip_attributes) {
+            addCodeAttribute(lnt = getLineNumberTable(cp));
+        }
+        Attribute[] code_attrs = getCodeAttributes();
+        /* Each attribute causes 6 additional header bytes
+         */
+        int attrs_len = 0;
+        for (Attribute code_attr : code_attrs) {
+            attrs_len += (code_attr.getLength() + 6);
+        }
+        CodeException[] c_exc = getCodeExceptions();
+        int exc_len = c_exc.length * 8; // Every entry takes 8 bytes
+        Code code = null;
+        if ((il != null) && !isAbstract() && !isNative()) {
+            // Remove any stale code attribute
+            Attribute[] attributes = getAttributes();
+            for (Attribute a : attributes) {
+                if (a instanceof Code) {
+                    removeAttribute(a);
+                }
+            }
+            code = new Code(cp.addUtf8("Code"), 8 + byte_code.length + // prologue byte code
+                    2 + exc_len + // exceptions
+                    2 + attrs_len, // attributes
+                    max_stack, max_locals, byte_code, c_exc, code_attrs, cp.getConstantPool());
+            addAttribute(code);
+        }
+        addAnnotationsAsAttribute(cp);
+        addParameterAnnotationsAsAttribute(cp);
+        ExceptionTable et = null;
+        if (throws_vec.size() > 0) {
+            addAttribute(et = getExceptionTable(cp));
+            // Add `Exceptions' if there are "throws" clauses
+        }
+        Method m = new Method(access_flags, name_index, signature_index, getAttributes(), cp
+                .getConstantPool());
+        // Undo effects of adding attributes
+        if (lvt != null) {
+            removeCodeAttribute(lvt);
+        }
+        if (lnt != null) {
+            removeCodeAttribute(lnt);
+        }
+        if (code != null) {
+            removeAttribute(code);
+        }
+        if (et != null) {
+            removeAttribute(et);
+        }
+        return m;
+    }
+
+
+    /**
+     * Remove all NOPs from the instruction list (if possible) and update every
+     * object refering to them, i.e., branch instructions, local variables and
+     * exception handlers.
+     */
+    public void removeNOPs() {
+        if (il != null) {
+            InstructionHandle next;
+            /* Check branch instructions.
+             */
+            for (InstructionHandle ih = il.getStart(); ih != null; ih = next) {
+                next = ih.next;
+                if ((next != null) && (ih.getInstruction() instanceof NOP)) {
+                    try {
+                        il.delete(ih);
+                    } catch (TargetLostException e) {
+                        for (InstructionHandle target : e.getTargets()) {
+                            for (InstructionTargeter targeter : target.getTargeters()) {
+                                targeter.updateTarget(target, next);
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Set maximum number of local variables.
+     */
+    public void setMaxLocals( int m ) {
+        max_locals = m;
+    }
+
+
+    public int getMaxLocals() {
+        return max_locals;
+    }
+
+
+    /**
+     * Set maximum stack size for this method.
+     */
+    public void setMaxStack( int m ) {
+        max_stack = m;
+    }
+
+
+    public int getMaxStack() {
+        return max_stack;
+    }
+
+
+    /** @return class that contains this method
+     */
+    public String getClassName() {
+        return class_name;
+    }
+
+
+    public void setClassName( String class_name ) {
+        this.class_name = class_name;
+    }
+
+
+    public void setReturnType( Type return_type ) {
+        setType(return_type);
+    }
+
+
+    public Type getReturnType() {
+        return getType();
+    }
+
+
+    public void setArgumentTypes( Type[] arg_types ) {
+        this.arg_types = arg_types;
+    }
+
+
+    public Type[] getArgumentTypes() {
+        return arg_types.clone();
+    }
+
+
+    public void setArgumentType( int i, Type type ) {
+        arg_types[i] = type;
+    }
+
+
+    public Type getArgumentType( int i ) {
+        return arg_types[i];
+    }
+
+
+    public void setArgumentNames( String[] arg_names ) {
+        this.arg_names = arg_names;
+    }
+
+
+    public String[] getArgumentNames() {
+        return arg_names.clone();
+    }
+
+
+    public void setArgumentName( int i, String name ) {
+        arg_names[i] = name;
+    }
+
+
+    public String getArgumentName( int i ) {
+        return arg_names[i];
+    }
+
+
+    public InstructionList getInstructionList() {
+        return il;
+    }
+
+
+    public void setInstructionList( InstructionList il ) {
+        this.il = il;
+    }
+
+
+    @Override
+    public String getSignature() {
+        return Type.getMethodSignature(type, arg_types);
+    }
+
+
+    /**
+     * Computes max. stack size by performing control flow analysis.
+     */
+    public void setMaxStack() {
+        if (il != null) {
+            max_stack = getMaxStack(cp, il, getExceptionHandlers());
+        } else {
+            max_stack = 0;
+        }
+    }
+
+
+    /**
+     * Compute maximum number of local variables.
+     */
+    public void setMaxLocals() {
+        if (il != null) {
+            int max = isStatic() ? 0 : 1;
+            if (arg_types != null) {
+                for (Type arg_type : arg_types) {
+                    max += arg_type.getSize();
+                }
+            }
+            for (InstructionHandle ih = il.getStart(); ih != null; ih = ih.getNext()) {
+                Instruction ins = ih.getInstruction();
+                if ((ins instanceof LocalVariableInstruction) || (ins instanceof RET)
+                        || (ins instanceof IINC)) {
+                    int index = ((IndexedInstruction) ins).getIndex()
+                            + ((TypedInstruction) ins).getType(cp).getSize();
+                    if (index > max) {
+                        max = index;
+                    }
+                }
+            }
+            max_locals = max;
+        } else {
+            max_locals = 0;
+        }
+    }
+
+
+    /** Do not/Do produce attributes code attributesLineNumberTable and
+     * LocalVariableTable, like javac -O
+     */
+    public void stripAttributes( boolean flag ) {
+        strip_attributes = flag;
+    }
+
+    static final class BranchTarget {
+
+        InstructionHandle target;
+        int stackDepth;
+
+
+        BranchTarget(InstructionHandle target, int stackDepth) {
+            this.target = target;
+            this.stackDepth = stackDepth;
+        }
+    }
+
+    static final class BranchStack {
+
+        Stack<BranchTarget> branchTargets = new Stack<BranchTarget>();
+        Hashtable<InstructionHandle, BranchTarget> visitedTargets = new Hashtable<InstructionHandle, BranchTarget>();
+
+
+        public void push( InstructionHandle target, int stackDepth ) {
+            if (visited(target)) {
+                return;
+            }
+            branchTargets.push(visit(target, stackDepth));
+        }
+
+
+        public BranchTarget pop() {
+            if (!branchTargets.empty()) {
+                BranchTarget bt = branchTargets.pop();
+                return bt;
+            }
+            return null;
+        }
+
+
+        private BranchTarget visit( InstructionHandle target, int stackDepth ) {
+            BranchTarget bt = new BranchTarget(target, stackDepth);
+            visitedTargets.put(target, bt);
+            return bt;
+        }
+
+
+        private boolean visited( InstructionHandle target ) {
+            return (visitedTargets.get(target) != null);
+        }
+    }
+
+
+    /**
+     * Computes stack usage of an instruction list by performing control flow analysis.
+     *
+     * @return maximum stack depth used by method
+     */
+    public static int getMaxStack( ConstantPoolGen cp, InstructionList il, CodeExceptionGen[] et ) {
+        BranchStack branchTargets = new BranchStack();
+        /* Initially, populate the branch stack with the exception
+         * handlers, because these aren't (necessarily) branched to
+         * explicitly. in each case, the stack will have depth 1,
+         * containing the exception object.
+         */
+        for (CodeExceptionGen element : et) {
+            InstructionHandle handler_pc = element.getHandlerPC();
+            if (handler_pc != null) {
+                branchTargets.push(handler_pc, 1);
+            }
+        }
+        int stackDepth = 0, maxStackDepth = 0;
+        InstructionHandle ih = il.getStart();
+        while (ih != null) {
+            Instruction instruction = ih.getInstruction();
+            short opcode = instruction.getOpcode();
+            int delta = instruction.produceStack(cp) - instruction.consumeStack(cp);
+            stackDepth += delta;
+            if (stackDepth > maxStackDepth) {
+                maxStackDepth = stackDepth;
+            }
+            // choose the next instruction based on whether current is a branch.
+            if (instruction instanceof BranchInstruction) {
+                BranchInstruction branch = (BranchInstruction) instruction;
+                if (instruction instanceof Select) {
+                    // explore all of the select's targets. the default target is handled below.
+                    Select select = (Select) branch;
+                    InstructionHandle[] targets = select.getTargets();
+                    for (InstructionHandle target : targets) {
+                        branchTargets.push(target, stackDepth);
+                    }
+                    // nothing to fall through to.
+                    ih = null;
+                } else if (!(branch instanceof IfInstruction)) {
+                    // if an instruction that comes back to following PC,
+                    // push next instruction, with stack depth reduced by 1.
+                    if (opcode == Constants.JSR || opcode == Constants.JSR_W) {
+                        branchTargets.push(ih.getNext(), stackDepth - 1);
+                    }
+                    ih = null;
+                }
+                // for all branches, the target of the branch is pushed on the branch stack.
+                // conditional branches have a fall through case, selects don't, and
+                // jsr/jsr_w return to the next instruction.
+                branchTargets.push(branch.getTarget(), stackDepth);
+            } else {
+                // check for instructions that terminate the method.
+                if (opcode == Constants.ATHROW || opcode == Constants.RET
+                        || (opcode >= Constants.IRETURN && opcode <= Constants.RETURN)) {
+                    ih = null;
+                }
+            }
+            // normal case, go to the next instruction.
+            if (ih != null) {
+                ih = ih.getNext();
+            }
+            // if we have no more instructions, see if there are any deferred branches to explore.
+            if (ih == null) {
+                BranchTarget bt = branchTargets.pop();
+                if (bt != null) {
+                    ih = bt.target;
+                    stackDepth = bt.stackDepth;
+                }
+            }
+        }
+        return maxStackDepth;
+    }
+
+    private List<MethodObserver> observers;
+
+
+    /** Add observer for this object.
+     */
+    public void addObserver( MethodObserver o ) {
+        if (observers == null) {
+            observers = new ArrayList<MethodObserver>();
+        }
+        observers.add(o);
+    }
+
+
+    /** Remove observer for this object.
+     */
+    public void removeObserver( MethodObserver o ) {
+        if (observers != null) {
+            observers.remove(o);
+        }
+    }
+
+
+    /** Call notify() method on all observers. This method is not called
+     * automatically whenever the state has changed, but has to be
+     * called by the user after he has finished editing the object.
+     */
+    public void update() {
+        if (observers != null) {
+            for (MethodObserver observer : observers) {
+                observer.notify(this);
+            }
+        }
+    }
+
+
+    /**
+     * Return string representation close to declaration format,
+     * `public static void main(String[]) throws IOException', e.g.
+     *
+     * @return String representation of the method.
+     */
+    @Override
+    public final String toString() {
+        String access = Utility.accessToString(access_flags);
+        String signature = Type.getMethodSignature(type, arg_types);
+        signature = Utility.methodSignatureToString(signature, name, access, true,
+                getLocalVariableTable(cp));
+        StringBuilder buf = new StringBuilder(signature);
+        for (int i = 0; i < getAttributes().length; i++) {
+            Attribute a = getAttributes()[i];
+            if (!((a instanceof Code) || (a instanceof ExceptionTable))) {
+                buf.append(" [").append(a.toString()).append("]");
+            }
+        }
+
+        if (throws_vec.size() > 0) {
+            for (String throwsDescriptor : throws_vec) {
+                buf.append("\n\t\tthrows ").append(throwsDescriptor);
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /** @return deep copy of this method
+     */
+    public MethodGen copy( String class_name, ConstantPoolGen cp ) {
+        Method m = ((MethodGen) clone()).getMethod();
+        MethodGen mg = new MethodGen(m, class_name, this.cp);
+        if (this.cp != cp) {
+            mg.setConstantPool(cp);
+            mg.getInstructionList().replaceConstantPool(this.cp, cp);
+        }
+        return mg;
+    }
+
+    //J5TODO: Should param_annotations be an array of arrays? Rather than an array of lists, this
+    // is more likely to suggest to the caller it is readonly (which a List does not). 
+    /**
+     * Return a list of AnnotationGen objects representing parameter annotations
+     */
+    public List<AnnotationEntryGen> getAnnotationsOnParameter(int i) {
+        ensureExistingParameterAnnotationsUnpacked();
+        if (!hasParameterAnnotations || i>arg_types.length) {
+            return null;
+        }
+        return param_annotations[i];
+    }
+
+    /**
+     * Goes through the attributes on the method and identifies any that are
+     * RuntimeParameterAnnotations, extracting their contents and storing them
+     * as parameter annotations. There are two kinds of parameter annotation -
+     * visible and invisible. Once they have been unpacked, these attributes are
+     * deleted. (The annotations will be rebuilt as attributes when someone
+     * builds a Method object out of this MethodGen object).
+     */
+    private void ensureExistingParameterAnnotationsUnpacked()
+    {
+        if (haveUnpackedParameterAnnotations) {
+            return;
+        }
+        // Find attributes that contain parameter annotation data
+        Attribute[] attrs = getAttributes();
+        ParameterAnnotations paramAnnVisAttr = null;
+        ParameterAnnotations paramAnnInvisAttr = null;
+        for (Attribute attribute : attrs) {
+            if (attribute instanceof ParameterAnnotations)
+            {
+                // Initialize param_annotations
+                if (!hasParameterAnnotations)
+                {
+                    param_annotations = new List[arg_types.length];
+                    for (int j = 0; j < arg_types.length; j++) {
+                        param_annotations[j] = new ArrayList<AnnotationEntryGen>();
+                    }
+                }
+                hasParameterAnnotations = true;
+                ParameterAnnotations rpa = (ParameterAnnotations) attribute;
+                if (rpa instanceof RuntimeVisibleParameterAnnotations) {
+                    paramAnnVisAttr = rpa;
+                } else {
+                    paramAnnInvisAttr = rpa;
+                }
+                for (int j = 0; j < arg_types.length; j++)
+                {
+                    // This returns Annotation[] ...
+                    ParameterAnnotationEntry immutableArray = rpa
+                            .getParameterAnnotationEntries()[j];
+                    // ... which needs transforming into an AnnotationGen[] ...
+                    List<AnnotationEntryGen> mutable = makeMutableVersion(immutableArray.getAnnotationEntries());
+                    // ... then add these to any we already know about
+                    param_annotations[j].addAll(mutable);
+                }
+            }
+        }
+        if (paramAnnVisAttr != null) {
+            removeAttribute(paramAnnVisAttr);
+        }
+        if (paramAnnInvisAttr != null) {
+            removeAttribute(paramAnnInvisAttr);
+        }
+        haveUnpackedParameterAnnotations = true;
+    }
+
+    private List<AnnotationEntryGen> makeMutableVersion(AnnotationEntry[] mutableArray)
+    {
+        List<AnnotationEntryGen> result = new ArrayList<AnnotationEntryGen>();
+        for (AnnotationEntry element : mutableArray) {
+            result.add(new AnnotationEntryGen(element, getConstantPool(),
+                    false));
+        }
+        return result;
+    }
+
+    public void addParameterAnnotation(int parameterIndex,
+            AnnotationEntryGen annotation)
+    {
+        ensureExistingParameterAnnotationsUnpacked();
+        if (!hasParameterAnnotations)
+        {
+            param_annotations = new List[arg_types.length];
+            hasParameterAnnotations = true;
+        }
+        List<AnnotationEntryGen> existingAnnotations = param_annotations[parameterIndex];
+        if (existingAnnotations != null)
+        {
+            existingAnnotations.add(annotation);
+        }
+        else
+        {
+            List<AnnotationEntryGen> l = new ArrayList<AnnotationEntryGen>();
+            l.add(annotation);
+            param_annotations[parameterIndex] = l;
+        }
+    }          
+
+
+
+
+    /**
+     * @return Comparison strategy object
+     */
+    public static BCELComparator getComparator() {
+        return _cmp;
+    }
+
+
+    /**
+     * @param comparator Comparison strategy object
+     */
+    public static void setComparator( BCELComparator comparator ) {
+        _cmp = comparator;
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default two MethodGen objects are said to be equal when
+     * their names and signatures are equal.
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals( Object obj ) {
+        return _cmp.equals(this, obj);
+    }
+
+
+    /**
+     * Return value as defined by given BCELComparator strategy.
+     * By default return the hashcode of the method's name XOR signature.
+     * 
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return _cmp.hashCode(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/MethodObserver.java b/src/main/java/org/apache/commons/bcel6/generic/MethodObserver.java
new file mode 100644
index 0000000..0991f60
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/MethodObserver.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Implement this interface if you're interested in changes to a MethodGen object
+ * and register yourself with addObserver().
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface MethodObserver {
+
+    void notify( MethodGen method );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/NEW.java b/src/main/java/org/apache/commons/bcel6/generic/NEW.java
new file mode 100644
index 0000000..e9b3fdc
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/NEW.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * NEW - Create new object
+ * <PRE>Stack: ... -&gt; ..., objectref</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class NEW extends CPInstruction implements LoadClass, AllocationInstruction,
+        ExceptionThrower, StackProducer {
+
+    private static final long serialVersionUID = 5773167897857305796L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    NEW() {
+    }
+
+
+    public NEW(int index) {
+        super(org.apache.commons.bcel6.Constants.NEW, index);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length + 1] = ExceptionConstants.INSTANTIATION_ERROR;
+        cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.ILLEGAL_ACCESS_ERROR;
+        return cs;
+    }
+
+
+    public ObjectType getLoadClassType( ConstantPoolGen cpg ) {
+        return (ObjectType) getType(cpg);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitLoadClass(this);
+        v.visitAllocationInstruction(this);
+        v.visitExceptionThrower(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitCPInstruction(this);
+        v.visitNEW(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/NEWARRAY.java b/src/main/java/org/apache/commons/bcel6/generic/NEWARRAY.java
new file mode 100644
index 0000000..2516d14
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/NEWARRAY.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * NEWARRAY -  Create new array of basic type (int, short, ...)
+ * <PRE>Stack: ..., count -&gt; ..., arrayref</PRE>
+ * type must be one of T_INT, T_SHORT, ...
+ * 
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class NEWARRAY extends Instruction implements AllocationInstruction, ExceptionThrower,
+        StackProducer {
+
+    private static final long serialVersionUID = 7048445841018649405L;
+    private byte type;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    NEWARRAY() {
+    }
+
+
+    public NEWARRAY(byte type) {
+        super(org.apache.commons.bcel6.Constants.NEWARRAY, (short) 2);
+        this.type = type;
+    }
+
+
+    public NEWARRAY(BasicType type) {
+        this(type.getType());
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode);
+        out.writeByte(type);
+    }
+
+
+    /**
+     * @return numeric code for basic element type
+     */
+    public final byte getTypecode() {
+        return type;
+    }
+
+
+    /**
+     * @return type of constructed array
+     */
+    public final Type getType() {
+        return new ArrayType(BasicType.getType(type), 1);
+    }
+
+
+    /**
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        return super.toString(verbose) + " " + org.apache.commons.bcel6.Constants.TYPE_NAMES[type];
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        type = bytes.readByte();
+        length = 2;
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            org.apache.commons.bcel6.ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION
+        };
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitAllocationInstruction(this);
+        v.visitExceptionThrower(this);
+        v.visitStackProducer(this);
+        v.visitNEWARRAY(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/NOP.java b/src/main/java/org/apache/commons/bcel6/generic/NOP.java
new file mode 100644
index 0000000..fb39590
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/NOP.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * NOP - Do nothing
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class NOP extends Instruction {
+
+    private static final long serialVersionUID = -244116825309415153L;
+
+
+    public NOP() {
+        super(org.apache.commons.bcel6.Constants.NOP, (short) 1);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitNOP(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/NameSignatureInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/NameSignatureInstruction.java
new file mode 100644
index 0000000..8b80177
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/NameSignatureInstruction.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.classfile.ConstantCP;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+
+/**
+ * Super class for FieldOrMethod and INVOKEDYNAMIC, since they both have
+ * names and signatures 
+ *
+ * @version $Id: FieldOrMethod.java 1481383 2013-05-11 17:34:32Z dbrosius $
+ * @author  <A HREF="mailto:bill.pugh@gmail.com">Bill Pugh</A>
+ * @since 6.0
+ */
+public abstract class NameSignatureInstruction extends CPInstruction {
+
+    private static final long serialVersionUID = 1L;
+
+    public NameSignatureInstruction() {
+        super();
+    }
+
+    public NameSignatureInstruction(short opcode, int index) {
+        super(opcode, index);
+    }
+
+    public ConstantNameAndType getNameAndType(ConstantPoolGen cpg) {
+        ConstantPool cp = cpg.getConstantPool();
+        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
+        return  (ConstantNameAndType) cp.getConstant(cmr.getNameAndTypeIndex());
+    }
+    /** @return signature of referenced method/field.
+     */
+    public String getSignature(ConstantPoolGen cpg) {
+        ConstantPool cp = cpg.getConstantPool();
+        ConstantNameAndType cnat = getNameAndType(cpg);
+        return ((ConstantUtf8) cp.getConstant(cnat.getSignatureIndex())).getBytes();
+    }
+
+    /** @return name of referenced method/field.
+     */
+    public String getName(ConstantPoolGen cpg) {
+        ConstantPool cp = cpg.getConstantPool();
+        ConstantNameAndType cnat = getNameAndType(cpg);
+        return ((ConstantUtf8) cp.getConstant(cnat.getNameIndex())).getBytes();
+    }
+
+}
\ No newline at end of file
diff --git a/src/main/java/org/apache/commons/bcel6/generic/NamedAndTyped.java b/src/main/java/org/apache/commons/bcel6/generic/NamedAndTyped.java
new file mode 100644
index 0000000..13db08f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/NamedAndTyped.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denote entity that has both name and type. This is true for local variables,
+ * methods and fields.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface NamedAndTyped {
+
+    String getName();
+
+
+    Type getType();
+
+
+    void setName( String name );
+
+
+    void setType( Type type );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ObjectType.java b/src/main/java/org/apache/commons/bcel6/generic/ObjectType.java
new file mode 100644
index 0000000..03e96fd
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ObjectType.java
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/** 
+ * Denotes reference such as java.lang.String.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ObjectType extends ReferenceType {
+
+    private static final long serialVersionUID = -2819379966444533294L;
+    private final String class_name; // Class name of type
+
+    public static ObjectType getInstance(String class_name) {
+        return new ObjectType(class_name);
+    }
+
+    /**
+     * @param class_name fully qualified class name, e.g. java.lang.String
+     */
+    public ObjectType(String class_name) {
+        super(Constants.T_REFERENCE, "L" + class_name.replace('.', '/') + ";");
+        this.class_name = class_name.replace('/', '.');
+    }
+
+
+    /** @return name of referenced class
+     */
+    public String getClassName() {
+        return class_name;
+    }
+
+
+    /** @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() {
+        return class_name.hashCode();
+    }
+
+
+    /** @return true if both type objects refer to the same class.
+     */
+    @Override
+    public boolean equals( Object type ) {
+        return (type instanceof ObjectType)
+                ? ((ObjectType) type).class_name.equals(class_name)
+                : false;
+    }
+
+
+    /**
+     * If "this" doesn't reference a class, it references an interface
+     * or a non-existant entity.
+     * @deprecated this method returns an inaccurate result
+     *   if the class or interface referenced cannot
+     *   be found: use referencesClassExact() instead
+     */
+    @Deprecated
+    public boolean referencesClass() {
+        try {
+            JavaClass jc = Repository.lookupClass(class_name);
+            return jc.isClass();
+        } catch (ClassNotFoundException e) {
+            return false;
+        }
+    }
+
+
+    /**
+     * If "this" doesn't reference an interface, it references a class
+     * or a non-existant entity.
+     * @deprecated this method returns an inaccurate result
+     *   if the class or interface referenced cannot
+     *   be found: use referencesInterfaceExact() instead
+     */
+    @Deprecated
+    public boolean referencesInterface() {
+        try {
+            JavaClass jc = Repository.lookupClass(class_name);
+            return !jc.isClass();
+        } catch (ClassNotFoundException e) {
+            return false;
+        }
+    }
+
+
+    /**
+     * Return true if this type references a class,
+     * false if it references an interface.
+     * @return true if the type references a class, false if
+     *   it references an interface
+     * @throws ClassNotFoundException if the class or interface
+     *   referenced by this type can't be found
+     */
+    public boolean referencesClassExact() throws ClassNotFoundException {
+        JavaClass jc = Repository.lookupClass(class_name);
+        return jc.isClass();
+    }
+
+
+    /**
+     * Return true if this type references an interface,
+     * false if it references a class.
+     * @return true if the type references an interface, false if
+     *   it references a class
+     * @throws ClassNotFoundException if the class or interface
+     *   referenced by this type can't be found
+     */
+    public boolean referencesInterfaceExact() throws ClassNotFoundException {
+        JavaClass jc = Repository.lookupClass(class_name);
+        return !jc.isClass();
+    }
+
+
+    /**
+     * Return true if this type is a subclass of given ObjectType.
+     * @throws ClassNotFoundException if any of this class's superclasses
+     *  can't be found
+     */
+    public boolean subclassOf( ObjectType superclass ) throws ClassNotFoundException {
+        if (this.referencesInterface() || superclass.referencesInterface()) {
+            return false;
+        }
+        return Repository.instanceOf(this.class_name, superclass.class_name);
+    }
+
+
+    /**
+     * Java Virtual Machine Specification edition 2, � 5.4.4 Access Control
+     * @throws ClassNotFoundException if the class referenced by this type
+     *   can't be found
+     */
+    public boolean accessibleTo( ObjectType accessor ) throws ClassNotFoundException {
+        JavaClass jc = Repository.lookupClass(class_name);
+        if (jc.isPublic()) {
+            return true;
+        } else {
+            JavaClass acc = Repository.lookupClass(accessor.class_name);
+            return acc.getPackageName().equals(jc.getPackageName());
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/POP.java b/src/main/java/org/apache/commons/bcel6/generic/POP.java
new file mode 100644
index 0000000..cc004ac
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/POP.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * POP - Pop top operand stack word
+ *
+ * <PRE>Stack: ..., word -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class POP extends StackInstruction implements PopInstruction {
+
+    private static final long serialVersionUID = -7366757965427670388L;
+
+
+    public POP() {
+        super(org.apache.commons.bcel6.Constants.POP);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitPopInstruction(this);
+        v.visitStackInstruction(this);
+        v.visitPOP(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/POP2.java b/src/main/java/org/apache/commons/bcel6/generic/POP2.java
new file mode 100644
index 0000000..7e17281
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/POP2.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * POP2 - Pop two top operand stack words
+ *
+ * <PRE>Stack: ..., word2, word1 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class POP2 extends StackInstruction implements PopInstruction {
+
+    private static final long serialVersionUID = -3868598204285850458L;
+
+
+    public POP2() {
+        super(org.apache.commons.bcel6.Constants.POP2);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitPopInstruction(this);
+        v.visitStackInstruction(this);
+        v.visitPOP2(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/PUSH.java b/src/main/java/org/apache/commons/bcel6/generic/PUSH.java
new file mode 100644
index 0000000..987e260
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/PUSH.java
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * Wrapper class for push operations, which are implemented either as BIPUSH,
+ * LDC or xCONST_n instructions.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class PUSH implements CompoundInstruction, VariableLengthInstruction,
+        InstructionConstants {
+
+    private Instruction instruction;
+
+
+    /**
+     * This constructor also applies for values of type short, char, byte 
+     *
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, int value) {
+        if ((value >= -1) && (value <= 5)) {
+            instruction = INSTRUCTIONS[Constants.ICONST_0 + value];
+        } else if ((value >= -128) && (value <= 127)) {
+            instruction = new BIPUSH((byte) value);
+        } else if ((value >= -32768) && (value <= 32767)) {
+            instruction = new SIPUSH((short) value);
+        } else {
+            instruction = new LDC(cp.addInteger(value));
+        }
+    }
+
+
+    /**
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, boolean value) {
+        instruction = INSTRUCTIONS[Constants.ICONST_0 + (value ? 1 : 0)];
+    }
+
+
+    /**
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, float value) {
+        if (value == 0.0) {
+            instruction = FCONST_0;
+        } else if (value == 1.0) {
+            instruction = FCONST_1;
+        } else if (value == 2.0) {
+            instruction = FCONST_2;
+        } else {
+            instruction = new LDC(cp.addFloat(value));
+        }
+    }
+
+
+    /**
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, long value) {
+        if (value == 0) {
+            instruction = LCONST_0;
+        } else if (value == 1) {
+            instruction = LCONST_1;
+        } else {
+            instruction = new LDC2_W(cp.addLong(value));
+        }
+    }
+
+
+    /**
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, double value) {
+        if (value == 0.0) {
+            instruction = DCONST_0;
+        } else if (value == 1.0) {
+            instruction = DCONST_1;
+        } else {
+            instruction = new LDC2_W(cp.addDouble(value));
+        }
+    }
+
+
+    /**
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, String value) {
+        if (value == null) {
+            instruction = ACONST_NULL;
+        } else {
+            instruction = new LDC(cp.addString(value));
+        }
+    }
+
+    /**
+     * 
+     * @param cp
+     * @param value
+     */
+    public PUSH(ConstantPoolGen cp, ObjectType value) {
+        if (value == null) {
+            instruction = ACONST_NULL;
+        } else {
+            instruction = new LDC(cp.addClass(value));
+        }
+    }
+    
+    /**
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, Number value) {
+        if ((value instanceof Integer) || (value instanceof Short) || (value instanceof Byte)) {
+            instruction = new PUSH(cp, value.intValue()).instruction;
+        } else if (value instanceof Double) {
+            instruction = new PUSH(cp, value.doubleValue()).instruction;
+        } else if (value instanceof Float) {
+            instruction = new PUSH(cp, value.floatValue()).instruction;
+        } else if (value instanceof Long) {
+            instruction = new PUSH(cp, value.longValue()).instruction;
+        } else {
+            throw new ClassGenException("What's this: " + value);
+        }
+    }
+
+
+    /**
+     * creates a push object from a Character value. Warning: Make sure not to attempt to allow
+     * autoboxing to create this value parameter, as an alternative constructor will be called
+     * 
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, Character value) {
+        this(cp, value.charValue());
+    }
+
+
+    /**
+     * @param cp Constant pool
+     * @param value to be pushed 
+     */
+    public PUSH(ConstantPoolGen cp, Boolean value) {
+        this(cp, value.booleanValue());
+    }
+
+
+    public final InstructionList getInstructionList() {
+        return new InstructionList(instruction);
+    }
+
+
+    public final Instruction getInstruction() {
+        return instruction;
+    }
+
+
+    /**
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString() {
+        return instruction.toString() + " (PUSH)";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/PUTFIELD.java b/src/main/java/org/apache/commons/bcel6/generic/PUTFIELD.java
new file mode 100644
index 0000000..db337b5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/PUTFIELD.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * PUTFIELD - Put field in object
+ * <PRE>Stack: ..., objectref, value -&gt; ...</PRE>
+ * OR
+ * <PRE>Stack: ..., objectref, value.word1, value.word2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class PUTFIELD extends FieldInstruction implements PopInstruction, ExceptionThrower {
+
+    private static final long serialVersionUID = -3931392044558815011L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    PUTFIELD() {
+    }
+
+
+    public PUTFIELD(int index) {
+        super(Constants.PUTFIELD, index);
+    }
+
+
+    @Override
+    public int consumeStack( ConstantPoolGen cpg ) {
+        return getFieldSize(cpg) + 1;
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.NULL_POINTER_EXCEPTION;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitStackConsumer(this);
+        v.visitPopInstruction(this);
+        v.visitTypedInstruction(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitFieldInstruction(this);
+        v.visitPUTFIELD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/PUTSTATIC.java b/src/main/java/org/apache/commons/bcel6/generic/PUTSTATIC.java
new file mode 100644
index 0000000..845fcfc
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/PUTSTATIC.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/** 
+ * PUTSTATIC - Put static field in class
+ * <PRE>Stack: ..., value -&gt; ...</PRE>
+ * OR
+ * <PRE>Stack: ..., value.word1, value.word2 -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class PUTSTATIC extends FieldInstruction implements ExceptionThrower, PopInstruction {
+
+    private static final long serialVersionUID = -1992788532422473584L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    PUTSTATIC() {
+    }
+
+
+    public PUTSTATIC(int index) {
+        super(Constants.PUTSTATIC, index);
+    }
+
+
+    @Override
+    public int consumeStack( ConstantPoolGen cpg ) {
+        return getFieldSize(cpg);
+    }
+
+
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+        System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
+                ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
+        cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;
+        return cs;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitStackConsumer(this);
+        v.visitPopInstruction(this);
+        v.visitTypedInstruction(this);
+        v.visitLoadClass(this);
+        v.visitCPInstruction(this);
+        v.visitFieldOrMethod(this);
+        v.visitFieldInstruction(this);
+        v.visitPUTSTATIC(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/PopInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/PopInstruction.java
new file mode 100644
index 0000000..6c0d49a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/PopInstruction.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denotes an unparameterized instruction to pop a value on top from the stack,
+ * such as ISTORE, POP, PUTSTATIC.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see ISTORE
+ * @see POP
+ */
+public interface PopInstruction extends StackConsumer {
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/PushInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/PushInstruction.java
new file mode 100644
index 0000000..b75ef3e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/PushInstruction.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denotes an unparameterized instruction to produce a value on top of the stack,
+ * such as ILOAD, LDC, SIPUSH, DUP, ICONST, etc.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+
+ * @see ILOAD
+ * @see ICONST
+ * @see LDC
+ * @see DUP
+ * @see SIPUSH
+ * @see GETSTATIC
+ */
+public interface PushInstruction extends StackProducer {
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/RET.java b/src/main/java/org/apache/commons/bcel6/generic/RET.java
new file mode 100644
index 0000000..be67a6a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/RET.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * RET - Return from subroutine
+ *
+ * <PRE>Stack: ... -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class RET extends Instruction implements IndexedInstruction, TypedInstruction {
+
+    private static final long serialVersionUID = -3751746568458761719L;
+    private boolean wide;
+    private int index; // index to local variable containg the return address
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    RET() {
+    }
+
+
+    public RET(int index) {
+        super(org.apache.commons.bcel6.Constants.RET, (short) 2);
+        setIndex(index); // May set wide as side effect
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        if (wide) {
+            out.writeByte(org.apache.commons.bcel6.Constants.WIDE);
+        }
+        out.writeByte(opcode);
+        if (wide) {
+            out.writeShort(index);
+        } else {
+            out.writeByte(index);
+        }
+    }
+
+
+    private void setWide() {
+        wide = index > org.apache.commons.bcel6.Constants.MAX_BYTE;
+        if (wide) {
+            length = 4; // Including the wide byte  
+        } else {
+            length = 2;
+        }
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        this.wide = wide;
+        if (wide) {
+            index = bytes.readUnsignedShort();
+            length = 4;
+        } else {
+            index = bytes.readUnsignedByte();
+            length = 2;
+        }
+    }
+
+
+    /**
+     * @return index of local variable containg the return address
+     */
+    public final int getIndex() {
+        return index;
+    }
+
+
+    /**
+     * Set index of local variable containg the return address
+     */
+    public final void setIndex( int n ) {
+        if (n < 0) {
+            throw new ClassGenException("Negative index value: " + n);
+        }
+        index = n;
+        setWide();
+    }
+
+
+    /**
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        return super.toString(verbose) + " " + index;
+    }
+
+
+    /** @return return address type
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return ReturnaddressType.NO_TARGET;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitRET(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/RETURN.java b/src/main/java/org/apache/commons/bcel6/generic/RETURN.java
new file mode 100644
index 0000000..4e25328
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/RETURN.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * RETURN -  Return from void method
+ * <PRE>Stack: ... -&gt; &lt;empty&gt;</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class RETURN extends ReturnInstruction {
+
+    private static final long serialVersionUID = -7375896559820981467L;
+
+
+    public RETURN() {
+        super(org.apache.commons.bcel6.Constants.RETURN);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitReturnInstruction(this);
+        v.visitRETURN(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ReferenceType.java b/src/main/java/org/apache/commons/bcel6/generic/ReferenceType.java
new file mode 100644
index 0000000..028ce66
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ReferenceType.java
@@ -0,0 +1,335 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/**
+ * Super class for object and array types.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class ReferenceType extends Type {
+
+    private static final long serialVersionUID = -1434716548829506031L;
+
+
+    protected ReferenceType(byte t, String s) {
+        super(t, s);
+    }
+
+
+    /** Class is non-abstract but not instantiable from the outside
+     */
+    ReferenceType() {
+        super(Constants.T_OBJECT, "<null object>");
+    }
+
+
+    /**
+     * Return true iff this type is castable to another type t as defined in
+     * the JVM specification.  The case where this is Type.NULL is not
+     * defined (see the CHECKCAST definition in the JVM specification).
+     * However, because e.g. CHECKCAST doesn't throw a
+     * ClassCastException when casting a null reference to any Object,
+     * true is returned in this case.
+     *
+     * @throws ClassNotFoundException if any classes or interfaces required
+     *  to determine assignment compatibility can't be found
+     */
+    public boolean isCastableTo( Type t ) throws ClassNotFoundException {
+        if (this.equals(Type.NULL)) {
+            return t instanceof ReferenceType; // If this is ever changed in isAssignmentCompatible()
+        }
+        return isAssignmentCompatibleWith(t);
+        /* Yes, it's true: It's the same definition.
+         * See vmspec2 AASTORE / CHECKCAST definitions.
+         */
+    }
+
+
+    /**
+     * Return true iff this is assignment compatible with another type t
+     * as defined in the JVM specification; see the AASTORE definition
+     * there.
+     * @throws ClassNotFoundException if any classes or interfaces required
+     *  to determine assignment compatibility can't be found
+     */
+    public boolean isAssignmentCompatibleWith( Type t ) throws ClassNotFoundException {
+        if (!(t instanceof ReferenceType)) {
+            return false;
+        }
+        ReferenceType T = (ReferenceType) t;
+        if (this.equals(Type.NULL)) {
+            return true; // This is not explicitely stated, but clear. Isn't it?
+        }
+        /* If this is a class type then
+         */
+        if ((this instanceof ObjectType) && (((ObjectType) this).referencesClassExact())) {
+            /* If T is a class type, then this must be the same class as T,
+             or this must be a subclass of T;
+             */
+            if ((T instanceof ObjectType) && (((ObjectType) T).referencesClassExact())) {
+                if (this.equals(T)) {
+                    return true;
+                }
+                if (Repository.instanceOf(((ObjectType) this).getClassName(), ((ObjectType) T)
+                        .getClassName())) {
+                    return true;
+                }
+            }
+            /* If T is an interface type, this must implement interface T.
+             */
+            if ((T instanceof ObjectType) && (((ObjectType) T).referencesInterfaceExact())) {
+                if (Repository.implementationOf(((ObjectType) this).getClassName(),
+                        ((ObjectType) T).getClassName())) {
+                    return true;
+                }
+            }
+        }
+        /* If this is an interface type, then:
+         */
+        if ((this instanceof ObjectType) && (((ObjectType) this).referencesInterfaceExact())) {
+            /* If T is a class type, then T must be Object (�2.4.7).
+             */
+            if ((T instanceof ObjectType) && (((ObjectType) T).referencesClassExact())) {
+                if (T.equals(Type.OBJECT)) {
+                    return true;
+                }
+            }
+            /* If T is an interface type, then T must be the same interface
+             * as this or a superinterface of this (�2.13.2).
+             */
+            if ((T instanceof ObjectType) && (((ObjectType) T).referencesInterfaceExact())) {
+                if (this.equals(T)) {
+                    return true;
+                }
+                if (Repository.implementationOf(((ObjectType) this).getClassName(),
+                        ((ObjectType) T).getClassName())) {
+                    return true;
+                }
+            }
+        }
+        /* If this is an array type, namely, the type SC[], that is, an
+         * array of components of type SC, then:
+         */
+        if (this instanceof ArrayType) {
+            /* If T is a class type, then T must be Object (�2.4.7).
+             */
+            if ((T instanceof ObjectType) && (((ObjectType) T).referencesClassExact())) {
+                if (T.equals(Type.OBJECT)) {
+                    return true;
+                }
+            }
+            /* If T is an array type TC[], that is, an array of components
+             * of type TC, then one of the following must be true:
+             */
+            if (T instanceof ArrayType) {
+                /* TC and SC are the same primitive type (�2.4.1).
+                 */
+                Type sc = ((ArrayType) this).getElementType();
+                Type tc = ((ArrayType) T).getElementType();
+                if (sc instanceof BasicType && tc instanceof BasicType && sc.equals(tc)) {
+                    return true;
+                }
+                /* TC and SC are reference types (�2.4.6), and type SC is
+                 * assignable to TC by these runtime rules.
+                 */
+                if (tc instanceof ReferenceType && sc instanceof ReferenceType
+                        && ((ReferenceType) sc).isAssignmentCompatibleWith(tc)) {
+                    return true;
+                }
+            }
+            /* If T is an interface type, T must be one of the interfaces implemented by arrays (�2.15). */
+            // TODO: Check if this is still valid or find a way to dynamically find out which
+            // interfaces arrays implement. However, as of the JVM specification edition 2, there
+            // are at least two different pages where assignment compatibility is defined and
+            // on one of them "interfaces implemented by arrays" is exchanged with "'Cloneable' or
+            // 'java.io.Serializable'"
+            if ((T instanceof ObjectType) && (((ObjectType) T).referencesInterfaceExact())) {
+                for (String element : Constants.INTERFACES_IMPLEMENTED_BY_ARRAYS) {
+                    if (T.equals(ObjectType.getInstance(element))) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return false; // default.
+    }
+
+
+    /**
+     * This commutative operation returns the first common superclass (narrowest ReferenceType
+     * referencing a class, not an interface).
+     * If one of the types is a superclass of the other, the former is returned.
+     * If "this" is Type.NULL, then t is returned.
+     * If t is Type.NULL, then "this" is returned.
+     * If "this" equals t ['this.equals(t)'] "this" is returned.
+     * If "this" or t is an ArrayType, then Type.OBJECT is returned;
+     * unless their dimensions match. Then an ArrayType of the same
+     * number of dimensions is returned, with its basic type being the
+     * first common super class of the basic types of "this" and t.
+     * If "this" or t is a ReferenceType referencing an interface, then Type.OBJECT is returned.
+     * If not all of the two classes' superclasses cannot be found, "null" is returned.
+     * See the JVM specification edition 2, "�4.9.2 The Bytecode Verifier".
+     *
+     * @throws ClassNotFoundException on failure to find superclasses of this
+     *  type, or the type passed as a parameter
+     */
+    public ReferenceType getFirstCommonSuperclass( ReferenceType t ) throws ClassNotFoundException {
+        if (this.equals(Type.NULL)) {
+            return t;
+        }
+        if (t.equals(Type.NULL)) {
+            return this;
+        }
+        if (this.equals(t)) {
+            return this;
+            /*
+             * TODO: Above sounds a little arbitrary. On the other hand, there is
+             * no object referenced by Type.NULL so we can also say all the objects
+             * referenced by Type.NULL were derived from java.lang.Object.
+             * However, the Java Language's "instanceof" operator proves us wrong:
+             * "null" is not referring to an instance of java.lang.Object :)
+             */
+        }
+        /* This code is from a bug report by Konstantin Shagin <konst@cs.technion.ac.il> */
+        if ((this instanceof ArrayType) && (t instanceof ArrayType)) {
+            ArrayType arrType1 = (ArrayType) this;
+            ArrayType arrType2 = (ArrayType) t;
+            if ((arrType1.getDimensions() == arrType2.getDimensions())
+                    && arrType1.getBasicType() instanceof ObjectType
+                    && arrType2.getBasicType() instanceof ObjectType) {
+                return new ArrayType(((ObjectType) arrType1.getBasicType())
+                        .getFirstCommonSuperclass((ObjectType) arrType2.getBasicType()), arrType1
+                        .getDimensions());
+            }
+        }
+        if ((this instanceof ArrayType) || (t instanceof ArrayType)) {
+            return Type.OBJECT;
+            // TODO: Is there a proof of OBJECT being the direct ancestor of every ArrayType?
+        }
+        if (((this instanceof ObjectType) && ((ObjectType) this).referencesInterface())
+                || ((t instanceof ObjectType) && ((ObjectType) t).referencesInterface())) {
+            return Type.OBJECT;
+            // TODO: The above line is correct comparing to the vmspec2. But one could
+            // make class file verification a bit stronger here by using the notion of
+            // superinterfaces or even castability or assignment compatibility.
+        }
+        // this and t are ObjectTypes, see above.
+        ObjectType thiz = (ObjectType) this;
+        ObjectType other = (ObjectType) t;
+        JavaClass[] thiz_sups = Repository.getSuperClasses(thiz.getClassName());
+        JavaClass[] other_sups = Repository.getSuperClasses(other.getClassName());
+        if ((thiz_sups == null) || (other_sups == null)) {
+            return null;
+        }
+        // Waaahh...
+        JavaClass[] this_sups = new JavaClass[thiz_sups.length + 1];
+        JavaClass[] t_sups = new JavaClass[other_sups.length + 1];
+        System.arraycopy(thiz_sups, 0, this_sups, 1, thiz_sups.length);
+        System.arraycopy(other_sups, 0, t_sups, 1, other_sups.length);
+        this_sups[0] = Repository.lookupClass(thiz.getClassName());
+        t_sups[0] = Repository.lookupClass(other.getClassName());
+        for (JavaClass t_sup : t_sups) {
+            for (JavaClass this_sup : this_sups) {
+                if (this_sup.equals(t_sup)) {
+                    return ObjectType.getInstance(this_sup.getClassName());
+                }
+            }
+        }
+        // Huh? Did you ask for Type.OBJECT's superclass??
+        return null;
+    }
+
+
+    /**
+     * This commutative operation returns the first common superclass (narrowest ReferenceType
+     * referencing a class, not an interface).
+     * If one of the types is a superclass of the other, the former is returned.
+     * If "this" is Type.NULL, then t is returned.
+     * If t is Type.NULL, then "this" is returned.
+     * If "this" equals t ['this.equals(t)'] "this" is returned.
+     * If "this" or t is an ArrayType, then Type.OBJECT is returned.
+     * If "this" or t is a ReferenceType referencing an interface, then Type.OBJECT is returned.
+     * If not all of the two classes' superclasses cannot be found, "null" is returned.
+     * See the JVM specification edition 2, "�4.9.2 The Bytecode Verifier".
+     *
+     * @deprecated use getFirstCommonSuperclass(ReferenceType t) which has
+     *             slightly changed semantics.
+     * @throws ClassNotFoundException on failure to find superclasses of this
+     *  type, or the type passed as a parameter
+     */
+    @Deprecated
+    public ReferenceType firstCommonSuperclass( ReferenceType t ) throws ClassNotFoundException {
+        if (this.equals(Type.NULL)) {
+            return t;
+        }
+        if (t.equals(Type.NULL)) {
+            return this;
+        }
+        if (this.equals(t)) {
+            return this;
+            /*
+             * TODO: Above sounds a little arbitrary. On the other hand, there is
+             * no object referenced by Type.NULL so we can also say all the objects
+             * referenced by Type.NULL were derived from java.lang.Object.
+             * However, the Java Language's "instanceof" operator proves us wrong:
+             * "null" is not referring to an instance of java.lang.Object :)
+             */
+        }
+        if ((this instanceof ArrayType) || (t instanceof ArrayType)) {
+            return Type.OBJECT;
+            // TODO: Is there a proof of OBJECT being the direct ancestor of every ArrayType?
+        }
+        if (((this instanceof ObjectType) && ((ObjectType) this).referencesInterface())
+                || ((t instanceof ObjectType) && ((ObjectType) t).referencesInterface())) {
+            return Type.OBJECT;
+            // TODO: The above line is correct comparing to the vmspec2. But one could
+            // make class file verification a bit stronger here by using the notion of
+            // superinterfaces or even castability or assignment compatibility.
+        }
+        // this and t are ObjectTypes, see above.
+        ObjectType thiz = (ObjectType) this;
+        ObjectType other = (ObjectType) t;
+        JavaClass[] thiz_sups = Repository.getSuperClasses(thiz.getClassName());
+        JavaClass[] other_sups = Repository.getSuperClasses(other.getClassName());
+        if ((thiz_sups == null) || (other_sups == null)) {
+            return null;
+        }
+        // Waaahh...
+        JavaClass[] this_sups = new JavaClass[thiz_sups.length + 1];
+        JavaClass[] t_sups = new JavaClass[other_sups.length + 1];
+        System.arraycopy(thiz_sups, 0, this_sups, 1, thiz_sups.length);
+        System.arraycopy(other_sups, 0, t_sups, 1, other_sups.length);
+        this_sups[0] = Repository.lookupClass(thiz.getClassName());
+        t_sups[0] = Repository.lookupClass(other.getClassName());
+        for (JavaClass t_sup : t_sups) {
+            for (JavaClass this_sup : this_sups) {
+                if (this_sup.equals(t_sup)) {
+                    return ObjectType.getInstance(this_sup.getClassName());
+                }
+            }
+        }
+        // Huh? Did you ask for Type.OBJECT's superclass??
+        return null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ReturnInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/ReturnInstruction.java
new file mode 100644
index 0000000..4bc3ce5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ReturnInstruction.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.ExceptionConstants;
+
+/**
+ * Super class for the xRETURN family of instructions.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class ReturnInstruction extends Instruction implements ExceptionThrower,
+        TypedInstruction, StackConsumer {
+
+    private static final long serialVersionUID = -1248578537710620153L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    ReturnInstruction() {
+    }
+
+
+    /**
+     * @param opcode of instruction
+     */
+    protected ReturnInstruction(short opcode) {
+        super(opcode, (short) 1);
+    }
+
+
+    public Type getType() {
+        switch (opcode) {
+            case Constants.IRETURN:
+                return Type.INT;
+            case Constants.LRETURN:
+                return Type.LONG;
+            case Constants.FRETURN:
+                return Type.FLOAT;
+            case Constants.DRETURN:
+                return Type.DOUBLE;
+            case Constants.ARETURN:
+                return Type.OBJECT;
+            case Constants.RETURN:
+                return Type.VOID;
+            default: // Never reached
+                throw new ClassGenException("Unknown type " + opcode);
+        }
+    }
+
+
+    public Class<?>[] getExceptions() {
+        return new Class[] {
+            ExceptionConstants.ILLEGAL_MONITOR_STATE
+        };
+    }
+
+
+    /** @return type associated with the instruction
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return getType();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/ReturnaddressType.java b/src/main/java/org/apache/commons/bcel6/generic/ReturnaddressType.java
new file mode 100644
index 0000000..111b934
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/ReturnaddressType.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import org.apache.commons.bcel6.Constants;
+
+/** 
+ * Returnaddress, the type JSR or JSR_W instructions push upon the stack.
+ *
+ * see vmspec2 �3.3.3
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class ReturnaddressType extends Type {
+
+    private static final long serialVersionUID = 3782621476731023927L;
+    public static final ReturnaddressType NO_TARGET = new ReturnaddressType();
+    private InstructionHandle returnTarget;
+
+
+    /**
+     * A Returnaddress [that doesn't know where to return to].
+     */
+    private ReturnaddressType() {
+        super(Constants.T_ADDRESS, "<return address>");
+    }
+
+
+    /**
+     * Creates a ReturnaddressType object with a target.
+     */
+    public ReturnaddressType(InstructionHandle returnTarget) {
+        super(Constants.T_ADDRESS, "<return address targeting " + returnTarget + ">");
+        this.returnTarget = returnTarget;
+    }
+
+
+    /** @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() {
+        if (returnTarget == null) {
+            return 0;
+        }
+        return returnTarget.hashCode();
+    }
+
+
+    /**
+     * Returns if the two Returnaddresses refer to the same target.
+     */
+    @Override
+    public boolean equals( Object rat ) {
+        if (!(rat instanceof ReturnaddressType)) {
+            return false;
+        }
+        ReturnaddressType that = (ReturnaddressType) rat;
+        if (this.returnTarget == null || that.returnTarget == null) {
+            return that.returnTarget == this.returnTarget;
+        }
+        return that.returnTarget.equals(this.returnTarget);
+    }
+
+
+    /**
+     * @return the target of this ReturnaddressType
+     */
+    public InstructionHandle getTarget() {
+        return returnTarget;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/SALOAD.java b/src/main/java/org/apache/commons/bcel6/generic/SALOAD.java
new file mode 100644
index 0000000..ccd352a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/SALOAD.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * SALOAD - Load short from array
+ * <PRE>Stack: ..., arrayref, index -&gt; ..., value</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class SALOAD extends ArrayInstruction implements StackProducer {
+
+    private static final long serialVersionUID = 7178769326864697416L;
+
+
+    public SALOAD() {
+        super(org.apache.commons.bcel6.Constants.SALOAD);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackProducer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitSALOAD(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/SASTORE.java b/src/main/java/org/apache/commons/bcel6/generic/SASTORE.java
new file mode 100644
index 0000000..274383a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/SASTORE.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * SASTORE - Store into short array
+ * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class SASTORE extends ArrayInstruction implements StackConsumer {
+
+    private static final long serialVersionUID = -5187452948601765872L;
+
+
+    public SASTORE() {
+        super(org.apache.commons.bcel6.Constants.SASTORE);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitExceptionThrower(this);
+        v.visitTypedInstruction(this);
+        v.visitArrayInstruction(this);
+        v.visitSASTORE(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/SIPUSH.java b/src/main/java/org/apache/commons/bcel6/generic/SIPUSH.java
new file mode 100644
index 0000000..25e301a
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/SIPUSH.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/**
+ * SIPUSH - Push short
+ *
+ * <PRE>Stack: ... -&gt; ..., value</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class SIPUSH extends Instruction implements ConstantPushInstruction {
+
+    private static final long serialVersionUID = -5670145672311191256L;
+    private short b;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    SIPUSH() {
+    }
+
+
+    public SIPUSH(short b) {
+        super(org.apache.commons.bcel6.Constants.SIPUSH, (short) 3);
+        this.b = b;
+    }
+
+
+    /**
+     * Dump instruction as short code to stream out.
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        super.dump(out);
+        out.writeShort(b);
+    }
+
+
+    /**
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        return super.toString(verbose) + " " + b;
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        length = 3;
+        b = bytes.readShort();
+    }
+
+
+    public Number getValue() {
+        return Integer.valueOf(b);
+    }
+
+
+    /** @return Type.SHORT
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.SHORT;
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitPushInstruction(this);
+        v.visitStackProducer(this);
+        v.visitTypedInstruction(this);
+        v.visitConstantPushInstruction(this);
+        v.visitSIPUSH(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/SWAP.java b/src/main/java/org/apache/commons/bcel6/generic/SWAP.java
new file mode 100644
index 0000000..54643e2
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/SWAP.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * SWAP - Swa top operand stack word
+ * <PRE>Stack: ..., word2, word1 -&gt; ..., word1, word2</PRE>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class SWAP extends StackInstruction implements StackConsumer, StackProducer {
+
+    private static final long serialVersionUID = 1965736870393433312L;
+
+
+    public SWAP() {
+        super(org.apache.commons.bcel6.Constants.SWAP);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitStackProducer(this);
+        v.visitStackInstruction(this);
+        v.visitSWAP(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/SWITCH.java b/src/main/java/org/apache/commons/bcel6/generic/SWITCH.java
new file mode 100644
index 0000000..c9d76e9
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/SWITCH.java
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/** 
+ * SWITCH - Branch depending on int value, generates either LOOKUPSWITCH or
+ * TABLESWITCH instruction, depending on whether the match values (int[]) can be
+ * sorted with no gaps between the numbers.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class SWITCH implements CompoundInstruction {
+
+    private int[] match;
+    private InstructionHandle[] targets;
+    private Select instruction;
+    private int match_length;
+
+
+    /**
+     * Template for switch() constructs. If the match array can be
+     * sorted in ascending order with gaps no larger than max_gap
+     * between the numbers, a TABLESWITCH instruction is generated, and
+     * a LOOKUPSWITCH otherwise. The former may be more efficient, but
+     * needs more space.
+     * 
+     * Note, that the key array always will be sorted, though we leave
+     * the original arrays unaltered.
+     *
+     * @param match array of match values (case 2: ... case 7: ..., etc.)
+     * @param targets the instructions to be branched to for each case
+     * @param target the default target
+     * @param max_gap maximum gap that may between case branches
+     */
+    public SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target, int max_gap) {
+        this.match = match.clone();
+        this.targets = targets.clone();
+        if ((match_length = match.length) < 2) {
+            instruction = new TABLESWITCH(match, targets, target);
+        } else {
+            sort(0, match_length - 1);
+            if (matchIsOrdered(max_gap)) {
+                fillup(max_gap, target);
+                instruction = new TABLESWITCH(this.match, this.targets, target);
+            } else {
+                instruction = new LOOKUPSWITCH(this.match, this.targets, target);
+            }
+        }
+    }
+
+
+    public SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target) {
+        this(match, targets, target, 1);
+    }
+
+
+    private void fillup( int max_gap, InstructionHandle target ) {
+        int max_size = match_length + match_length * max_gap;
+        int[] m_vec = new int[max_size];
+        InstructionHandle[] t_vec = new InstructionHandle[max_size];
+        int count = 1;
+        m_vec[0] = match[0];
+        t_vec[0] = targets[0];
+        for (int i = 1; i < match_length; i++) {
+            int prev = match[i - 1];
+            int gap = match[i] - prev;
+            for (int j = 1; j < gap; j++) {
+                m_vec[count] = prev + j;
+                t_vec[count] = target;
+                count++;
+            }
+            m_vec[count] = match[i];
+            t_vec[count] = targets[i];
+            count++;
+        }
+        match = new int[count];
+        targets = new InstructionHandle[count];
+        System.arraycopy(m_vec, 0, match, 0, count);
+        System.arraycopy(t_vec, 0, targets, 0, count);
+    }
+
+
+    /**
+     * Sort match and targets array with QuickSort.
+     */
+    private void sort( int l, int r ) {
+        int i = l, j = r;
+        int h, m = match[(l + r) / 2];
+        InstructionHandle h2;
+        do {
+            while (match[i] < m) {
+                i++;
+            }
+            while (m < match[j]) {
+                j--;
+            }
+            if (i <= j) {
+                h = match[i];
+                match[i] = match[j];
+                match[j] = h; // Swap elements
+                h2 = targets[i];
+                targets[i] = targets[j];
+                targets[j] = h2; // Swap instructions, too
+                i++;
+                j--;
+            }
+        } while (i <= j);
+        if (l < j) {
+            sort(l, j);
+        }
+        if (i < r) {
+            sort(i, r);
+        }
+    }
+
+
+    /**
+     * @return match is sorted in ascending order with no gap bigger than max_gap?
+     */
+    private boolean matchIsOrdered( int max_gap ) {
+        for (int i = 1; i < match_length; i++) {
+            if (match[i] - match[i - 1] > max_gap) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+
+    public final InstructionList getInstructionList() {
+        return new InstructionList(instruction);
+    }
+
+
+    public final Instruction getInstruction() {
+        return instruction;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/Select.java b/src/main/java/org/apache/commons/bcel6/generic/Select.java
new file mode 100644
index 0000000..f80055b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/Select.java
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.
+ * 
+ * <p>We use our super's <code>target</code> property as the default target.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see LOOKUPSWITCH
+ * @see TABLESWITCH
+ * @see InstructionList
+ */
+public abstract class Select extends BranchInstruction implements VariableLengthInstruction,
+        StackConsumer, StackProducer {
+
+    private static final long serialVersionUID = 2806771744559217250L;
+    protected int[] match; // matches, i.e., case 1: ...
+    protected int[] indices; // target offsets
+    protected InstructionHandle[] targets; // target objects in instruction list
+    protected int fixed_length; // fixed length defined by subclasses
+    protected int match_length; // number of cases
+    protected int padding = 0; // number of pad bytes for alignment
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    Select() {
+    }
+
+
+    /**
+     * (Match, target) pairs for switch.
+     * `Match' and `targets' must have the same length of course.
+     *
+     * @param match array of matching values
+     * @param targets instruction targets
+     * @param defaultTarget default instruction target
+     */
+    Select(short opcode, int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget) {
+        super(opcode, defaultTarget);
+        this.targets = targets;
+        for (InstructionHandle target2 : targets) {
+            notifyTarget(null, target2, this);
+        }
+        this.match = match;
+        if ((match_length = match.length) != targets.length) {
+            throw new ClassGenException("Match and target array have not the same length: Match length: " + match.length + " Target length: " + targets.length);
+        }
+        indices = new int[match_length];
+    }
+
+
+    /**
+     * Since this is a variable length instruction, it may shift the following
+     * instructions which then need to update their position.
+     *
+     * Called by InstructionList.setPositions when setting the position for every
+     * instruction. In the presence of variable length instructions `setPositions'
+     * performs multiple passes over the instruction list to calculate the
+     * correct (byte) positions and offsets by calling this function.
+     *
+     * @param offset additional offset caused by preceding (variable length) instructions
+     * @param max_offset the maximum offset that may be caused by these instructions
+     * @return additional offset caused by possible change of this instruction's length
+     */
+    @Override
+    protected int updatePosition( int offset, int max_offset ) {
+        position += offset; // Additional offset caused by preceding SWITCHs, GOTOs, etc.
+        short old_length = length;
+        /* Alignment on 4-byte-boundary, + 1, because of tag byte.
+         */
+        padding = (4 - ((position + 1) % 4)) % 4;
+        length = (short) (fixed_length + padding); // Update length
+        return length - old_length;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        out.writeByte(opcode);
+        for (int i = 0; i < padding; i++) {
+            out.writeByte(0);
+        }
+        index = getTargetOffset(); // Write default target offset
+        out.writeInt(index);
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        padding = (4 - (bytes.getIndex() % 4)) % 4; // Compute number of pad bytes
+        for (int i = 0; i < padding; i++) {
+            bytes.readByte();
+        }
+        // Default branch target common for both cases (TABLESWITCH, LOOKUPSWITCH)
+        index = bytes.readInt();
+    }
+
+
+    /**
+     * @return mnemonic for instruction
+     */
+    @Override
+    public String toString( boolean verbose ) {
+        StringBuilder buf = new StringBuilder(super.toString(verbose));
+        if (verbose) {
+            for (int i = 0; i < match_length; i++) {
+                String s = "null";
+                if (targets[i] != null) {
+                    s = targets[i].getInstruction().toString();
+                }
+                buf.append("(").append(match[i]).append(", ").append(s).append(" = {").append(
+                        indices[i]).append("})");
+            }
+        } else {
+            buf.append(" ...");
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * Set branch target for `i'th case
+     */
+    public void setTarget( int i, InstructionHandle target ) {
+        notifyTarget(targets[i], target, this);
+        targets[i] = target;
+    }
+
+
+    /**
+     * @param old_ih old target
+     * @param new_ih new target
+     */
+    @Override
+    public void updateTarget( InstructionHandle old_ih, InstructionHandle new_ih ) {
+        boolean targeted = false;
+        if (target == old_ih) {
+            targeted = true;
+            setTarget(new_ih);
+        }
+        for (int i = 0; i < targets.length; i++) {
+            if (targets[i] == old_ih) {
+                targeted = true;
+                setTarget(i, new_ih);
+            }
+        }
+        if (!targeted) {
+            throw new ClassGenException("Not targeting " + old_ih);
+        }
+    }
+
+
+    /**
+     * @return true, if ih is target of this instruction
+     */
+    @Override
+    public boolean containsTarget( InstructionHandle ih ) {
+        if (target == ih) {
+            return true;
+        }
+        for (InstructionHandle target2 : targets) {
+            if (target2 == ih) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        Select copy = (Select) super.clone();
+        copy.match = match.clone();
+        copy.indices = indices.clone();
+        copy.targets = targets.clone();
+        return copy;
+    }
+
+
+    /**
+     * Inform targets that they're not targeted anymore.
+     */
+    @Override
+    void dispose() {
+        super.dispose();
+        for (InstructionHandle target2 : targets) {
+            target2.removeTargeter(this);
+        }
+    }
+
+
+    /**
+     * @return array of match indices
+     */
+    public int[] getMatchs() {
+        return match;
+    }
+
+
+    /**
+     * @return array of match target offsets
+     */
+    public int[] getIndices() {
+        return indices;
+    }
+
+
+    /**
+     * @return array of match targets
+     */
+    public InstructionHandle[] getTargets() {
+        return targets;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/SimpleElementValueGen.java b/src/main/java/org/apache/commons/bcel6/generic/SimpleElementValueGen.java
new file mode 100644
index 0000000..ad1b269
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/SimpleElementValueGen.java
@@ -0,0 +1,273 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.ConstantDouble;
+import org.apache.commons.bcel6.classfile.ConstantFloat;
+import org.apache.commons.bcel6.classfile.ConstantInteger;
+import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ElementValue;
+import org.apache.commons.bcel6.classfile.SimpleElementValue;
+
+/**
+ * @since 6.0
+ */
+public class SimpleElementValueGen extends ElementValueGen
+{
+    // For primitive types and string type, this points to the value entry in
+    // the cpGen
+    // For 'class' this points to the class entry in the cpGen
+    private int idx;
+
+    // ctors for each supported type... type could be inferred but for now lets
+    // force it to be passed
+    /**
+     * Protected ctor used for deserialization, doesn't *put* an entry in the
+     * constant pool, assumes the one at the supplied index is correct.
+     */
+    protected SimpleElementValueGen(int type, int idx, ConstantPoolGen cpGen)
+    {
+        super(type, cpGen);
+        this.idx = idx;
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, int value)
+    {
+        super(type, cpGen);
+        idx = cpGen.addInteger(value);
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, long value)
+    {
+        super(type, cpGen);
+        idx = cpGen.addLong(value);
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, double value)
+    {
+        super(type, cpGen);
+        idx = cpGen.addDouble(value);
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, float value)
+    {
+        super(type, cpGen);
+        idx = cpGen.addFloat(value);
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, short value)
+    {
+        super(type, cpGen);
+        idx = cpGen.addInteger(value);
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, byte value)
+    {
+        super(type, cpGen);
+        idx = cpGen.addInteger(value);
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, char value)
+    {
+        super(type, cpGen);
+        idx = cpGen.addInteger(value);
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, boolean value)
+    {
+        super(type, cpGen);
+        if (value) {
+            idx = cpGen.addInteger(1);
+        } else {
+            idx = cpGen.addInteger(0);
+        }
+    }
+
+    public SimpleElementValueGen(int type, ConstantPoolGen cpGen, String value)
+    {
+        super(type, cpGen);
+        idx = cpGen.addUtf8(value);
+    }
+
+    /**
+     * The boolean controls whether we copy info from the 'old' constant pool to
+     * the 'new'. You need to use this ctor if the annotation is being copied
+     * from one file to another.
+     */
+    public SimpleElementValueGen(SimpleElementValue value,
+            ConstantPoolGen cpool, boolean copyPoolEntries)
+    {
+        super(value.getElementValueType(), cpool);
+        if (!copyPoolEntries)
+        {
+            // J5ASSERT: Could assert value.stringifyValue() is the same as
+            // cpool.getConstant(SimpleElementValuevalue.getIndex())
+            idx = value.getIndex();
+        }
+        else
+        {
+            switch (value.getElementValueType())
+            {
+            case STRING:
+                idx = cpool.addUtf8(value.getValueString());
+                break;
+            case PRIMITIVE_INT:
+                idx = cpool.addInteger(value.getValueInt());
+                break;
+            case PRIMITIVE_BYTE:
+                idx = cpool.addInteger(value.getValueByte());
+                break;
+            case PRIMITIVE_CHAR:
+                idx = cpool.addInteger(value.getValueChar());
+                break;
+            case PRIMITIVE_LONG:
+                idx = cpool.addLong(value.getValueLong());
+                break;
+            case PRIMITIVE_FLOAT:
+                idx = cpool.addFloat(value.getValueFloat());
+                break;
+            case PRIMITIVE_DOUBLE:
+                idx = cpool.addDouble(value.getValueDouble());
+                break;
+            case PRIMITIVE_BOOLEAN:
+                if (value.getValueBoolean())
+                {
+                    idx = cpool.addInteger(1);
+                }
+                else
+                {
+                    idx = cpool.addInteger(0);
+                }
+                break;
+            case PRIMITIVE_SHORT:
+                idx = cpool.addInteger(value.getValueShort());
+                break;
+            default:
+                throw new RuntimeException(
+                        "SimpleElementValueGen class does not know how "
+                                + "to copy this type " + type);
+            }
+        }
+    }
+
+    /**
+     * Return immutable variant
+     */
+    @Override
+    public ElementValue getElementValue()
+    {
+        return new SimpleElementValue(type, idx, cpGen.getConstantPool());
+    }
+
+    public int getIndex()
+    {
+        return idx;
+    }
+
+    public String getValueString()
+    {
+        if (type != STRING) {
+            throw new RuntimeException(
+                    "Dont call getValueString() on a non STRING ElementValue");
+        }
+        ConstantUtf8 c = (ConstantUtf8) cpGen.getConstant(idx);
+        return c.getBytes();
+    }
+
+    public int getValueInt()
+    {
+        if (type != PRIMITIVE_INT) {
+            throw new RuntimeException(
+                    "Dont call getValueString() on a non STRING ElementValue");
+        }
+        ConstantInteger c = (ConstantInteger) cpGen.getConstant(idx);
+        return c.getBytes();
+    }
+
+    // Whatever kind of value it is, return it as a string
+    @Override
+    public String stringifyValue()
+    {
+        switch (type)
+        {
+        case PRIMITIVE_INT:
+            ConstantInteger c = (ConstantInteger) cpGen.getConstant(idx);
+            return Integer.toString(c.getBytes());
+        case PRIMITIVE_LONG:
+            ConstantLong j = (ConstantLong) cpGen.getConstant(idx);
+            return Long.toString(j.getBytes());
+        case PRIMITIVE_DOUBLE:
+            ConstantDouble d = (ConstantDouble) cpGen.getConstant(idx);
+            return Double.toString(d.getBytes());
+        case PRIMITIVE_FLOAT:
+            ConstantFloat f = (ConstantFloat) cpGen.getConstant(idx);
+            return Float.toString(f.getBytes());
+        case PRIMITIVE_SHORT:
+            ConstantInteger s = (ConstantInteger) cpGen.getConstant(idx);
+            return Integer.toString(s.getBytes());
+        case PRIMITIVE_BYTE:
+            ConstantInteger b = (ConstantInteger) cpGen.getConstant(idx);
+            return Integer.toString(b.getBytes());
+        case PRIMITIVE_CHAR:
+            ConstantInteger ch = (ConstantInteger) cpGen.getConstant(idx);
+            return Integer.toString(ch.getBytes());
+        case PRIMITIVE_BOOLEAN:
+            ConstantInteger bo = (ConstantInteger) cpGen.getConstant(idx);
+            if (bo.getBytes() == 0) {
+                return "false";
+            } else {
+                return "true";
+            }
+        case STRING:
+            ConstantUtf8 cu8 = (ConstantUtf8) cpGen.getConstant(idx);
+            return cu8.getBytes();
+        default:
+            throw new RuntimeException(
+                    "SimpleElementValueGen class does not know how to stringify type "
+                            + type);
+        }
+    }
+
+    @Override
+    public void dump(DataOutputStream dos) throws IOException
+    {
+        dos.writeByte(type); // u1 kind of value
+        switch (type)
+        {
+        case PRIMITIVE_INT:
+        case PRIMITIVE_BYTE:
+        case PRIMITIVE_CHAR:
+        case PRIMITIVE_FLOAT:
+        case PRIMITIVE_LONG:
+        case PRIMITIVE_BOOLEAN:
+        case PRIMITIVE_SHORT:
+        case PRIMITIVE_DOUBLE:
+        case STRING:
+            dos.writeShort(idx);
+            break;
+        default:
+            throw new RuntimeException(
+                    "SimpleElementValueGen doesnt know how to write out type "
+                            + type);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/StackConsumer.java b/src/main/java/org/apache/commons/bcel6/generic/StackConsumer.java
new file mode 100644
index 0000000..4e0a3e7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/StackConsumer.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denote an instruction that may consume a value from the stack.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface StackConsumer {
+
+    /** @return how many words are consumed from stack
+     */
+    int consumeStack( ConstantPoolGen cpg );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/StackInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/StackInstruction.java
new file mode 100644
index 0000000..1e11129
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/StackInstruction.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Super class for stack operations like DUP and POP.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class StackInstruction extends Instruction {
+
+    private static final long serialVersionUID = -8542057001831958935L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    StackInstruction() {
+    }
+
+
+    /**
+     * @param opcode instruction opcode
+     */
+    protected StackInstruction(short opcode) {
+        super(opcode, (short) 1);
+    }
+
+
+    /** @return Type.UNKNOWN
+     */
+    public Type getType( ConstantPoolGen cp ) {
+        return Type.UNKNOWN;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/StackProducer.java b/src/main/java/org/apache/commons/bcel6/generic/StackProducer.java
new file mode 100644
index 0000000..4f217c0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/StackProducer.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denote an instruction that may produce a value on top of the stack
+ * (this excludes DUP_X1, e.g.)
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface StackProducer {
+
+    /** @return how many words are produced on stack
+     */
+    int produceStack( ConstantPoolGen cpg );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/StoreInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/StoreInstruction.java
new file mode 100644
index 0000000..2a38a24
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/StoreInstruction.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denotes an unparameterized instruction to store a value into a local variable,
+ * e.g. ISTORE.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class StoreInstruction extends LocalVariableInstruction implements PopInstruction {
+
+    private static final long serialVersionUID = -774241740383612113L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     * tag and length are defined in readInstruction and initFromFile, respectively.
+     */
+    StoreInstruction(short canon_tag, short c_tag) {
+        super(canon_tag, c_tag);
+    }
+
+
+    /**
+     * @param opcode Instruction opcode
+     * @param c_tag Instruction number for compact version, ASTORE_0, e.g.
+     * @param n local variable index (unsigned short)
+     */
+    protected StoreInstruction(short opcode, short c_tag, int n) {
+        super(opcode, c_tag, n);
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitStackConsumer(this);
+        v.visitPopInstruction(this);
+        v.visitTypedInstruction(this);
+        v.visitLocalVariableInstruction(this);
+        v.visitStoreInstruction(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/TABLESWITCH.java b/src/main/java/org/apache/commons/bcel6/generic/TABLESWITCH.java
new file mode 100644
index 0000000..fd59f23
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/TABLESWITCH.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.util.ByteSequence;
+
+/** 
+ * TABLESWITCH - Switch within given range of values, i.e., low..high
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see SWITCH
+ */
+public class TABLESWITCH extends Select {
+
+    private static final long serialVersionUID = -1178229029789923698L;
+
+
+    /**
+     * Empty constructor needed for the Class.newInstance() statement in
+     * Instruction.readInstruction(). Not to be used otherwise.
+     */
+    TABLESWITCH() {
+    }
+
+
+    /**
+     * @param match sorted array of match values, match[0] must be low value, 
+     * match[match_length - 1] high value
+     * @param targets where to branch for matched values
+     * @param defaultTarget default branch
+     */
+    public TABLESWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget) {
+        super(org.apache.commons.bcel6.Constants.TABLESWITCH, match, targets, defaultTarget);
+        length = (short) (13 + match_length * 4); /* Alignment remainder assumed
+         * 0 here, until dump time */
+        fixed_length = length;
+    }
+
+
+    /**
+     * Dump instruction as byte code to stream out.
+     * @param out Output stream
+     */
+    @Override
+    public void dump( DataOutputStream out ) throws IOException {
+        super.dump(out);
+        int low = (match_length > 0) ? match[0] : 0;
+        out.writeInt(low);
+        int high = (match_length > 0) ? match[match_length - 1] : 0;
+        out.writeInt(high);
+        for (int i = 0; i < match_length; i++) {
+            out.writeInt(indices[i] = getTargetOffset(targets[i]));
+        }
+    }
+
+
+    /**
+     * Read needed data (e.g. index) from file.
+     */
+    @Override
+    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
+        super.initFromFile(bytes, wide);
+        int low = bytes.readInt();
+        int high = bytes.readInt();
+        match_length = high - low + 1;
+        fixed_length = (short) (13 + match_length * 4);
+        length = (short) (fixed_length + padding);
+        match = new int[match_length];
+        indices = new int[match_length];
+        targets = new InstructionHandle[match_length];
+        for (int i = 0; i < match_length; i++) {
+            match[i] = low + i;
+            indices[i] = bytes.readInt();
+        }
+    }
+
+
+    /**
+     * Call corresponding visitor method(s). The order is:
+     * Call visitor methods of implemented interfaces first, then
+     * call methods according to the class hierarchy in descending order,
+     * i.e., the most specific visitXXX() call comes last.
+     *
+     * @param v Visitor object
+     */
+    @Override
+    public void accept( Visitor v ) {
+        v.visitVariableLengthInstruction(this);
+        v.visitStackConsumer(this);
+        v.visitBranchInstruction(this);
+        v.visitSelect(this);
+        v.visitTABLESWITCH(this);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/TargetLostException.java b/src/main/java/org/apache/commons/bcel6/generic/TargetLostException.java
new file mode 100644
index 0000000..0cb402e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/TargetLostException.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Thrown by InstructionList.remove() when one or multiple disposed instructions
+ * are still being referenced by an InstructionTargeter object. I.e. the
+ * InstructionTargeter has to be notified that (one of) the InstructionHandle it
+ * is referencing is being removed from the InstructionList and thus not valid anymore.
+ *
+ * <p>Making this an exception instead of a return value forces the user to handle
+ * these case explicitely in a try { ... } catch. The following code illustrates
+ * how this may be done:</p>
+ *
+ * <PRE>
+ *     ...
+ *     try {
+ *         il.delete(start_ih, end_ih);
+ *     } catch(TargetLostException e) {
+ *         for (InstructionHandle target : e.getTargets()) {
+ *             for (InstructionTargeter targeter : target.getTargeters()) {
+ *                 targeter.updateTarget(target, new_target);
+ *             }
+ *         }
+ *     }
+ * </PRE>
+ *
+ * @see InstructionHandle
+ * @see InstructionList
+ * @see InstructionTargeter
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class TargetLostException extends Exception {
+
+    private static final long serialVersionUID = -6857272667645328384L;
+    private final InstructionHandle[] targets;
+
+
+    TargetLostException(InstructionHandle[] t, String mesg) {
+        super(mesg);
+        targets = t;
+    }
+
+
+    /**
+     * @return list of instructions still being targeted.
+     */
+    public InstructionHandle[] getTargets() {
+        return targets;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/Type.java b/src/main/java/org/apache/commons/bcel6/generic/Type.java
new file mode 100644
index 0000000..9899f0c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/Type.java
@@ -0,0 +1,395 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.ClassFormatException;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.verifier.structurals.LocalVariables;
+import org.apache.commons.bcel6.verifier.structurals.OperandStack;
+
+/**
+ * Abstract super class for all possible java types, namely basic types
+ * such as int, object types like String and array types, e.g. int[]
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public abstract class Type implements java.io.Serializable {
+
+    private static final long serialVersionUID = -1985077286871826895L;
+    protected byte type;
+    protected String signature; // signature for the type
+    /** Predefined constants
+     */
+    public static final BasicType VOID = new BasicType(Constants.T_VOID);
+    public static final BasicType BOOLEAN = new BasicType(Constants.T_BOOLEAN);
+    public static final BasicType INT = new BasicType(Constants.T_INT);
+    public static final BasicType SHORT = new BasicType(Constants.T_SHORT);
+    public static final BasicType BYTE = new BasicType(Constants.T_BYTE);
+    public static final BasicType LONG = new BasicType(Constants.T_LONG);
+    public static final BasicType DOUBLE = new BasicType(Constants.T_DOUBLE);
+    public static final BasicType FLOAT = new BasicType(Constants.T_FLOAT);
+    public static final BasicType CHAR = new BasicType(Constants.T_CHAR);
+    public static final ObjectType OBJECT = ObjectType.getInstance("java.lang.Object");
+    public static final ObjectType CLASS = ObjectType.getInstance("java.lang.Class");
+    public static final ObjectType STRING = ObjectType.getInstance("java.lang.String");
+    public static final ObjectType STRINGBUFFER = ObjectType.getInstance("java.lang.StringBuffer");
+    public static final ObjectType THROWABLE = ObjectType.getInstance("java.lang.Throwable");
+    public static final Type[] NO_ARGS = new Type[0];
+    public static final ReferenceType NULL = new ReferenceType() {
+
+        private static final long serialVersionUID = 4526765862386946282L;
+    };
+    public static final Type UNKNOWN = new Type(Constants.T_UNKNOWN, "<unknown object>") {
+
+        private static final long serialVersionUID = 1321113605813486066L;
+    };
+
+
+    protected Type(byte t, String s) {
+        type = t;
+        signature = s;
+    }
+
+
+    /**
+     * @return hashcode of Type
+     */
+    @Override
+    public int hashCode() {
+        return type ^ signature.hashCode();
+    }
+
+
+    /**
+     * @return whether the Types are equal
+     */
+    @Override
+    public boolean equals(Object o) {
+          if (o instanceof Type) {
+              Type t = (Type)o;
+              return (type == t.type) && signature.equals(t.signature);
+          }
+          return false;
+    }
+
+
+    /**
+     * @return signature for given type.
+     */
+    public String getSignature() {
+        return signature;
+    }
+
+
+    /**
+     * @return type as defined in Constants
+     */
+    public byte getType() {
+        return type;
+    }
+
+    /**
+     * boolean, short and char variable are considered as int in the stack or local variable area.
+     * Returns {@link Type#INT} for {@link Type#BOOLEAN}, {@link Type#SHORT} or {@link Type#CHAR}, otherwise
+     * returns the given type.
+     * @see OperandStack#push(Type)
+     * @see LocalVariables#set(int, Type)
+     */
+    public Type normalizeForStackOrLocal(){
+        if (this == Type.BOOLEAN || this == Type.BYTE || this == Type.SHORT || this == Type.CHAR){
+            return Type.INT;
+        }
+        return this;
+    }
+
+    /**
+     * @return stack size of this type (2 for long and double, 0 for void, 1 otherwise)
+     */
+    public int getSize() {
+        switch (type) {
+            case Constants.T_DOUBLE:
+            case Constants.T_LONG:
+                return 2;
+            case Constants.T_VOID:
+                return 0;
+            default:
+                return 1;
+        }
+    }
+
+
+    /**
+     * @return Type string, e.g. `int[]'
+     */
+    @Override
+    public String toString() {
+        return ((this.equals(Type.NULL) || (type >= Constants.T_UNKNOWN))) ? signature : Utility
+                .signatureToString(signature, false);
+    }
+
+
+    /**
+     * Convert type to Java method signature, e.g. int[] f(java.lang.String x)
+     * becomes (Ljava/lang/String;)[I
+     *
+     * @param return_type what the method returns
+     * @param arg_types what are the argument types
+     * @return method signature for given type(s).
+     */
+    public static String getMethodSignature( Type return_type, Type[] arg_types ) {
+        StringBuilder buf = new StringBuilder("(");
+        if (arg_types != null) {
+            for (Type arg_type : arg_types) {
+                buf.append(arg_type.getSignature());
+            }
+        }
+        buf.append(')');
+        buf.append(return_type.getSignature());
+        return buf.toString();
+    }
+
+    private static final ThreadLocal<Integer> consumed_chars = new ThreadLocal<Integer>() {
+
+        @Override
+        protected Integer initialValue() {
+            return Integer.valueOf(0);
+        }
+    };//int consumed_chars=0; // Remember position in string, see getArgumentTypes
+
+
+    private static int unwrap( ThreadLocal<Integer> tl ) {
+        return tl.get().intValue();
+    }
+
+
+    private static void wrap( ThreadLocal<Integer> tl, int value ) {
+        tl.set(Integer.valueOf(value));
+    }
+
+
+    /**
+     * Convert signature to a Type object.
+     * @param signature signature string such as Ljava/lang/String;
+     * @return type object
+     */
+    public static Type getType( String signature ) throws StringIndexOutOfBoundsException {
+        byte type = Utility.typeOfSignature(signature);
+        if (type <= Constants.T_VOID) {
+            //corrected concurrent private static field acess
+            wrap(consumed_chars, 1);
+            return BasicType.getType(type);
+        } else if (type == Constants.T_ARRAY) {
+            int dim = 0;
+            do { // Count dimensions
+                dim++;
+            } while (signature.charAt(dim) == '[');
+            // Recurse, but just once, if the signature is ok
+            Type t = getType(signature.substring(dim));
+            //corrected concurrent private static field acess
+            //  consumed_chars += dim; // update counter - is replaced by
+            int _temp = unwrap(consumed_chars) + dim;
+            wrap(consumed_chars, _temp);
+            return new ArrayType(t, dim);
+        } else { // type == T_REFERENCE
+            int index = signature.indexOf(';'); // Look for closing `;'
+            if (index < 0) {
+                throw new ClassFormatException("Invalid signature: " + signature);
+            }
+            //corrected concurrent private static field acess
+            wrap(consumed_chars, index + 1); // "Lblabla;" `L' and `;' are removed
+            return ObjectType.getInstance(signature.substring(1, index).replace('/', '.'));
+        }
+    }
+
+
+    /**
+     * Convert return value of a method (signature) to a Type object.
+     *
+     * @param signature signature string such as (Ljava/lang/String;)V
+     * @return return type
+     */
+    public static Type getReturnType( String signature ) {
+        try {
+            // Read return type after `)'
+            int index = signature.lastIndexOf(')') + 1;
+            return getType(signature.substring(index));
+        } catch (StringIndexOutOfBoundsException e) { // Should never occur
+            throw new ClassFormatException("Invalid method signature: " + signature, e);
+        }
+    }
+
+
+    /**
+     * Convert arguments of a method (signature) to an array of Type objects.
+     * @param signature signature string such as (Ljava/lang/String;)V
+     * @return array of argument types
+     */
+    public static Type[] getArgumentTypes( String signature ) {
+        List<Type> vec = new ArrayList<Type>();
+        int index;
+        Type[] types;
+        try { // Read all declarations between for `(' and `)'
+            if (signature.charAt(0) != '(') {
+                throw new ClassFormatException("Invalid method signature: " + signature);
+            }
+            index = 1; // current string position
+            while (signature.charAt(index) != ')') {
+                vec.add(getType(signature.substring(index)));
+                //corrected concurrent private static field acess
+                index += unwrap(consumed_chars); // update position
+            }
+        } catch (StringIndexOutOfBoundsException e) { // Should never occur
+            throw new ClassFormatException("Invalid method signature: " + signature, e);
+        }
+        types = new Type[vec.size()];
+        vec.toArray(types);
+        return types;
+    }
+
+
+    /** Convert runtime java.lang.Class to BCEL Type object.
+     * @param cl Java class
+     * @return corresponding Type object
+     */
+    public static Type getType( java.lang.Class<?> cl ) {
+        if (cl == null) {
+            throw new IllegalArgumentException("Class must not be null");
+        }
+        /* That's an amzingly easy case, because getName() returns
+         * the signature. That's what we would have liked anyway.
+         */
+        if (cl.isArray()) {
+            return getType(cl.getName());
+        } else if (cl.isPrimitive()) {
+            if (cl == Integer.TYPE) {
+                return INT;
+            } else if (cl == Void.TYPE) {
+                return VOID;
+            } else if (cl == Double.TYPE) {
+                return DOUBLE;
+            } else if (cl == Float.TYPE) {
+                return FLOAT;
+            } else if (cl == Boolean.TYPE) {
+                return BOOLEAN;
+            } else if (cl == Byte.TYPE) {
+                return BYTE;
+            } else if (cl == Short.TYPE) {
+                return SHORT;
+            } else if (cl == Byte.TYPE) {
+                return BYTE;
+            } else if (cl == Long.TYPE) {
+                return LONG;
+            } else if (cl == Character.TYPE) {
+                return CHAR;
+            } else {
+                throw new IllegalStateException("Ooops, what primitive type is " + cl);
+            }
+        } else { // "Real" class
+            return ObjectType.getInstance(cl.getName());
+        }
+    }
+
+
+    /**
+     * Convert runtime java.lang.Class[] to BCEL Type objects.
+     * @param classes an array of runtime class objects
+     * @return array of corresponding Type objects
+     */
+    public static Type[] getTypes( java.lang.Class<?>[] classes ) {
+        Type[] ret = new Type[classes.length];
+        for (int i = 0; i < ret.length; i++) {
+            ret[i] = getType(classes[i]);
+        }
+        return ret;
+    }
+
+
+    public static String getSignature( java.lang.reflect.Method meth ) {
+        StringBuilder sb = new StringBuilder("(");
+        Class<?>[] params = meth.getParameterTypes(); // avoid clone
+        for (Class<?> param : params) {
+            sb.append(getType(param).getSignature());
+        }
+        sb.append(")");
+        sb.append(getType(meth.getReturnType()).getSignature());
+        return sb.toString();
+    }
+
+    static int size(int coded) {
+        return coded & 3;
+    }
+
+    static int consumed(int coded) {
+        return coded >> 2;
+    }
+
+    static int encode(int size, int consumed) {
+        return consumed << 2 | size;
+    }
+
+    static int getArgumentTypesSize( String signature ) {
+        int res = 0;
+        int index;
+        try { // Read all declarations between for `(' and `)'
+            if (signature.charAt(0) != '(') {
+                throw new ClassFormatException("Invalid method signature: " + signature);
+            }
+            index = 1; // current string position
+            while (signature.charAt(index) != ')') {
+                int coded = getTypeSize(signature.substring(index));
+                res += size(coded);
+                index += consumed(coded);
+            }
+        } catch (StringIndexOutOfBoundsException e) { // Should never occur
+            throw new ClassFormatException("Invalid method signature: " + signature, e);
+        }
+        return res;
+    }
+
+    static int getTypeSize( String signature ) throws StringIndexOutOfBoundsException {
+        byte type = Utility.typeOfSignature(signature);
+        if (type <= Constants.T_VOID) {
+            return encode(BasicType.getType(type).getSize(), 1);
+        } else if (type == Constants.T_ARRAY) {
+            int dim = 0;
+            do { // Count dimensions
+                dim++;
+            } while (signature.charAt(dim) == '[');
+            // Recurse, but just once, if the signature is ok
+            int consumed = consumed(getTypeSize(signature.substring(dim)));
+            return encode(1, dim + consumed);
+        } else { // type == T_REFERENCE
+            int index = signature.indexOf(';'); // Look for closing `;'
+            if (index < 0) {
+                throw new ClassFormatException("Invalid signature: " + signature);
+            }
+            return encode(1, index + 1);
+        }
+    }
+
+
+    static int getReturnTypeSize(String signature) {
+        int index = signature.lastIndexOf(')') + 1;
+        return Type.size(getTypeSize(signature.substring(index)));
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/TypedInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/TypedInstruction.java
new file mode 100644
index 0000000..92204a3
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/TypedInstruction.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Get the type associated with an instruction, int for ILOAD, or the type
+ * of the field of a PUTFIELD instruction, e.g..
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface TypedInstruction {
+
+    Type getType( ConstantPoolGen cpg );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/UnconditionalBranch.java b/src/main/java/org/apache/commons/bcel6/generic/UnconditionalBranch.java
new file mode 100644
index 0000000..b1b79f1
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/UnconditionalBranch.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denotes an instruction to perform an unconditional branch, i.e., GOTO, JSR.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+
+ * @see GOTO
+ * @see JSR
+ */
+public interface UnconditionalBranch {
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/VariableLengthInstruction.java b/src/main/java/org/apache/commons/bcel6/generic/VariableLengthInstruction.java
new file mode 100644
index 0000000..2cfff02
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/VariableLengthInstruction.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Denotes an instruction to be a variable length instruction, such as
+ * GOTO, JSR, LOOKUPSWITCH and TABLESWITCH.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+
+ * @see GOTO
+ * @see JSR
+ * @see LOOKUPSWITCH
+ * @see TABLESWITCH
+ */
+public interface VariableLengthInstruction {
+}
diff --git a/src/main/java/org/apache/commons/bcel6/generic/Visitor.java b/src/main/java/org/apache/commons/bcel6/generic/Visitor.java
new file mode 100644
index 0000000..0a2f4c8
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/generic/Visitor.java
@@ -0,0 +1,572 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.generic;
+
+/**
+ * Interface implementing the Visitor pattern programming style.
+ * I.e., a class that implements this interface can handle all types of
+ * instructions with the properly typed methods just by calling the accept()
+ * method.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public interface Visitor {
+
+    void visitStackInstruction( StackInstruction obj );
+
+
+    void visitLocalVariableInstruction( LocalVariableInstruction obj );
+
+
+    void visitBranchInstruction( BranchInstruction obj );
+
+
+    void visitLoadClass( LoadClass obj );
+
+
+    void visitFieldInstruction( FieldInstruction obj );
+
+
+    void visitIfInstruction( IfInstruction obj );
+
+
+    void visitConversionInstruction( ConversionInstruction obj );
+
+
+    void visitPopInstruction( PopInstruction obj );
+
+
+    void visitStoreInstruction( StoreInstruction obj );
+
+
+    void visitTypedInstruction( TypedInstruction obj );
+
+
+    void visitSelect( Select obj );
+
+
+    void visitJsrInstruction( JsrInstruction obj );
+
+
+    void visitGotoInstruction( GotoInstruction obj );
+
+
+    void visitUnconditionalBranch( UnconditionalBranch obj );
+
+
+    void visitPushInstruction( PushInstruction obj );
+
+
+    void visitArithmeticInstruction( ArithmeticInstruction obj );
+
+
+    void visitCPInstruction( CPInstruction obj );
+
+
+    void visitInvokeInstruction( InvokeInstruction obj );
+
+
+    void visitArrayInstruction( ArrayInstruction obj );
+
+
+    void visitAllocationInstruction( AllocationInstruction obj );
+
+
+    void visitReturnInstruction( ReturnInstruction obj );
+
+
+    void visitFieldOrMethod( FieldOrMethod obj );
+
+
+    void visitConstantPushInstruction( ConstantPushInstruction obj );
+
+
+    void visitExceptionThrower( ExceptionThrower obj );
+
+
+    void visitLoadInstruction( LoadInstruction obj );
+
+
+    void visitVariableLengthInstruction( VariableLengthInstruction obj );
+
+
+    void visitStackProducer( StackProducer obj );
+
+
+    void visitStackConsumer( StackConsumer obj );
+
+
+    void visitACONST_NULL( ACONST_NULL obj );
+
+
+    void visitGETSTATIC( GETSTATIC obj );
+
+
+    void visitIF_ICMPLT( IF_ICMPLT obj );
+
+
+    void visitMONITOREXIT( MONITOREXIT obj );
+
+
+    void visitIFLT( IFLT obj );
+
+
+    void visitLSTORE( LSTORE obj );
+
+
+    void visitPOP2( POP2 obj );
+
+
+    void visitBASTORE( BASTORE obj );
+
+
+    void visitISTORE( ISTORE obj );
+
+
+    void visitCHECKCAST( CHECKCAST obj );
+
+
+    void visitFCMPG( FCMPG obj );
+
+
+    void visitI2F( I2F obj );
+
+
+    void visitATHROW( ATHROW obj );
+
+
+    void visitDCMPL( DCMPL obj );
+
+
+    void visitARRAYLENGTH( ARRAYLENGTH obj );
+
+
+    void visitDUP( DUP obj );
+
+
+    void visitINVOKESTATIC( INVOKESTATIC obj );
+
+
+    void visitLCONST( LCONST obj );
+
+
+    void visitDREM( DREM obj );
+
+
+    void visitIFGE( IFGE obj );
+
+
+    void visitCALOAD( CALOAD obj );
+
+
+    void visitLASTORE( LASTORE obj );
+
+
+    void visitI2D( I2D obj );
+
+
+    void visitDADD( DADD obj );
+
+
+    void visitINVOKESPECIAL( INVOKESPECIAL obj );
+
+
+    void visitIAND( IAND obj );
+
+
+    void visitPUTFIELD( PUTFIELD obj );
+
+
+    void visitILOAD( ILOAD obj );
+
+
+    void visitDLOAD( DLOAD obj );
+
+
+    void visitDCONST( DCONST obj );
+
+
+    void visitNEW( NEW obj );
+
+
+    void visitIFNULL( IFNULL obj );
+
+
+    void visitLSUB( LSUB obj );
+
+
+    void visitL2I( L2I obj );
+
+
+    void visitISHR( ISHR obj );
+
+
+    void visitTABLESWITCH( TABLESWITCH obj );
+
+
+    void visitIINC( IINC obj );
+
+
+    void visitDRETURN( DRETURN obj );
+
+
+    void visitFSTORE( FSTORE obj );
+
+
+    void visitDASTORE( DASTORE obj );
+
+
+    void visitIALOAD( IALOAD obj );
+
+
+    void visitDDIV( DDIV obj );
+
+
+    void visitIF_ICMPGE( IF_ICMPGE obj );
+
+
+    void visitLAND( LAND obj );
+
+
+    void visitIDIV( IDIV obj );
+
+
+    void visitLOR( LOR obj );
+
+
+    void visitCASTORE( CASTORE obj );
+
+
+    void visitFREM( FREM obj );
+
+
+    void visitLDC( LDC obj );
+
+
+    void visitBIPUSH( BIPUSH obj );
+
+
+    void visitDSTORE( DSTORE obj );
+
+
+    void visitF2L( F2L obj );
+
+
+    void visitFMUL( FMUL obj );
+
+
+    void visitLLOAD( LLOAD obj );
+
+
+    void visitJSR( JSR obj );
+
+
+    void visitFSUB( FSUB obj );
+
+
+    void visitSASTORE( SASTORE obj );
+
+
+    void visitALOAD( ALOAD obj );
+
+
+    void visitDUP2_X2( DUP2_X2 obj );
+
+
+    void visitRETURN( RETURN obj );
+
+
+    void visitDALOAD( DALOAD obj );
+
+
+    void visitSIPUSH( SIPUSH obj );
+
+
+    void visitDSUB( DSUB obj );
+
+
+    void visitL2F( L2F obj );
+
+
+    void visitIF_ICMPGT( IF_ICMPGT obj );
+
+
+    void visitF2D( F2D obj );
+
+
+    void visitI2L( I2L obj );
+
+
+    void visitIF_ACMPNE( IF_ACMPNE obj );
+
+
+    void visitPOP( POP obj );
+
+
+    void visitI2S( I2S obj );
+
+
+    void visitIFEQ( IFEQ obj );
+
+
+    void visitSWAP( SWAP obj );
+
+
+    void visitIOR( IOR obj );
+
+
+    void visitIREM( IREM obj );
+
+
+    void visitIASTORE( IASTORE obj );
+
+
+    void visitNEWARRAY( NEWARRAY obj );
+
+
+    void visitINVOKEINTERFACE( INVOKEINTERFACE obj );
+
+
+    void visitINEG( INEG obj );
+
+
+    void visitLCMP( LCMP obj );
+
+
+    void visitJSR_W( JSR_W obj );
+
+
+    void visitMULTIANEWARRAY( MULTIANEWARRAY obj );
+
+
+    void visitDUP_X2( DUP_X2 obj );
+
+
+    void visitSALOAD( SALOAD obj );
+
+
+    void visitIFNONNULL( IFNONNULL obj );
+
+
+    void visitDMUL( DMUL obj );
+
+
+    void visitIFNE( IFNE obj );
+
+
+    void visitIF_ICMPLE( IF_ICMPLE obj );
+
+
+    void visitLDC2_W( LDC2_W obj );
+
+
+    void visitGETFIELD( GETFIELD obj );
+
+
+    void visitLADD( LADD obj );
+
+
+    void visitNOP( NOP obj );
+
+
+    void visitFALOAD( FALOAD obj );
+
+
+    void visitINSTANCEOF( INSTANCEOF obj );
+
+
+    void visitIFLE( IFLE obj );
+
+
+    void visitLXOR( LXOR obj );
+
+
+    void visitLRETURN( LRETURN obj );
+
+
+    void visitFCONST( FCONST obj );
+
+
+    void visitIUSHR( IUSHR obj );
+
+
+    void visitBALOAD( BALOAD obj );
+
+
+    void visitDUP2( DUP2 obj );
+
+
+    void visitIF_ACMPEQ( IF_ACMPEQ obj );
+
+
+    void visitIMPDEP1( IMPDEP1 obj );
+
+
+    void visitMONITORENTER( MONITORENTER obj );
+
+
+    void visitLSHL( LSHL obj );
+
+
+    void visitDCMPG( DCMPG obj );
+
+
+    void visitD2L( D2L obj );
+
+
+    void visitIMPDEP2( IMPDEP2 obj );
+
+
+    void visitL2D( L2D obj );
+
+
+    void visitRET( RET obj );
+
+
+    void visitIFGT( IFGT obj );
+
+
+    void visitIXOR( IXOR obj );
+
+
+    void visitINVOKEVIRTUAL( INVOKEVIRTUAL obj );
+
+
+    void visitINVOKEDYNAMIC( INVOKEDYNAMIC obj );
+
+
+    void visitFASTORE( FASTORE obj );
+
+
+    void visitIRETURN( IRETURN obj );
+
+
+    void visitIF_ICMPNE( IF_ICMPNE obj );
+
+
+    void visitFLOAD( FLOAD obj );
+
+
+    void visitLDIV( LDIV obj );
+
+
+    void visitPUTSTATIC( PUTSTATIC obj );
+
+
+    void visitAALOAD( AALOAD obj );
+
+
+    void visitD2I( D2I obj );
+
+
+    void visitIF_ICMPEQ( IF_ICMPEQ obj );
+
+
+    void visitAASTORE( AASTORE obj );
+
+
+    void visitARETURN( ARETURN obj );
+
+
+    void visitDUP2_X1( DUP2_X1 obj );
+
+
+    void visitFNEG( FNEG obj );
+
+
+    void visitGOTO_W( GOTO_W obj );
+
+
+    void visitD2F( D2F obj );
+
+
+    void visitGOTO( GOTO obj );
+
+
+    void visitISUB( ISUB obj );
+
+
+    void visitF2I( F2I obj );
+
+
+    void visitDNEG( DNEG obj );
+
+
+    void visitICONST( ICONST obj );
+
+
+    void visitFDIV( FDIV obj );
+
+
+    void visitI2B( I2B obj );
+
+
+    void visitLNEG( LNEG obj );
+
+
+    void visitLREM( LREM obj );
+
+
+    void visitIMUL( IMUL obj );
+
+
+    void visitIADD( IADD obj );
+
+
+    void visitLSHR( LSHR obj );
+
+
+    void visitLOOKUPSWITCH( LOOKUPSWITCH obj );
+
+
+    void visitDUP_X1( DUP_X1 obj );
+
+
+    void visitFCMPL( FCMPL obj );
+
+
+    void visitI2C( I2C obj );
+
+
+    void visitLMUL( LMUL obj );
+
+
+    void visitLUSHR( LUSHR obj );
+
+
+    void visitISHL( ISHL obj );
+
+
+    void visitLALOAD( LALOAD obj );
+
+
+    void visitASTORE( ASTORE obj );
+
+
+    void visitANEWARRAY( ANEWARRAY obj );
+
+
+    void visitFRETURN( FRETURN obj );
+
+
+    void visitFADD( FADD obj );
+
+
+    void visitBREAKPOINT( BREAKPOINT obj );
+}
diff --git a/src/main/java/org/apache/bcel/generic/package.html b/src/main/java/org/apache/commons/bcel6/generic/package.html
similarity index 100%
rename from src/main/java/org/apache/bcel/generic/package.html
rename to src/main/java/org/apache/commons/bcel6/generic/package.html
diff --git a/src/main/java/org/apache/bcel/package.html b/src/main/java/org/apache/commons/bcel6/package.html
similarity index 100%
rename from src/main/java/org/apache/bcel/package.html
rename to src/main/java/org/apache/commons/bcel6/package.html
diff --git a/src/main/java/org/apache/commons/bcel6/util/AttributeHTML.java b/src/main/java/org/apache/commons/bcel6/util/AttributeHTML.java
new file mode 100644
index 0000000..b174a74
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/AttributeHTML.java
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.CodeException;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ConstantValue;
+import org.apache.commons.bcel6.classfile.ExceptionTable;
+import org.apache.commons.bcel6.classfile.InnerClass;
+import org.apache.commons.bcel6.classfile.InnerClasses;
+import org.apache.commons.bcel6.classfile.LineNumber;
+import org.apache.commons.bcel6.classfile.LineNumberTable;
+import org.apache.commons.bcel6.classfile.LocalVariable;
+import org.apache.commons.bcel6.classfile.LocalVariableTable;
+import org.apache.commons.bcel6.classfile.SourceFile;
+import org.apache.commons.bcel6.classfile.Utility;
+
+/**
+ * Convert found attributes into HTML file.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * 
+ */
+final class AttributeHTML implements org.apache.commons.bcel6.Constants {
+
+    private final String class_name; // name of current class
+    private final PrintWriter file; // file to write to
+    private int attr_count = 0;
+    private final ConstantHTML constant_html;
+    private final ConstantPool constant_pool;
+
+
+    AttributeHTML(String dir, String class_name, ConstantPool constant_pool,
+            ConstantHTML constant_html) throws IOException {
+        this.class_name = class_name;
+        this.constant_pool = constant_pool;
+        this.constant_html = constant_html;
+        file = new PrintWriter(new FileOutputStream(dir + class_name + "_attributes.html"));
+        file.println("<HTML><BODY BGCOLOR=\"#C0C0C0\"><TABLE BORDER=0>");
+    }
+
+
+    private String codeLink( int link, int method_number ) {
+        return "<A HREF=\"" + class_name + "_code.html#code" + method_number + "@" + link
+                + "\" TARGET=Code>" + link + "</A>";
+    }
+
+
+    final void close() {
+        file.println("</TABLE></BODY></HTML>");
+        file.close();
+    }
+
+
+    final void writeAttribute( Attribute attribute, String anchor ) {
+        writeAttribute(attribute, anchor, 0);
+    }
+
+
+    final void writeAttribute( Attribute attribute, String anchor, int method_number ) {
+        byte tag = attribute.getTag();
+        int index;
+        if (tag == ATTR_UNKNOWN) {
+            return;
+        }
+        attr_count++; // Increment number of attributes found so far
+        if (attr_count % 2 == 0) {
+            file.print("<TR BGCOLOR=\"#C0C0C0\"><TD>");
+        } else {
+            file.print("<TR BGCOLOR=\"#A0A0A0\"><TD>");
+        }
+        file.println("<H4><A NAME=\"" + anchor + "\">" + attr_count + " " + ATTRIBUTE_NAMES[tag]
+                + "</A></H4>");
+        /* Handle different attributes
+         */
+        switch (tag) {
+            case ATTR_CODE:
+                Code c = (Code) attribute;
+                // Some directly printable values
+                file.print("<UL><LI>Maximum stack size = " + c.getMaxStack()
+                        + "</LI>\n<LI>Number of local variables = " + c.getMaxLocals()
+                        + "</LI>\n<LI><A HREF=\"" + class_name + "_code.html#method"
+                        + method_number + "\" TARGET=Code>Byte code</A></LI></UL>\n");
+                // Get handled exceptions and list them
+                CodeException[] ce = c.getExceptionTable();
+                int len = ce.length;
+                if (len > 0) {
+                    file.print("<P><B>Exceptions handled</B><UL>");
+                    for (CodeException cex : ce) {
+                        int catch_type = cex.getCatchType(); // Index in constant pool
+                        file.print("<LI>");
+                        if (catch_type != 0) {
+                            file.print(constant_html.referenceConstant(catch_type)); // Create Link to _cp.html
+                        } else {
+                            file.print("Any Exception");
+                        }
+                        file.print("<BR>(Ranging from lines "
+                                + codeLink(cex.getStartPC(), method_number) + " to "
+                                + codeLink(cex.getEndPC(), method_number) + ", handled at line "
+                                + codeLink(cex.getHandlerPC(), method_number) + ")</LI>");
+                    }
+                    file.print("</UL>");
+                }
+                break;
+            case ATTR_CONSTANT_VALUE:
+                index = ((ConstantValue) attribute).getConstantValueIndex();
+                // Reference _cp.html
+                file.print("<UL><LI><A HREF=\"" + class_name + "_cp.html#cp" + index
+                        + "\" TARGET=\"ConstantPool\">Constant value index(" + index
+                        + ")</A></UL>\n");
+                break;
+            case ATTR_SOURCE_FILE:
+                index = ((SourceFile) attribute).getSourceFileIndex();
+                // Reference _cp.html
+                file.print("<UL><LI><A HREF=\"" + class_name + "_cp.html#cp" + index
+                        + "\" TARGET=\"ConstantPool\">Source file index(" + index + ")</A></UL>\n");
+                break;
+            case ATTR_EXCEPTIONS:
+                // List thrown exceptions
+                int[] indices = ((ExceptionTable) attribute).getExceptionIndexTable();
+                file.print("<UL>");
+            for (int indice : indices) {
+                file.print("<LI><A HREF=\"" + class_name + "_cp.html#cp" + indice
+                        + "\" TARGET=\"ConstantPool\">Exception class index(" + indice
+                        + ")</A>\n");
+            }
+                file.print("</UL>\n");
+                break;
+            case ATTR_LINE_NUMBER_TABLE:
+                LineNumber[] line_numbers = ((LineNumberTable) attribute).getLineNumberTable();
+                // List line number pairs
+                file.print("<P>");
+                for (int i = 0; i < line_numbers.length; i++) {
+                    file.print("(" + line_numbers[i].getStartPC() + ",&nbsp;"
+                            + line_numbers[i].getLineNumber() + ")");
+                    if (i < line_numbers.length - 1) {
+                        file.print(", "); // breakable
+                    }
+                }
+                break;
+            case ATTR_LOCAL_VARIABLE_TABLE:
+                LocalVariable[] vars = ((LocalVariableTable) attribute).getLocalVariableTable();
+                // List name, range and type
+                file.print("<UL>");
+            for (LocalVariable var : vars) {
+                index = var.getSignatureIndex();
+                String signature = ((ConstantUtf8) constant_pool.getConstant(index,
+                        CONSTANT_Utf8)).getBytes();
+                signature = Utility.signatureToString(signature, false);
+                int start = var.getStartPC();
+                int end = (start + var.getLength());
+                file.println("<LI>" + Class2HTML.referenceType(signature) + "&nbsp;<B>"
+                        + var.getName() + "</B> in slot %" + var.getIndex()
+                        + "<BR>Valid from lines " + "<A HREF=\"" + class_name
+                        + "_code.html#code" + method_number + "@" + start + "\" TARGET=Code>"
+                        + start + "</A> to " + "<A HREF=\"" + class_name + "_code.html#code"
+                        + method_number + "@" + end + "\" TARGET=Code>" + end + "</A></LI>");
+            }
+                file.print("</UL>\n");
+                break;
+            case ATTR_INNER_CLASSES:
+                InnerClass[] classes = ((InnerClasses) attribute).getInnerClasses();
+                // List inner classes
+                file.print("<UL>");
+            for (InnerClass classe : classes) {
+                String name, access;
+                index = classe.getInnerNameIndex();
+                if (index > 0) {
+                    name = ((ConstantUtf8) constant_pool.getConstant(index, CONSTANT_Utf8))
+                            .getBytes();
+                } else {
+                    name = "&lt;anonymous&gt;";
+                }
+                access = Utility.accessToString(classe.getInnerAccessFlags());
+                file.print("<LI><FONT COLOR=\"#FF0000\">" + access + "</FONT> "
+                        + constant_html.referenceConstant(classe.getInnerClassIndex())
+                        + " in&nbsp;class "
+                        + constant_html.referenceConstant(classe.getOuterClassIndex())
+                        + " named " + name + "</LI>\n");
+            }
+                file.print("</UL>\n");
+                break;
+            default: // Such as Unknown attribute or Deprecated
+                file.print("<P>" + attribute);
+        }
+        file.println("</TD></TR>");
+        file.flush();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/BCELComparator.java b/src/main/java/org/apache/commons/bcel6/util/BCELComparator.java
new file mode 100644
index 0000000..28017ce
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/BCELComparator.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+/**
+ * Used for BCEL comparison strategy
+ * 
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @version $Id$
+ * @since 5.2
+ */
+public interface BCELComparator {
+
+    /**
+     * Compare two objects and return what THIS.equals(THAT) should return
+     * 
+     * @param THIS
+     * @param THAT
+     * @return true if and only if THIS equals THAT
+     */
+    boolean equals( Object THIS, Object THAT );
+
+
+    /**
+     * Return hashcode for THIS.hashCode()
+     * 
+     * @param THIS
+     * @return hashcode for THIS.hashCode()
+     */
+    int hashCode( Object THIS );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/BCELFactory.java b/src/main/java/org/apache/commons/bcel6/util/BCELFactory.java
new file mode 100644
index 0000000..53b7e1f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/BCELFactory.java
@@ -0,0 +1,347 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.generic.AllocationInstruction;
+import org.apache.commons.bcel6.generic.ArrayInstruction;
+import org.apache.commons.bcel6.generic.ArrayType;
+import org.apache.commons.bcel6.generic.BranchHandle;
+import org.apache.commons.bcel6.generic.BranchInstruction;
+import org.apache.commons.bcel6.generic.CHECKCAST;
+import org.apache.commons.bcel6.generic.CPInstruction;
+import org.apache.commons.bcel6.generic.CodeExceptionGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.ConstantPushInstruction;
+import org.apache.commons.bcel6.generic.EmptyVisitor;
+import org.apache.commons.bcel6.generic.FieldInstruction;
+import org.apache.commons.bcel6.generic.IINC;
+import org.apache.commons.bcel6.generic.INSTANCEOF;
+import org.apache.commons.bcel6.generic.Instruction;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InvokeInstruction;
+import org.apache.commons.bcel6.generic.LDC;
+import org.apache.commons.bcel6.generic.LDC2_W;
+import org.apache.commons.bcel6.generic.LocalVariableInstruction;
+import org.apache.commons.bcel6.generic.MULTIANEWARRAY;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.NEWARRAY;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.RET;
+import org.apache.commons.bcel6.generic.ReturnInstruction;
+import org.apache.commons.bcel6.generic.Select;
+import org.apache.commons.bcel6.generic.Type;
+
+/**
+ * Factory creates il.append() statements, and sets instruction targets.
+ * A helper class for BCELifier.
+ *
+ * @see BCELifier
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+class BCELFactory extends EmptyVisitor {
+
+    private final MethodGen _mg;
+    private final PrintWriter _out;
+    private final ConstantPoolGen _cp;
+
+
+    BCELFactory(MethodGen mg, PrintWriter out) {
+        _mg = mg;
+        _cp = mg.getConstantPool();
+        _out = out;
+    }
+
+    private final Map<Instruction, InstructionHandle> branch_map = new HashMap<Instruction, InstructionHandle>();
+
+
+    public void start() {
+        if (!_mg.isAbstract() && !_mg.isNative()) {
+            for (InstructionHandle ih = _mg.getInstructionList().getStart(); ih != null; ih = ih
+                    .getNext()) {
+                Instruction i = ih.getInstruction();
+                if (i instanceof BranchInstruction) {
+                    branch_map.put(i, ih); // memorize container
+                }
+                if (ih.hasTargeters()) {
+                    if (i instanceof BranchInstruction) {
+                        _out.println("    InstructionHandle ih_" + ih.getPosition() + ";");
+                    } else {
+                        _out.print("    InstructionHandle ih_" + ih.getPosition() + " = ");
+                    }
+                } else {
+                    _out.print("    ");
+                }
+                if (!visitInstruction(i)) {
+                    i.accept(this);
+                }
+            }
+            updateBranchTargets();
+            updateExceptionHandlers();
+        }
+    }
+
+
+    private boolean visitInstruction( Instruction i ) {
+        short opcode = i.getOpcode();
+        if ((InstructionConstants.INSTRUCTIONS[opcode] != null)
+                && !(i instanceof ConstantPushInstruction) && !(i instanceof ReturnInstruction)) { // Handled below
+            _out.println("il.append(InstructionConstants."
+                    + i.getName().toUpperCase(Locale.ENGLISH) + ");");
+            return true;
+        }
+        return false;
+    }
+
+
+    @Override
+    public void visitLocalVariableInstruction( LocalVariableInstruction i ) {
+        short opcode = i.getOpcode();
+        Type type = i.getType(_cp);
+        if (opcode == Constants.IINC) {
+            _out.println("il.append(new IINC(" + i.getIndex() + ", " + ((IINC) i).getIncrement()
+                    + "));");
+        } else {
+            String kind = (opcode < Constants.ISTORE) ? "Load" : "Store";
+            _out.println("il.append(_factory.create" + kind + "(" + BCELifier.printType(type)
+                    + ", " + i.getIndex() + "));");
+        }
+    }
+
+
+    @Override
+    public void visitArrayInstruction( ArrayInstruction i ) {
+        short opcode = i.getOpcode();
+        Type type = i.getType(_cp);
+        String kind = (opcode < Constants.IASTORE) ? "Load" : "Store";
+        _out.println("il.append(_factory.createArray" + kind + "(" + BCELifier.printType(type)
+                + "));");
+    }
+
+
+    @Override
+    public void visitFieldInstruction( FieldInstruction i ) {
+        short opcode = i.getOpcode();
+        String class_name = i.getClassName(_cp);
+        String field_name = i.getFieldName(_cp);
+        Type type = i.getFieldType(_cp);
+        _out.println("il.append(_factory.createFieldAccess(\"" + class_name + "\", \"" + field_name
+                + "\", " + BCELifier.printType(type) + ", " + "Constants."
+                + Constants.OPCODE_NAMES[opcode].toUpperCase(Locale.ENGLISH) + "));");
+    }
+
+
+    @Override
+    public void visitInvokeInstruction( InvokeInstruction i ) {
+        short opcode = i.getOpcode();
+        String class_name = i.getClassName(_cp);
+        String method_name = i.getMethodName(_cp);
+        Type type = i.getReturnType(_cp);
+        Type[] arg_types = i.getArgumentTypes(_cp);
+        _out.println("il.append(_factory.createInvoke(\"" + class_name + "\", \"" + method_name
+                + "\", " + BCELifier.printType(type) + ", "
+                + BCELifier.printArgumentTypes(arg_types) + ", " + "Constants."
+                + Constants.OPCODE_NAMES[opcode].toUpperCase(Locale.ENGLISH) + "));");
+    }
+
+
+    @Override
+    public void visitAllocationInstruction( AllocationInstruction i ) {
+        Type type;
+        if (i instanceof CPInstruction) {
+            type = ((CPInstruction) i).getType(_cp);
+        } else {
+            type = ((NEWARRAY) i).getType();
+        }
+        short opcode = ((Instruction) i).getOpcode();
+        int dim = 1;
+        switch (opcode) {
+            case Constants.NEW:
+                _out.println("il.append(_factory.createNew(\"" + ((ObjectType) type).getClassName()
+                        + "\"));");
+                break;
+            case Constants.MULTIANEWARRAY:
+                dim = ((MULTIANEWARRAY) i).getDimensions();
+                //$FALL-THROUGH$
+            case Constants.ANEWARRAY:
+            case Constants.NEWARRAY:
+                if (type instanceof ArrayType) {
+                    type = ((ArrayType) type).getBasicType();
+                }
+                _out.println("il.append(_factory.createNewArray(" + BCELifier.printType(type)
+                        + ", (short) " + dim + "));");
+                break;
+            default:
+                throw new RuntimeException("Oops: " + opcode);
+        }
+    }
+
+
+    private void createConstant( Object value ) {
+        String embed = value.toString();
+        if (value instanceof String) {
+            embed = '"' + Utility.convertString(embed) + '"';
+        } else if (value instanceof Character) {
+            embed = "(char)0x" + Integer.toHexString(((Character) value).charValue());
+        } else if (value instanceof Float) {
+            embed += "f";
+        } else if (value instanceof Long) {
+            embed += "L";
+        } else if (value instanceof ObjectType){
+            ObjectType ot = (ObjectType) value;
+            embed = "new ObjectType(\""+ot.getClassName()+"\")";
+        }
+
+        _out.println("il.append(new PUSH(_cp, " + embed + "));");
+    }
+
+
+    @Override
+    public void visitLDC( LDC i ) {
+        createConstant(i.getValue(_cp));
+    }
+
+
+    @Override
+    public void visitLDC2_W( LDC2_W i ) {
+        createConstant(i.getValue(_cp));
+    }
+
+
+    @Override
+    public void visitConstantPushInstruction( ConstantPushInstruction i ) {
+        createConstant(i.getValue());
+    }
+
+
+    @Override
+    public void visitINSTANCEOF( INSTANCEOF i ) {
+        Type type = i.getType(_cp);
+        _out.println("il.append(new INSTANCEOF(_cp.addClass(" + BCELifier.printType(type) + ")));");
+    }
+
+
+    @Override
+    public void visitCHECKCAST( CHECKCAST i ) {
+        Type type = i.getType(_cp);
+        _out.println("il.append(_factory.createCheckCast(" + BCELifier.printType(type) + "));");
+    }
+
+
+    @Override
+    public void visitReturnInstruction( ReturnInstruction i ) {
+        Type type = i.getType(_cp);
+        _out.println("il.append(_factory.createReturn(" + BCELifier.printType(type) + "));");
+    }
+
+    // Memorize BranchInstructions that need an update
+    private final List<BranchInstruction> branches = new ArrayList<BranchInstruction>();
+
+
+    @Override
+    public void visitBranchInstruction( BranchInstruction bi ) {
+        BranchHandle bh = (BranchHandle) branch_map.get(bi);
+        int pos = bh.getPosition();
+        String name = bi.getName() + "_" + pos;
+        if (bi instanceof Select) {
+            Select s = (Select) bi;
+            branches.add(bi);
+            StringBuilder args = new StringBuilder("new int[] { ");
+            int[] matchs = s.getMatchs();
+            for (int i = 0; i < matchs.length; i++) {
+                args.append(matchs[i]);
+                if (i < matchs.length - 1) {
+                    args.append(", ");
+                }
+            }
+            args.append(" }");
+            _out.print("Select " + name + " = new " + bi.getName().toUpperCase(Locale.ENGLISH)
+                    + "(" + args + ", new InstructionHandle[] { ");
+            for (int i = 0; i < matchs.length; i++) {
+                _out.print("null");
+                if (i < matchs.length - 1) {
+                    _out.print(", ");
+                }
+            }
+            _out.println(" }, null);");
+        } else {
+            int t_pos = bh.getTarget().getPosition();
+            String target;
+            if (pos > t_pos) {
+                target = "ih_" + t_pos;
+            } else {
+                branches.add(bi);
+                target = "null";
+            }
+            _out.println("    BranchInstruction " + name + " = _factory.createBranchInstruction("
+                    + "Constants." + bi.getName().toUpperCase(Locale.ENGLISH) + ", " + target
+                    + ");");
+        }
+        if (bh.hasTargeters()) {
+            _out.println("    ih_" + pos + " = il.append(" + name + ");");
+        } else {
+            _out.println("    il.append(" + name + ");");
+        }
+    }
+
+
+    @Override
+    public void visitRET( RET i ) {
+        _out.println("il.append(new RET(" + i.getIndex() + ")));");
+    }
+
+
+    private void updateBranchTargets() {
+        for (BranchInstruction bi : branches) {
+            BranchHandle bh = (BranchHandle) branch_map.get(bi);
+            int pos = bh.getPosition();
+            String name = bi.getName() + "_" + pos;
+            int t_pos = bh.getTarget().getPosition();
+            _out.println("    " + name + ".setTarget(ih_" + t_pos + ");");
+            if (bi instanceof Select) {
+                InstructionHandle[] ihs = ((Select) bi).getTargets();
+                for (int j = 0; j < ihs.length; j++) {
+                    t_pos = ihs[j].getPosition();
+                    _out.println("    " + name + ".setTarget(" + j + ", ih_" + t_pos + ");");
+                }
+            }
+        }
+    }
+
+
+    private void updateExceptionHandlers() {
+        CodeExceptionGen[] handlers = _mg.getExceptionHandlers();
+        for (CodeExceptionGen h : handlers) {
+            String type = (h.getCatchType() == null) ? "null" : BCELifier.printType(h
+                    .getCatchType());
+            _out.println("    method.addExceptionHandler(" + "ih_" + h.getStartPC().getPosition()
+                    + ", " + "ih_" + h.getEndPC().getPosition() + ", " + "ih_"
+                    + h.getHandlerPC().getPosition() + ", " + type + ");");
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/BCELifier.java b/src/main/java/org/apache/commons/bcel6/util/BCELifier.java
new file mode 100644
index 0000000..97eb444
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/BCELifier.java
@@ -0,0 +1,273 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.Locale;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.ConstantValue;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.Utility;
+import org.apache.commons.bcel6.generic.ArrayType;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.Type;
+
+/** 
+ * This class takes a given JavaClass object and converts it to a
+ * Java program that creates that very class using BCEL. This
+ * gives new users of BCEL a useful example showing how things
+ * are done with BCEL. It does not cover all features of BCEL,
+ * but tries to mimic hand-written code as close as possible.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
+ */
+public class BCELifier extends org.apache.commons.bcel6.classfile.EmptyVisitor {
+
+    private static final int FLAG_FOR_UNKNOWN = -1;
+    private static final int FLAG_FOR_CLASS = 0;
+    private static final int FLAG_FOR_METHOD = 1;
+    private final JavaClass _clazz;
+    private final PrintWriter _out;
+    private final ConstantPoolGen _cp;
+
+
+    /** @param clazz Java class to "decompile"
+     * @param out where to output Java program
+     */
+    public BCELifier(JavaClass clazz, OutputStream out) {
+        _clazz = clazz;
+        _out = new PrintWriter(out);
+        _cp = new ConstantPoolGen(_clazz.getConstantPool());
+    }
+
+
+    /** Start Java code generation
+     */
+    public void start() {
+        visitJavaClass(_clazz);
+        _out.flush();
+    }
+
+
+    @Override
+    public void visitJavaClass( JavaClass clazz ) {
+        String class_name = clazz.getClassName();
+        String super_name = clazz.getSuperclassName();
+        String package_name = clazz.getPackageName();
+        String inter = Utility.printArray(clazz.getInterfaceNames(), false, true);
+        if (!"".equals(package_name)) {
+            class_name = class_name.substring(package_name.length() + 1);
+            _out.println("package " + package_name + ";");
+            _out.println();
+        }
+        _out.println("import org.apache.commons.bcel6.generic.*;");
+        _out.println("import org.apache.commons.bcel6.classfile.*;");
+        _out.println("import org.apache.commons.bcel6.*;");
+        _out.println("import java.io.*;");
+        _out.println();
+        _out.println("public class " + class_name + "Creator implements Constants {");
+        _out.println("  private InstructionFactory _factory;");
+        _out.println("  private ConstantPoolGen    _cp;");
+        _out.println("  private ClassGen           _cg;");
+        _out.println();
+        _out.println("  public " + class_name + "Creator() {");
+        _out.println("    _cg = new ClassGen(\""
+                + (("".equals(package_name)) ? class_name : package_name + "." + class_name)
+                + "\", \"" + super_name + "\", " + "\"" + clazz.getSourceFileName() + "\", "
+                + printFlags(clazz.getAccessFlags(), FLAG_FOR_CLASS) + ", " + "new String[] { "
+                + inter + " });");
+        _out.println();
+        _out.println("    _cp = _cg.getConstantPool();");
+        _out.println("    _factory = new InstructionFactory(_cg, _cp);");
+        _out.println("  }");
+        _out.println();
+        printCreate();
+        Field[] fields = clazz.getFields();
+        if (fields.length > 0) {
+            _out.println("  private void createFields() {");
+            _out.println("    FieldGen field;");
+            for (Field field : fields) {
+                field.accept(this);
+            }
+            _out.println("  }");
+            _out.println();
+        }
+        Method[] methods = clazz.getMethods();
+        for (int i = 0; i < methods.length; i++) {
+            _out.println("  private void createMethod_" + i + "() {");
+            methods[i].accept(this);
+            _out.println("  }");
+            _out.println();
+        }
+        printMain();
+        _out.println("}");
+    }
+
+
+    private void printCreate() {
+        _out.println("  public void create(OutputStream out) throws IOException {");
+        Field[] fields = _clazz.getFields();
+        if (fields.length > 0) {
+            _out.println("    createFields();");
+        }
+        Method[] methods = _clazz.getMethods();
+        for (int i = 0; i < methods.length; i++) {
+            _out.println("    createMethod_" + i + "();");
+        }
+        _out.println("    _cg.getJavaClass().dump(out);");
+        _out.println("  }");
+        _out.println();
+    }
+
+
+    private void printMain() {
+        String class_name = _clazz.getClassName();
+        _out.println("  public static void main(String[] args) throws Exception {");
+        _out.println("    " + class_name + "Creator creator = new " + class_name + "Creator();");
+        _out.println("    creator.create(new FileOutputStream(\"" + class_name + ".class\"));");
+        _out.println("  }");
+    }
+
+
+    @Override
+    public void visitField( Field field ) {
+        _out.println();
+        _out.println("    field = new FieldGen(" + printFlags(field.getAccessFlags()) + ", "
+                + printType(field.getSignature()) + ", \"" + field.getName() + "\", _cp);");
+        ConstantValue cv = field.getConstantValue();
+        if (cv != null) {
+            String value = cv.toString();
+            _out.println("    field.setInitValue(" + value + ")");
+        }
+        _out.println("    _cg.addField(field.getField());");
+    }
+
+
+    @Override
+    public void visitMethod( Method method ) {
+        MethodGen mg = new MethodGen(method, _clazz.getClassName(), _cp);
+        Type result_type = mg.getReturnType();
+        Type[] arg_types = mg.getArgumentTypes();
+        _out.println("    InstructionList il = new InstructionList();");
+        _out.println("    MethodGen method = new MethodGen("
+                + printFlags(method.getAccessFlags(), FLAG_FOR_METHOD) + ", "
+                + printType(result_type) + ", " + printArgumentTypes(arg_types) + ", "
+                + "new String[] { " + Utility.printArray(mg.getArgumentNames(), false, true)
+                + " }, \"" + method.getName() + "\", \"" + _clazz.getClassName() + "\", il, _cp);");
+        _out.println();
+        BCELFactory factory = new BCELFactory(mg, _out);
+        factory.start();
+        _out.println("    method.setMaxStack();");
+        _out.println("    method.setMaxLocals();");
+        _out.println("    _cg.addMethod(method.getMethod());");
+        _out.println("    il.dispose();");
+    }
+
+
+    static String printFlags( int flags ) {
+        return printFlags(flags, FLAG_FOR_UNKNOWN);
+    }
+
+
+    static String printFlags( int flags, int reason ) {
+        if (flags == 0) {
+            return "0";
+        }
+        StringBuilder buf = new StringBuilder();
+        for (int i = 0, pow = 1; pow <= Constants.MAX_ACC_FLAG; i++) {
+            if ((flags & pow) != 0) {
+                if ((pow == Constants.ACC_SYNCHRONIZED) && (reason == FLAG_FOR_CLASS)) {
+                    buf.append("ACC_SUPER | ");
+                } else if ((pow == Constants.ACC_VOLATILE) && (reason == FLAG_FOR_METHOD)) {
+                    buf.append("ACC_BRIDGE | ");
+                } else if ((pow == Constants.ACC_TRANSIENT) && (reason == FLAG_FOR_METHOD)) {
+                    buf.append("ACC_VARARGS | ");
+                } else {
+                    buf.append("ACC_")
+                            .append(Constants.ACCESS_NAMES[i].toUpperCase(Locale.ENGLISH)).append(
+                                    " | ");
+                }
+            }
+            pow <<= 1;
+        }
+        String str = buf.toString();
+        return str.substring(0, str.length() - 3);
+    }
+
+
+    static String printArgumentTypes( Type[] arg_types ) {
+        if (arg_types.length == 0) {
+            return "Type.NO_ARGS";
+        }
+        StringBuilder args = new StringBuilder();
+        for (int i = 0; i < arg_types.length; i++) {
+            args.append(printType(arg_types[i]));
+            if (i < arg_types.length - 1) {
+                args.append(", ");
+            }
+        }
+        return "new Type[] { " + args.toString() + " }";
+    }
+
+
+    static String printType( Type type ) {
+        return printType(type.getSignature());
+    }
+
+
+    static String printType( String signature ) {
+        Type type = Type.getType(signature);
+        byte t = type.getType();
+        if (t <= Constants.T_VOID) {
+            return "Type." + Constants.TYPE_NAMES[t].toUpperCase(Locale.ENGLISH);
+        } else if (type.toString().equals("java.lang.String")) {
+            return "Type.STRING";
+        } else if (type.toString().equals("java.lang.Object")) {
+            return "Type.OBJECT";
+        } else if (type.toString().equals("java.lang.StringBuffer")) {
+            return "Type.STRINGBUFFER";
+        } else if (type instanceof ArrayType) {
+            ArrayType at = (ArrayType) type;
+            return "new ArrayType(" + printType(at.getBasicType()) + ", " + at.getDimensions()
+                    + ")";
+        } else {
+            return "new ObjectType(\"" + Utility.signatureToString(signature, false) + "\")";
+        }
+    }
+
+
+    /** Default main method
+     */
+    public static void main( String[] argv ) throws Exception {
+        JavaClass java_class;
+        String name = argv[0];
+        if ((java_class = Repository.lookupClass(name)) == null) {
+            java_class = new ClassParser(name).parse(); // May throw IOException
+        }
+        BCELifier bcelifier = new BCELifier(java_class, System.out);
+        bcelifier.start();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ByteSequence.java b/src/main/java/org/apache/commons/bcel6/util/ByteSequence.java
new file mode 100644
index 0000000..c000289
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ByteSequence.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+
+/**
+ * Utility class that implements a sequence of bytes which can be read
+ * via the `readByte()' method. This is used to implement a wrapper for the 
+ * Java byte code stream to gain some more readability.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public final class ByteSequence extends DataInputStream {
+
+    private final ByteArrayStream byteStream;
+
+
+    public ByteSequence(byte[] bytes) {
+        super(new ByteArrayStream(bytes));
+        byteStream = (ByteArrayStream) in;
+    }
+
+
+    public final int getIndex() {
+        return byteStream.getPosition();
+    }
+
+
+    final void unreadByte() {
+        byteStream.unreadByte();
+    }
+
+    private static final class ByteArrayStream extends ByteArrayInputStream {
+
+        ByteArrayStream(byte[] bytes) {
+            super(bytes);
+        }
+
+        final int getPosition() {
+            // pos is protected in ByteArrayInputStream
+            return pos;
+        }
+
+        final void unreadByte() {
+            if (pos > 0) {
+                pos--;
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/Class2HTML.java b/src/main/java/org/apache/commons/bcel6/util/Class2HTML.java
new file mode 100644
index 0000000..e1d389d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/Class2HTML.java
@@ -0,0 +1,232 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.Utility;
+
+/**
+ * Read class file(s) and convert them into HTML files.
+ *
+ * Given a JavaClass object "class" that is in package "package" five files
+ * will be created in the specified directory.
+ *
+ * <OL>
+ * <LI> "package"."class".html as the main file which defines the frames for
+ * the following subfiles.
+ * <LI>  "package"."class"_attributes.html contains all (known) attributes found in the file
+ * <LI>  "package"."class"_cp.html contains the constant pool
+ * <LI>  "package"."class"_code.html contains the byte code
+ * <LI>  "package"."class"_methods.html contains references to all methods and fields of the class
+ * </OL>
+ *
+ * All subfiles reference each other appropiately, e.g. clicking on a
+ * method in the Method's frame will jump to the appropiate method in
+ * the Code frame.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
+ */
+public class Class2HTML implements Constants {
+
+    private final JavaClass java_class; // current class object
+    private final String dir;
+    private static String class_package; // name of package, unclean to make it static, but ...
+    private static String class_name; // name of current class, dito
+    private static ConstantPool constant_pool;
+
+
+    /**
+     * Write contents of the given JavaClass into HTML files.
+     * 
+     * @param java_class The class to write
+     * @param dir The directory to put the files in
+     */
+    public Class2HTML(JavaClass java_class, String dir) throws IOException {
+        Method[] methods = java_class.getMethods();
+        this.java_class = java_class;
+        this.dir = dir;
+        class_name = java_class.getClassName(); // Remember full name
+        constant_pool = java_class.getConstantPool();
+        // Get package name by tacking off everything after the last `.'
+        int index = class_name.lastIndexOf('.');
+        if (index > -1) {
+            class_package = class_name.substring(0, index);
+        } else {
+            class_package = ""; // default package
+        }
+        ConstantHTML constant_html = new ConstantHTML(dir, class_name, class_package, methods,
+                constant_pool);
+        /* Attributes can't be written in one step, so we just open a file
+         * which will be written consequently.
+         */
+        AttributeHTML attribute_html = new AttributeHTML(dir, class_name, constant_pool,
+                constant_html);
+//        MethodHTML method_html = new MethodHTML(dir, class_name, methods, java_class.getFields(),
+//                constant_html, attribute_html);
+        // Write main file (with frames, yuk)
+        writeMainHTML(attribute_html);
+        new CodeHTML(dir, class_name, methods, constant_pool, constant_html);
+        attribute_html.close();
+    }
+
+
+    public static void main( String argv[] ) {
+        String[] file_name = new String[argv.length];
+        int files = 0;
+        ClassParser parser = null;
+        JavaClass java_class = null;
+        String zip_file = null;
+        char sep = File.separatorChar;
+        String dir = "." + sep; // Where to store HTML files
+        try {
+            /* Parse command line arguments.
+             */
+            for (int i = 0; i < argv.length; i++) {
+                if (argv[i].charAt(0) == '-') { // command line switch
+                    if (argv[i].equals("-d")) { // Specify target directory, default `.�
+                        dir = argv[++i];
+                        if (!dir.endsWith("" + sep)) {
+                            dir = dir + sep;
+                        }
+                        new File(dir).mkdirs(); // Create target directory if necessary
+                    } else if (argv[i].equals("-zip")) {
+                        zip_file = argv[++i];
+                    } else {
+                        System.out.println("Unknown option " + argv[i]);
+                    }
+                } else {
+                    file_name[files++] = argv[i];
+                }
+            }
+            if (files == 0) {
+                System.err.println("Class2HTML: No input files specified.");
+            } else { // Loop through files ...
+                for (int i = 0; i < files; i++) {
+                    System.out.print("Processing " + file_name[i] + "...");
+                    if (zip_file == null) {
+                        parser = new ClassParser(file_name[i]); // Create parser object from file
+                    } else {
+                        parser = new ClassParser(zip_file, file_name[i]); // Create parser object from zip file
+                    }
+                    java_class = parser.parse();
+                    new Class2HTML(java_class, dir);
+                    System.out.println("Done.");
+                }
+            }
+        } catch (Exception e) {
+            System.out.println(e);
+            e.printStackTrace(System.out);
+        }
+    }
+
+
+    /**
+     * Utility method that converts a class reference in the constant pool,
+     * i.e., an index to a string.
+     */
+    static String referenceClass( int index ) {
+        String str = constant_pool.getConstantString(index, CONSTANT_Class);
+        str = Utility.compactClassName(str);
+        str = Utility.compactClassName(str, class_package + ".", true);
+        return "<A HREF=\"" + class_name + "_cp.html#cp" + index + "\" TARGET=ConstantPool>" + str
+                + "</A>";
+    }
+
+
+    static String referenceType( String type ) {
+        String short_type = Utility.compactClassName(type);
+        short_type = Utility.compactClassName(short_type, class_package + ".", true);
+        int index = type.indexOf('['); // Type is an array?
+        String base_type = type;
+        if (index > -1) {
+            base_type = type.substring(0, index); // Tack of the `['
+        }
+        // test for basic type
+        if (base_type.equals("int") || base_type.equals("short") || base_type.equals("boolean")
+                || base_type.equals("void") || base_type.equals("char") || base_type.equals("byte")
+                || base_type.equals("long") || base_type.equals("double")
+                || base_type.equals("float")) {
+            return "<FONT COLOR=\"#00FF00\">" + type + "</FONT>";
+        }
+        return "<A HREF=\"" + base_type + ".html\" TARGET=_top>" + short_type + "</A>";
+    }
+
+
+    static String toHTML( String str ) {
+        StringBuilder buf = new StringBuilder();
+        try { // Filter any characters HTML doesn't like such as < and > in particular
+            for (int i = 0; i < str.length(); i++) {
+                char ch;
+                switch (ch = str.charAt(i)) {
+                    case '<':
+                        buf.append("&lt;");
+                        break;
+                    case '>':
+                        buf.append("&gt;");
+                        break;
+                    case '\n':
+                        buf.append("\\n");
+                        break;
+                    case '\r':
+                        buf.append("\\r");
+                        break;
+                    default:
+                        buf.append(ch);
+                }
+            }
+        } catch (StringIndexOutOfBoundsException e) {
+        } // Never occurs
+        return buf.toString();
+    }
+
+
+    private void writeMainHTML( AttributeHTML attribute_html ) throws IOException {
+        PrintWriter file = new PrintWriter(new FileOutputStream(dir + class_name + ".html"));
+        Attribute[] attributes = java_class.getAttributes();
+        file.println("<HTML>\n" + "<HEAD><TITLE>Documentation for " + class_name + "</TITLE>"
+                + "</HEAD>\n" + "<FRAMESET BORDER=1 cols=\"30%,*\">\n"
+                + "<FRAMESET BORDER=1 rows=\"80%,*\">\n" + "<FRAME NAME=\"ConstantPool\" SRC=\""
+                + class_name + "_cp.html" + "\"\n MARGINWIDTH=\"0\" "
+                + "MARGINHEIGHT=\"0\" FRAMEBORDER=\"1\" SCROLLING=\"AUTO\">\n"
+                + "<FRAME NAME=\"Attributes\" SRC=\"" + class_name + "_attributes.html"
+                + "\"\n MARGINWIDTH=\"0\" "
+                + "MARGINHEIGHT=\"0\" FRAMEBORDER=\"1\" SCROLLING=\"AUTO\">\n" + "</FRAMESET>\n"
+                + "<FRAMESET BORDER=1 rows=\"80%,*\">\n" + "<FRAME NAME=\"Code\" SRC=\""
+                + class_name + "_code.html\"\n MARGINWIDTH=0 "
+                + "MARGINHEIGHT=0 FRAMEBORDER=1 SCROLLING=\"AUTO\">\n"
+                + "<FRAME NAME=\"Methods\" SRC=\"" + class_name
+                + "_methods.html\"\n MARGINWIDTH=0 "
+                + "MARGINHEIGHT=0 FRAMEBORDER=1 SCROLLING=\"AUTO\">\n"
+                + "</FRAMESET></FRAMESET></HTML>");
+        file.close();
+        for (int i = 0; i < attributes.length; i++) {
+            attribute_html.writeAttribute(attributes[i], "class" + i);
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java b/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java
new file mode 100644
index 0000000..ebcf25c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ClassLoader.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.ByteArrayInputStream;
+import java.util.Hashtable;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Utility;
+
+/**
+ * <p>Drop in replacement for the standard class loader of the JVM. You can use it
+ * in conjunction with the JavaWrapper to dynamically modify/create classes
+ * as they're requested.</p>
+ *
+ * <p>This class loader recognizes special requests in a distinct
+ * format, i.e., when the name of the requested class contains with
+ * "$$BCEL$$" it calls the createClass() method with that name
+ * (everything bevor the $$BCEL$$ is considered to be the package
+ * name. You can subclass the class loader and override that
+ * method. "Normal" classes class can be modified by overriding the
+ * modifyClass() method which is called just before defineClass().</p>
+ *
+ * <p>There may be a number of packages where you have to use the
+ * default class loader (which may also be faster). You can define the
+ * set of packages where to use the system class loader in the
+ * constructor. The default value contains "java.", "sun.",
+ * "javax."</p>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see JavaWrapper
+ * @see ClassPath
+ */
+public class ClassLoader extends java.lang.ClassLoader {
+
+    public static final String[] DEFAULT_IGNORED_PACKAGES = {
+            "java.", "javax.", "sun."
+    };
+    private final Hashtable<String, Class<?>> classes = new Hashtable<String, Class<?>>(); // Hashtable is synchronized thus thread-safe
+    private final String[] ignored_packages;
+    private Repository repository = SyntheticRepository.getInstance();
+
+
+    /** Ignored packages are by default ( "java.", "sun.",
+     * "javax."), i.e. loaded by system class loader
+     */
+    public ClassLoader() {
+        this(DEFAULT_IGNORED_PACKAGES);
+    }
+
+
+    /** @param deferTo delegate class loader to use for ignored packages
+     */
+    public ClassLoader(java.lang.ClassLoader deferTo) {
+        super(deferTo);
+        this.ignored_packages = DEFAULT_IGNORED_PACKAGES;
+        this.repository = new ClassLoaderRepository(deferTo);
+    }
+
+
+    /** @param ignored_packages classes contained in these packages will be loaded
+     * with the system class loader
+     */
+    public ClassLoader(String[] ignored_packages) {
+        this.ignored_packages = ignored_packages;
+    }
+
+
+    /** @param ignored_packages classes contained in these packages will be loaded
+     * with the system class loader
+     * @param deferTo delegate class loader to use for ignored packages
+     */
+    public ClassLoader(java.lang.ClassLoader deferTo, String[] ignored_packages) {
+        this(ignored_packages);
+        this.repository = new ClassLoaderRepository(deferTo);
+    }
+
+    @Override
+    protected Class<?> loadClass( String class_name, boolean resolve ) throws ClassNotFoundException {
+        Class<?> cl = null;
+        /* First try: lookup hash table.
+         */
+        if ((cl = classes.get(class_name)) == null) {
+            /* Second try: Load system class using system class loader. You better
+             * don't mess around with them.
+             */
+            for (String ignored_package : ignored_packages) {
+                if (class_name.startsWith(ignored_package)) {
+                    cl = getParent().loadClass(class_name);
+                    break;
+                }
+            }
+            if (cl == null) {
+                JavaClass clazz = null;
+                /* Third try: Special request?
+                 */
+                if (class_name.contains("$$BCEL$$")) {
+                    clazz = createClass(class_name);
+                } else { // Fourth try: Load classes via repository
+                    if ((clazz = repository.loadClass(class_name)) != null) {
+                        clazz = modifyClass(clazz);
+                    } else {
+                        throw new ClassNotFoundException(class_name);
+                    }
+                }
+                if (clazz != null) {
+                    byte[] bytes = clazz.getBytes();
+                    cl = defineClass(class_name, bytes, 0, bytes.length);
+                } else {
+                    cl = Class.forName(class_name);
+                }
+            }
+            if (resolve) {
+                resolveClass(cl);
+            }
+        }
+        classes.put(class_name, cl);
+        return cl;
+    }
+
+
+    /** Override this method if you want to alter a class before it gets actually
+     * loaded. Does nothing by default.
+     */
+    protected JavaClass modifyClass( JavaClass clazz ) {
+        return clazz;
+    }
+
+
+    /** 
+     * Override this method to create you own classes on the fly. The
+     * name contains the special token $$BCEL$$. Everything before that
+     * token is consddered to be a package name. You can encode you own
+     * arguments into the subsequent string. You must regard however not
+     * to use any "illegal" characters, i.e., characters that may not
+     * appear in a Java class name too<br>
+     *
+     * The default implementation interprets the string as a encoded compressed
+     * Java class, unpacks and decodes it with the Utility.decode() method, and
+     * parses the resulting byte array and returns the resulting JavaClass object.
+     *
+     * @param class_name compressed byte code with "$$BCEL$$" in it
+     */
+    protected JavaClass createClass( String class_name ) {
+        int index = class_name.indexOf("$$BCEL$$");
+        String real_name = class_name.substring(index + 8);
+        JavaClass clazz = null;
+        try {
+            byte[] bytes = Utility.decode(real_name, true);
+            ClassParser parser = new ClassParser(new ByteArrayInputStream(bytes), "foo");
+            clazz = parser.parse();
+        } catch (Throwable e) {
+            e.printStackTrace();
+            return null;
+        }
+        // Adapt the class name to the passed value
+        ConstantPool cp = clazz.getConstantPool();
+        ConstantClass cl = (ConstantClass) cp.getConstant(clazz.getClassNameIndex(),
+                Constants.CONSTANT_Class);
+        ConstantUtf8 name = (ConstantUtf8) cp.getConstant(cl.getNameIndex(),
+                Constants.CONSTANT_Utf8);
+        name.setBytes(class_name.replace('.', '/'));
+        return clazz;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ClassLoaderRepository.java b/src/main/java/org/apache/commons/bcel6/util/ClassLoaderRepository.java
new file mode 100644
index 0000000..1e6a1ba
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ClassLoaderRepository.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/**
+ * The repository maintains information about which classes have
+ * been loaded.
+ *
+ * It loads its data from the ClassLoader implementation
+ * passed into its constructor.
+ *
+ * @see org.apache.commons.bcel6.Repository
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @author David Dixon-Peugh
+ */
+public class ClassLoaderRepository implements Repository {
+
+    private static final long serialVersionUID = -1052781833503868187L;
+    private final java.lang.ClassLoader loader;
+    private final Map<String, JavaClass> loadedClasses = new HashMap<String, JavaClass>(); // CLASSNAME X JAVACLASS
+
+
+    public ClassLoaderRepository(java.lang.ClassLoader loader) {
+        this.loader = loader;
+    }
+
+
+    /**
+     * Store a new JavaClass into this Repository.
+     */
+    public void storeClass( JavaClass clazz ) {
+        loadedClasses.put(clazz.getClassName(), clazz);
+        clazz.setRepository(this);
+    }
+
+
+    /**
+     * Remove class from repository
+     */
+    public void removeClass( JavaClass clazz ) {
+        loadedClasses.remove(clazz.getClassName());
+    }
+
+
+    /**
+     * Find an already defined JavaClass.
+     */
+    public JavaClass findClass( String className ) {
+        return loadedClasses.containsKey(className) ? loadedClasses.get(className) : null;
+    }
+
+
+    /**
+     * Lookup a JavaClass object from the Class Name provided.
+     */
+    public JavaClass loadClass( String className ) throws ClassNotFoundException {
+        String classFile = className.replace('.', '/');
+        JavaClass RC = findClass(className);
+        if (RC != null) {
+            return RC;
+        }
+        try {
+            InputStream is = loader.getResourceAsStream(classFile + ".class");
+            if (is == null) {
+                throw new ClassNotFoundException(className + " not found.");
+            }
+            try {
+                ClassParser parser = new ClassParser(is, className);
+                RC = parser.parse();
+                storeClass(RC);
+                return RC;
+            } finally {
+                is.close();
+            }
+        } catch (IOException e) {
+            throw new ClassNotFoundException(className + " not found: " + e, e);
+        }
+    }
+
+
+    public JavaClass loadClass( Class<?> clazz ) throws ClassNotFoundException {
+        return loadClass(clazz.getName());
+    }
+
+
+    /** Clear all entries from cache.
+     */
+    public void clear() {
+        loadedClasses.clear();
+    }
+
+
+    /*
+     * @return null
+     */
+    public ClassPath getClassPath() {
+        return null;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ClassPath.java b/src/main/java/org/apache/commons/bcel6/util/ClassPath.java
new file mode 100644
index 0000000..cae4609
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ClassPath.java
@@ -0,0 +1,539 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Serializable;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Locale;
+import java.util.StringTokenizer;
+import java.util.Vector;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+/**
+ * Responsible for loading (class) files from the CLASSPATH. Inspired by
+ * sun.tools.ClassPath.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ */
+public class ClassPath implements Serializable {
+
+    private static final long serialVersionUID = 2099441438483340671L;
+    public static final ClassPath SYSTEM_CLASS_PATH = new ClassPath();
+
+    private static final FilenameFilter ARCHIVE_FILTER = new FilenameFilter() {
+
+        public boolean accept( File dir, String name ) {
+            name = name.toLowerCase(Locale.ENGLISH);
+            return name.endsWith(".zip") || name.endsWith(".jar");
+        }
+    };
+
+    private final PathEntry[] paths;
+    private final String class_path;
+    private ClassPath parent;
+
+    public ClassPath(ClassPath parent, String class_path) {
+        this(class_path);
+        this.parent = parent;
+    }
+
+    /**
+     * Search for classes in given path.
+     * 
+     * @param class_path
+     */
+    public ClassPath(String class_path) {
+        this.class_path = class_path;
+        List<PathEntry> vec = new ArrayList<PathEntry>();
+        for (StringTokenizer tok = new StringTokenizer(class_path, File.pathSeparator); tok.hasMoreTokens();) {
+            String path = tok.nextToken();
+            if (!path.equals("")) {
+                File file = new File(path);
+                try {
+                    if (file.exists()) {
+                        if (file.isDirectory()) {
+                            vec.add(new Dir(path));
+                        } else {
+                            vec.add(new Zip(new ZipFile(file)));
+                        }
+                    }
+                } catch (IOException e) {
+                    if (path.endsWith(".zip") || path.endsWith(".jar")) {
+                        System.err.println("CLASSPATH component " + file + ": " + e);
+                    }
+                }
+            }
+        }
+        paths = new PathEntry[vec.size()];
+        vec.toArray(paths);
+    }
+
+
+    /**
+     * Search for classes in CLASSPATH.
+     * @deprecated Use SYSTEM_CLASS_PATH constant
+     */
+    @Deprecated
+    public ClassPath() {
+        this(getClassPath());
+    }
+
+
+    /** @return used class path string
+     */
+    @Override
+    public String toString() {
+        if (parent != null) {
+            return parent.toString() + File.pathSeparator + class_path;
+        }
+        return class_path;
+    }
+
+    @Override
+    public int hashCode() {
+        if (parent != null) {
+            return class_path.hashCode() + parent.hashCode();            
+        }
+        return class_path.hashCode();
+    }
+
+
+    @Override
+    public boolean equals( Object o ) {
+        if (o instanceof ClassPath) {
+            ClassPath cp = (ClassPath)o;
+            return class_path.equals(cp.toString());
+        }
+        return false;
+    }
+
+
+    private static void getPathComponents( String path, List<String> list ) {
+        if (path != null) {
+            StringTokenizer tok = new StringTokenizer(path, File.pathSeparator);
+            while (tok.hasMoreTokens()) {
+                String name = tok.nextToken();
+                File file = new File(name);
+                if (file.exists()) {
+                    list.add(name);
+                }
+            }
+        }
+    }
+
+
+    /** Checks for class path components in the following properties:
+     * "java.class.path", "sun.boot.class.path", "java.ext.dirs"
+     *
+     * @return class path as used by default by BCEL
+     */
+    public static String getClassPath() {
+        String class_path = System.getProperty("java.class.path");
+        String boot_path = System.getProperty("sun.boot.class.path");
+        String ext_path = System.getProperty("java.ext.dirs");
+        List<String> list = new ArrayList<String>();
+        getPathComponents(class_path, list);
+        getPathComponents(boot_path, list);
+        List<String> dirs = new ArrayList<String>();
+        getPathComponents(ext_path, dirs);
+        for (String d : dirs) {
+            File ext_dir = new File(d);
+            String[] extensions = ext_dir.list(ARCHIVE_FILTER);
+            if (extensions != null) {
+                for (String extension : extensions) {
+                    list.add(ext_dir.getPath() + File.separatorChar + extension);
+                }
+            }
+        }
+        StringBuilder buf = new StringBuilder();
+        String separator = "";
+        for (String path : list) {
+            buf.append(separator);
+            separator = File.pathSeparator;
+            buf.append(path);
+        }
+        return buf.toString().intern();
+    }
+
+
+    /**
+     * @param name fully qualified class name, e.g. java.lang.String
+     * @return input stream for class
+     */
+    public InputStream getInputStream( String name ) throws IOException {
+        return getInputStream(name.replace('.', '/'), ".class");
+    }
+
+
+    /**
+     * Return stream for class or resource on CLASSPATH.
+     *
+     * @param name fully qualified file name, e.g. java/lang/String
+     * @param suffix file name ends with suff, e.g. .java
+     * @return input stream for file on class path
+     */
+    public InputStream getInputStream( String name, String suffix ) throws IOException {
+        InputStream is = null;
+        try {
+            is = getClass().getClassLoader().getResourceAsStream(name + suffix);
+        } catch (Exception e) {
+        }
+        if (is != null) {
+            return is;
+        }
+        return getClassFile(name, suffix).getInputStream();
+    }
+
+    /**
+     * @param name fully qualified resource name, e.g. java/lang/String.class
+     * @return InputStream supplying the resource, or null if no resource with that name.
+     */
+    public InputStream getResourceAsStream(String name) {
+        for (PathEntry path : paths) {
+            InputStream is;
+            if ((is = path.getResourceAsStream(name)) != null) {
+                return is;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @param name fully qualified resource name, e.g. java/lang/String.class
+     * @return URL supplying the resource, or null if no resource with that name.
+     */
+    public URL getResource(String name) {
+        for (PathEntry path : paths) {
+            URL url;
+            if ((url = path.getResource(name)) != null) {
+                return url;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @param name fully qualified resource name, e.g. java/lang/String.class
+     * @return An Enumeration of URLs supplying the resource, or an
+     * empty Enumeration if no resource with that name.
+     */
+    public Enumeration<URL> getResources(String name) {
+        Vector<URL> results = new Vector<URL>();
+        for (PathEntry path : paths) {
+            URL url;
+            if ((url = path.getResource(name)) != null) {
+                results.add(url);
+            }
+        }
+        return results.elements();
+    }
+
+    /**
+     * @param name fully qualified file name, e.g. java/lang/String
+     * @param suffix file name ends with suff, e.g. .java
+     * @return class file for the java class
+     */
+    public ClassFile getClassFile( String name, String suffix ) throws IOException {
+        ClassFile cf = null;
+
+        if (parent != null) {
+            cf = parent.getClassFileInternal(name, suffix);
+        }
+
+        if (cf == null) {
+            cf = getClassFileInternal(name, suffix);
+        }
+
+        if (cf != null) {
+            return cf;
+        }
+
+        throw new IOException("Couldn't find: " + name + suffix);
+    }
+
+    private ClassFile getClassFileInternal(String name, String suffix) throws IOException {
+
+      for (PathEntry path : paths) {
+          ClassFile cf = path.getClassFile(name, suffix);
+
+          if(cf != null) {
+              return cf;
+          }
+      }
+
+      return null;
+   }
+
+
+    /**
+     * @param name fully qualified class name, e.g. java.lang.String
+     * @return input stream for class
+     */
+    public ClassFile getClassFile( String name ) throws IOException {
+        return getClassFile(name, ".class");
+    }
+
+
+    /**
+     * @param name fully qualified file name, e.g. java/lang/String
+     * @param suffix file name ends with suffix, e.g. .java
+     * @return byte array for file on class path
+     */
+    public byte[] getBytes( String name, String suffix ) throws IOException {
+        DataInputStream dis = null;
+        try {
+            InputStream is = getInputStream(name, suffix);
+            if (is == null) {
+                throw new IOException("Couldn't find: " + name + suffix);
+            }
+            dis = new DataInputStream(is);
+            byte[] bytes = new byte[is.available()];
+            dis.readFully(bytes);
+            return bytes;
+        } finally {
+            if (dis != null) {
+                dis.close();
+            }
+        }
+    }
+
+
+    /**
+     * @return byte array for class
+     */
+    public byte[] getBytes( String name ) throws IOException {
+        return getBytes(name, ".class");
+    }
+
+
+    /**
+     * @param name name of file to search for, e.g. java/lang/String.java
+     * @return full (canonical) path for file
+     */
+    public String getPath( String name ) throws IOException {
+        int index = name.lastIndexOf('.');
+        String suffix = "";
+        if (index > 0) {
+            suffix = name.substring(index);
+            name = name.substring(0, index);
+        }
+        return getPath(name, suffix);
+    }
+
+
+    /**
+     * @param name name of file to search for, e.g. java/lang/String
+     * @param suffix file name suffix, e.g. .java
+     * @return full (canonical) path for file, if it exists
+     */
+    public String getPath( String name, String suffix ) throws IOException {
+        return getClassFile(name, suffix).getPath();
+    }
+
+    private static abstract class PathEntry implements Serializable {
+
+        private static final long serialVersionUID = 6828494485207666122L;
+        abstract ClassFile getClassFile( String name, String suffix ) throws IOException;
+        abstract URL getResource(String name);
+        abstract InputStream getResourceAsStream(String name);
+    }
+
+    /** Contains information about file/ZIP entry of the Java class.
+     */
+    public interface ClassFile {
+
+        /** @return input stream for class file.
+         */
+        public abstract InputStream getInputStream() throws IOException;
+
+
+        /** @return canonical path to class file.
+         */
+        public abstract String getPath();
+
+
+        /** @return base path of found class, i.e. class is contained relative
+         * to that path, which may either denote a directory, or zip file
+         */
+        public abstract String getBase();
+
+
+        /** @return modification time of class file.
+         */
+        public abstract long getTime();
+
+
+        /** @return size of class file.
+         */
+        public abstract long getSize();
+    }
+
+    private static class Dir extends PathEntry {
+
+        private static final long serialVersionUID = 4374062802142373088L;
+        private final String dir;
+
+
+        Dir(String d) {
+            dir = d;
+        }
+
+        @Override
+        URL getResource(String name) {
+            // Resource specification uses '/' whatever the platform
+            final File file = new File(dir + File.separatorChar + name.replace('/', File.separatorChar));
+            try {
+                return file.exists() ? file.toURI().toURL() : null;
+            } catch (MalformedURLException e) {
+               return null;
+            }
+        }
+
+        @Override
+        InputStream getResourceAsStream(String name) {
+            // Resource specification uses '/' whatever the platform
+            final File file = new File(dir + File.separatorChar + name.replace('/', File.separatorChar));
+            try {
+               return file.exists() ? new FileInputStream(file) : null;
+            } catch (IOException e) {
+               return null;
+            }
+        }
+
+        @Override
+        ClassFile getClassFile( String name, String suffix ) throws IOException {
+            final File file = new File(dir + File.separatorChar
+                    + name.replace('.', File.separatorChar) + suffix);
+            return file.exists() ? new ClassFile() {
+
+                public InputStream getInputStream() throws IOException {
+                    return new FileInputStream(file);
+                }
+
+
+                public String getPath() {
+                    try {
+                        return file.getCanonicalPath();
+                    } catch (IOException e) {
+                        return null;
+                    }
+                }
+
+
+                public long getTime() {
+                    return file.lastModified();
+                }
+
+
+                public long getSize() {
+                    return file.length();
+                }
+
+
+                public String getBase() {
+                    return dir;
+                }
+            } : null;
+        }
+
+
+        @Override
+        public String toString() {
+            return dir;
+        }
+    }
+
+    private static class Zip extends PathEntry {
+
+        private static final long serialVersionUID = -2210747632897905532L;
+        private final ZipFile zip;
+
+
+        Zip(ZipFile z) {
+            zip = z;
+        }
+
+        @Override
+        URL getResource(String name) {
+            final ZipEntry entry = zip.getEntry(name);
+            try {
+                return (entry != null) ? new URL("jar:file:" + zip.getName() + "!/" + name) : null;
+            } catch (MalformedURLException e) {
+                return null;
+           }
+        }
+
+        @Override
+        InputStream getResourceAsStream(String name) {
+            final ZipEntry entry = zip.getEntry(name);
+            try {
+                return (entry != null) ? zip.getInputStream(entry) : null;
+            } catch (IOException e) {
+                return null;
+            }
+        }
+
+        @Override
+        ClassFile getClassFile( String name, String suffix ) throws IOException {
+            final ZipEntry entry = zip.getEntry(name.replace('.', '/') + suffix);
+
+            if (entry == null) {
+                return null;
+            }
+
+            return new ClassFile() {
+
+                public InputStream getInputStream() throws IOException {
+                    return zip.getInputStream(entry);
+                }
+
+
+                public String getPath() {
+                    return entry.toString();
+                }
+
+
+                public long getTime() {
+                    return entry.getTime();
+                }
+
+
+                public long getSize() {
+                    return entry.getSize();
+                }
+
+
+                public String getBase() {
+                    return zip.getName();
+                }
+            };
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ClassQueue.java b/src/main/java/org/apache/commons/bcel6/util/ClassQueue.java
new file mode 100644
index 0000000..fa1d778
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ClassQueue.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.util.LinkedList;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/** 
+ * Utility class implementing a (typesafe) queue of JavaClass
+ * objects.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
+ */
+public class ClassQueue implements java.io.Serializable {
+
+    private static final long serialVersionUID = 685144104322420292L;
+    protected LinkedList<JavaClass> vec = new LinkedList<JavaClass>();
+
+
+    public void enqueue( JavaClass clazz ) {
+        vec.addLast(clazz);
+    }
+
+
+    public JavaClass dequeue() {
+        return vec.removeFirst();
+    }
+
+
+    public boolean empty() {
+        return vec.isEmpty();
+    }
+
+
+    @Override
+    public String toString() {
+        return vec.toString();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ClassSet.java b/src/main/java/org/apache/commons/bcel6/util/ClassSet.java
new file mode 100644
index 0000000..8f9b6c0
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ClassSet.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/** 
+ * Utility class implementing a (typesafe) set of JavaClass objects.
+ * Since JavaClass has no equals() method, the name of the class is
+ * used for comparison.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
+ * @see ClassStack
+ */
+public class ClassSet implements java.io.Serializable {
+
+    private static final long serialVersionUID = -7476907380350035254L;
+    private final Map<String, JavaClass> _map = new HashMap<String, JavaClass>();
+
+
+    public boolean add( JavaClass clazz ) {
+        boolean result = false;
+        if (!_map.containsKey(clazz.getClassName())) {
+            result = true;
+            _map.put(clazz.getClassName(), clazz);
+        }
+        return result;
+    }
+
+
+    public void remove( JavaClass clazz ) {
+        _map.remove(clazz.getClassName());
+    }
+
+
+    public boolean empty() {
+        return _map.isEmpty();
+    }
+
+
+    public JavaClass[] toArray() {
+        Collection<JavaClass> values = _map.values();
+        JavaClass[] classes = new JavaClass[values.size()];
+        values.toArray(classes);
+        return classes;
+    }
+
+
+    public String[] getClassNames() {
+        return _map.keySet().toArray(new String[_map.keySet().size()]);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ClassStack.java b/src/main/java/org/apache/commons/bcel6/util/ClassStack.java
new file mode 100644
index 0000000..d6adb32
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ClassStack.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.util.Stack;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/** 
+ * Utility class implementing a (typesafe) stack of JavaClass objects.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
+ * @see Stack
+ */
+public class ClassStack implements java.io.Serializable {
+
+    private static final long serialVersionUID = 6126079269396985982L;
+    private final Stack<JavaClass> stack = new Stack<JavaClass>();
+
+
+    public void push( JavaClass clazz ) {
+        stack.push(clazz);
+    }
+
+
+    public JavaClass pop() {
+        return stack.pop();
+    }
+
+
+    public JavaClass top() {
+        return stack.peek();
+    }
+
+
+    public boolean empty() {
+        return stack.empty();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ClassVector.java b/src/main/java/org/apache/commons/bcel6/util/ClassVector.java
new file mode 100644
index 0000000..30ca244
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ClassVector.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/** 
+ * Utility class implementing a (typesafe) collection of JavaClass
+ * objects. Contains the most important methods of a Vector.
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A> 
+ * 
+ * @deprecated as of 5.1.1 - 7/17/2005
+ */
+@Deprecated
+public class ClassVector implements java.io.Serializable {
+
+    private static final long serialVersionUID = 5600397075672780806L;
+    protected List<JavaClass> vec = new ArrayList<JavaClass>();
+
+
+    public void addElement( JavaClass clazz ) {
+        vec.add(clazz);
+    }
+
+
+    public JavaClass elementAt( int index ) {
+        return vec.get(index);
+    }
+
+
+    public void removeElementAt( int index ) {
+        vec.remove(index);
+    }
+
+
+    public JavaClass[] toArray() {
+        JavaClass[] classes = new JavaClass[vec.size()];
+        vec.toArray(classes);
+        return classes;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/CodeHTML.java b/src/main/java/org/apache/commons/bcel6/util/CodeHTML.java
new file mode 100644
index 0000000..603179b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/CodeHTML.java
@@ -0,0 +1,579 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.BitSet;
+
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.CodeException;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
+import org.apache.commons.bcel6.classfile.ConstantInvokeDynamic;
+import org.apache.commons.bcel6.classfile.ConstantMethodref;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.LocalVariable;
+import org.apache.commons.bcel6.classfile.LocalVariableTable;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.Utility;
+
+/**
+ * Convert code into HTML file.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * 
+ */
+final class CodeHTML implements org.apache.commons.bcel6.Constants {
+
+    private final String class_name; // name of current class
+//    private Method[] methods; // Methods to print
+    private final PrintWriter file; // file to write to
+    private BitSet goto_set;
+    private final ConstantPool constant_pool;
+    private final ConstantHTML constant_html;
+    private static boolean wide = false;
+
+
+    CodeHTML(String dir, String class_name, Method[] methods, ConstantPool constant_pool,
+            ConstantHTML constant_html) throws IOException {
+        this.class_name = class_name;
+//        this.methods = methods;
+        this.constant_pool = constant_pool;
+        this.constant_html = constant_html;
+        file = new PrintWriter(new FileOutputStream(dir + class_name + "_code.html"));
+        file.println("<HTML><BODY BGCOLOR=\"#C0C0C0\">");
+        for (int i = 0; i < methods.length; i++) {
+            writeMethod(methods[i], i);
+        }
+        file.println("</BODY></HTML>");
+        file.close();
+    }
+
+
+    /**
+     * Disassemble a stream of byte codes and return the
+     * string representation.
+     *
+     * @param  stream data input stream
+     * @return String representation of byte code
+     */
+    private String codeToHTML( ByteSequence bytes, int method_number ) throws IOException {
+        short opcode = (short) bytes.readUnsignedByte();
+        StringBuilder buf;
+        String name, signature;
+        int default_offset = 0, low, high;
+        int index, class_index, vindex, constant;
+        int[] jump_table;
+        int no_pad_bytes = 0, offset;
+        buf = new StringBuilder(256);
+        buf.append("<TT>").append(OPCODE_NAMES[opcode]).append("</TT></TD><TD>");
+        /* Special case: Skip (0-3) padding bytes, i.e., the
+         * following bytes are 4-byte-aligned
+         */
+        if ((opcode == TABLESWITCH) || (opcode == LOOKUPSWITCH)) {
+            int remainder = bytes.getIndex() % 4;
+            no_pad_bytes = (remainder == 0) ? 0 : 4 - remainder;
+            for (int i = 0; i < no_pad_bytes; i++) {
+                bytes.readByte();
+            }
+            // Both cases have a field default_offset in common
+            default_offset = bytes.readInt();
+        }
+        switch (opcode) {
+            case TABLESWITCH:
+                low = bytes.readInt();
+                high = bytes.readInt();
+                offset = bytes.getIndex() - 12 - no_pad_bytes - 1;
+                default_offset += offset;
+                buf.append("<TABLE BORDER=1><TR>");
+                // Print switch indices in first row (and default)
+                jump_table = new int[high - low + 1];
+                for (int i = 0; i < jump_table.length; i++) {
+                    jump_table[i] = offset + bytes.readInt();
+                    buf.append("<TH>").append(low + i).append("</TH>");
+                }
+                buf.append("<TH>default</TH></TR>\n<TR>");
+                // Print target and default indices in second row
+            for (int element : jump_table) {
+                buf.append("<TD><A HREF=\"#code").append(method_number).append("@").append(
+                        element).append("\">").append(element).append("</A></TD>");
+            }
+                buf.append("<TD><A HREF=\"#code").append(method_number).append("@").append(
+                        default_offset).append("\">").append(default_offset).append(
+                        "</A></TD></TR>\n</TABLE>\n");
+                break;
+            /* Lookup switch has variable length arguments.
+             */
+            case LOOKUPSWITCH:
+                int npairs = bytes.readInt();
+                offset = bytes.getIndex() - 8 - no_pad_bytes - 1;
+                jump_table = new int[npairs];
+                default_offset += offset;
+                buf.append("<TABLE BORDER=1><TR>");
+                // Print switch indices in first row (and default)
+                for (int i = 0; i < npairs; i++) {
+                    int match = bytes.readInt();
+                    jump_table[i] = offset + bytes.readInt();
+                    buf.append("<TH>").append(match).append("</TH>");
+                }
+                buf.append("<TH>default</TH></TR>\n<TR>");
+                // Print target and default indices in second row
+                for (int i = 0; i < npairs; i++) {
+                    buf.append("<TD><A HREF=\"#code").append(method_number).append("@").append(
+                            jump_table[i]).append("\">").append(jump_table[i]).append("</A></TD>");
+                }
+                buf.append("<TD><A HREF=\"#code").append(method_number).append("@").append(
+                        default_offset).append("\">").append(default_offset).append(
+                        "</A></TD></TR>\n</TABLE>\n");
+                break;
+            /* Two address bytes + offset from start of byte stream form the
+             * jump target.
+             */
+            case GOTO:
+            case IFEQ:
+            case IFGE:
+            case IFGT:
+            case IFLE:
+            case IFLT:
+            case IFNE:
+            case IFNONNULL:
+            case IFNULL:
+            case IF_ACMPEQ:
+            case IF_ACMPNE:
+            case IF_ICMPEQ:
+            case IF_ICMPGE:
+            case IF_ICMPGT:
+            case IF_ICMPLE:
+            case IF_ICMPLT:
+            case IF_ICMPNE:
+            case JSR:
+                index = (bytes.getIndex() + bytes.readShort() - 1);
+                buf.append("<A HREF=\"#code").append(method_number).append("@").append(index)
+                        .append("\">").append(index).append("</A>");
+                break;
+            /* Same for 32-bit wide jumps
+             */
+            case GOTO_W:
+            case JSR_W:
+                int windex = bytes.getIndex() + bytes.readInt() - 1;
+                buf.append("<A HREF=\"#code").append(method_number).append("@").append(windex)
+                        .append("\">").append(windex).append("</A>");
+                break;
+            /* Index byte references local variable (register)
+             */
+            case ALOAD:
+            case ASTORE:
+            case DLOAD:
+            case DSTORE:
+            case FLOAD:
+            case FSTORE:
+            case ILOAD:
+            case ISTORE:
+            case LLOAD:
+            case LSTORE:
+            case RET:
+                if (wide) {
+                    vindex = bytes.readShort();
+                    wide = false; // Clear flag
+                } else {
+                    vindex = bytes.readUnsignedByte();
+                }
+                buf.append("%").append(vindex);
+                break;
+            /*
+             * Remember wide byte which is used to form a 16-bit address in the
+             * following instruction. Relies on that the method is called again with
+             * the following opcode.
+             */
+            case WIDE:
+                wide = true;
+                buf.append("(wide)");
+                break;
+            /* Array of basic type.
+             */
+            case NEWARRAY:
+                buf.append("<FONT COLOR=\"#00FF00\">").append(TYPE_NAMES[bytes.readByte()]).append(
+                        "</FONT>");
+                break;
+            /* Access object/class fields.
+             */
+            case GETFIELD:
+            case GETSTATIC:
+            case PUTFIELD:
+            case PUTSTATIC:
+                index = bytes.readShort();
+                ConstantFieldref c1 = (ConstantFieldref) constant_pool.getConstant(index,
+                        CONSTANT_Fieldref);
+                class_index = c1.getClassIndex();
+                name = constant_pool.getConstantString(class_index, CONSTANT_Class);
+                name = Utility.compactClassName(name, false);
+                index = c1.getNameAndTypeIndex();
+                String field_name = constant_pool.constantToString(index, CONSTANT_NameAndType);
+                if (name.equals(class_name)) { // Local field
+                    buf.append("<A HREF=\"").append(class_name).append("_methods.html#field")
+                            .append(field_name).append("\" TARGET=Methods>").append(field_name)
+                            .append("</A>\n");
+                } else {
+                    buf.append(constant_html.referenceConstant(class_index)).append(".").append(
+                            field_name);
+                }
+                break;
+            /* Operands are references to classes in constant pool
+             */
+            case CHECKCAST:
+            case INSTANCEOF:
+            case NEW:
+                index = bytes.readShort();
+                buf.append(constant_html.referenceConstant(index));
+                break;
+            /* Operands are references to methods in constant pool
+             */
+            case INVOKESPECIAL:
+            case INVOKESTATIC:
+            case INVOKEVIRTUAL:
+            case INVOKEINTERFACE:
+            case INVOKEDYNAMIC:
+                int m_index = bytes.readShort();
+                String str;
+                if (opcode == INVOKEINTERFACE) { // Special treatment needed
+                    bytes.readUnsignedByte(); // Redundant
+                    bytes.readUnsignedByte(); // Reserved
+//                    int nargs = bytes.readUnsignedByte(); // Redundant
+//                    int reserved = bytes.readUnsignedByte(); // Reserved
+                    ConstantInterfaceMethodref c = (ConstantInterfaceMethodref) constant_pool
+                            .getConstant(m_index, CONSTANT_InterfaceMethodref);
+                    class_index = c.getClassIndex();
+                    index = c.getNameAndTypeIndex();
+                    name = Class2HTML.referenceClass(class_index);
+                } else if (opcode == INVOKEDYNAMIC) { // Special treatment needed
+                    bytes.readUnsignedByte(); // Reserved
+                    bytes.readUnsignedByte(); // Reserved
+                    ConstantInvokeDynamic c = (ConstantInvokeDynamic) constant_pool
+                            .getConstant(m_index, CONSTANT_InvokeDynamic);
+                    index = c.getNameAndTypeIndex();
+                    name = "#" + c.getBootstrapMethodAttrIndex();
+                } else {
+                    // UNDONE: Java8 now allows INVOKESPECIAL and INVOKESTATIC to
+                    // reference EITHER a Methodref OR an InterfaceMethodref.
+                    // Not sure if that affects this code or not.  (markro)
+                    ConstantMethodref c = (ConstantMethodref) constant_pool.getConstant(m_index,
+                            CONSTANT_Methodref);
+                    class_index = c.getClassIndex();
+                    index = c.getNameAndTypeIndex();
+                name = Class2HTML.referenceClass(class_index);
+                }
+                str = Class2HTML.toHTML(constant_pool.constantToString(constant_pool.getConstant(
+                        index, CONSTANT_NameAndType)));
+                // Get signature, i.e., types
+                ConstantNameAndType c2 = (ConstantNameAndType) constant_pool.getConstant(index,
+                        CONSTANT_NameAndType);
+                signature = constant_pool.constantToString(c2.getSignatureIndex(), CONSTANT_Utf8);
+                String[] args = Utility.methodSignatureArgumentTypes(signature, false);
+                String type = Utility.methodSignatureReturnType(signature, false);
+                buf.append(name).append(".<A HREF=\"").append(class_name).append("_cp.html#cp")
+                        .append(m_index).append("\" TARGET=ConstantPool>").append(str).append(
+                                "</A>").append("(");
+                // List arguments
+                for (int i = 0; i < args.length; i++) {
+                    buf.append(Class2HTML.referenceType(args[i]));
+                    if (i < args.length - 1) {
+                        buf.append(", ");
+                    }
+                }
+                // Attach return type
+                buf.append("):").append(Class2HTML.referenceType(type));
+                break;
+            /* Operands are references to items in constant pool
+             */
+            case LDC_W:
+            case LDC2_W:
+                index = bytes.readShort();
+                buf.append("<A HREF=\"").append(class_name).append("_cp.html#cp").append(index)
+                        .append("\" TARGET=\"ConstantPool\">").append(
+                                Class2HTML.toHTML(constant_pool.constantToString(index,
+                                        constant_pool.getConstant(index).getTag()))).append("</a>");
+                break;
+            case LDC:
+                index = bytes.readUnsignedByte();
+                buf.append("<A HREF=\"").append(class_name).append("_cp.html#cp").append(index)
+                        .append("\" TARGET=\"ConstantPool\">").append(
+                                Class2HTML.toHTML(constant_pool.constantToString(index,
+                                        constant_pool.getConstant(index).getTag()))).append("</a>");
+                break;
+            /* Array of references.
+             */
+            case ANEWARRAY:
+                index = bytes.readShort();
+                buf.append(constant_html.referenceConstant(index));
+                break;
+            /* Multidimensional array of references.
+             */
+            case MULTIANEWARRAY:
+                index = bytes.readShort();
+                int dimensions = bytes.readByte();
+                buf.append(constant_html.referenceConstant(index)).append(":").append(dimensions)
+                        .append("-dimensional");
+                break;
+            /* Increment local variable.
+             */
+            case IINC:
+                if (wide) {
+                    vindex = bytes.readShort();
+                    constant = bytes.readShort();
+                    wide = false;
+                } else {
+                    vindex = bytes.readUnsignedByte();
+                    constant = bytes.readByte();
+                }
+                buf.append("%").append(vindex).append(" ").append(constant);
+                break;
+            default:
+                if (NO_OF_OPERANDS[opcode] > 0) {
+                    for (int i = 0; i < TYPE_OF_OPERANDS[opcode].length; i++) {
+                        switch (TYPE_OF_OPERANDS[opcode][i]) {
+                            case T_BYTE:
+                                buf.append(bytes.readUnsignedByte());
+                                break;
+                            case T_SHORT: // Either branch or index
+                                buf.append(bytes.readShort());
+                                break;
+                            case T_INT:
+                                buf.append(bytes.readInt());
+                                break;
+                            default: // Never reached
+                                System.err.println("Unreachable default case reached!");
+                                System.exit(-1);
+                        }
+                        buf.append("&nbsp;");
+                    }
+                }
+        }
+        buf.append("</TD>");
+        return buf.toString();
+    }
+
+
+    /**
+     * Find all target addresses in code, so that they can be marked
+     * with &lt;A NAME = ...&gt;. Target addresses are kept in an BitSet object.
+     */
+    private void findGotos( ByteSequence bytes, Code code ) throws IOException {
+        int index;
+        goto_set = new BitSet(bytes.available());
+        int opcode;
+        /* First get Code attribute from method and the exceptions handled
+         * (try .. catch) in this method. We only need the line number here.
+         */
+        if (code != null) {
+            CodeException[] ce = code.getExceptionTable();
+            for (CodeException cex : ce) {
+                goto_set.set(cex.getStartPC());
+                goto_set.set(cex.getEndPC());
+                goto_set.set(cex.getHandlerPC());
+            }
+            // Look for local variables and their range
+            Attribute[] attributes = code.getAttributes();
+            for (Attribute attribute : attributes) {
+                if (attribute.getTag() == ATTR_LOCAL_VARIABLE_TABLE) {
+                    LocalVariable[] vars = ((LocalVariableTable) attribute)
+                            .getLocalVariableTable();
+                    for (LocalVariable var : vars) {
+                        int start = var.getStartPC();
+                        int end = (start + var.getLength());
+                        goto_set.set(start);
+                        goto_set.set(end);
+                    }
+                    break;
+                }
+            }
+        }
+        // Get target addresses from GOTO, JSR, TABLESWITCH, etc.
+        for (; bytes.available() > 0;) {
+            opcode = bytes.readUnsignedByte();
+            //System.out.println(OPCODE_NAMES[opcode]);
+            switch (opcode) {
+                case TABLESWITCH:
+                case LOOKUPSWITCH:
+                    //bytes.readByte(); // Skip already read byte
+                    int remainder = bytes.getIndex() % 4;
+                    int no_pad_bytes = (remainder == 0) ? 0 : 4 - remainder;
+                    int default_offset,
+                    offset;
+                    for (int j = 0; j < no_pad_bytes; j++) {
+                        bytes.readByte();
+                    }
+                    // Both cases have a field default_offset in common
+                    default_offset = bytes.readInt();
+                    if (opcode == TABLESWITCH) {
+                        int low = bytes.readInt();
+                        int high = bytes.readInt();
+                        offset = bytes.getIndex() - 12 - no_pad_bytes - 1;
+                        default_offset += offset;
+                        goto_set.set(default_offset);
+                        for (int j = 0; j < (high - low + 1); j++) {
+                            index = offset + bytes.readInt();
+                            goto_set.set(index);
+                        }
+                    } else { // LOOKUPSWITCH
+                        int npairs = bytes.readInt();
+                        offset = bytes.getIndex() - 8 - no_pad_bytes - 1;
+                        default_offset += offset;
+                        goto_set.set(default_offset);
+                        for (int j = 0; j < npairs; j++) {
+//                            int match = bytes.readInt();
+                            bytes.readInt();
+                            index = offset + bytes.readInt();
+                            goto_set.set(index);
+                        }
+                    }
+                    break;
+                case GOTO:
+                case IFEQ:
+                case IFGE:
+                case IFGT:
+                case IFLE:
+                case IFLT:
+                case IFNE:
+                case IFNONNULL:
+                case IFNULL:
+                case IF_ACMPEQ:
+                case IF_ACMPNE:
+                case IF_ICMPEQ:
+                case IF_ICMPGE:
+                case IF_ICMPGT:
+                case IF_ICMPLE:
+                case IF_ICMPLT:
+                case IF_ICMPNE:
+                case JSR:
+                    //bytes.readByte(); // Skip already read byte
+                    index = bytes.getIndex() + bytes.readShort() - 1;
+                    goto_set.set(index);
+                    break;
+                case GOTO_W:
+                case JSR_W:
+                    //bytes.readByte(); // Skip already read byte
+                    index = bytes.getIndex() + bytes.readInt() - 1;
+                    goto_set.set(index);
+                    break;
+                default:
+                    bytes.unreadByte();
+                    codeToHTML(bytes, 0); // Ignore output
+            }
+        }
+    }
+
+
+    /**
+     * Write a single method with the byte code associated with it.
+     */
+    private void writeMethod( Method method, int method_number ) throws IOException {
+        // Get raw signature
+        String signature = method.getSignature();
+        // Get array of strings containing the argument types
+        String[] args = Utility.methodSignatureArgumentTypes(signature, false);
+        // Get return type string
+        String type = Utility.methodSignatureReturnType(signature, false);
+        // Get method name
+        String name = method.getName();
+        String html_name = Class2HTML.toHTML(name);
+        // Get method's access flags
+        String access = Utility.accessToString(method.getAccessFlags());
+        access = Utility.replace(access, " ", "&nbsp;");
+        // Get the method's attributes, the Code Attribute in particular
+        Attribute[] attributes = method.getAttributes();
+        file.print("<P><B><FONT COLOR=\"#FF0000\">" + access + "</FONT>&nbsp;" + "<A NAME=method"
+                + method_number + ">" + Class2HTML.referenceType(type) + "</A>&nbsp<A HREF=\""
+                + class_name + "_methods.html#method" + method_number + "\" TARGET=Methods>"
+                + html_name + "</A>(");
+        for (int i = 0; i < args.length; i++) {
+            file.print(Class2HTML.referenceType(args[i]));
+            if (i < args.length - 1) {
+                file.print(",&nbsp;");
+            }
+        }
+        file.println(")</B></P>");
+        Code c = null;
+        byte[] code = null;
+        if (attributes.length > 0) {
+            file.print("<H4>Attributes</H4><UL>\n");
+            for (int i = 0; i < attributes.length; i++) {
+                byte tag = attributes[i].getTag();
+                if (tag != ATTR_UNKNOWN) {
+                    file.print("<LI><A HREF=\"" + class_name + "_attributes.html#method"
+                            + method_number + "@" + i + "\" TARGET=Attributes>"
+                            + ATTRIBUTE_NAMES[tag] + "</A></LI>\n");
+                } else {
+                    file.print("<LI>" + attributes[i] + "</LI>");
+                }
+                if (tag == ATTR_CODE) {
+                    c = (Code) attributes[i];
+                    Attribute[] attributes2 = c.getAttributes();
+                    code = c.getCode();
+                    file.print("<UL>");
+                    for (int j = 0; j < attributes2.length; j++) {
+                        tag = attributes2[j].getTag();
+                        file.print("<LI><A HREF=\"" + class_name + "_attributes.html#" + "method"
+                                + method_number + "@" + i + "@" + j + "\" TARGET=Attributes>"
+                                + ATTRIBUTE_NAMES[tag] + "</A></LI>\n");
+                    }
+                    file.print("</UL>");
+                }
+            }
+            file.println("</UL>");
+        }
+        if (code != null) { // No code, an abstract method, e.g.
+            //System.out.println(name + "\n" + Utility.codeToString(code, constant_pool, 0, -1));
+            // Print the byte code
+            ByteSequence stream = new ByteSequence(code);
+            stream.mark(stream.available());
+            findGotos(stream, c);
+            stream.reset();
+            file.println("<TABLE BORDER=0><TR><TH ALIGN=LEFT>Byte<BR>offset</TH>"
+                    + "<TH ALIGN=LEFT>Instruction</TH><TH ALIGN=LEFT>Argument</TH>");
+            for (; stream.available() > 0;) {
+                int offset = stream.getIndex();
+                String str = codeToHTML(stream, method_number);
+                String anchor = "";
+                /* Set an anchor mark if this line is targetted by a goto, jsr, etc.
+                 * Defining an anchor for every line is very inefficient!
+                 */
+                if (goto_set.get(offset)) {
+                    anchor = "<A NAME=code" + method_number + "@" + offset + "></A>";
+                }
+                String anchor2;
+                if (stream.getIndex() == code.length) {
+                    anchor2 = "<A NAME=code" + method_number + "@" + code.length + ">" + offset
+                            + "</A>";
+                } else {
+                    anchor2 = "" + offset;
+                }
+                file
+                        .println("<TR VALIGN=TOP><TD>" + anchor2 + "</TD><TD>" + anchor + str
+                                + "</TR>");
+            }
+            // Mark last line, may be targetted from Attributes window
+            file.println("<TR><TD> </A></TD></TR>");
+            file.println("</TABLE>");
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/ConstantHTML.java b/src/main/java/org/apache/commons/bcel6/util/ConstantHTML.java
new file mode 100644
index 0000000..e52ac86
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/ConstantHTML.java
@@ -0,0 +1,235 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
+import org.apache.commons.bcel6.classfile.ConstantMethodref;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantString;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.Utility;
+
+/**
+ * Convert constant pool into HTML file.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * 
+ */
+final class ConstantHTML implements org.apache.commons.bcel6.Constants {
+
+    private final String class_name; // name of current class
+    private final String class_package; // name of package
+    private final ConstantPool constant_pool; // reference to constant pool
+    private final PrintWriter file; // file to write to
+    private final String[] constant_ref; // String to return for cp[i]
+    private final Constant[] constants; // The constants in the cp
+    private final Method[] methods;
+
+
+    ConstantHTML(String dir, String class_name, String class_package, Method[] methods,
+            ConstantPool constant_pool) throws IOException {
+        this.class_name = class_name;
+        this.class_package = class_package;
+        this.constant_pool = constant_pool;
+        this.methods = methods;
+        constants = constant_pool.getConstantPool();
+        file = new PrintWriter(new FileOutputStream(dir + class_name + "_cp.html"));
+        constant_ref = new String[constants.length];
+        constant_ref[0] = "&lt;unknown&gt;";
+        file.println("<HTML><BODY BGCOLOR=\"#C0C0C0\"><TABLE BORDER=0>");
+        // Loop through constants, constants[0] is reserved
+        for (int i = 1; i < constants.length; i++) {
+            if (i % 2 == 0) {
+                file.print("<TR BGCOLOR=\"#C0C0C0\"><TD>");
+            } else {
+                file.print("<TR BGCOLOR=\"#A0A0A0\"><TD>");
+            }
+            if (constants[i] != null) {
+                writeConstant(i);
+            }
+            file.print("</TD></TR>\n");
+        }
+        file.println("</TABLE></BODY></HTML>");
+        file.close();
+    }
+
+
+    String referenceConstant( int index ) {
+        return constant_ref[index];
+    }
+
+
+    private void writeConstant( int index ) {
+        byte tag = constants[index].getTag();
+        int class_index, name_index;
+        String ref;
+        // The header is always the same
+        file.println("<H4> <A NAME=cp" + index + ">" + index + "</A> " + CONSTANT_NAMES[tag]
+                + "</H4>");
+        /* For every constant type get the needed parameters and print them appropiately 
+         */
+        switch (tag) {
+            case CONSTANT_InterfaceMethodref:
+            case CONSTANT_Methodref:
+                // Get class_index and name_and_type_index, depending on type
+                if (tag == CONSTANT_Methodref) {
+                    ConstantMethodref c = (ConstantMethodref) constant_pool.getConstant(index,
+                            CONSTANT_Methodref);
+                    class_index = c.getClassIndex();
+                    name_index = c.getNameAndTypeIndex();
+                } else {
+                    ConstantInterfaceMethodref c1 = (ConstantInterfaceMethodref) constant_pool
+                            .getConstant(index, CONSTANT_InterfaceMethodref);
+                    class_index = c1.getClassIndex();
+                    name_index = c1.getNameAndTypeIndex();
+                }
+                // Get method name and its class
+                String method_name = constant_pool.constantToString(name_index,
+                        CONSTANT_NameAndType);
+                String html_method_name = Class2HTML.toHTML(method_name);
+                // Partially compacted class name, i.e., / -> .
+                String method_class = constant_pool.constantToString(class_index, CONSTANT_Class);
+                String short_method_class = Utility.compactClassName(method_class); // I.e., remove java.lang.
+                short_method_class = Utility.compactClassName(short_method_class, class_package
+                        + ".", true); // Remove class package prefix
+                // Get method signature
+                ConstantNameAndType c2 = (ConstantNameAndType) constant_pool.getConstant(
+                        name_index, CONSTANT_NameAndType);
+                String signature = constant_pool.constantToString(c2.getSignatureIndex(),
+                        CONSTANT_Utf8);
+                // Get array of strings containing the argument types
+                String[] args = Utility.methodSignatureArgumentTypes(signature, false);
+                // Get return type string
+                String type = Utility.methodSignatureReturnType(signature, false);
+                String ret_type = Class2HTML.referenceType(type);
+                StringBuilder buf = new StringBuilder("(");
+                for (int i = 0; i < args.length; i++) {
+                    buf.append(Class2HTML.referenceType(args[i]));
+                    if (i < args.length - 1) {
+                        buf.append(",&nbsp;");
+                    }
+                }
+                buf.append(")");
+                String arg_types = buf.toString();
+                if (method_class.equals(class_name)) {
+                    ref = "<A HREF=\"" + class_name + "_code.html#method"
+                            + getMethodNumber(method_name + signature) + "\" TARGET=Code>"
+                            + html_method_name + "</A>";
+                } else {
+                    ref = "<A HREF=\"" + method_class + ".html" + "\" TARGET=_top>"
+                            + short_method_class + "</A>." + html_method_name;
+                }
+                constant_ref[index] = ret_type + "&nbsp;<A HREF=\"" + class_name + "_cp.html#cp"
+                        + class_index + "\" TARGET=Constants>" + short_method_class
+                        + "</A>.<A HREF=\"" + class_name + "_cp.html#cp" + index
+                        + "\" TARGET=ConstantPool>" + html_method_name + "</A>&nbsp;" + arg_types;
+                file.println("<P><TT>" + ret_type + "&nbsp;" + ref + arg_types
+                        + "&nbsp;</TT>\n<UL>" + "<LI><A HREF=\"#cp" + class_index
+                        + "\">Class index(" + class_index + ")</A>\n" + "<LI><A HREF=\"#cp"
+                        + name_index + "\">NameAndType index(" + name_index + ")</A></UL>");
+                break;
+            case CONSTANT_Fieldref:
+                // Get class_index and name_and_type_index
+                ConstantFieldref c3 = (ConstantFieldref) constant_pool.getConstant(index,
+                        CONSTANT_Fieldref);
+                class_index = c3.getClassIndex();
+                name_index = c3.getNameAndTypeIndex();
+                // Get method name and its class (compacted)
+                String field_class = constant_pool.constantToString(class_index, CONSTANT_Class);
+                String short_field_class = Utility.compactClassName(field_class); // I.e., remove java.lang.
+                short_field_class = Utility.compactClassName(short_field_class,
+                        class_package + ".", true); // Remove class package prefix
+                String field_name = constant_pool
+                        .constantToString(name_index, CONSTANT_NameAndType);
+                if (field_class.equals(class_name)) {
+                    ref = "<A HREF=\"" + field_class + "_methods.html#field" + field_name
+                            + "\" TARGET=Methods>" + field_name + "</A>";
+                } else {
+                    ref = "<A HREF=\"" + field_class + ".html\" TARGET=_top>" + short_field_class
+                            + "</A>." + field_name + "\n";
+                }
+                constant_ref[index] = "<A HREF=\"" + class_name + "_cp.html#cp" + class_index
+                        + "\" TARGET=Constants>" + short_field_class + "</A>.<A HREF=\""
+                        + class_name + "_cp.html#cp" + index + "\" TARGET=ConstantPool>"
+                        + field_name + "</A>";
+                file.println("<P><TT>" + ref + "</TT><BR>\n" + "<UL>" + "<LI><A HREF=\"#cp"
+                        + class_index + "\">Class(" + class_index + ")</A><BR>\n"
+                        + "<LI><A HREF=\"#cp" + name_index + "\">NameAndType(" + name_index
+                        + ")</A></UL>");
+                break;
+            case CONSTANT_Class:
+                ConstantClass c4 = (ConstantClass) constant_pool.getConstant(index, CONSTANT_Class);
+                name_index = c4.getNameIndex();
+                String class_name2 = constant_pool.constantToString(index, tag); // / -> .
+                String short_class_name = Utility.compactClassName(class_name2); // I.e., remove java.lang.
+                short_class_name = Utility.compactClassName(short_class_name, class_package + ".",
+                        true); // Remove class package prefix
+                ref = "<A HREF=\"" + class_name2 + ".html\" TARGET=_top>" + short_class_name
+                        + "</A>";
+                constant_ref[index] = "<A HREF=\"" + class_name + "_cp.html#cp" + index
+                        + "\" TARGET=ConstantPool>" + short_class_name + "</A>";
+                file.println("<P><TT>" + ref + "</TT><UL>" + "<LI><A HREF=\"#cp" + name_index
+                        + "\">Name index(" + name_index + ")</A></UL>\n");
+                break;
+            case CONSTANT_String:
+                ConstantString c5 = (ConstantString) constant_pool.getConstant(index,
+                        CONSTANT_String);
+                name_index = c5.getStringIndex();
+                String str = Class2HTML.toHTML(constant_pool.constantToString(index, tag));
+                file.println("<P><TT>" + str + "</TT><UL>" + "<LI><A HREF=\"#cp" + name_index
+                        + "\">Name index(" + name_index + ")</A></UL>\n");
+                break;
+            case CONSTANT_NameAndType:
+                ConstantNameAndType c6 = (ConstantNameAndType) constant_pool.getConstant(index,
+                        CONSTANT_NameAndType);
+                name_index = c6.getNameIndex();
+                int signature_index = c6.getSignatureIndex();
+                file.println("<P><TT>"
+                        + Class2HTML.toHTML(constant_pool.constantToString(index, tag))
+                        + "</TT><UL>" + "<LI><A HREF=\"#cp" + name_index + "\">Name index("
+                        + name_index + ")</A>\n" + "<LI><A HREF=\"#cp" + signature_index
+                        + "\">Signature index(" + signature_index + ")</A></UL>\n");
+                break;
+            default:
+                file
+                        .println("<P><TT>"
+                                + Class2HTML.toHTML(constant_pool.constantToString(index, tag))
+                                + "</TT>\n");
+        } // switch
+    }
+
+
+    private int getMethodNumber( String str ) {
+        for (int i = 0; i < methods.length; i++) {
+            String cmp = methods[i].getName() + methods[i].getSignature();
+            if (cmp.equals(str)) {
+                return i;
+            }
+        }
+        return -1;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java b/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java
new file mode 100644
index 0000000..7a03aae
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/InstructionFinder.java
@@ -0,0 +1,428 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ClassGenException;
+import org.apache.commons.bcel6.generic.Instruction;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+
+/**
+ * InstructionFinder is a tool to search for given instructions patterns, i.e.,
+ * match sequences of instructions in an instruction list via regular
+ * expressions. This can be used, e.g., in order to implement a peep hole
+ * optimizer that looks for code patterns and replaces them with faster
+ * equivalents.
+ * 
+ * <p>
+ * This class internally uses the java.util.regex
+ * package to search for regular expressions.
+ * 
+ * A typical application would look like this:
+ * 
+ * <pre>
+ * 
+ *  
+ *   InstructionFinder f   = new InstructionFinder(il);
+ *   String            pat = &quot;IfInstruction ICONST_0 GOTO ICONST_1 NOP (IFEQ|IFNE)&quot;;
+ *   
+ *   for(Iterator i = f.search(pat, constraint); i.hasNext(); ) {
+ *   InstructionHandle[] match = (InstructionHandle[])i.next();
+ *   ...
+ *   il.delete(match[1], match[5]);
+ *   ...
+ *   }
+ *   
+ *  
+ * </pre>
+ * 
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see Instruction
+ * @see InstructionList
+ */
+public class InstructionFinder {
+
+    private static final int OFFSET = 32767; // char + OFFSET is
+    // outside of
+    // LATIN-1
+    private static final int NO_OPCODES = 256; // Potential number,
+    // some are not used
+    private static final Map<String, String> map = new HashMap<String, String>();
+    private final InstructionList il;
+    private String il_string; // instruction list
+    // as string
+    private InstructionHandle[] handles; // map instruction
+
+
+    // list to array
+    /**
+     * @param il
+     *          instruction list to search for given patterns
+     */
+    public InstructionFinder(InstructionList il) {
+        this.il = il;
+        reread();
+    }
+
+
+    /**
+     * Reread the instruction list, e.g., after you've altered the list upon a
+     * match.
+     */
+    public final void reread() {
+        int size = il.getLength();
+        char[] buf = new char[size]; // Create a string with length equal to il
+        // length
+        handles = il.getInstructionHandles();
+        // Map opcodes to characters
+        for (int i = 0; i < size; i++) {
+            buf[i] = makeChar(handles[i].getInstruction().getOpcode());
+        }
+        il_string = new String(buf);
+    }
+
+
+    /**
+     * Map symbolic instruction names like "getfield" to a single character.
+     * 
+     * @param pattern
+     *          instruction pattern in lower case
+     * @return encoded string for a pattern such as "BranchInstruction".
+     */
+    private static String mapName( String pattern ) {
+        String result = map.get(pattern);
+        if (result != null) {
+            return result;
+        }
+        for (short i = 0; i < NO_OPCODES; i++) {
+            if (pattern.equals(Constants.OPCODE_NAMES[i])) {
+                return "" + makeChar(i);
+            }
+        }
+        throw new RuntimeException("Instruction unknown: " + pattern);
+    }
+
+
+    /**
+     * Replace symbolic names of instructions with the appropiate character and
+     * remove all white space from string. Meta characters such as +, * are
+     * ignored.
+     * 
+     * @param pattern
+     *          The pattern to compile
+     * @return translated regular expression string
+     */
+    private static String compilePattern( String pattern ) {
+        //Bug: BCEL-77 - Instructions are assumed to be english, to avoid odd Locale issues
+        String lower = pattern.toLowerCase(Locale.ENGLISH);
+        StringBuilder buf = new StringBuilder();
+        int size = pattern.length();
+        for (int i = 0; i < size; i++) {
+            char ch = lower.charAt(i);
+            if (Character.isLetterOrDigit(ch)) {
+                StringBuilder name = new StringBuilder();
+                while ((Character.isLetterOrDigit(ch) || ch == '_') && i < size) {
+                    name.append(ch);
+                    if (++i < size) {
+                        ch = lower.charAt(i);
+                    } else {
+                        break;
+                    }
+                }
+                i--;
+                buf.append(mapName(name.toString()));
+            } else if (!Character.isWhitespace(ch)) {
+                buf.append(ch);
+            }
+        }
+        return buf.toString();
+    }
+
+
+    /**
+     * @return the matched piece of code as an array of instruction (handles)
+     */
+    private InstructionHandle[] getMatch( int matched_from, int match_length ) {
+        InstructionHandle[] match = new InstructionHandle[match_length];
+        System.arraycopy(handles, matched_from, match, 0, match_length);
+        return match;
+    }
+
+
+    /**
+     * Search for the given pattern in the instruction list. You can search for
+     * any valid opcode via its symbolic name, e.g. "istore". You can also use a
+     * super class or an interface name to match a whole set of instructions, e.g.
+     * "BranchInstruction" or "LoadInstruction". "istore" is also an alias for all
+     * "istore_x" instructions. Additional aliases are "if" for "ifxx", "if_icmp"
+     * for "if_icmpxx", "if_acmp" for "if_acmpxx".
+     * 
+     * Consecutive instruction names must be separated by white space which will
+     * be removed during the compilation of the pattern.
+     * 
+     * For the rest the usual pattern matching rules for regular expressions
+     * apply.
+     * <P>
+     * Example pattern:
+     * 
+     * <pre>
+     * search(&quot;BranchInstruction NOP ((IfInstruction|GOTO)+ ISTORE Instruction)*&quot;);
+     * </pre>
+     * 
+     * <p>
+     * If you alter the instruction list upon a match such that other matching
+     * areas are affected, you should call reread() to update the finder and call
+     * search() again, because the matches are cached.
+     * 
+     * @param pattern
+     *          the instruction pattern to search for, where case is ignored
+     * @param from
+     *          where to start the search in the instruction list
+     * @param constraint
+     *          optional CodeConstraint to check the found code pattern for
+     *          user-defined constraints
+     * @return iterator of matches where e.nextElement() returns an array of
+     *         instruction handles describing the matched area
+     */
+    public final Iterator<InstructionHandle[]> search( String pattern, InstructionHandle from, CodeConstraint constraint ) {
+        String search = compilePattern(pattern);
+        int start = -1;
+        for (int i = 0; i < handles.length; i++) {
+            if (handles[i] == from) {
+                start = i; // Where to start search from (index)
+                break;
+            }
+        }
+        if (start == -1) {
+            throw new ClassGenException("Instruction handle " + from
+                    + " not found in instruction list.");
+        }
+        Pattern regex = Pattern.compile(search);
+        List<InstructionHandle[]> matches = new ArrayList<InstructionHandle[]>();
+        Matcher matcher = regex.matcher(il_string);
+        while (start < il_string.length() && matcher.find(start)) {
+            int startExpr = matcher.start();
+            int endExpr = matcher.end();
+            int lenExpr = (endExpr - startExpr);
+            InstructionHandle[] match = getMatch(startExpr, lenExpr);
+            if ((constraint == null) || constraint.checkCode(match)) {
+                matches.add(match);
+            }
+            start = endExpr;
+        }
+        return matches.iterator();
+    }
+
+
+    /**
+     * Start search beginning from the start of the given instruction list.
+     * 
+     * @param pattern
+     *          the instruction pattern to search for, where case is ignored
+     * @return iterator of matches where e.nextElement() returns an array of
+     *         instruction handles describing the matched area
+     */
+    public final Iterator<InstructionHandle[]> search( String pattern ) {
+        return search(pattern, il.getStart(), null);
+    }
+
+
+    /**
+     * Start search beginning from `from'.
+     * 
+     * @param pattern
+     *          the instruction pattern to search for, where case is ignored
+     * @param from
+     *          where to start the search in the instruction list
+     * @return iterator of matches where e.nextElement() returns an array of
+     *         instruction handles describing the matched area
+     */
+    public final Iterator<InstructionHandle[]> search( String pattern, InstructionHandle from ) {
+        return search(pattern, from, null);
+    }
+
+
+    /**
+     * Start search beginning from the start of the given instruction list. Check
+     * found matches with the constraint object.
+     * 
+     * @param pattern
+     *          the instruction pattern to search for, case is ignored
+     * @param constraint
+     *          constraints to be checked on matching code
+     * @return instruction handle or `null' if the match failed
+     */
+    public final Iterator<InstructionHandle[]> search( String pattern, CodeConstraint constraint ) {
+        return search(pattern, il.getStart(), constraint);
+    }
+
+
+    /**
+     * Convert opcode number to char.
+     */
+    private static char makeChar( short opcode ) {
+        return (char) (opcode + OFFSET);
+    }
+
+
+    /**
+     * @return the inquired instruction list
+     */
+    public final InstructionList getInstructionList() {
+        return il;
+    }
+
+    /**
+     * Code patterns found may be checked using an additional user-defined
+     * constraint object whether they really match the needed criterion. I.e.,
+     * check constraints that can not expressed with regular expressions.
+     * 
+     */
+    public static interface CodeConstraint {
+
+        /**
+         * @param match
+         *          array of instructions matching the requested pattern
+         * @return true if the matched area is really useful
+         */
+        public boolean checkCode( InstructionHandle[] match );
+    }
+
+    // Initialize pattern map
+    static {
+        map.put("arithmeticinstruction","(irem|lrem|iand|ior|ineg|isub|lneg|fneg|fmul|ldiv|fadd|lxor|frem|idiv|land|ixor|ishr|fsub|lshl|fdiv|iadd|lor|dmul|lsub|ishl|imul|lmul|lushr|dneg|iushr|lshr|ddiv|drem|dadd|ladd|dsub)");
+        map.put("invokeinstruction", "(invokevirtual|invokeinterface|invokestatic|invokespecial|invokedynamic)");
+        map.put("arrayinstruction", "(baload|aastore|saload|caload|fastore|lastore|iaload|castore|iastore|aaload|bastore|sastore|faload|laload|daload|dastore)");
+        map.put("gotoinstruction", "(goto|goto_w)");
+        map.put("conversioninstruction", "(d2l|l2d|i2s|d2i|l2i|i2b|l2f|d2f|f2i|i2d|i2l|f2d|i2c|f2l|i2f)");
+        map.put("localvariableinstruction","(fstore|iinc|lload|dstore|dload|iload|aload|astore|istore|fload|lstore)");
+        map.put("loadinstruction", "(fload|dload|lload|iload|aload)");
+        map.put("fieldinstruction", "(getfield|putstatic|getstatic|putfield)");
+        map.put("cpinstruction", "(ldc2_w|invokeinterface|invokedynamic|multianewarray|putstatic|instanceof|getstatic|checkcast|getfield|invokespecial|ldc_w|invokestatic|invokevirtual|putfield|ldc|new|anewarray)");
+        map.put("stackinstruction", "(dup2|swap|dup2_x2|pop|pop2|dup|dup2_x1|dup_x2|dup_x1)");
+        map.put("branchinstruction", "(ifle|if_acmpne|if_icmpeq|if_acmpeq|ifnonnull|goto_w|iflt|ifnull|if_icmpne|tableswitch|if_icmple|ifeq|if_icmplt|jsr_w|if_icmpgt|ifgt|jsr|goto|ifne|ifge|lookupswitch|if_icmpge)");
+        map.put("returninstruction", "(lreturn|ireturn|freturn|dreturn|areturn|return)");
+        map.put("storeinstruction", "(istore|fstore|dstore|astore|lstore)");
+        map.put("select", "(tableswitch|lookupswitch)");
+        map.put("ifinstruction", "(ifeq|ifgt|if_icmpne|if_icmpeq|ifge|ifnull|ifne|if_icmple|if_icmpge|if_acmpeq|if_icmplt|if_acmpne|ifnonnull|iflt|if_icmpgt|ifle)");
+        map.put("jsrinstruction", "(jsr|jsr_w)");
+        map.put("variablelengthinstruction", "(tableswitch|jsr|goto|lookupswitch)");
+        map.put("unconditionalbranch", "(goto|jsr|jsr_w|athrow|goto_w)");
+        map.put("constantpushinstruction", "(dconst|bipush|sipush|fconst|iconst|lconst)");
+        map.put("typedinstruction", "(imul|lsub|aload|fload|lor|new|aaload|fcmpg|iand|iaload|lrem|idiv|d2l|isub|dcmpg|dastore|ret|f2d|f2i|drem|iinc|i2c|checkcast|frem|lreturn|astore|lushr|daload|dneg|fastore|istore|lshl|ldiv|lstore|areturn|ishr|ldc_w|invokeinterface|invokedynamic|aastore|lxor|ishl|l2d|i2f|return|faload|sipush|iushr|caload|instanceof|invokespecial|putfield|fmul|ireturn|laload|d2f|lneg|ixor|i2l|fdiv|lastore|multianewarray|i2b|getstatic|i2d|putstatic|fcmpl|saload|ladd|irem|dload|jsr_w|dconst|dcmpl|fsub|freturn|ldc|aconst_null|castore|lmul|ldc2_w|dadd|iconst|f2l|ddiv|dstore|land|jsr|anewarray|dmul|bipush|dsub|sastore|d2i|i2s|lshr|iadd|l2i|lload|bastore|fstore|fneg|iload|fadd|baload|fconst|ior|ineg|dreturn|l2f|lconst|getfield|invokevirtual|invokestatic|iastore)");
+        map.put("popinstruction", "(fstore|dstore|pop|pop2|astore|putstatic|istore|lstore)");
+        map.put("allocationinstruction", "(multianewarray|new|anewarray|newarray)");
+        map.put("indexedinstruction", "(lload|lstore|fload|ldc2_w|invokeinterface|invokedynamic|multianewarray|astore|dload|putstatic|instanceof|getstatic|checkcast|getfield|invokespecial|dstore|istore|iinc|ldc_w|ret|fstore|invokestatic|iload|putfield|invokevirtual|ldc|new|aload|anewarray)");
+        map.put("pushinstruction", "(dup|lload|dup2|bipush|fload|ldc2_w|sipush|lconst|fconst|dload|getstatic|ldc_w|aconst_null|dconst|iload|ldc|iconst|aload)");
+        map.put("stackproducer", "(imul|lsub|aload|fload|lor|new|aaload|fcmpg|iand|iaload|lrem|idiv|d2l|isub|dcmpg|dup|f2d|f2i|drem|i2c|checkcast|frem|lushr|daload|dneg|lshl|ldiv|ishr|ldc_w|invokeinterface|invokedynamic|lxor|ishl|l2d|i2f|faload|sipush|iushr|caload|instanceof|invokespecial|fmul|laload|d2f|lneg|ixor|i2l|fdiv|getstatic|i2b|swap|i2d|dup2|fcmpl|saload|ladd|irem|dload|jsr_w|dconst|dcmpl|fsub|ldc|arraylength|aconst_null|tableswitch|lmul|ldc2_w|iconst|dadd|f2l|ddiv|land|jsr|anewarray|dmul|bipush|dsub|d2i|newarray|i2s|lshr|iadd|lload|l2i|fneg|iload|fadd|baload|fconst|lookupswitch|ior|ineg|lconst|l2f|getfield|invokevirtual|invokestatic)");
+        map.put("stackconsumer", "(imul|lsub|lor|iflt|fcmpg|if_icmpgt|iand|ifeq|if_icmplt|lrem|ifnonnull|idiv|d2l|isub|dcmpg|dastore|if_icmpeq|f2d|f2i|drem|i2c|checkcast|frem|lreturn|astore|lushr|pop2|monitorexit|dneg|fastore|istore|lshl|ldiv|lstore|areturn|if_icmpge|ishr|monitorenter|invokeinterface|invokedynamic|aastore|lxor|ishl|l2d|i2f|return|iushr|instanceof|invokespecial|fmul|ireturn|d2f|lneg|ixor|pop|i2l|ifnull|fdiv|lastore|i2b|if_acmpeq|ifge|swap|i2d|putstatic|fcmpl|ladd|irem|dcmpl|fsub|freturn|ifgt|castore|lmul|dadd|f2l|ddiv|dstore|land|if_icmpne|if_acmpne|dmul|dsub|sastore|ifle|d2i|i2s|lshr|iadd|l2i|bastore|fstore|fneg|fadd|ior|ineg|ifne|dreturn|l2f|if_icmple|getfield|invokevirtual|invokestatic|iastore)");
+        map.put("exceptionthrower","(irem|lrem|laload|putstatic|baload|dastore|areturn|getstatic|ldiv|anewarray|iastore|castore|idiv|saload|lastore|fastore|putfield|lreturn|caload|getfield|return|aastore|freturn|newarray|instanceof|multianewarray|athrow|faload|iaload|aaload|dreturn|monitorenter|checkcast|bastore|arraylength|new|invokevirtual|sastore|ldc_w|ireturn|invokespecial|monitorexit|invokeinterface|invokedynamic|ldc|invokestatic|daload)");
+        map.put("loadclass", "(multianewarray|invokeinterface|invokedynamic|instanceof|invokespecial|putfield|checkcast|putstatic|invokevirtual|new|getstatic|invokestatic|getfield|anewarray)");
+        map.put("instructiontargeter", "(ifle|if_acmpne|if_icmpeq|if_acmpeq|ifnonnull|goto_w|iflt|ifnull|if_icmpne|tableswitch|if_icmple|ifeq|if_icmplt|jsr_w|if_icmpgt|ifgt|jsr|goto|ifne|ifge|lookupswitch|if_icmpge)");
+        // Some aliases
+        map.put("if_icmp", "(if_icmpne|if_icmpeq|if_icmple|if_icmpge|if_icmplt|if_icmpgt)");
+        map.put("if_acmp", "(if_acmpeq|if_acmpne)");
+        map.put("if", "(ifeq|ifne|iflt|ifge|ifgt|ifle)");
+        // Precompile some aliases first
+        map.put("iconst", precompile(Constants.ICONST_0, Constants.ICONST_5, Constants.ICONST_M1));
+        map.put("lconst", new String(new char[] { '(', makeChar(Constants.LCONST_0), '|', makeChar(Constants.LCONST_1), ')' }));
+        map.put("dconst", new String(new char[] { '(', makeChar(Constants.DCONST_0), '|', makeChar(Constants.DCONST_1), ')' }));
+        map.put("fconst", new String(new char[] { '(', makeChar(Constants.FCONST_0), '|', makeChar(Constants.FCONST_1), ')' }));
+        map.put("iload", precompile(Constants.ILOAD_0, Constants.ILOAD_3, Constants.ILOAD));
+        map.put("dload", precompile(Constants.DLOAD_0, Constants.DLOAD_3, Constants.DLOAD));
+        map.put("fload", precompile(Constants.FLOAD_0, Constants.FLOAD_3, Constants.FLOAD));
+        map.put("aload", precompile(Constants.ALOAD_0, Constants.ALOAD_3, Constants.ALOAD));
+        map.put("istore", precompile(Constants.ISTORE_0, Constants.ISTORE_3, Constants.ISTORE));
+        map.put("dstore", precompile(Constants.DSTORE_0, Constants.DSTORE_3, Constants.DSTORE));
+        map.put("fstore", precompile(Constants.FSTORE_0, Constants.FSTORE_3, Constants.FSTORE));
+        map.put("astore", precompile(Constants.ASTORE_0, Constants.ASTORE_3, Constants.ASTORE));
+        // Compile strings
+        for (String key : map.keySet()) {
+            String value = map.get(key);
+            char ch = value.charAt(1); // Omit already precompiled patterns
+            if (ch < OFFSET) {
+                map.put(key, compilePattern(value)); // precompile all
+                                                        // patterns
+            }
+        }
+        // Add instruction alias to match anything
+        StringBuilder buf = new StringBuilder("(");
+        for (short i = 0; i < NO_OPCODES; i++) {
+            if (Constants.NO_OF_OPERANDS[i] != Constants.UNDEFINED) { // Not
+                                                                        // an
+                // invalid
+                // opcode
+                buf.append(makeChar(i));
+                if (i < NO_OPCODES - 1) {
+                    buf.append('|');
+                }
+            }
+        }
+        buf.append(')');
+        map.put("instruction", buf.toString());
+    }
+
+
+    private static String precompile( short from, short to, short extra ) {
+        StringBuilder buf = new StringBuilder("(");
+        for (short i = from; i <= to; i++) {
+            buf.append(makeChar(i));
+            buf.append('|');
+        }
+        buf.append(makeChar(extra));
+        buf.append(")");
+        return buf.toString();
+    }
+
+
+    /*
+     * Internal debugging routines.
+     */
+//    private static final String pattern2string( String pattern ) {
+//        return pattern2string(pattern, true);
+//    }
+
+
+//    private static final String pattern2string( String pattern, boolean make_string ) {
+//        StringBuffer buf = new StringBuffer();
+//        for (int i = 0; i < pattern.length(); i++) {
+//            char ch = pattern.charAt(i);
+//            if (ch >= OFFSET) {
+//                if (make_string) {
+//                    buf.append(Constants.OPCODE_NAMES[ch - OFFSET]);
+//                } else {
+//                    buf.append((ch - OFFSET));
+//                }
+//            } else {
+//                buf.append(ch);
+//            }
+//        }
+//        return buf.toString();
+//    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/JavaWrapper.java b/src/main/java/org/apache/commons/bcel6/util/JavaWrapper.java
new file mode 100644
index 0000000..d217385
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/JavaWrapper.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
+/**
+ * Java interpreter replacement, i.e., wrapper that uses its own ClassLoader
+ * to modify/generate classes as they're requested. You can take this as a template
+ * for your own applications.<br>
+ * Call this wrapper with:
+ * 
+ * <pre>java org.apache.commons.bcel6.util.JavaWrapper &lt;real.class.name&gt; [arguments]</pre>
+ * 
+ * <p>To use your own class loader you can set the "bcel.classloader" system property
+ * which defaults to "org.apache.commons.bcel6.util.ClassLoader", e.g., with:</p>
+ * <pre>java org.apache.commons.bcel6.util.JavaWrapper -Dbcel.classloader=foo.MyLoader &lt;real.class.name&gt; [arguments]</pre>
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @see ClassLoader
+ */
+public class JavaWrapper {
+
+    private final java.lang.ClassLoader loader;
+
+
+    private static java.lang.ClassLoader getClassLoader() {
+        String s = System.getProperty("bcel.classloader");
+        if ((s == null) || "".equals(s)) {
+            s = "org.apache.commons.bcel6.util.ClassLoader";
+        }
+        try {
+            return (java.lang.ClassLoader) Class.forName(s).newInstance();
+        } catch (Exception e) {
+            throw new RuntimeException(e.toString(), e);
+        }
+    }
+
+
+    public JavaWrapper(java.lang.ClassLoader loader) {
+        this.loader = loader;
+    }
+
+
+    public JavaWrapper() {
+        this(getClassLoader());
+    }
+
+
+    /** Runs the main method of the given class with the arguments passed in argv
+     *
+     * @param class_name the fully qualified class name
+     * @param argv the arguments just as you would pass them directly
+     */
+    public void runMain( String class_name, String[] argv ) throws ClassNotFoundException {
+        Class<?> cl = loader.loadClass(class_name);
+        Method method = null;
+        try {
+            method = cl.getMethod("main", new Class[] {
+                argv.getClass()
+            });
+            /* Method main is sane ?
+             */
+            int m = method.getModifiers();
+            Class<?> r = method.getReturnType();
+            if (!(Modifier.isPublic(m) && Modifier.isStatic(m)) || Modifier.isAbstract(m)
+                    || (r != Void.TYPE)) {
+                throw new NoSuchMethodException();
+            }
+        } catch (NoSuchMethodException no) {
+            System.out.println("In class " + class_name
+                    + ": public static void main(String[] argv) is not defined");
+            return;
+        }
+        try {
+            method.invoke(null, new Object[] {
+                argv
+            });
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+
+
+    /** Default main method used as wrapper, expects the fully qualified class name
+     * of the real class as the first argument.
+     */
+    public static void main( String[] argv ) throws Exception {
+        /* Expects class name as first argument, other arguments are by-passed.
+         */
+        if (argv.length == 0) {
+            System.out.println("Missing class name.");
+            return;
+        }
+        String class_name = argv[0];
+        String[] new_argv = new String[argv.length - 1];
+        System.arraycopy(argv, 1, new_argv, 0, new_argv.length);
+        JavaWrapper wrapper = new JavaWrapper();
+        wrapper.runMain(class_name, new_argv);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/MethodHTML.java b/src/main/java/org/apache/commons/bcel6/util/MethodHTML.java
new file mode 100644
index 0000000..b86250c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/MethodHTML.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.ConstantValue;
+import org.apache.commons.bcel6.classfile.ExceptionTable;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.Utility;
+
+/**
+ * Convert methods and fields into HTML file.
+ *
+ * @version $Id$
+ * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * 
+ */
+final class MethodHTML implements org.apache.commons.bcel6.Constants {
+
+    private final String class_name; // name of current class
+    private final PrintWriter file; // file to write to
+    private final ConstantHTML constant_html;
+    private final AttributeHTML attribute_html;
+
+
+    MethodHTML(String dir, String class_name, Method[] methods, Field[] fields,
+            ConstantHTML constant_html, AttributeHTML attribute_html) throws IOException {
+        this.class_name = class_name;
+        this.attribute_html = attribute_html;
+        this.constant_html = constant_html;
+        file = new PrintWriter(new FileOutputStream(dir + class_name + "_methods.html"));
+        file.println("<HTML><BODY BGCOLOR=\"#C0C0C0\"><TABLE BORDER=0>");
+        file.println("<TR><TH ALIGN=LEFT>Access&nbsp;flags</TH><TH ALIGN=LEFT>Type</TH>"
+                + "<TH ALIGN=LEFT>Field&nbsp;name</TH></TR>");
+        for (Field field : fields) {
+            writeField(field);
+        }
+        file.println("</TABLE>");
+        file.println("<TABLE BORDER=0><TR><TH ALIGN=LEFT>Access&nbsp;flags</TH>"
+                + "<TH ALIGN=LEFT>Return&nbsp;type</TH><TH ALIGN=LEFT>Method&nbsp;name</TH>"
+                + "<TH ALIGN=LEFT>Arguments</TH></TR>");
+        for (int i = 0; i < methods.length; i++) {
+            writeMethod(methods[i], i);
+        }
+        file.println("</TABLE></BODY></HTML>");
+        file.close();
+    }
+
+
+    /**
+     * Print field of class.
+     *
+     * @param field field to print
+     * @exception java.io.IOException
+     */
+    private void writeField( Field field ) throws IOException {
+        String type = Utility.signatureToString(field.getSignature());
+        String name = field.getName();
+        String access = Utility.accessToString(field.getAccessFlags());
+        Attribute[] attributes;
+        access = Utility.replace(access, " ", "&nbsp;");
+        file.print("<TR><TD><FONT COLOR=\"#FF0000\">" + access + "</FONT></TD>\n<TD>"
+                + Class2HTML.referenceType(type) + "</TD><TD><A NAME=\"field" + name + "\">" + name
+                + "</A></TD>");
+        attributes = field.getAttributes();
+        // Write them to the Attributes.html file with anchor "<name>[<i>]"
+        for (int i = 0; i < attributes.length; i++) {
+            attribute_html.writeAttribute(attributes[i], name + "@" + i);
+        }
+        for (int i = 0; i < attributes.length; i++) {
+            if (attributes[i].getTag() == ATTR_CONSTANT_VALUE) { // Default value
+                String str = ((ConstantValue) attributes[i]).toString();
+                // Reference attribute in _attributes.html
+                file.print("<TD>= <A HREF=\"" + class_name + "_attributes.html#" + name + "@" + i
+                        + "\" TARGET=\"Attributes\">" + str + "</TD>\n");
+                break;
+            }
+        }
+        file.println("</TR>");
+    }
+
+
+    private void writeMethod( Method method, int method_number ) {
+        // Get raw signature
+        String signature = method.getSignature();
+        // Get array of strings containing the argument types 
+        String[] args = Utility.methodSignatureArgumentTypes(signature, false);
+        // Get return type string
+        String type = Utility.methodSignatureReturnType(signature, false);
+        // Get method name
+        String name = method.getName(), html_name;
+        // Get method's access flags
+        String access = Utility.accessToString(method.getAccessFlags());
+        // Get the method's attributes, the Code Attribute in particular
+        Attribute[] attributes = method.getAttributes();
+        /* HTML doesn't like names like <clinit> and spaces are places to break
+         * lines. Both we don't want...
+         */
+        access = Utility.replace(access, " ", "&nbsp;");
+        html_name = Class2HTML.toHTML(name);
+        file.print("<TR VALIGN=TOP><TD><FONT COLOR=\"#FF0000\"><A NAME=method" + method_number
+                + ">" + access + "</A></FONT></TD>");
+        file.print("<TD>" + Class2HTML.referenceType(type) + "</TD><TD>" + "<A HREF=" + class_name
+                + "_code.html#method" + method_number + " TARGET=Code>" + html_name
+                + "</A></TD>\n<TD>(");
+        for (int i = 0; i < args.length; i++) {
+            file.print(Class2HTML.referenceType(args[i]));
+            if (i < args.length - 1) {
+                file.print(", ");
+            }
+        }
+        file.print(")</TD></TR>");
+        // Check for thrown exceptions
+        for (int i = 0; i < attributes.length; i++) {
+            attribute_html.writeAttribute(attributes[i], "method" + method_number + "@" + i,
+                    method_number);
+            byte tag = attributes[i].getTag();
+            if (tag == ATTR_EXCEPTIONS) {
+                file.print("<TR VALIGN=TOP><TD COLSPAN=2></TD><TH ALIGN=LEFT>throws</TH><TD>");
+                int[] exceptions = ((ExceptionTable) attributes[i]).getExceptionIndexTable();
+                for (int j = 0; j < exceptions.length; j++) {
+                    file.print(constant_html.referenceConstant(exceptions[j]));
+                    if (j < exceptions.length - 1) {
+                        file.print(", ");
+                    }
+                }
+                file.println("</TD></TR>");
+            } else if (tag == ATTR_CODE) {
+                Attribute[] c_a = ((Code) attributes[i]).getAttributes();
+                for (int j = 0; j < c_a.length; j++) {
+                    attribute_html.writeAttribute(c_a[j], "method" + method_number + "@" + i + "@"
+                            + j, method_number);
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/Repository.java b/src/main/java/org/apache/commons/bcel6/util/Repository.java
new file mode 100644
index 0000000..2188196
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/Repository.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/**
+ * Abstract definition of a class repository. Instances may be used
+ * to load classes from different sources and may be used in the
+ * Repository.setRepository method.
+ *
+ * @see org.apache.commons.bcel6.Repository
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @author David Dixon-Peugh
+ */
+public interface Repository extends java.io.Serializable {
+
+    /**
+     * Store the provided class under "clazz.getClassName()" 
+     */
+    void storeClass( JavaClass clazz );
+
+
+    /**
+     * Remove class from repository
+     */
+    void removeClass( JavaClass clazz );
+
+
+    /**
+     * Find the class with the name provided, if the class
+     * isn't there, return NULL.
+     */
+    JavaClass findClass( String className );
+
+
+    /**
+     * Find the class with the name provided, if the class
+     * isn't there, make an attempt to load it.
+     */
+    JavaClass loadClass( String className ) throws java.lang.ClassNotFoundException;
+
+
+    /**
+     * Find the JavaClass instance for the given run-time class object
+     */
+    JavaClass loadClass( Class<?> clazz ) throws java.lang.ClassNotFoundException;
+
+
+    /** Clear all entries from cache.
+     */
+    void clear();
+
+
+    /** Get the ClassPath associated with this Repository
+     */
+    ClassPath getClassPath();
+}
diff --git a/src/main/java/org/apache/commons/bcel6/util/SyntheticRepository.java b/src/main/java/org/apache/commons/bcel6/util/SyntheticRepository.java
new file mode 100644
index 0000000..c5640ae
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/util/SyntheticRepository.java
@@ -0,0 +1,207 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.ref.SoftReference;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/**
+ * This repository is used in situations where a Class is created
+ * outside the realm of a ClassLoader. Classes are loaded from
+ * the file systems using the paths specified in the given
+ * class path. By default, this is the value returned by
+ * ClassPath.getClassPath().
+ * <br>
+ * It is designed to be used as a singleton, however it
+ * can also be used with custom classpaths.
+ *
+ * @see org.apache.commons.bcel6.Repository
+ *
+ * @version $Id$
+ * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
+ * @author David Dixon-Peugh
+ */
+public class SyntheticRepository implements Repository {
+
+    private static final long serialVersionUID = 2923440730410019444L;
+    //private static final String DEFAULT_PATH = ClassPath.getClassPath();
+    private static final Map<ClassPath, SyntheticRepository> _instances = new HashMap<ClassPath, SyntheticRepository>(); // CLASSPATH X REPOSITORY
+    private ClassPath _path = null;
+    private final Map<String, SoftReference<JavaClass>> _loadedClasses = new HashMap<String, SoftReference<JavaClass>>(); // CLASSNAME X JAVACLASS
+
+
+    private SyntheticRepository(ClassPath path) {
+        _path = path;
+    }
+
+
+    public static SyntheticRepository getInstance() {
+        return getInstance(ClassPath.SYSTEM_CLASS_PATH);
+    }
+
+
+    public static SyntheticRepository getInstance( ClassPath classPath ) {
+        SyntheticRepository rep = _instances.get(classPath);
+        if (rep == null) {
+            rep = new SyntheticRepository(classPath);
+            _instances.put(classPath, rep);
+        }
+        return rep;
+    }
+
+
+    /**
+     * Store a new JavaClass instance into this Repository.
+     */
+    public void storeClass( JavaClass clazz ) {
+        _loadedClasses.put(clazz.getClassName(), new SoftReference<JavaClass>(clazz));
+        clazz.setRepository(this);
+    }
+
+
+    /**
+     * Remove class from repository
+     */
+    public void removeClass( JavaClass clazz ) {
+        _loadedClasses.remove(clazz.getClassName());
+    }
+
+
+    /**
+     * Find an already defined (cached) JavaClass object by name.
+     */
+    public JavaClass findClass( String className ) {
+        SoftReference<JavaClass> ref = _loadedClasses.get(className);
+        if (ref == null) {
+            return null;
+        }
+        return ref.get();
+    }
+
+
+    /**
+     * Find a JavaClass object by name.
+     * If it is already in this Repository, the Repository version
+     * is returned.  Otherwise, the Repository's classpath is searched for
+     * the class (and it is added to the Repository if found).
+     *
+     * @param className the name of the class
+     * @return the JavaClass object
+     * @throws ClassNotFoundException if the class is not in the
+     *   Repository, and could not be found on the classpath
+     */
+    public JavaClass loadClass( String className ) throws ClassNotFoundException {
+        if (className == null || className.equals("")) {
+            throw new IllegalArgumentException("Invalid class name " + className);
+        }
+        className = className.replace('/', '.'); // Just in case, canonical form
+        JavaClass clazz = findClass(className);
+        if (clazz != null) {
+            return clazz;
+        }
+        try {
+            return loadClass(_path.getInputStream(className), className);
+        } catch (IOException e) {
+            throw new ClassNotFoundException("Exception while looking for class " + className
+                    + ": " + e, e);
+        }
+    }
+
+
+    /**
+     * Find the JavaClass object for a runtime Class object.
+     * If a class with the same name is already in this Repository,
+     * the Repository version is returned.  Otherwise, getResourceAsStream()
+     * is called on the Class object to find the class's representation.
+     * If the representation is found, it is added to the Repository.
+     *
+     * @see Class
+     * @param clazz the runtime Class object
+     * @return JavaClass object for given runtime class
+     * @throws ClassNotFoundException if the class is not in the
+     *   Repository, and its representation could not be found
+     */
+    public JavaClass loadClass( Class<?> clazz ) throws ClassNotFoundException {
+        InputStream clsStream = null;
+        try{
+            String className = clazz.getName();
+            JavaClass repositoryClass = findClass(className);
+            if (repositoryClass != null) {
+                return repositoryClass;
+            }
+            String name = className;
+            int i = name.lastIndexOf('.');
+            if (i > 0) {
+                name = name.substring(i + 1);
+            }
+            clsStream = clazz.getResourceAsStream(name + ".class");
+            return loadClass(clsStream, className);
+        } finally {
+            try{
+                if (clsStream != null){
+                    clsStream.close();
+                }
+            } catch(IOException ioe){
+                //don't care
+            }
+        }
+    }
+
+
+    private JavaClass loadClass( InputStream is, String className ) throws ClassNotFoundException {
+        try {
+            if (is != null) {
+                ClassParser parser = new ClassParser(is, className);
+                JavaClass clazz = parser.parse();
+                storeClass(clazz);
+                return clazz;
+            }
+        } catch (IOException e) {
+            throw new ClassNotFoundException("Exception while looking for class " + className
+                    + ": " + e, e);
+        } finally {
+            if (is != null){
+                try {
+                    is.close();
+                } catch (IOException e) {
+                }
+            }
+        }
+        throw new ClassNotFoundException("SyntheticRepository could not load " + className);
+    }
+
+
+    /** ClassPath associated with the Repository.
+     */
+    public ClassPath getClassPath() {
+        return _path;
+    }
+
+
+    /** Clear all entries from cache.
+     */
+    public void clear() {
+        _loadedClasses.clear();
+    }
+}
diff --git a/src/main/java/org/apache/bcel/util/package.html b/src/main/java/org/apache/commons/bcel6/util/package.html
similarity index 100%
rename from src/main/java/org/apache/bcel/util/package.html
rename to src/main/java/org/apache/commons/bcel6/util/package.html
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/GraphicalVerifier.java b/src/main/java/org/apache/commons/bcel6/verifier/GraphicalVerifier.java
new file mode 100644
index 0000000..d6d796e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/GraphicalVerifier.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+import java.awt.Dimension;
+import java.awt.Toolkit;
+import javax.swing.UIManager;
+
+import org.apache.commons.bcel6.generic.Type;
+
+/**
+ * A graphical user interface application demonstrating JustIce.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class GraphicalVerifier {
+
+    boolean packFrame = false;
+
+
+    /** Constructor. */
+    public GraphicalVerifier() {
+        VerifierAppFrame frame = new VerifierAppFrame();
+        //Frames �berpr�fen, die voreingestellte Gr��e haben
+        //Frames packen, die nutzbare bevorzugte Gr��eninformationen enthalten, z.B. aus ihrem Layout
+        if (packFrame) {
+            frame.pack();
+        } else {
+            frame.validate();
+        }
+        //Das Fenster zentrieren
+        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
+        Dimension frameSize = frame.getSize();
+        if (frameSize.height > screenSize.height) {
+            frameSize.height = screenSize.height;
+        }
+        if (frameSize.width > screenSize.width) {
+            frameSize.width = screenSize.width;
+        }
+        frame.setLocation((screenSize.width - frameSize.width) / 2,
+                (screenSize.height - frameSize.height) / 2);
+        frame.setVisible(true);
+        frame.classNamesJList.setModel(new VerifierFactoryListModel());
+        VerifierFactory.getVerifier(Type.OBJECT.getClassName()); // Fill list with java.lang.Object
+        frame.classNamesJList.setSelectedIndex(0); // default, will verify java.lang.Object
+    }
+
+
+    /** Main method. */
+    public static void main( String[] args ) {
+        try {
+            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        new GraphicalVerifier();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/NativeVerifier.java b/src/main/java/org/apache/commons/bcel6/verifier/NativeVerifier.java
new file mode 100644
index 0000000..d2d182d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/NativeVerifier.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+/**
+ * The NativeVerifier class implements a main(String[] args) method that's
+ * roughly compatible to the one in the Verifier class, but that uses the
+ * JVM's internal verifier for its class file verification.
+ * This can be used for comparison runs between the JVM-internal verifier
+ * and JustIce.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public abstract class NativeVerifier {
+
+    /**
+     * This class must not be instantiated.
+     */
+    private NativeVerifier() {
+    }
+
+
+    /**
+     * Works only on the first argument.
+     */
+    public static void main( String[] args ) {
+        if (args.length != 1) {
+            System.out.println("Verifier front-end: need exactly one argument.");
+            System.exit(1);
+        }
+        int dotclasspos = args[0].lastIndexOf(".class");
+        if (dotclasspos != -1) {
+            args[0] = args[0].substring(0, dotclasspos);
+        }
+        args[0] = args[0].replace('/', '.');
+        //System.out.println(args[0]);
+        try {
+            Class.forName(args[0]);
+        } catch (ExceptionInInitializerError eiie) { //subclass of LinkageError!
+            System.out.println("NativeVerifier: ExceptionInInitializerError encountered on '"
+                    + args[0] + "'.");
+            System.out.println(eiie);
+            System.exit(1);
+        } catch (LinkageError le) {
+            System.out.println("NativeVerifier: LinkageError encountered on '" + args[0] + "'.");
+            System.out.println(le);
+            System.exit(1);
+        } catch (ClassNotFoundException cnfe) {
+            System.out.println("NativeVerifier: FILE NOT FOUND: '" + args[0] + "'.");
+            System.exit(1);
+        } catch (Throwable t) {
+            System.out.println("NativeVerifier: Unspecified verification error on'" + args[0]
+                    + "'.");
+            System.exit(1);
+        }
+        System.out.println("NativeVerifier: Class file '" + args[0] + "' seems to be okay.");
+        System.exit(0);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/PassVerifier.java b/src/main/java/org/apache/commons/bcel6/verifier/PassVerifier.java
new file mode 100644
index 0000000..55849d7
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/PassVerifier.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A PassVerifier actually verifies a class file; it is instantiated
+ * by a Verifier.
+ * The verification should conform with a certain pass as described
+ * in The Java Virtual Machine Specification, 2nd edition.
+ * This book describes four passes. Pass one means loading the
+ * class and verifying a few static constraints. Pass two actually
+ * verifies some other constraints that could enforce loading in
+ * referenced class files. Pass three is the first pass that actually
+ * checks constraints in the code array of a method in the class file;
+ * it has two parts with the first verifying static constraints and
+ * the second part verifying structural constraints (where a data flow
+ * analysis is used for). The fourth pass, finally, performs checks
+ * that can only be done at run-time.
+ * JustIce does not have a run-time pass, but certain constraints that
+ * are usually delayed until run-time for performance reasons are also
+ * checked during the second part of pass three.
+ * PassVerifier instances perform caching.
+ * That means, if you really want a new verification run of a certain
+ * pass you must use a new instance of a given PassVerifier.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see org.apache.commons.bcel6.verifier.Verifier
+ * @see #verify()
+ */
+public abstract class PassVerifier {
+
+    /** The (warning) messages. */
+    private final List<String> messages = new ArrayList<String>();
+    /** The VerificationResult cache. */
+    private VerificationResult verificationResult = null;
+
+
+    /**
+     * This method runs a verification pass conforming to the
+     * Java Virtual Machine Specification, 2nd edition, on a
+     * class file.
+     * PassVerifier instances perform caching;
+     * i.e. if the verify() method once determined a VerificationResult,
+     * then this result may be returned after every invocation of this
+     * method instead of running the verification pass anew; likewise with
+     * the result of getMessages().
+     *
+     * @see #getMessages()
+     * @see #addMessage(String)
+     */
+    public VerificationResult verify() {
+        if (verificationResult == null) {
+            verificationResult = do_verify();
+        }
+        return verificationResult;
+    }
+
+
+    /** Does the real verification work, uncached. */
+    public abstract VerificationResult do_verify();
+
+
+    /**
+     * This method adds a (warning) message to the message pool of this
+     * PassVerifier. This method is normally only internally used by
+     * BCEL's class file verifier "JustIce" and should not be used from
+     * the outside. 
+     *
+     * @see #getMessages()
+     */
+    public void addMessage( String message ) {
+        messages.add(message);
+    }
+
+
+    /**
+     * Returns the (warning) messages that this PassVerifier accumulated
+     * during its do_verify()ing work.
+     *
+     * @see #addMessage(String)
+     * @see #do_verify()
+     */
+    public String[] getMessages() {
+        verify(); // create messages if not already done (cached!)
+        return messages.toArray(new String[messages.size()]);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/TransitiveHull.java b/src/main/java/org/apache/commons/bcel6/verifier/TransitiveHull.java
new file mode 100644
index 0000000..20e792c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/TransitiveHull.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/**
+ * This class has a main method implementing a demonstration program
+ * of how to use the VerifierFactoryObserver. It transitively verifies
+ * all class files encountered; this may take up a lot of time and,
+ * more notably, memory.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class TransitiveHull implements VerifierFactoryObserver {
+
+    /** Used for indentation. */
+    private int indent = 0;
+
+
+    /** Not publicly instantiable. */
+    private TransitiveHull() {
+    }
+
+
+    /* Implementing VerifierFactoryObserver. */
+    public void update( String classname ) {
+        System.gc(); // avoid swapping if possible.
+        for (int i = 0; i < indent; i++) {
+            System.out.print(" ");
+        }
+        System.out.println(classname);
+        indent += 1;
+        Verifier v = VerifierFactory.getVerifier(classname);
+        VerificationResult vr;
+        vr = v.doPass1();
+        if (vr != VerificationResult.VR_OK) {
+            System.out.println("Pass 1:\n" + vr);
+        }
+        vr = v.doPass2();
+        if (vr != VerificationResult.VR_OK) {
+            System.out.println("Pass 2:\n" + vr);
+        }
+        if (vr == VerificationResult.VR_OK) {
+            try {
+                JavaClass jc = Repository.lookupClass(v.getClassName());
+                for (int i = 0; i < jc.getMethods().length; i++) {
+                    vr = v.doPass3a(i);
+                    if (vr != VerificationResult.VR_OK) {
+                        System.out.println(v.getClassName() + ", Pass 3a, method " + i + " ['"
+                                + jc.getMethods()[i] + "']:\n" + vr);
+                    }
+                    vr = v.doPass3b(i);
+                    if (vr != VerificationResult.VR_OK) {
+                        System.out.println(v.getClassName() + ", Pass 3b, method " + i + " ['"
+                                + jc.getMethods()[i] + "']:\n" + vr);
+                    }
+                }
+            } catch (ClassNotFoundException e) {
+                System.err.println("Could not find class " + v.getClassName() + " in Repository");
+            }
+        }
+        indent -= 1;
+    }
+
+
+    /**
+     * This method implements a demonstration program
+     * of how to use the VerifierFactoryObserver. It transitively verifies
+     * all class files encountered; this may take up a lot of time and,
+     * more notably, memory.
+     */
+    public static void main( String[] args ) {
+        if (args.length != 1) {
+            System.out.println("Need exactly one argument: The root class to verify.");
+            System.exit(1);
+        }
+        int dotclasspos = args[0].lastIndexOf(".class");
+        if (dotclasspos != -1) {
+            args[0] = args[0].substring(0, dotclasspos);
+        }
+        args[0] = args[0].replace('/', '.');
+        TransitiveHull th = new TransitiveHull();
+        VerifierFactory.attach(th);
+        VerifierFactory.getVerifier(args[0]); // the observer is called back and does the actual trick.
+        VerifierFactory.detach(th);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/VerificationResult.java b/src/main/java/org/apache/commons/bcel6/verifier/VerificationResult.java
new file mode 100644
index 0000000..eda2148
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/VerificationResult.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+/**
+ * A VerificationResult is what a PassVerifier returns
+ * after verifying.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class VerificationResult {
+
+    /**
+     * Constant to indicate verification has not been tried yet.
+     * This happens if some earlier verification pass did not return VERIFIED_OK.
+     */
+    public static final int VERIFIED_NOTYET = 0;
+
+    /** Constant to indicate verification was passed. */
+    public static final int VERIFIED_OK = 1;
+
+    /** Constant to indicate verfication failed. */
+    public static final int VERIFIED_REJECTED = 2;
+
+    /**
+     * This string is the canonical message for verifications that have not been tried yet.
+     * This happens if some earlier verification pass did not return {@link #VERIFIED_OK}.
+     */
+    private static final String VERIFIED_NOTYET_MSG = "Not yet verified.";
+
+    /** This string is the canonical message for passed verification passes. */
+    private static final String VERIFIED_OK_MSG = "Passed verification.";
+
+    /**
+     * Canonical VerificationResult for not-yet-tried verifications.
+     * This happens if some earlier verification pass did not return {@link #VERIFIED_OK}.
+     */
+    public static final VerificationResult VR_NOTYET = new VerificationResult(VERIFIED_NOTYET, VERIFIED_NOTYET_MSG);
+
+    /** Canonical VerificationResult for passed verifications. */
+    public static final VerificationResult VR_OK = new VerificationResult(VERIFIED_OK, VERIFIED_OK_MSG);
+
+    /** The numeric status. */
+    private final int numeric;
+
+    /** The detailed message. */
+    private final String detailMessage;
+
+
+    /** The usual constructor. */
+    public VerificationResult(int status, String message) {
+        numeric = status;
+        detailMessage = message;
+    }
+
+
+    /**
+     * Returns one one the {@link #VERIFIED_OK}, {@link #VERIFIED_NOTYET},
+     * {@link #VERIFIED_REJECTED} constants.
+     */
+    public int getStatus() {
+        return numeric;
+    }
+
+
+    /** Returns a detailed message. */
+    public String getMessage() {
+        return detailMessage;
+    }
+
+
+    /**
+     * @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() {
+        return numeric ^ detailMessage.hashCode();
+    }
+
+
+    /**
+     * Returns if two VerificationResult instances are equal.
+     */
+    @Override
+    public boolean equals( Object o ) {
+        if (!(o instanceof VerificationResult)) {
+            return false;
+        }
+        VerificationResult other = (VerificationResult) o;
+        return ((other.numeric == this.numeric) && (other.detailMessage.equals(this.detailMessage)));
+    }
+
+
+    /**
+     * Returns a String representation of the VerificationResult.
+     */
+    @Override
+    public String toString() {
+        String ret = "";
+        if (numeric == VERIFIED_NOTYET) {
+            ret = "VERIFIED_NOTYET";
+        }
+        if (numeric == VERIFIED_OK) {
+            ret = "VERIFIED_OK";
+        }
+        if (numeric == VERIFIED_REJECTED) {
+            ret = "VERIFIED_REJECTED";
+        }
+        ret += "\n" + detailMessage + "\n";
+        return ret;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/Verifier.java b/src/main/java/org/apache/commons/bcel6/verifier/Verifier.java
new file mode 100644
index 0000000..b8429d9
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/Verifier.java
@@ -0,0 +1,246 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.verifier.statics.Pass1Verifier;
+import org.apache.commons.bcel6.verifier.statics.Pass2Verifier;
+import org.apache.commons.bcel6.verifier.statics.Pass3aVerifier;
+import org.apache.commons.bcel6.verifier.structurals.Pass3bVerifier;
+
+/**
+ * A Verifier instance is there to verify a class file according to The Java Virtual
+ * Machine Specification, 2nd Edition.
+ *
+ * Pass-3b-verification includes pass-3a-verification;
+ * pass-3a-verification includes pass-2-verification;
+ * pass-2-verification includes pass-1-verification.
+ *
+ * A Verifier creates PassVerifier instances to perform the actual verification.
+ * Verifier instances are usually generated by the VerifierFactory.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see org.apache.commons.bcel6.verifier.VerifierFactory
+ * @see org.apache.commons.bcel6.verifier.PassVerifier
+ */
+public class Verifier {
+
+    /**
+     * The name of the class this verifier operates on.
+     */
+    private final String classname;
+    /** A Pass1Verifier for this Verifier instance. */
+    private Pass1Verifier p1v;
+    /** A Pass2Verifier for this Verifier instance. */
+    private Pass2Verifier p2v;
+    /** The Pass3aVerifiers for this Verifier instance. Key: Interned string specifying the method number. */
+    private final Map<String, Pass3aVerifier> p3avs = new HashMap<String, Pass3aVerifier>();
+    /** The Pass3bVerifiers for this Verifier instance. Key: Interned string specifying the method number. */
+    private final Map<String, Pass3bVerifier> p3bvs = new HashMap<String, Pass3bVerifier>();
+
+
+    /** Returns the VerificationResult for the given pass. */
+    public VerificationResult doPass1() {
+        if (p1v == null) {
+            p1v = new Pass1Verifier(this);
+        }
+        return p1v.verify();
+    }
+
+
+    /** Returns the VerificationResult for the given pass. */
+    public VerificationResult doPass2() {
+        if (p2v == null) {
+            p2v = new Pass2Verifier(this);
+        }
+        return p2v.verify();
+    }
+
+
+    /** Returns the VerificationResult for the given pass. */
+    public VerificationResult doPass3a( int method_no ) {
+        String key = Integer.toString(method_no);
+        Pass3aVerifier p3av;
+        p3av = p3avs.get(key);
+        if (p3avs.get(key) == null) {
+            p3av = new Pass3aVerifier(this, method_no);
+            p3avs.put(key, p3av);
+        }
+        return p3av.verify();
+    }
+
+
+    /** Returns the VerificationResult for the given pass. */
+    public VerificationResult doPass3b( int method_no ) {
+        String key = Integer.toString(method_no);
+        Pass3bVerifier p3bv;
+        p3bv = p3bvs.get(key);
+        if (p3bvs.get(key) == null) {
+            p3bv = new Pass3bVerifier(this, method_no);
+            p3bvs.put(key, p3bv);
+        }
+        return p3bv.verify();
+    }
+
+
+    /**
+     * Instantiation is done by the VerifierFactory.
+     *
+     * @see VerifierFactory
+     */
+    Verifier(String fully_qualified_classname) {
+        classname = fully_qualified_classname;
+        flush();
+    }
+
+
+    /**
+     * Returns the name of the class this verifier operates on.
+     * This is particularly interesting when this verifier was created
+     * recursively by another Verifier and you got a reference to this
+     * Verifier by the getVerifiers() method of the VerifierFactory.
+     * @see VerifierFactory
+     */
+    public final String getClassName() {
+        return classname;
+    }
+
+
+    /**
+     * Forget everything known about the class file; that means, really
+     * start a new verification of a possibly different class file from
+     * BCEL's repository.
+     *
+     */
+    public void flush() {
+        p1v = null;
+        p2v = null;
+        p3avs.clear();
+        p3bvs.clear();
+    }
+
+
+    /**
+     * This returns all the (warning) messages collected during verification.
+     * A prefix shows from which verifying pass a message originates.
+     */
+    public String[] getMessages() throws ClassNotFoundException {
+        List<String> messages = new ArrayList<String>();
+        if (p1v != null) {
+            String[] p1m = p1v.getMessages();
+            for (String element : p1m) {
+                messages.add("Pass 1: " + element);
+            }
+        }
+        if (p2v != null) {
+            String[] p2m = p2v.getMessages();
+            for (String element : p2m) {
+                messages.add("Pass 2: " + element);
+            }
+        }
+        for (Pass3aVerifier pv : p3avs.values()) {
+            String[] p3am = pv.getMessages();
+            int meth = pv.getMethodNo();
+            for (String element : p3am) {
+                messages.add("Pass 3a, method " + meth + " ('"
+                        + org.apache.commons.bcel6.Repository.lookupClass(classname).getMethods()[meth]
+                        + "'): " + element);
+            }
+        }
+        for (Pass3bVerifier pv : p3bvs.values()) {
+            String[] p3bm = pv.getMessages();
+            int meth = pv.getMethodNo();
+            for (String element : p3bm) {
+                messages.add("Pass 3b, method " + meth + " ('"
+                        + org.apache.commons.bcel6.Repository.lookupClass(classname).getMethods()[meth]
+                        + "'): " + element);
+            }
+        }
+        String[] ret = new String[messages.size()];
+        for (int i = 0; i < messages.size(); i++) {
+            ret[i] = messages.get(i);
+        }
+        return ret;
+    }
+
+
+    /**
+     * Verifies class files.
+     * This is a simple demonstration of how the API of BCEL's
+     * class file verifier "JustIce" may be used.
+     * You should supply command-line arguments which are
+     * fully qualified namea of the classes to verify. These class files
+     * must be somewhere in your CLASSPATH (refer to Sun's
+     * documentation for questions about this) or you must have put the classes
+     * into the BCEL Repository yourself (via 'addClass(JavaClass)').
+     */
+    public static void main( String[] args ) {
+        System.out
+                .println("JustIce by Enver Haase, (C) 2001-2002.\n<http://bcel.sourceforge.net>\n<http://commons.apache.org/bcel>\n");
+        for (int k = 0; k < args.length; k++) {
+            try {
+                if (args[k].endsWith(".class")) {
+                    int dotclasspos = args[k].lastIndexOf(".class");
+                    if (dotclasspos != -1) {
+                        args[k] = args[k].substring(0, dotclasspos);
+                    }
+                }
+                args[k] = args[k].replace('/', '.');
+                System.out.println("Now verifying: " + args[k] + "\n");
+                Verifier v = VerifierFactory.getVerifier(args[k]);
+                VerificationResult vr;
+                vr = v.doPass1();
+                System.out.println("Pass 1:\n" + vr);
+                vr = v.doPass2();
+                System.out.println("Pass 2:\n" + vr);
+                if (vr == VerificationResult.VR_OK) {
+                    JavaClass jc = org.apache.commons.bcel6.Repository.lookupClass(args[k]);
+                    for (int i = 0; i < jc.getMethods().length; i++) {
+                        vr = v.doPass3a(i);
+                        System.out.println("Pass 3a, method number " + i + " ['"
+                                + jc.getMethods()[i] + "']:\n" + vr);
+                        vr = v.doPass3b(i);
+                        System.out.println("Pass 3b, method number " + i + " ['"
+                                + jc.getMethods()[i] + "']:\n" + vr);
+                    }
+                }
+                System.out.println("Warnings:");
+                String[] warnings = v.getMessages();
+                if (warnings.length == 0) {
+                    System.out.println("<none>");
+                }
+                for (String warning : warnings) {
+                    System.out.println(warning);
+                }
+                System.out.println("\n");
+                // avoid swapping.
+                v.flush();
+                org.apache.commons.bcel6.Repository.clearCache();
+                System.gc();
+            } catch (ClassNotFoundException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/VerifierAppFrame.java b/src/main/java/org/apache/commons/bcel6/verifier/VerifierAppFrame.java
new file mode 100644
index 0000000..4502aa1
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/VerifierAppFrame.java
@@ -0,0 +1,401 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+import java.awt.AWTEvent;
+import java.awt.CardLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.InputEvent;
+import java.awt.event.WindowEvent;
+import javax.swing.BorderFactory;
+import javax.swing.JFrame;
+import javax.swing.JList;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JSplitPane;
+import javax.swing.JTextPane;
+import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/**
+ * This class implements a machine-generated frame for use with
+ * the GraphicalVerfifier.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see GraphicalVerifier
+ */
+public class VerifierAppFrame extends JFrame {
+
+    private static final long serialVersionUID = -542458133073307640L;
+    JPanel contentPane;
+    JSplitPane jSplitPane1 = new JSplitPane();
+    JPanel jPanel1 = new JPanel();
+    JPanel jPanel2 = new JPanel();
+    JSplitPane jSplitPane2 = new JSplitPane();
+    JPanel jPanel3 = new JPanel();
+    JList classNamesJList = new JList();
+    GridLayout gridLayout1 = new GridLayout();
+    JPanel messagesPanel = new JPanel();
+    GridLayout gridLayout2 = new GridLayout();
+    JMenuBar jMenuBar1 = new JMenuBar();
+    JMenu jMenu1 = new JMenu();
+    JScrollPane jScrollPane1 = new JScrollPane();
+    JScrollPane messagesScrollPane = new JScrollPane();
+    JScrollPane jScrollPane3 = new JScrollPane();
+    GridLayout gridLayout4 = new GridLayout();
+    JScrollPane jScrollPane4 = new JScrollPane();
+    CardLayout cardLayout1 = new CardLayout();
+    private final String JUSTICE_VERSION = "JustIce by Enver Haase";
+    private String current_class;
+    GridLayout gridLayout3 = new GridLayout();
+    JTextPane pass1TextPane = new JTextPane();
+    JTextPane pass2TextPane = new JTextPane();
+    JTextPane messagesTextPane = new JTextPane();
+    JMenuItem newFileMenuItem = new JMenuItem();
+    JSplitPane jSplitPane3 = new JSplitPane();
+    JSplitPane jSplitPane4 = new JSplitPane();
+    JScrollPane jScrollPane2 = new JScrollPane();
+    JScrollPane jScrollPane5 = new JScrollPane();
+    JScrollPane jScrollPane6 = new JScrollPane();
+    JScrollPane jScrollPane7 = new JScrollPane();
+    JList pass3aJList = new JList();
+    JList pass3bJList = new JList();
+    JTextPane pass3aTextPane = new JTextPane();
+    JTextPane pass3bTextPane = new JTextPane();
+    JMenu jMenu2 = new JMenu();
+    JMenuItem whatisMenuItem = new JMenuItem();
+    JMenuItem aboutMenuItem = new JMenuItem();
+
+
+    /** Constructor. */
+    public VerifierAppFrame() {
+        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
+        try {
+            jbInit();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    /** Initizalization of the components. */
+    private void jbInit() throws Exception {
+        //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Ihr Symbol]")));
+        contentPane = (JPanel) this.getContentPane();
+        contentPane.setLayout(cardLayout1);
+        this.setJMenuBar(jMenuBar1);
+        this.setSize(new Dimension(708, 451));
+        this.setTitle("JustIce");
+        jPanel1.setMinimumSize(new Dimension(100, 100));
+        jPanel1.setPreferredSize(new Dimension(100, 100));
+        jPanel1.setLayout(gridLayout1);
+        jSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT);
+        jPanel2.setLayout(gridLayout2);
+        jPanel3.setMinimumSize(new Dimension(200, 100));
+        jPanel3.setPreferredSize(new Dimension(400, 400));
+        jPanel3.setLayout(gridLayout4);
+        messagesPanel.setMinimumSize(new Dimension(100, 100));
+        messagesPanel.setLayout(gridLayout3);
+        jPanel2.setMinimumSize(new Dimension(200, 100));
+        jMenu1.setText("File");
+        jScrollPane1.getViewport().setBackground(Color.red);
+        messagesScrollPane.getViewport().setBackground(Color.red);
+        messagesScrollPane.setPreferredSize(new Dimension(10, 10));
+        classNamesJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
+
+            public void valueChanged( ListSelectionEvent e ) {
+                classNamesJList_valueChanged(e);
+            }
+        });
+        classNamesJList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+        jScrollPane3.setBorder(BorderFactory.createLineBorder(Color.black));
+        jScrollPane3.setPreferredSize(new Dimension(100, 100));
+        gridLayout4.setRows(4);
+        gridLayout4.setColumns(1);
+        gridLayout4.setHgap(1);
+        jScrollPane4.setBorder(BorderFactory.createLineBorder(Color.black));
+        jScrollPane4.setPreferredSize(new Dimension(100, 100));
+        pass1TextPane.setBorder(BorderFactory.createRaisedBevelBorder());
+        pass1TextPane.setToolTipText("");
+        pass1TextPane.setEditable(false);
+        pass2TextPane.setBorder(BorderFactory.createRaisedBevelBorder());
+        pass2TextPane.setEditable(false);
+        messagesTextPane.setBorder(BorderFactory.createRaisedBevelBorder());
+        messagesTextPane.setEditable(false);
+        newFileMenuItem.setText("New...");
+        newFileMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(78,
+                InputEvent.CTRL_MASK, true));
+        newFileMenuItem.addActionListener(new java.awt.event.ActionListener() {
+
+            public void actionPerformed( ActionEvent e ) {
+                newFileMenuItem_actionPerformed(e);
+            }
+        });
+        pass3aTextPane.setEditable(false);
+        pass3bTextPane.setEditable(false);
+        pass3aJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
+
+            public void valueChanged( ListSelectionEvent e ) {
+                pass3aJList_valueChanged(e);
+            }
+        });
+        pass3bJList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
+
+            public void valueChanged( ListSelectionEvent e ) {
+                pass3bJList_valueChanged(e);
+            }
+        });
+        jMenu2.setText("Help");
+        whatisMenuItem.setText("What is...");
+        whatisMenuItem.addActionListener(new java.awt.event.ActionListener() {
+
+            public void actionPerformed( ActionEvent e ) {
+                whatisMenuItem_actionPerformed(e);
+            }
+        });
+        aboutMenuItem.setText("About");
+        aboutMenuItem.addActionListener(new java.awt.event.ActionListener() {
+
+            public void actionPerformed( ActionEvent e ) {
+                aboutMenuItem_actionPerformed(e);
+            }
+        });
+        jSplitPane2.add(messagesPanel, JSplitPane.BOTTOM);
+        messagesPanel.add(messagesScrollPane, null);
+        messagesScrollPane.getViewport().add(messagesTextPane, null);
+        jSplitPane2.add(jPanel3, JSplitPane.TOP);
+        jPanel3.add(jScrollPane3, null);
+        jScrollPane3.getViewport().add(pass1TextPane, null);
+        jPanel3.add(jScrollPane4, null);
+        jPanel3.add(jSplitPane3, null);
+        jSplitPane3.add(jScrollPane2, JSplitPane.LEFT);
+        jScrollPane2.getViewport().add(pass3aJList, null);
+        jSplitPane3.add(jScrollPane5, JSplitPane.RIGHT);
+        jScrollPane5.getViewport().add(pass3aTextPane, null);
+        jPanel3.add(jSplitPane4, null);
+        jSplitPane4.add(jScrollPane6, JSplitPane.LEFT);
+        jScrollPane6.getViewport().add(pass3bJList, null);
+        jSplitPane4.add(jScrollPane7, JSplitPane.RIGHT);
+        jScrollPane7.getViewport().add(pass3bTextPane, null);
+        jScrollPane4.getViewport().add(pass2TextPane, null);
+        jSplitPane1.add(jPanel2, JSplitPane.TOP);
+        jPanel2.add(jScrollPane1, null);
+        jSplitPane1.add(jPanel1, JSplitPane.BOTTOM);
+        jPanel1.add(jSplitPane2, null);
+        jScrollPane1.getViewport().add(classNamesJList, null);
+        jMenuBar1.add(jMenu1);
+        jMenuBar1.add(jMenu2);
+        contentPane.add(jSplitPane1, "jSplitPane1");
+        jMenu1.add(newFileMenuItem);
+        jMenu2.add(whatisMenuItem);
+        jMenu2.add(aboutMenuItem);
+        jSplitPane2.setDividerLocation(300);
+        jSplitPane3.setDividerLocation(150);
+        jSplitPane4.setDividerLocation(150);
+    }
+
+
+    /** Overridden to stop the application on a closing window. */
+    @Override
+    protected void processWindowEvent( WindowEvent e ) {
+        super.processWindowEvent(e);
+        if (e.getID() == WindowEvent.WINDOW_CLOSING) {
+            System.exit(0);
+        }
+    }
+
+
+    synchronized void classNamesJList_valueChanged( ListSelectionEvent e ) {
+        if (e.getValueIsAdjusting()) {
+            return;
+        }
+        current_class = classNamesJList.getSelectedValue().toString();
+        try {
+            verify();
+        } catch (ClassNotFoundException ex) {
+            // FIXME: report the error using the GUI
+            ex.printStackTrace();
+        }
+        classNamesJList.setSelectedValue(current_class, true);
+    }
+
+
+    private void verify() throws ClassNotFoundException {
+        setTitle("PLEASE WAIT");
+        Verifier v = VerifierFactory.getVerifier(current_class);
+        v.flush(); // Don't cache the verification result for this class.
+        VerificationResult vr;
+        vr = v.doPass1();
+        if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
+            pass1TextPane.setText(vr.getMessage());
+            pass1TextPane.setBackground(Color.red);
+            pass2TextPane.setText("");
+            pass2TextPane.setBackground(Color.yellow);
+            pass3aTextPane.setText("");
+            pass3aJList.setListData(new String[0]);
+            pass3aTextPane.setBackground(Color.yellow);
+            pass3bTextPane.setText("");
+            pass3bJList.setListData(new String[0]);
+            pass3bTextPane.setBackground(Color.yellow);
+        } else { // Must be VERIFIED_OK, Pass 1 does not know VERIFIED_NOTYET
+            pass1TextPane.setBackground(Color.green);
+            pass1TextPane.setText(vr.getMessage());
+            vr = v.doPass2();
+            if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
+                pass2TextPane.setText(vr.getMessage());
+                pass2TextPane.setBackground(Color.red);
+                pass3aTextPane.setText("");
+                pass3aTextPane.setBackground(Color.yellow);
+                pass3aJList.setListData(new String[0]);
+                pass3bTextPane.setText("");
+                pass3bTextPane.setBackground(Color.yellow);
+                pass3bJList.setListData(new String[0]);
+            } else { // must be Verified_OK, because Pass1 was OK (cannot be Verified_NOTYET).
+                pass2TextPane.setText(vr.getMessage());
+                pass2TextPane.setBackground(Color.green);
+                JavaClass jc = Repository.lookupClass(current_class);
+                /*
+                 boolean all3aok = true;
+                 boolean all3bok = true;
+                 String all3amsg = "";
+                 String all3bmsg = "";
+                 */
+                String[] methodnames = new String[jc.getMethods().length];
+                for (int i = 0; i < jc.getMethods().length; i++) {
+                    methodnames[i] = jc.getMethods()[i].toString().replace('\n', ' ').replace('\t',
+                            ' ');
+                }
+                pass3aJList.setListData(methodnames);
+                pass3aJList.setSelectionInterval(0, jc.getMethods().length - 1);
+                pass3bJList.setListData(methodnames);
+                pass3bJList.setSelectionInterval(0, jc.getMethods().length - 1);
+            }
+        }
+        String[] msgs = v.getMessages();
+        messagesTextPane.setBackground(msgs.length == 0 ? Color.green : Color.yellow);
+        String allmsgs = "";
+        for (int i = 0; i < msgs.length; i++) {
+            msgs[i] = msgs[i].replace('\n', ' ');
+            allmsgs += msgs[i] + "\n\n";
+        }
+        messagesTextPane.setText(allmsgs);
+        setTitle(current_class + " - " + JUSTICE_VERSION);
+    }
+
+
+    void newFileMenuItem_actionPerformed( ActionEvent e ) {
+        String classname = JOptionPane
+                .showInputDialog("Please enter the fully qualified name of a class or interface to verify:");
+        if ((classname == null) || (classname.equals(""))) {
+            return;
+        }
+        VerifierFactory.getVerifier(classname); // let observers do the rest.
+        classNamesJList.setSelectedValue(classname, true);
+    }
+
+
+    synchronized void pass3aJList_valueChanged( ListSelectionEvent e ) {
+        if (e.getValueIsAdjusting()) {
+            return;
+        }
+        Verifier v = VerifierFactory.getVerifier(current_class);
+        String all3amsg = "";
+        boolean all3aok = true;
+        boolean rejected = false;
+        for (int i = 0; i < pass3aJList.getModel().getSize(); i++) {
+            if (pass3aJList.isSelectedIndex(i)) {
+                VerificationResult vr = v.doPass3a(i);
+                if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
+                    all3aok = false;
+                    rejected = true;
+                }
+                JavaClass jc = null;
+                try {
+                    jc = Repository.lookupClass(v.getClassName());
+                    all3amsg += "Method '" + jc.getMethods()[i] + "': "
+                            + vr.getMessage().replace('\n', ' ') + "\n\n";
+                } catch (ClassNotFoundException ex) {
+                    // FIXME: handle the error
+                    ex.printStackTrace();
+                }
+            }
+        }
+        pass3aTextPane.setText(all3amsg);
+        pass3aTextPane.setBackground(all3aok ? Color.green : (rejected ? Color.red : Color.yellow));
+    }
+
+
+    synchronized void pass3bJList_valueChanged( ListSelectionEvent e ) {
+        if (e.getValueIsAdjusting()) {
+            return;
+        }
+        Verifier v = VerifierFactory.getVerifier(current_class);
+        String all3bmsg = "";
+        boolean all3bok = true;
+        boolean rejected = false;
+        for (int i = 0; i < pass3bJList.getModel().getSize(); i++) {
+            if (pass3bJList.isSelectedIndex(i)) {
+                VerificationResult vr = v.doPass3b(i);
+                if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
+                    all3bok = false;
+                    rejected = true;
+                }
+                JavaClass jc = null;
+                try {
+                    jc = Repository.lookupClass(v.getClassName());
+                    all3bmsg += "Method '" + jc.getMethods()[i] + "': "
+                            + vr.getMessage().replace('\n', ' ') + "\n\n";
+                } catch (ClassNotFoundException ex) {
+                    // FIXME: handle the error
+                    ex.printStackTrace();
+                }
+            }
+        }
+        pass3bTextPane.setText(all3bmsg);
+        pass3bTextPane.setBackground(all3bok ? Color.green : (rejected ? Color.red : Color.yellow));
+    }
+
+
+    void aboutMenuItem_actionPerformed( ActionEvent e ) {
+        JOptionPane
+                .showMessageDialog(
+                        this,
+                        "JustIce is a Java class file verifier.\nIt was implemented by Enver Haase in 2001, 2002.\n<http://commons.apache.org/bcel/>",
+                        JUSTICE_VERSION, JOptionPane.INFORMATION_MESSAGE);
+    }
+
+
+    void whatisMenuItem_actionPerformed( ActionEvent e ) {
+        JOptionPane
+                .showMessageDialog(
+                        this,
+                        "The upper four boxes to the right reflect verification passes according to The Java Virtual Machine Specification.\nThese are (in that order): Pass one, Pass two, Pass three (before data flow analysis), Pass three (data flow analysis).\nThe bottom box to the right shows (warning) messages; warnings do not cause a class to be rejected.",
+                        JUSTICE_VERSION, JOptionPane.INFORMATION_MESSAGE);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactory.java b/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactory.java
new file mode 100644
index 0000000..03b1641
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactory.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+/**
+ * This class produces instances of the Verifier class. Its purpose is to make
+ * sure that they are singleton instances with respect to the class name they
+ * operate on. That means, for every class (represented by a unique fully qualified
+ * class name) there is exactly one Verifier.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see org.apache.commons.bcel6.verifier.Verifier
+ */
+public class VerifierFactory {
+
+    /**
+     * The HashMap that holds the data about the already-constructed Verifier instances.
+     */
+    private static final Map<String, Verifier> hashMap = new HashMap<String, Verifier>();
+    /**
+     * The VerifierFactoryObserver instances that observe the VerifierFactory.
+     */
+    private static final List<VerifierFactoryObserver> observers = new Vector<VerifierFactoryObserver>();
+
+
+    /**
+     * The VerifierFactory is not instantiable.
+     */
+    private VerifierFactory() {
+    }
+
+
+    /**
+     * Returns the (only) verifier responsible for the class with the given name.
+     * Possibly a new Verifier object is transparently created.
+     * @return the (only) verifier responsible for the class with the given name.
+     */
+    public static Verifier getVerifier( String fully_qualified_classname ) {
+        Verifier v = hashMap.get(fully_qualified_classname);
+        if (v == null) {
+            v = new Verifier(fully_qualified_classname);
+            hashMap.put(fully_qualified_classname, v);
+            notify(fully_qualified_classname);
+        }
+        return v;
+    }
+
+
+    /**
+     * Notifies the observers of a newly generated Verifier.
+     */
+    private static void notify( String fully_qualified_classname ) {
+        // notify the observers
+        for (VerifierFactoryObserver vfo : observers) {
+            vfo.update(fully_qualified_classname);
+        }
+    }
+
+
+    /**
+     * Returns all Verifier instances created so far.
+     * This is useful when a Verifier recursively lets
+     * the VerifierFactory create other Verifier instances
+     * and if you want to verify the transitive hull of
+     * referenced class files.
+     */
+    public static Verifier[] getVerifiers() {
+        Verifier[] vs = new Verifier[hashMap.values().size()];
+        return hashMap.values().toArray(vs); // Because vs is big enough, vs is used to store the values into and returned!
+    }
+
+
+    /**
+     * Adds the VerifierFactoryObserver o to the list of observers.
+     */
+    public static void attach( VerifierFactoryObserver o ) {
+        observers.add(o);
+    }
+
+
+    /**
+     * Removes the VerifierFactoryObserver o from the list of observers.
+     */
+    public static void detach( VerifierFactoryObserver o ) {
+        observers.remove(o);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactoryListModel.java b/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactoryListModel.java
new file mode 100644
index 0000000..7548abc
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactoryListModel.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.swing.event.ListDataEvent;
+import javax.swing.event.ListDataListener;
+
+/**
+ * This class implements an adapter; it implements both a Swing ListModel and
+ * a VerifierFactoryObserver.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class VerifierFactoryListModel implements org.apache.commons.bcel6.verifier.VerifierFactoryObserver,
+        javax.swing.ListModel {
+
+    private final List<ListDataListener> listeners = new ArrayList<ListDataListener>();
+    private final Set<String> cache = new TreeSet<String>();
+
+
+    public VerifierFactoryListModel() {
+        VerifierFactory.attach(this);
+        update(null); // fill cache.
+    }
+
+
+    public synchronized void update( String s ) {
+        Verifier[] verifiers = VerifierFactory.getVerifiers();
+        int num_of_verifiers = verifiers.length;
+        cache.clear();
+        for (Verifier verifier : verifiers) {
+            cache.add(verifier.getClassName());
+        }
+        for (ListDataListener listener : listeners) {
+            ListDataEvent e = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, 0, num_of_verifiers - 1);
+            listener.contentsChanged(e);
+        }
+    }
+
+
+    public synchronized void addListDataListener( ListDataListener l ) {
+        listeners.add(l);
+    }
+
+
+    public synchronized void removeListDataListener( javax.swing.event.ListDataListener l ) {
+        listeners.remove(l);
+    }
+
+
+    public synchronized int getSize() {
+        return cache.size();
+    }
+
+
+    public synchronized Object getElementAt( int index ) {
+        return (cache.toArray(new String[cache.size()]))[index];
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactoryObserver.java b/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactoryObserver.java
new file mode 100644
index 0000000..0b18445
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/VerifierFactoryObserver.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier;
+
+/**
+ * VerifierFactoryObserver instances are notified when new Verifier
+ * instances are created.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ *
+ * @see VerifierFactory#getVerifier(String)
+ * @see VerifierFactory#getVerifiers()
+ * @see VerifierFactory#attach(VerifierFactoryObserver)
+ * @see VerifierFactory#detach(VerifierFactoryObserver)
+ */
+public interface VerifierFactoryObserver {
+
+    /**
+     * VerifierFactoryObserver instances are notified invoking this method.
+     * The String argument is the fully qualified class name of a class a
+     * new Verifier instance created by the VerifierFactory operates on.
+     */
+    void update( String s );
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/VerifyDialog.java b/src/main/java/org/apache/commons/bcel6/verifier/VerifyDialog.java
new file mode 100644
index 0000000..9b27400
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/VerifyDialog.java
@@ -0,0 +1,557 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.verifier;
+
+import java.awt.Color;
+
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+/**
+ * A class for simple graphical class file verification.
+ * Use the main(String []) method with fully qualified
+ * class names as arguments to use it as a stand-alone
+ * application.
+ * Use the VerifyDialog(String) constructor to use this
+ * class in your application.
+ * [This class was created using VisualAge for Java,
+ * but it does not work under VAJ itself (Version 3.02 JDK 1.2)]
+ * @version $Id$
+ * @author Enver Haase
+ * @see #main(String[])
+ * @see #VerifyDialog(String)
+ */
+public class VerifyDialog extends javax.swing.JDialog {
+
+    private static final long serialVersionUID = -6374807677043142313L;
+    /** Machine-generated. */
+    private javax.swing.JPanel ivjJDialogContentPane = null;
+    /** Machine-generated. */
+    private javax.swing.JPanel ivjPass1Panel = null;
+    /** Machine-generated. */
+    private javax.swing.JPanel ivjPass2Panel = null;
+    /** Machine-generated. */
+    private javax.swing.JPanel ivjPass3Panel = null;
+    /** Machine-generated. */
+    private javax.swing.JButton ivjPass1Button = null;
+    /** Machine-generated. */
+    private javax.swing.JButton ivjPass2Button = null;
+    /** Machine-generated. */
+    private javax.swing.JButton ivjPass3Button = null;
+    /** Machine-generated. */
+    IvjEventHandler ivjEventHandler = new IvjEventHandler();
+    /**
+     * The class to verify. Default set to 'java.lang.Object'
+     * in case this class is instantiated via one of the many
+     * machine-generated constructors.
+     */
+    private String class_name = "java.lang.Object";
+    /**
+     * This field is here to count the number of open VerifyDialog
+     * instances so the JVM can be exited afer every Dialog had been
+     * closed.
+     */
+    private static int classes_to_verify;
+
+    /** Machine-generated. */
+    class IvjEventHandler implements java.awt.event.ActionListener {
+
+        public void actionPerformed( java.awt.event.ActionEvent e ) {
+            if (e.getSource() == VerifyDialog.this.getPass1Button()) {
+                connEtoC1(e);
+            }
+            if (e.getSource() == VerifyDialog.this.getPass2Button()) {
+                connEtoC2(e);
+            }
+            if (e.getSource() == VerifyDialog.this.getPass3Button()) {
+                connEtoC3(e);
+            }
+            if (e.getSource() == VerifyDialog.this.getFlushButton()) {
+                connEtoC4(e);
+            }
+        }
+    }
+
+    /** Machine-generated. */
+    private javax.swing.JButton ivjFlushButton = null;
+
+
+    /** Machine-generated. */
+    public VerifyDialog() {
+        super();
+        initialize();
+    }
+
+
+    /** Machine-generated. */
+    public VerifyDialog(java.awt.Dialog owner) {
+        super(owner);
+    }
+
+
+    /** Machine-generated. */
+    public VerifyDialog(java.awt.Dialog owner, String title) {
+        super(owner, title);
+    }
+
+
+    /** Machine-generated. */
+    public VerifyDialog(java.awt.Dialog owner, String title, boolean modal) {
+        super(owner, title, modal);
+    }
+
+
+    /** Machine-generated. */
+    public VerifyDialog(java.awt.Dialog owner, boolean modal) {
+        super(owner, modal);
+    }
+
+
+    /** Machine-generated. */
+    public VerifyDialog(java.awt.Frame owner) {
+        super(owner);
+    }
+
+
+    /** Machine-generated. */
+    public VerifyDialog(java.awt.Frame owner, String title) {
+        super(owner, title);
+    }
+
+
+    /** Machine-generated. */
+    public VerifyDialog(java.awt.Frame owner, String title, boolean modal) {
+        super(owner, title, modal);
+    }
+
+
+    /** Machine-generated. */
+    public VerifyDialog(java.awt.Frame owner, boolean modal) {
+        super(owner, modal);
+    }
+
+
+    /**
+     * Use this constructor if you want a possibility to verify other
+     * class files than java.lang.Object.
+     * @param fully_qualified_class_name java.lang.String
+     */
+    public VerifyDialog(String fully_qualified_class_name) {
+        super();
+        int dotclasspos = fully_qualified_class_name.lastIndexOf(".class");
+        if (dotclasspos != -1) {
+            fully_qualified_class_name = fully_qualified_class_name.substring(0, dotclasspos);
+        }
+        fully_qualified_class_name = fully_qualified_class_name.replace('/', '.');
+        class_name = fully_qualified_class_name;
+        initialize();
+    }
+
+
+    /** Machine-generated. */
+    private void connEtoC1( java.awt.event.ActionEvent arg1 ) {
+        try {
+            // user code begin {1}
+            // user code end
+            this.pass1Button_ActionPerformed(arg1);
+            // user code begin {2}
+            // user code end
+        } catch (java.lang.Throwable ivjExc) {
+            // user code begin {3}
+            // user code end
+            handleException(ivjExc);
+        }
+    }
+
+
+    /** Machine-generated. */
+    private void connEtoC2( java.awt.event.ActionEvent arg1 ) {
+        try {
+            // user code begin {1}
+            // user code end
+            this.pass2Button_ActionPerformed(arg1);
+            // user code begin {2}
+            // user code end
+        } catch (java.lang.Throwable ivjExc) {
+            // user code begin {3}
+            // user code end
+            handleException(ivjExc);
+        }
+    }
+
+
+    /** Machine-generated. */
+    private void connEtoC3( java.awt.event.ActionEvent arg1 ) {
+        try {
+            // user code begin {1}
+            // user code end
+            this.pass4Button_ActionPerformed(arg1);
+            // user code begin {2}
+            // user code end
+        } catch (java.lang.Throwable ivjExc) {
+            // user code begin {3}
+            // user code end
+            handleException(ivjExc);
+        }
+    }
+
+
+    /** Machine-generated. */
+    private void connEtoC4( java.awt.event.ActionEvent arg1 ) {
+        try {
+            // user code begin {1}
+            // user code end
+            this.flushButton_ActionPerformed(arg1);
+            // user code begin {2}
+            // user code end
+        } catch (java.lang.Throwable ivjExc) {
+            // user code begin {3}
+            // user code end
+            handleException(ivjExc);
+        }
+    }
+
+
+    /** Machine-generated. */
+    public void flushButton_ActionPerformed( java.awt.event.ActionEvent actionEvent ) {
+        VerifierFactory.getVerifier(class_name).flush();
+        Repository.removeClass(class_name); // Make sure it will be reloaded.
+        getPass1Panel().setBackground(Color.gray);
+        getPass1Panel().repaint();
+        getPass2Panel().setBackground(Color.gray);
+        getPass2Panel().repaint();
+        getPass3Panel().setBackground(Color.gray);
+        getPass3Panel().repaint();
+    }
+
+
+    /** Machine-generated. */
+    private javax.swing.JButton getFlushButton() {
+        if (ivjFlushButton == null) {
+            try {
+                ivjFlushButton = new javax.swing.JButton();
+                ivjFlushButton.setName("FlushButton");
+                ivjFlushButton.setText("Flush: Forget old verification results");
+                ivjFlushButton.setBackground(java.awt.SystemColor.controlHighlight);
+                ivjFlushButton.setBounds(60, 215, 300, 30);
+                ivjFlushButton.setForeground(java.awt.Color.red);
+                ivjFlushButton.setActionCommand("FlushButton");
+                // user code begin {1}
+                // user code end
+            } catch (java.lang.Throwable ivjExc) {
+                // user code begin {2}
+                // user code end
+                handleException(ivjExc);
+            }
+        }
+        return ivjFlushButton;
+    }
+
+
+    /** Machine-generated. */
+    private javax.swing.JPanel getJDialogContentPane() {
+        if (ivjJDialogContentPane == null) {
+            try {
+                ivjJDialogContentPane = new javax.swing.JPanel();
+                ivjJDialogContentPane.setName("JDialogContentPane");
+                ivjJDialogContentPane.setLayout(null);
+                getJDialogContentPane().add(getPass1Panel(), getPass1Panel().getName());
+                getJDialogContentPane().add(getPass3Panel(), getPass3Panel().getName());
+                getJDialogContentPane().add(getPass2Panel(), getPass2Panel().getName());
+                getJDialogContentPane().add(getPass1Button(), getPass1Button().getName());
+                getJDialogContentPane().add(getPass2Button(), getPass2Button().getName());
+                getJDialogContentPane().add(getPass3Button(), getPass3Button().getName());
+                getJDialogContentPane().add(getFlushButton(), getFlushButton().getName());
+                // user code begin {1}
+                // user code end
+            } catch (java.lang.Throwable ivjExc) {
+                // user code begin {2}
+                // user code end
+                handleException(ivjExc);
+            }
+        }
+        return ivjJDialogContentPane;
+    }
+
+
+    /** Machine-generated. */
+    private javax.swing.JButton getPass1Button() {
+        if (ivjPass1Button == null) {
+            try {
+                ivjPass1Button = new javax.swing.JButton();
+                ivjPass1Button.setName("Pass1Button");
+                ivjPass1Button.setText("Pass1: Verify binary layout of .class file");
+                ivjPass1Button.setBackground(java.awt.SystemColor.controlHighlight);
+                ivjPass1Button.setBounds(100, 40, 300, 30);
+                ivjPass1Button.setActionCommand("Button1");
+                // user code begin {1}
+                // user code end
+            } catch (java.lang.Throwable ivjExc) {
+                // user code begin {2}
+                // user code end
+                handleException(ivjExc);
+            }
+        }
+        return ivjPass1Button;
+    }
+
+
+    /** Machine-generated. */
+    private javax.swing.JPanel getPass1Panel() {
+        if (ivjPass1Panel == null) {
+            try {
+                ivjPass1Panel = new javax.swing.JPanel();
+                ivjPass1Panel.setName("Pass1Panel");
+                ivjPass1Panel.setLayout(null);
+                ivjPass1Panel.setBackground(java.awt.SystemColor.controlShadow);
+                ivjPass1Panel.setBounds(30, 30, 50, 50);
+                // user code begin {1}
+                // user code end
+            } catch (java.lang.Throwable ivjExc) {
+                // user code begin {2}
+                // user code end
+                handleException(ivjExc);
+            }
+        }
+        return ivjPass1Panel;
+    }
+
+
+    /** Machine-generated. */
+    private javax.swing.JButton getPass2Button() {
+        if (ivjPass2Button == null) {
+            try {
+                ivjPass2Button = new javax.swing.JButton();
+                ivjPass2Button.setName("Pass2Button");
+                ivjPass2Button.setText("Pass 2: Verify static .class file constraints");
+                ivjPass2Button.setBackground(java.awt.SystemColor.controlHighlight);
+                ivjPass2Button.setBounds(100, 100, 300, 30);
+                ivjPass2Button.setActionCommand("Button2");
+                // user code begin {1}
+                // user code end
+            } catch (java.lang.Throwable ivjExc) {
+                // user code begin {2}
+                // user code end
+                handleException(ivjExc);
+            }
+        }
+        return ivjPass2Button;
+    }
+
+
+    /** Machine-generated. */
+    private javax.swing.JPanel getPass2Panel() {
+        if (ivjPass2Panel == null) {
+            try {
+                ivjPass2Panel = new javax.swing.JPanel();
+                ivjPass2Panel.setName("Pass2Panel");
+                ivjPass2Panel.setLayout(null);
+                ivjPass2Panel.setBackground(java.awt.SystemColor.controlShadow);
+                ivjPass2Panel.setBounds(30, 90, 50, 50);
+                // user code begin {1}
+                // user code end
+            } catch (java.lang.Throwable ivjExc) {
+                // user code begin {2}
+                // user code end
+                handleException(ivjExc);
+            }
+        }
+        return ivjPass2Panel;
+    }
+
+
+    /** Machine-generated. */
+    private javax.swing.JButton getPass3Button() {
+        if (ivjPass3Button == null) {
+            try {
+                ivjPass3Button = new javax.swing.JButton();
+                ivjPass3Button.setName("Pass3Button");
+                ivjPass3Button.setText("Passes 3a+3b: Verify code arrays");
+                ivjPass3Button.setBackground(java.awt.SystemColor.controlHighlight);
+                ivjPass3Button.setBounds(100, 160, 300, 30);
+                ivjPass3Button.setActionCommand("Button2");
+                // user code begin {1}
+                // user code end
+            } catch (java.lang.Throwable ivjExc) {
+                // user code begin {2}
+                // user code end
+                handleException(ivjExc);
+            }
+        }
+        return ivjPass3Button;
+    }
+
+
+    /** Machine-generated. */
+    private javax.swing.JPanel getPass3Panel() {
+        if (ivjPass3Panel == null) {
+            try {
+                ivjPass3Panel = new javax.swing.JPanel();
+                ivjPass3Panel.setName("Pass3Panel");
+                ivjPass3Panel.setLayout(null);
+                ivjPass3Panel.setBackground(java.awt.SystemColor.controlShadow);
+                ivjPass3Panel.setBounds(30, 150, 50, 50);
+                // user code begin {1}
+                // user code end
+            } catch (java.lang.Throwable ivjExc) {
+                // user code begin {2}
+                // user code end
+                handleException(ivjExc);
+            }
+        }
+        return ivjPass3Panel;
+    }
+
+
+    /** Machine-generated. */
+    private void handleException( java.lang.Throwable exception ) {
+        /* Uncomment the following lines to print uncaught exceptions to stdout */
+        System.out.println("--------- UNCAUGHT EXCEPTION ---------");
+        exception.printStackTrace(System.out);
+    }
+
+
+    /** Machine-generated. */
+    private void initConnections() throws java.lang.Exception {
+        // user code begin {1}
+        // user code end
+        getPass1Button().addActionListener(ivjEventHandler);
+        getPass2Button().addActionListener(ivjEventHandler);
+        getPass3Button().addActionListener(ivjEventHandler);
+        getFlushButton().addActionListener(ivjEventHandler);
+    }
+
+
+    /** Machine-generated. */
+    private void initialize() {
+        try {
+            // user code begin {1}
+            // user code end
+            setName("VerifyDialog");
+            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+            setSize(430, 280);
+            setVisible(true);
+            setModal(true);
+            setResizable(false);
+            setContentPane(getJDialogContentPane());
+            initConnections();
+        } catch (java.lang.Throwable ivjExc) {
+            handleException(ivjExc);
+        }
+        // user code begin {2}
+        setTitle("'" + class_name + "' verification - JustIce / BCEL");
+        // user code end
+    }
+
+
+    /**
+     * Verifies one or more class files.
+     * Verification results are presented graphically: Red means 'rejected',
+     * green means 'passed' while yellow means 'could not be verified yet'.
+     * @param args java.lang.String[] fully qualified names of classes to verify.
+     */
+    public static void main( java.lang.String[] args ) {
+        classes_to_verify = args.length;
+        for (String arg : args) {
+            try {
+                VerifyDialog aVerifyDialog;
+                aVerifyDialog = new VerifyDialog(arg);
+                aVerifyDialog.setModal(true);
+                aVerifyDialog.addWindowListener(new java.awt.event.WindowAdapter() {
+
+                    @Override
+                    public void windowClosing( java.awt.event.WindowEvent e ) {
+                        classes_to_verify--;
+                        if (classes_to_verify == 0) {
+                            System.exit(0);
+                        }
+                    }
+                });
+                aVerifyDialog.setVisible(true);
+            } catch (Throwable exception) {
+                System.err.println("Exception occurred in main() of javax.swing.JDialog");
+                exception.printStackTrace(System.out);
+            }
+        }
+    }
+
+
+    /** Machine-generated. */
+    public void pass1Button_ActionPerformed( java.awt.event.ActionEvent actionEvent ) {
+        Verifier v = VerifierFactory.getVerifier(class_name);
+        VerificationResult vr = v.doPass1();
+        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
+            getPass1Panel().setBackground(Color.green);
+            getPass1Panel().repaint();
+        }
+        if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
+            getPass1Panel().setBackground(Color.red);
+            getPass1Panel().repaint();
+        }
+    }
+
+
+    /** Machine-generated. */
+    public void pass2Button_ActionPerformed( java.awt.event.ActionEvent actionEvent ) {
+        pass1Button_ActionPerformed(actionEvent);
+        Verifier v = VerifierFactory.getVerifier(class_name);
+        VerificationResult vr = v.doPass2();
+        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
+            getPass2Panel().setBackground(Color.green);
+            getPass2Panel().repaint();
+        }
+        if (vr.getStatus() == VerificationResult.VERIFIED_NOTYET) {
+            getPass2Panel().setBackground(Color.yellow);
+            getPass2Panel().repaint();
+        }
+        if (vr.getStatus() == VerificationResult.VERIFIED_REJECTED) {
+            getPass2Panel().setBackground(Color.red);
+            getPass2Panel().repaint();
+        }
+    }
+
+
+    /** Machine-generated. */
+    public void pass4Button_ActionPerformed( java.awt.event.ActionEvent actionEvent ) {
+        pass2Button_ActionPerformed(actionEvent);
+        Color color = Color.green;
+        Verifier v = VerifierFactory.getVerifier(class_name);
+        VerificationResult vr = v.doPass2();
+        if (vr.getStatus() == VerificationResult.VERIFIED_OK) {
+            JavaClass jc = null;
+            try {
+                jc = Repository.lookupClass(class_name);
+                int nr = jc.getMethods().length;
+                for (int i = 0; i < nr; i++) {
+                    vr = v.doPass3b(i);
+                    if (vr.getStatus() != VerificationResult.VERIFIED_OK) {
+                        color = Color.red;
+                        break;
+                    }
+                }
+            } catch (ClassNotFoundException ex) {
+                // FIXME: report the error
+                ex.printStackTrace();
+            }
+        } else {
+            color = Color.yellow;
+        }
+        getPass3Panel().setBackground(color);
+        getPass3Panel().repaint();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/AssertionViolatedException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/AssertionViolatedException.java
new file mode 100644
index 0000000..891505d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/AssertionViolatedException.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * Instances of this class should never be thrown. When such an instance is thrown,
+ * this is due to an INTERNAL ERROR of BCEL's class file verifier &quot;JustIce&quot;.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public final class AssertionViolatedException extends RuntimeException{
+    private static final long serialVersionUID = -129822266349567409L;
+    /** The error message. */
+    private String detailMessage;
+    /** Constructs a new AssertionViolatedException with null as its error message string. */
+    public AssertionViolatedException(){
+        super();
+    }
+    /**
+     * Constructs a new AssertionViolatedException with the specified error message preceded
+     * by &quot;INTERNAL ERROR: &quot;.
+     */
+    public AssertionViolatedException(String message){
+        super(message = "INTERNAL ERROR: "+message); // Thanks to Java, the constructor call here must be first.
+        detailMessage=message;
+    }
+    /**
+     * Constructs a new AssertionViolationException with the specified error message and initial cause
+     */
+    public AssertionViolatedException(String message, Throwable initCause) {
+        super(message = "INTERNAL ERROR: "+message, initCause);
+        detailMessage=message;
+    }    
+    /** Extends the error message with a string before ("pre") and after ("post") the
+        'old' error message. All of these three strings are allowed to be null, and null
+        is always replaced by the empty string (""). In particular, after invoking this
+        method, the error message of this object can no longer be null.
+    */
+    public void extendMessage(String pre, String post){
+        if (pre  == null) {
+            pre="";
+        }
+        if (detailMessage == null) {
+            detailMessage="";
+        }
+        if (post == null) {
+            post="";
+        }
+        detailMessage = pre+detailMessage+post;
+    }
+    /**
+     * Returns the error message string of this AssertionViolatedException object.
+     * @return the error message string of this AssertionViolatedException.
+     */
+    @Override
+    public String getMessage(){
+        return detailMessage;
+    }
+
+    /** 
+     * DO NOT USE. It's for experimental testing during development only.
+     */
+    public static void main(String[] args){
+        AssertionViolatedException ave = new AssertionViolatedException("Oops!");
+        ave.extendMessage("\nFOUND:\n\t","\nExiting!!\n");
+        throw ave;
+    }
+
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/ClassConstraintException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/ClassConstraintException.java
new file mode 100644
index 0000000..6896766
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/ClassConstraintException.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce"
+ * when a class file to verify does not pass the verification pass 2 as described
+ * in the Java Virtual Machine specification, 2nd edition.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class ClassConstraintException extends VerificationException{
+    private static final long serialVersionUID = -4745598983569128296L;
+
+    /**
+     * Constructs a new ClassConstraintException with null as its error message string.
+     */
+    public ClassConstraintException(){
+        super();
+    }
+
+    /**
+     * Constructs a new ClassConstraintException with the specified error message.
+     */
+    public ClassConstraintException(String message){
+        super (message);
+    }
+
+    /**
+     * Constructs a new ClassConstraintException with the specified error message and cause
+     */
+    public ClassConstraintException(String message, Throwable initCause){
+        super(message, initCause);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/CodeConstraintException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/CodeConstraintException.java
new file mode 100644
index 0000000..107a84b
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/CodeConstraintException.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
+ * a class file does not pass the verification pass 3. Note that the pass 3 used by
+ * "JustIce" involves verification that is usually delayed to pass 4.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public abstract class CodeConstraintException extends VerificationException{
+    private static final long serialVersionUID = -7265388214714996640L;
+    /**
+     * Constructs a new CodeConstraintException with null as its error message string.
+     */
+    CodeConstraintException(){
+        super();
+    }
+    /**
+     * Constructs a new CodeConstraintException with the specified error message.
+     */
+    CodeConstraintException(String message){
+        super(message);
+    }    
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/InvalidMethodException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/InvalidMethodException.java
new file mode 100644
index 0000000..281a18f
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/InvalidMethodException.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce"
+ * when the verification of a method is requested that does not exist.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class InvalidMethodException extends RuntimeException{
+
+    private static final long serialVersionUID = -7060302743724808051L;
+
+    /** Constructs an InvalidMethodException with the specified detail message. */
+    public InvalidMethodException(String message){
+        super(message);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/LinkingConstraintException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/LinkingConstraintException.java
new file mode 100644
index 0000000..7f4db05
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/LinkingConstraintException.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
+ * a class file to verify does not pass the verification pass 3 because of a violation
+ * of a constraint that is usually only verified at run-time (pass 4).
+ * The Java Virtual Machine Specification, 2nd edition, states that certain constraints
+ * are usually verified at run-time for performance reasons (the verification of those
+ * constraints requires loading in and recursively verifying referenced classes) that
+ * conceptually belong to pass 3; to be precise, that conceptually belong to the
+ * data flow analysis of pass 3 (called pass 3b in JustIce).
+ * These are the checks necessary for resolution: Compare pages 142-143 ("4.9.1 The
+ * Verification Process") and pages 50-51 ("2.17.3 Linking: Verification, Preparation,
+ * and Resolution") of the above mentioned book.
+ * <B>TODO: At this time, this class is not used in JustIce.</B>
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class LinkingConstraintException extends StructuralCodeConstraintException{
+
+    private static final long serialVersionUID = -5239226345026321126L;
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/LoadingException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/LoadingException.java
new file mode 100644
index 0000000..66ba5b5
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/LoadingException.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * When loading a class file, BCEL will throw an instance of LoadingException if
+ * the class file is malformed; so it is not conforming to the "Pass 1" verification
+ * process as described in the Java Virtual Machine specification, 2nd. edition.
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class LoadingException extends VerifierConstraintViolatedException{
+
+    private static final long serialVersionUID = -7911901533049018823L;
+
+    /**
+     * Constructs a new LoadingException with null as its error message string.
+     */
+    public LoadingException(){
+        super();
+    }
+
+    /**
+     * Constructs a new LoadingException with the specified error message.
+     */
+    public LoadingException(String message){
+        super (message);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/LocalVariableInfoInconsistentException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/LocalVariableInfoInconsistentException.java
new file mode 100644
index 0000000..82e1a06
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/LocalVariableInfoInconsistentException.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * A LocalVariableInfoInconsistentException instance is thrown by
+ * the LocalVariableInfo class when it detects that the information
+ * it holds is inconsistent; this is normally due to inconsistent
+ * LocalVariableTable entries in the Code attribute of a certain
+ * Method object.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class LocalVariableInfoInconsistentException extends ClassConstraintException{
+    private static final long serialVersionUID = -2833180480144304190L;
+
+    /**
+     * Constructs a new LocalVariableInfoInconsistentException with null as its error message string.
+     */
+    public LocalVariableInfoInconsistentException(){
+        super();
+    }
+
+    /**
+     * Constructs a new LocalVariableInfoInconsistentException with the specified error message.
+     */
+    public LocalVariableInfoInconsistentException(String message){
+        super (message);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeConstraintException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeConstraintException.java
new file mode 100644
index 0000000..0a9bca4
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeConstraintException.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
+ * a class file to verify does not pass the verification pass 3 because of a violation
+ * of a static constraint as described in the Java Virtual Machine Specification,
+ * 2nd edition, 4.8.1, pages 133-137. The static constraints checking part of pass 3
+ * is called pass 3a in JustIce.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public abstract class StaticCodeConstraintException extends CodeConstraintException{
+    private static final long serialVersionUID = 3858523065007725128L;
+
+    public StaticCodeConstraintException(String message){
+        super(message);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeInstructionConstraintException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeInstructionConstraintException.java
new file mode 100644
index 0000000..18e7d0e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeInstructionConstraintException.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
+ * a class file to verify does not pass the verification pass 3 because of a violation
+ * of a static constraint as described in the Java Virtual Machine Specification,
+ * Second edition, 4.8.1, pages 133-137. The static constraints checking part of pass 3
+ * is called pass 3a in JustIce.
+ * Static constraints on the instructions in the code array are checked early in
+ * pass 3a and are described on page 134 in the Java Virtual Machine Specification,
+ * Second Edition.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class StaticCodeInstructionConstraintException extends StaticCodeConstraintException{
+    private static final long serialVersionUID = 4987255974346614794L;
+
+    public StaticCodeInstructionConstraintException(String message){
+        super(message);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeInstructionOperandConstraintException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeInstructionOperandConstraintException.java
new file mode 100644
index 0000000..0780ed3
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/StaticCodeInstructionOperandConstraintException.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
+ * a class file to verify does not pass the verification pass 3 because of a violation
+ * of a static constraint as described in the Java Virtual Machine Specification,
+ * Second edition, 4.8.1, pages 133-137. The static constraints checking part of pass 3
+ * is called pass 3a in JustIce.
+ * Static constraints on the operands of instructions in the code array are checked late in
+ * pass 3a and are described on page 134-137 in the Java Virtual Machine Specification,
+ * Second Edition.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class StaticCodeInstructionOperandConstraintException extends StaticCodeConstraintException{
+    private static final long serialVersionUID = 4780787099381933487L;
+
+    public StaticCodeInstructionOperandConstraintException(String message){
+        super(message);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/StructuralCodeConstraintException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/StructuralCodeConstraintException.java
new file mode 100644
index 0000000..fa47604
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/StructuralCodeConstraintException.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce" when
+ * a class file to verify does not pass the verification pass 3 because of a violation
+ * of a structural constraint as described in the Java Virtual Machine Specification,
+ * 2nd edition, 4.8.2, pages 137-139.
+ * Note that the notion of a "structural" constraint is somewhat misleading. Structural
+ * constraints are constraints on relationships between Java virtual machine instructions.
+ * These are the constraints where data-flow analysis is needed to verify if they hold.
+ * The data flow analysis of pass 3 is called pass 3b in JustIce.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class StructuralCodeConstraintException extends CodeConstraintException{
+    private static final long serialVersionUID = 5406842000007181420L;
+    /**
+     * Constructs a new StructuralCodeConstraintException with the specified error message.
+     */
+    public StructuralCodeConstraintException(String message){
+        super(message);
+    }
+    /**
+     * Constructs a new StructuralCodeConstraintException with null as its error message string.
+     */
+    public StructuralCodeConstraintException(){
+        super();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/Utility.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/Utility.java
new file mode 100644
index 0000000..2887c5e
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/Utility.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+/**
+ * A utility class providing convenience methods concerning Throwable instances.
+ * @version $Id$
+ * @author Enver Haase
+ * @see java.lang.Throwable
+ */
+public final class Utility{
+    /** This class is not instantiable. */
+    private Utility(){}
+
+    /** This method returns the stack trace of a Throwable instance as a String. */
+    public static String getStackTrace(Throwable t){
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        t.printStackTrace(pw);
+        return sw.toString();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/VerificationException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/VerificationException.java
new file mode 100644
index 0000000..bca39a8
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/VerificationException.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce" when a
+ * class file to verify does not pass one of the verification passes 2 or 3.
+ * Note that the pass 3 used by "JustIce" involves verification that is usually
+ * delayed to pass 4.
+ * The name of this class is justified by the Java Virtual Machine Specification, 2nd
+ * edition, page 164, 5.4.1 where verification as a part of the linking process is
+ * defined to be the verification happening in passes 2 and 3.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public abstract class VerificationException extends VerifierConstraintViolatedException{
+    private static final long serialVersionUID = 8012776320318623652L;
+
+    /**
+     * Constructs a new VerificationException with null as its error message string.
+     */
+    VerificationException(){
+        super();
+    }
+    /**
+     * Constructs a new VerificationException with the specified error message.
+     */
+    VerificationException(String message){
+        super(message);
+    }
+
+    /**
+     * Constructs a new VerificationException with the specified error message and exception
+     */
+    VerificationException(String message, Throwable initCause){
+        super(message, initCause);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/exc/VerifierConstraintViolatedException.java b/src/main/java/org/apache/commons/bcel6/verifier/exc/VerifierConstraintViolatedException.java
new file mode 100644
index 0000000..841d9ee
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/exc/VerifierConstraintViolatedException.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.exc;
+
+
+/**
+ * Instances of this class are thrown by BCEL's class file verifier "JustIce"
+ * whenever
+ * verification proves that some constraint of a class file (as stated in the
+ * Java Virtual Machine Specification, Edition 2) is violated.
+ * This is roughly equivalent to the VerifyError the JVM-internal verifiers
+ * throw.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public abstract class VerifierConstraintViolatedException extends RuntimeException{
+    // /** The name of the offending class that did not pass the verifier. */
+    // String name_of_offending_class;
+
+    private static final long serialVersionUID = 2946136970490179465L;
+    /** The specified error message. */
+    private String detailMessage;
+    /**
+     * Constructs a new VerifierConstraintViolatedException with null as its error message string.
+     */
+    VerifierConstraintViolatedException(){
+        super();
+    }
+    /**
+     * Constructs a new VerifierConstraintViolatedException with the specified error message.
+     */
+    VerifierConstraintViolatedException(String message){
+        super(message); // Not that important
+        detailMessage = message;
+    }
+    /**
+     * Constructs a new VerifierConstraintViolationException with the specified error message and cause
+     */
+    VerifierConstraintViolatedException(String message, Throwable initCause){
+        super(message, initCause);
+        detailMessage = message;
+    }
+
+
+    /** Extends the error message with a string before ("pre") and after ("post") the
+        'old' error message. All of these three strings are allowed to be null, and null
+        is always replaced by the empty string (""). In particular, after invoking this
+        method, the error message of this object can no longer be null.
+    */
+    public void extendMessage(String pre, String post){
+        if (pre  == null) {
+            pre="";
+        }
+        if (detailMessage == null) {
+            detailMessage="";
+        }
+        if (post == null) {
+            post="";
+        }
+        detailMessage = pre+detailMessage+post;
+    }
+    /**
+     * Returns the error message string of this VerifierConstraintViolatedException object.
+     * @return the error message string of this VerifierConstraintViolatedException.
+     */
+    @Override
+    public String getMessage(){
+        return detailMessage;
+    }
+}
diff --git a/src/main/java/org/apache/bcel/verifier/exc/package.html b/src/main/java/org/apache/commons/bcel6/verifier/exc/package.html
similarity index 100%
rename from src/main/java/org/apache/bcel/verifier/exc/package.html
rename to src/main/java/org/apache/commons/bcel6/verifier/exc/package.html
diff --git a/src/main/java/org/apache/bcel/verifier/package.html b/src/main/java/org/apache/commons/bcel6/verifier/package.html
similarity index 100%
rename from src/main/java/org/apache/bcel/verifier/package.html
rename to src/main/java/org/apache/commons/bcel6/verifier/package.html
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/DOUBLE_Upper.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/DOUBLE_Upper.java
new file mode 100644
index 0000000..4f4dbc9
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/DOUBLE_Upper.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.Type;
+
+/**
+ * This class represents the upper half of a DOUBLE variable.
+ * @version $Id$
+ * @author Enver Haase
+ */
+public final class DOUBLE_Upper extends Type{
+
+    private static final long serialVersionUID = -3046888862357818539L;
+    /** The one and only instance of this class. */
+    private static final DOUBLE_Upper singleInstance = new DOUBLE_Upper();
+
+    /** The constructor; this class must not be instantiated from the outside. */
+    private DOUBLE_Upper(){
+        super(Constants.T_UNKNOWN, "Long_Upper");
+    }
+
+    /** Use this method to get the single instance of this class. */
+    public static DOUBLE_Upper theInstance(){
+        return singleInstance;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/IntList.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/IntList.java
new file mode 100644
index 0000000..c029b17
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/IntList.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A small utility class representing a set of basic int values.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class IntList{
+    /** The int are stored as Integer objects here. */
+    private final List<Integer> theList;
+    /** This constructor creates an empty list. */
+    IntList(){
+        theList = new ArrayList<Integer>();
+    }
+    /** Adds an element to the list. */
+    void add(int i){
+        theList.add(Integer.valueOf(i));
+    }
+    /** Checks if the specified int is already in the list. */
+    boolean contains(int i){
+        Integer[] ints = new Integer[theList.size()];
+        theList.toArray(ints);
+        for (Integer k : ints) {
+            if (i == k.intValue()) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/LONG_Upper.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/LONG_Upper.java
new file mode 100644
index 0000000..9d5d1ed
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/LONG_Upper.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.Type;
+
+/**
+ * This class represents the upper half of a LONG variable.
+ * @version $Id$
+ * @author Enver Haase
+ */
+public final class LONG_Upper extends Type{
+
+    private static final long serialVersionUID = 3650377550491597107L;
+    /** The one and only instance of this class. */
+    private static final LONG_Upper singleInstance = new LONG_Upper();
+
+    /** The constructor; this class must not be instantiated from the outside. */
+    private LONG_Upper(){
+        super(Constants.T_UNKNOWN, "Long_Upper");
+    }
+
+    /** Use this method to get the single instance of this class. */
+    public static LONG_Upper theInstance(){
+        return singleInstance;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/LocalVariableInfo.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/LocalVariableInfo.java
new file mode 100644
index 0000000..4137765
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/LocalVariableInfo.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import java.util.Hashtable;
+
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.verifier.exc.LocalVariableInfoInconsistentException;
+
+/**
+ * A utility class holding the information about
+ * the name and the type of a local variable in
+ * a given slot (== index). This information
+ * often changes in course of byte code offsets.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class LocalVariableInfo{
+
+    /** The types database. KEY: String representing the offset integer. */
+    private final Hashtable<String, Type> types = new Hashtable<String, Type>();
+    /** The names database. KEY: String representing the offset integer. */
+    private final Hashtable<String, String> names = new Hashtable<String, String>();
+
+    /**
+     * Adds a name of a local variable and a certain slot to our 'names'
+     * (Hashtable) database.
+     */
+    private void setName(int offset, String name){
+        names.put( ((Integer.toString(offset))), name);
+    }
+    /**
+     * Adds a type of a local variable and a certain slot to our 'types'
+     * (Hashtable) database.
+     */
+    private void setType(int offset, Type t){
+        types.put( ((Integer.toString(offset))), t);
+    }
+
+    /**
+     * Returns the type of the local variable that uses this local
+     * variable slot at the given bytecode offset.
+     * Care for legal bytecode offsets yourself, otherwise the return value
+     * might be wrong.
+     * May return 'null' if nothing is known about the type of this local
+     * variable slot at the given bytecode offset.
+     */
+    public Type getType(int offset){
+        return types.get(Integer.toString(offset));
+    }
+    /**
+     * Returns the name of the local variable that uses this local
+     * variable slot at the given bytecode offset.
+     * Care for legal bytecode offsets yourself, otherwise the return value
+     * might be wrong.
+     * May return 'null' if nothing is known about the type of this local
+     * variable slot at the given bytecode offset.
+     */
+    public String getName(int offset){
+        return (names.get(Integer.toString(offset)));
+    }
+    /**
+     * Adds some information about this local variable (slot).
+     * @throws LocalVariableInfoInconsistentException if the new information conflicts
+     *         with already gathered information.
+     */
+    public void add(String name, int startpc, int length, Type t) throws LocalVariableInfoInconsistentException{
+        for (int i=startpc; i<=startpc+length; i++){ // incl/incl-notation!
+            add(i,name,t);
+        }
+    }
+
+    /**
+     * Adds information about name and type for a given offset.
+     * @throws LocalVariableInfoInconsistentException if the new information conflicts
+     *         with already gathered information.
+     */
+    private void add(int offset, String name, Type t) throws LocalVariableInfoInconsistentException{
+        if (getName(offset) != null){
+            if (! getName(offset).equals(name)){
+                throw new LocalVariableInfoInconsistentException("At bytecode offset '"+offset+"' a local variable has two different names: '"+getName(offset)+"' and '"+name+"'.");
+            }
+        }
+        if (getType(offset) != null){
+            if (! getType(offset).equals(t)){
+                throw new LocalVariableInfoInconsistentException("At bytecode offset '"+offset+"' a local variable has two different types: '"+getType(offset)+"' and '"+t+"'.");
+            }
+        }
+        setName(offset, name);
+        setType(offset, t);
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/LocalVariablesInfo.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/LocalVariablesInfo.java
new file mode 100644
index 0000000..6962b47
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/LocalVariablesInfo.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.LocalVariableInfoInconsistentException;
+
+/**
+ * A utility class holding the information about
+ * the names and the types of the local variables in
+ * a given method.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class LocalVariablesInfo{
+
+    /** The information about the local variables is stored here. */
+    private final LocalVariableInfo[] localVariableInfos;
+
+    /** The constructor. */
+    LocalVariablesInfo(int max_locals){
+        localVariableInfos = new LocalVariableInfo[max_locals];
+        for (int i=0; i<max_locals; i++){
+            localVariableInfos[i] = new LocalVariableInfo();
+        }
+    }
+
+    /** Returns the LocalVariableInfo for the given slot. */
+    public LocalVariableInfo getLocalVariableInfo(int slot){
+        if (slot < 0 || slot >= localVariableInfos.length){
+            throw new AssertionViolatedException("Slot number for local variable information out of range.");
+        }
+        return localVariableInfos[slot];
+    }
+
+    /**
+     * Adds information about the local variable in slot 'slot'. Automatically 
+     * adds information for slot+1 if 't' is Type.LONG or Type.DOUBLE.
+     * @throws LocalVariableInfoInconsistentException if the new information conflicts
+     *         with already gathered information.
+     */
+    public void add(int slot, String name, int startpc, int length, Type t) throws LocalVariableInfoInconsistentException{
+        // The add operation on LocalVariableInfo may throw the '...Inconsistent...' exception, we don't throw it explicitely here.
+
+        if (slot < 0 || slot >= localVariableInfos.length){
+            throw new AssertionViolatedException("Slot number for local variable information out of range.");
+        }
+
+        localVariableInfos[slot].add(name, startpc, length, t);
+        if (t == Type.LONG) {
+            localVariableInfos[slot+1].add(name, startpc, length, LONG_Upper.theInstance());
+        }
+        if (t == Type.DOUBLE) {
+            localVariableInfos[slot+1].add(name, startpc, length, DOUBLE_Upper.theInstance());
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass1Verifier.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass1Verifier.java
new file mode 100644
index 0000000..2fc0a79
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass1Verifier.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.ClassFormatException;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.verifier.PassVerifier;
+import org.apache.commons.bcel6.verifier.VerificationResult;
+import org.apache.commons.bcel6.verifier.Verifier;
+import org.apache.commons.bcel6.verifier.exc.LoadingException;
+import org.apache.commons.bcel6.verifier.exc.Utility;
+
+/**
+ * This PassVerifier verifies a class file according to pass 1 as
+ * described in The Java Virtual Machine Specification, 2nd edition.
+ * More detailed information is to be found at the do_verify() method's
+ * documentation.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see #do_verify()
+ */
+public final class Pass1Verifier extends PassVerifier{
+    /**
+     * DON'T USE THIS EVEN PRIVATELY! USE getJavaClass() INSTEAD.
+     * @see #getJavaClass()
+     */
+    private JavaClass jc;
+
+    /**
+     * The Verifier that created this.
+     */
+    private final Verifier myOwner;
+
+    /** Used to load in and return the myOwner-matching JavaClass object when needed. Avoids loading in a class file when it's not really needed! */
+    private JavaClass getJavaClass(){
+        if (jc == null){
+            try {
+                jc = Repository.lookupClass(myOwner.getClassName());
+            } catch (ClassNotFoundException e) {
+                // FIXME: currently, Pass1Verifier treats jc == null as a special
+                // case, so we don't need to do anything here.  A better solution
+                // would be to simply throw the ClassNotFoundException
+                // out of this method.
+            }
+        }
+        return jc;
+    }
+
+    /**
+     * Should only be instantiated by a Verifier.
+     *
+     * @see org.apache.commons.bcel6.verifier.Verifier
+     */
+    public Pass1Verifier(Verifier owner){
+        myOwner = owner;
+    }
+
+    /**
+     * Pass-one verification basically means loading in a class file.
+     * The Java Virtual Machine Specification is not too precise about
+     * what makes the difference between passes one and two.
+     * The answer is that only pass one is performed on a class file as
+     * long as its resolution is not requested; whereas pass two and
+     * pass three are performed during the resolution process.
+     * Only four constraints to be checked are explicitely stated by
+     * The Java Virtual Machine Specification, 2nd edition:
+     * <UL>
+     *  <LI>The first four bytes must contain the right magic number (0xCAFEBABE).
+     *  <LI>All recognized attributes must be of the proper length.
+     *  <LI>The class file must not be truncated or have extra bytes at the end.
+     *  <LI>The constant pool must not contain any superficially unrecognizable information.
+     * </UL>
+     * A more in-depth documentation of what pass one should do was written by
+     * <A HREF=mailto:pwfong@cs.sfu.ca>Philip W. L. Fong</A>:
+     * <UL>
+     *  <LI> the file should not be truncated.
+     *  <LI> the file should not have extra bytes at the end.
+     *  <LI> all variable-length structures should be well-formatted:
+     *  <UL>
+     *   <LI> there should only be constant_pool_count-1 many entries in the constant pool.
+     *   <LI> all constant pool entries should have size the same as indicated by their type tag.
+     *   <LI> there are exactly interfaces_count many entries in the interfaces array of the class file.
+     *   <LI> there are exactly fields_count many entries in the fields array of the class file.
+     *   <LI> there are exactly methods_count many entries in the methods array of the class file.
+     *   <LI> there are exactly attributes_count many entries in the attributes array of the class file, fields, methods, and code attribute.
+     *   <LI> there should be exactly attribute_length many bytes in each attribute. Inconsistency between attribute_length and the actually size of the attribute content should be uncovered. For example, in an Exceptions attribute, the actual number of exceptions as required by the number_of_exceptions field might yeild an attribute size that doesn't match the attribute_length. Such an anomaly should be detected.
+     *   <LI> all attributes should have proper length. In particular, under certain context (e.g. while parsing method_info), recognizable attributes (e.g. "Code" attribute) should have correct format (e.g. attribute_length is 2).
+     *  </UL>
+     *  <LI> Also, certain constant values are checked for validity:
+     *  <UL>
+     *   <LI> The magic number should be 0xCAFEBABE.
+     *   <LI> The major and minor version numbers are valid.
+     *   <LI> All the constant pool type tags are recognizable.
+     *   <LI> All undocumented access flags are masked off before use. Strictly speaking, this is not really a check.
+     *   <LI> The field this_class should point to a string that represents a legal non-array class name, and this name should be the same as the class file being loaded.
+     *   <LI> the field super_class should point to a string that represents a legal non-array class name.
+     *   <LI> Because some of the above checks require cross referencing the constant pool entries, guards are set up to make sure that the referenced entries are of the right type and the indices are within the legal range (0 &lt; index &lt; constant_pool_count).
+     *  </UL>
+     *  <LI> Extra checks done in pass 1:
+     *  <UL>
+     *   <LI> the constant values of static fields should have the same type as the fields.
+     *   <LI> the number of words in a parameter list does not exceed 255 and locals_max.
+     *   <LI> the name and signature of fields and methods are verified to be of legal format.
+     *  </UL>
+     * </UL>
+     * (From the Paper <A HREF=http://www.cs.sfu.ca/people/GradStudents/pwfong/personal/JVM/pass1/>The Mysterious Pass One, first draft, September 2, 1997</A>.)
+     * 
+     * <P>However, most of this is done by parsing a class file or generating a class file into BCEL's internal data structure.
+     * <B>Therefore, all that is really done here is look up the class file from BCEL's repository.</B>
+     * This is also motivated by the fact that some omitted things
+     * (like the check for extra bytes at the end of the class file) are handy when actually using BCEL to repair a class file (otherwise you would not be
+     * able to load it into BCEL).</P>
+     *
+     * @see org.apache.commons.bcel6.Repository
+     */
+    @Override
+    public VerificationResult do_verify(){
+        JavaClass jc;
+        try{
+            jc = getJavaClass();    //loads in the class file if not already done.
+
+            if (jc != null){
+                /* If we find more constraints to check, we should do this in an own method. */
+                if (! myOwner.getClassName().equals(jc.getClassName())){
+                    // This should maybe caught by BCEL: In case of renamed .class files we get wrong
+                    // JavaClass objects here.
+                    throw new LoadingException("Wrong name: the internal name of the .class file '"+jc.getClassName()+"' does not match the file's name '"+myOwner.getClassName()+"'.");
+                }
+            }
+
+        }
+        catch(LoadingException e){
+            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, e.getMessage());
+        }
+        catch(ClassFormatException e){
+            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, e.getMessage());
+        }
+        catch(RuntimeException e){
+            // BCEL does not catch every possible RuntimeException; e.g. if
+            // a constant pool index is referenced that does not exist.
+            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Parsing via BCEL did not succeed. "+e.getClass().getName()+" occured:\n"+Utility.getStackTrace(e));
+        }
+
+        if (jc != null){
+            return VerificationResult.VR_OK;
+        }
+        //TODO: Maybe change Repository's behaviour to throw a LoadingException instead of just returning "null"
+        //      if a class file cannot be found or in another way be looked up.
+        return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Repository.lookup() failed. FILE NOT FOUND?");
+    }
+
+    /**
+     * Currently this returns an empty array of String.
+     * One could parse the error messages of BCEL
+     * (written to java.lang.System.err) when loading
+     * a class file such as detecting unknown attributes
+     * or trailing garbage at the end of a class file.
+     * However, Markus Dahm does not like the idea so this
+     * method is currently useless and therefore marked as
+     * <B>TODO</B>.
+     */
+    @Override
+    public String[] getMessages(){
+        // This method is only here to override the javadoc-comment.
+        return super.getMessages();
+    }
+
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass2Verifier.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass2Verifier.java
new file mode 100644
index 0000000..8a77b48
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass2Verifier.java
@@ -0,0 +1,1471 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.ClassFormatException;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.CodeException;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantDouble;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantFloat;
+import org.apache.commons.bcel6.classfile.ConstantInteger;
+import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
+import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantMethodref;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantString;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ConstantValue;
+import org.apache.commons.bcel6.classfile.Deprecated;
+import org.apache.commons.bcel6.classfile.DescendingVisitor;
+import org.apache.commons.bcel6.classfile.EmptyVisitor;
+import org.apache.commons.bcel6.classfile.ExceptionTable;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.InnerClass;
+import org.apache.commons.bcel6.classfile.InnerClasses;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.LineNumber;
+import org.apache.commons.bcel6.classfile.LineNumberTable;
+import org.apache.commons.bcel6.classfile.LocalVariable;
+import org.apache.commons.bcel6.classfile.LocalVariableTable;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.Node;
+import org.apache.commons.bcel6.classfile.SourceFile;
+import org.apache.commons.bcel6.classfile.Synthetic;
+import org.apache.commons.bcel6.classfile.Unknown;
+import org.apache.commons.bcel6.generic.ArrayType;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.verifier.PassVerifier;
+import org.apache.commons.bcel6.verifier.VerificationResult;
+import org.apache.commons.bcel6.verifier.Verifier;
+import org.apache.commons.bcel6.verifier.VerifierFactory;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.ClassConstraintException;
+import org.apache.commons.bcel6.verifier.exc.LocalVariableInfoInconsistentException;
+
+/**
+ * This PassVerifier verifies a class file according to
+ * pass 2 as described in The Java Virtual Machine
+ * Specification, 2nd edition.
+ * More detailed information is to be found at the do_verify()
+ * method's documentation.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see #do_verify()
+ */
+public final class Pass2Verifier extends PassVerifier implements Constants{
+
+    /**
+     * The LocalVariableInfo instances used by Pass3bVerifier.
+     * localVariablesInfos[i] denotes the information for the
+     * local variables of method number i in the
+     * JavaClass this verifier operates on.
+     */
+    private LocalVariablesInfo[] localVariablesInfos;
+
+    /** The Verifier that created this. */
+    private final Verifier myOwner;
+
+    /**
+     * Should only be instantiated by a Verifier.
+     *
+     * @see Verifier
+     */
+    public Pass2Verifier(Verifier owner){
+        myOwner = owner;
+    }
+
+    /**
+     * Returns a LocalVariablesInfo object containing information
+     * about the usage of the local variables in the Code attribute
+     * of the said method or <B>null</B> if the class file this
+     * Pass2Verifier operates on could not be pass-2-verified correctly.
+     * The method number method_nr is the method you get using
+     * <B>Repository.lookupClass(myOwner.getClassname()).getMethods()[method_nr];</B>.
+     * You should not add own information. Leave that to JustIce.
+     */
+    public LocalVariablesInfo getLocalVariablesInfo(int method_nr){
+        if (this.verify() != VerificationResult.VR_OK) {
+            return null; // It's cached, don't worry.
+        }
+        if (method_nr < 0 || method_nr >= localVariablesInfos.length){
+            throw new AssertionViolatedException("Method number out of range.");
+        }
+        return localVariablesInfos[method_nr];
+    }
+
+    /**
+     * Pass 2 is the pass where static properties of the
+     * class file are checked without looking into "Code"
+     * arrays of methods.
+     * This verification pass is usually invoked when
+     * a class is resolved; and it may be possible that
+     * this verification pass has to load in other classes
+     * such as superclasses or implemented interfaces.
+     * Therefore, Pass 1 is run on them.<BR>
+     * Note that most referenced classes are <B>not</B> loaded
+     * in for verification or for an existance check by this
+     * pass; only the syntactical correctness of their names
+     * and descriptors (a.k.a. signatures) is checked.<BR>
+     * Very few checks that conceptually belong here
+     * are delayed until pass 3a in JustIce. JustIce does
+     * not only check for syntactical correctness but also
+     * for semantical sanity - therefore it needs access to
+     * the "Code" array of methods in a few cases. Please
+     * see the pass 3a documentation, too.
+     *
+     * @see org.apache.commons.bcel6.verifier.statics.Pass3aVerifier
+     */
+    @Override
+    public VerificationResult do_verify(){
+        try {
+        VerificationResult vr1 = myOwner.doPass1();
+        if (vr1.equals(VerificationResult.VR_OK)){
+
+            // For every method, we could have information about the local variables out of LocalVariableTable attributes of
+            // the Code attributes.
+            localVariablesInfos = new LocalVariablesInfo[Repository.lookupClass(myOwner.getClassName()).getMethods().length];
+
+            VerificationResult vr = VerificationResult.VR_OK; // default.
+            try{
+                constant_pool_entries_satisfy_static_constraints();
+                field_and_method_refs_are_valid();
+                every_class_has_an_accessible_superclass();
+                final_methods_are_not_overridden();
+            }
+            catch (ClassConstraintException cce){
+                vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage());
+            }
+            return vr;
+        }
+        return VerificationResult.VR_NOTYET;
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: this might not be the best way to handle missing classes.
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures that every class has a super class and that
+     * <B>final</B> classes are not subclassed.
+     * This means, the class this Pass2Verifier operates
+     * on has proper super classes (transitively) up to
+     * java.lang.Object.
+     * The reason for really loading (and Pass1-verifying)
+     * all of those classes here is that we need them in
+     * Pass2 anyway to verify no final methods are overridden
+     * (that could be declared anywhere in the ancestor hierarchy).
+     *
+     * @throws ClassConstraintException otherwise.
+     */
+    private void every_class_has_an_accessible_superclass(){
+        try {
+        Set<String> hs = new HashSet<String>(); // save class names to detect circular inheritance
+        JavaClass jc = Repository.lookupClass(myOwner.getClassName());
+        int supidx = -1;
+
+        while (supidx != 0){
+            supidx = jc.getSuperclassNameIndex();
+
+            if (supidx == 0){
+                if (jc != Repository.lookupClass(Type.OBJECT.getClassName())){
+                    throw new ClassConstraintException("Superclass of '"+jc.getClassName()+"' missing but not "+Type.OBJECT.getClassName()+" itself!");
+                }
+            }
+            else{
+                String supername = jc.getSuperclassName();
+                if (! hs.add(supername)){    // If supername already is in the list
+                    throw new ClassConstraintException("Circular superclass hierarchy detected.");
+                }
+                Verifier v = VerifierFactory.getVerifier(supername);
+                VerificationResult vr = v.doPass1();
+
+                if (vr != VerificationResult.VR_OK){
+                    throw new ClassConstraintException("Could not load in ancestor class '"+supername+"'.");
+                }
+                jc = Repository.lookupClass(supername);
+
+                if (jc.isFinal()){
+                    throw new ClassConstraintException("Ancestor class '"+supername+"' has the FINAL access modifier and must therefore not be subclassed.");
+                }
+            }
+        }
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: this might not be the best way to handle missing classes.
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures that <B>final</B> methods are not overridden.
+     * <B>Precondition to run this method:
+     * constant_pool_entries_satisfy_static_constraints() and
+     * every_class_has_an_accessible_superclass() have to be invoked before
+     * (in that order).</B>
+     *
+     * @throws ClassConstraintException otherwise.
+     * @see #constant_pool_entries_satisfy_static_constraints()
+     * @see #every_class_has_an_accessible_superclass()
+     */
+    private void final_methods_are_not_overridden(){
+        try {
+        Map<String, String> hashmap = new HashMap<String, String>();
+        JavaClass jc = Repository.lookupClass(myOwner.getClassName());
+
+        int supidx = -1;
+        while (supidx != 0){
+            supidx = jc.getSuperclassNameIndex();
+
+            Method[] methods = jc.getMethods();
+            for (Method method : methods) {
+                String name_and_sig = (method.getName() + method.getSignature());
+
+                if (hashmap.containsKey(name_and_sig)) {
+                    if (method.isFinal()) {
+                        if (!(method.isPrivate())) {
+                            throw new ClassConstraintException("Method '" + name_and_sig + "' in class '" + hashmap.get(name_and_sig) + "' overrides the final (not-overridable) definition in class '" + jc.getClassName() + "'.");
+                        }
+                        addMessage("Method '" + name_and_sig + "' in class '" + hashmap.get(name_and_sig) + "' overrides the final (not-overridable) definition in class '" + jc.getClassName() + "'. This is okay, as the original definition was private; however this constraint leverage was introduced by JLS 8.4.6 (not vmspec2) and the behaviour of the Sun verifiers.");
+                    } else {
+                        if (!method.isStatic()) { // static methods don't inherit
+                            hashmap.put(name_and_sig, jc.getClassName());
+                        }
+                    }
+                } else {
+                    if (!method.isStatic()) { // static methods don't inherit
+                        hashmap.put(name_and_sig, jc.getClassName());
+                    }
+                }
+            }
+
+            jc = Repository.lookupClass(jc.getSuperclassName());    // Well, for OBJECT this returns OBJECT so it works (could return anything but must not throw an Exception).
+        }
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: this might not be the best way to handle missing classes.
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+
+    }
+
+    /**
+     * Ensures that the constant pool entries satisfy the static constraints
+     * as described in The Java Virtual Machine Specification, 2nd Edition.
+     *
+     * @throws ClassConstraintException otherwise.
+     */
+    private void constant_pool_entries_satisfy_static_constraints(){
+        try {
+        // Most of the consistency is handled internally by BCEL; here
+        // we only have to verify if the indices of the constants point
+        // to constants of the appropriate type and such.
+        JavaClass jc = Repository.lookupClass(myOwner.getClassName());
+        new CPESSC_Visitor(jc); // constructor implicitly traverses jc
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: this might not be the best way to handle missing classes.
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * A Visitor class that ensures the constant pool satisfies the static
+     * constraints.
+     * The visitXXX() methods throw ClassConstraintException instances otherwise.
+     *
+     * @see #constant_pool_entries_satisfy_static_constraints()
+     */
+    private class CPESSC_Visitor extends org.apache.commons.bcel6.classfile.EmptyVisitor{
+        private final Class<?> CONST_Class;
+        /*
+        private Class<?> CONST_Fieldref;
+        private Class<?> CONST_Methodref;
+        private Class<?> CONST_InterfaceMethodref;
+        */
+        private final Class<?> CONST_String;
+        private final Class<?> CONST_Integer;
+        private final Class<?> CONST_Float;
+        private final Class<?> CONST_Long;
+        private final Class<?> CONST_Double;
+        private final Class<?> CONST_NameAndType;
+        private final Class<?> CONST_Utf8;
+
+        private final JavaClass jc;
+        private final ConstantPool cp; // ==jc.getConstantPool() -- only here to save typing work and computing power.
+        private final int cplen; // == cp.getLength() -- to save computing power.
+        private final DescendingVisitor carrier;
+
+        private final Set<String> field_names = new HashSet<String>();
+        private final Set<String> field_names_and_desc = new HashSet<String>();
+        private final Set<String> method_names_and_desc = new HashSet<String>();
+
+        private CPESSC_Visitor(JavaClass _jc){
+            jc = _jc;
+            cp = _jc.getConstantPool();
+            cplen = cp.getLength();
+
+            CONST_Class = org.apache.commons.bcel6.classfile.ConstantClass.class;
+            /*
+            CONST_Fieldref = org.apache.commons.bcel6.classfile.ConstantFieldref.class;
+            CONST_Methodref = org.apache.commons.bcel6.classfile.ConstantMethodref.class;
+            CONST_InterfaceMethodref = org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref.class;
+            */
+            CONST_String = org.apache.commons.bcel6.classfile.ConstantString.class;
+            CONST_Integer = org.apache.commons.bcel6.classfile.ConstantInteger.class;
+            CONST_Float = org.apache.commons.bcel6.classfile.ConstantFloat.class;
+            CONST_Long = org.apache.commons.bcel6.classfile.ConstantLong.class;
+            CONST_Double = org.apache.commons.bcel6.classfile.ConstantDouble.class;
+            CONST_NameAndType = org.apache.commons.bcel6.classfile.ConstantNameAndType.class;
+            CONST_Utf8 = org.apache.commons.bcel6.classfile.ConstantUtf8.class;
+
+            carrier = new DescendingVisitor(_jc, this);
+            carrier.visit();
+        }
+
+        private void checkIndex(Node referrer, int index, Class<?> shouldbe){
+            if ((index < 0) || (index >= cplen)){
+                throw new ClassConstraintException("Invalid index '"+index+"' used by '"+tostring(referrer)+"'.");
+            }
+            Constant c = cp.getConstant(index);
+            if (! shouldbe.isInstance(c)){
+                /* String isnot = shouldbe.toString().substring(shouldbe.toString().lastIndexOf(".")+1); //Cut all before last "." */
+                throw new ClassCastException("Illegal constant '"+tostring(c)+"' at index '"+index+"'. '"+tostring(referrer)+"' expects a '"+shouldbe+"'.");
+            }
+        }
+        ///////////////////////////////////////
+        // ClassFile structure (vmspec2 4.1) //
+        ///////////////////////////////////////
+        @Override
+        public void visitJavaClass(JavaClass obj){
+            Attribute[] atts = obj.getAttributes();
+            boolean foundSourceFile = false;
+            boolean foundInnerClasses = false;
+
+            // Is there an InnerClass referenced?
+            // This is a costly check; existing verifiers don't do it!
+            boolean hasInnerClass = new InnerClassDetector(jc).innerClassReferenced();
+
+            for (Attribute att : atts) {
+                if ((!(att instanceof SourceFile)) &&
+                        (!(att instanceof Deprecated)) &&
+                        (!(att instanceof InnerClasses)) &&
+                        (!(att instanceof Synthetic))) {
+                    addMessage("Attribute '" + tostring(att) + "' as an attribute of the ClassFile structure '" + tostring(obj) + "' is unknown and will therefore be ignored.");
+                }
+
+                if (att instanceof SourceFile) {
+                    if (foundSourceFile == false) {
+                        foundSourceFile = true;
+                    } else {
+                        throw new ClassConstraintException("A ClassFile structure (like '" + tostring(obj) + "') may have no more than one SourceFile attribute."); //vmspec2 4.7.7
+                    }
+                }
+
+                if (att instanceof InnerClasses) {
+                    if (foundInnerClasses == false) {
+                        foundInnerClasses = true;
+                    } else {
+                        if (hasInnerClass) {
+                            throw new ClassConstraintException("A Classfile structure (like '" + tostring(obj) + "') must have exactly one InnerClasses attribute if at least one Inner Class is referenced (which is the case). More than one InnerClasses attribute was found.");
+                        }
+                    }
+                    if (!hasInnerClass) {
+                        addMessage("No referenced Inner Class found, but InnerClasses attribute '" + tostring(att) + "' found. Strongly suggest removal of that attribute.");
+                    }
+                }
+
+            }
+            if (hasInnerClass && !foundInnerClasses){
+                //throw new ClassConstraintException("A Classfile structure (like '"+tostring(obj)+"') must have exactly one InnerClasses attribute if at least one Inner Class is referenced (which is the case). No InnerClasses attribute was found.");
+                //vmspec2, page 125 says it would be a constraint: but existing verifiers
+                //don't check it and javac doesn't satisfy it when it comes to anonymous
+                //inner classes
+                addMessage("A Classfile structure (like '"+tostring(obj)+"') must have exactly one InnerClasses attribute if at least one Inner Class is referenced (which is the case). No InnerClasses attribute was found.");
+            }
+        }
+        /////////////////////////////
+        // CONSTANTS (vmspec2 4.4) //
+        /////////////////////////////
+        @Override
+        public void visitConstantClass(ConstantClass obj){
+            if (obj.getTag() != Constants.CONSTANT_Class){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+        }
+        @Override
+        public void visitConstantFieldref(ConstantFieldref obj){
+            if (obj.getTag() != Constants.CONSTANT_Fieldref){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            checkIndex(obj, obj.getClassIndex(), CONST_Class);
+            checkIndex(obj, obj.getNameAndTypeIndex(), CONST_NameAndType);
+        }
+        @Override
+        public void visitConstantMethodref(ConstantMethodref obj){
+            if (obj.getTag() != Constants.CONSTANT_Methodref){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            checkIndex(obj, obj.getClassIndex(), CONST_Class);
+            checkIndex(obj, obj.getNameAndTypeIndex(), CONST_NameAndType);
+        }
+        @Override
+        public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj){
+            if (obj.getTag() != Constants.CONSTANT_InterfaceMethodref){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            checkIndex(obj, obj.getClassIndex(), CONST_Class);
+            checkIndex(obj, obj.getNameAndTypeIndex(), CONST_NameAndType);
+        }
+        @Override
+        public void visitConstantString(ConstantString obj){
+            if (obj.getTag() != Constants.CONSTANT_String){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            checkIndex(obj, obj.getStringIndex(), CONST_Utf8);
+        }
+        @Override
+        public void visitConstantInteger(ConstantInteger obj){
+            if (obj.getTag() != Constants.CONSTANT_Integer){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            // no indices to check
+        }
+        @Override
+        public void visitConstantFloat(ConstantFloat obj){
+            if (obj.getTag() != Constants.CONSTANT_Float){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            //no indices to check
+        }
+        @Override
+        public void visitConstantLong(ConstantLong obj){
+            if (obj.getTag() != Constants.CONSTANT_Long){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            //no indices to check
+        }
+        @Override
+        public void visitConstantDouble(ConstantDouble obj){
+            if (obj.getTag() != Constants.CONSTANT_Double){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            //no indices to check
+        }
+        @Override
+        public void visitConstantNameAndType(ConstantNameAndType obj){
+            if (obj.getTag() != Constants.CONSTANT_NameAndType){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+            //checkIndex(obj, obj.getDescriptorIndex(), CONST_Utf8); //inconsistently named in BCEL, see below.
+            checkIndex(obj, obj.getSignatureIndex(), CONST_Utf8);
+        }
+        @Override
+        public void visitConstantUtf8(ConstantUtf8 obj){
+            if (obj.getTag() != Constants.CONSTANT_Utf8){
+                throw new ClassConstraintException("Wrong constant tag in '"+tostring(obj)+"'.");
+            }
+            //no indices to check
+        }
+        //////////////////////////
+        // FIELDS (vmspec2 4.5) //
+        //////////////////////////
+        @Override
+        public void visitField(Field obj){
+
+            if (jc.isClass()){
+                int maxone=0;
+                if (obj.isPrivate()) {
+                    maxone++;
+                }
+                if (obj.isProtected()) {
+                    maxone++;
+                }
+                if (obj.isPublic()) {
+                    maxone++;
+                }
+                if (maxone > 1){
+                    throw new ClassConstraintException("Field '"+tostring(obj)+"' must only have at most one of its ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC modifiers set.");
+                }
+
+                if (obj.isFinal() && obj.isVolatile()){
+                    throw new ClassConstraintException("Field '"+tostring(obj)+"' must only have at most one of its ACC_FINAL, ACC_VOLATILE modifiers set.");
+                }
+            }
+            else{ // isInterface!
+                if (!obj.isPublic()){
+                    throw new ClassConstraintException("Interface field '"+tostring(obj)+"' must have the ACC_PUBLIC modifier set but hasn't!");
+                }
+                if (!obj.isStatic()){
+                    throw new ClassConstraintException("Interface field '"+tostring(obj)+"' must have the ACC_STATIC modifier set but hasn't!");
+                }
+                if (!obj.isFinal()){
+                    throw new ClassConstraintException("Interface field '"+tostring(obj)+"' must have the ACC_FINAL modifier set but hasn't!");
+                }
+            }
+
+            if ((obj.getAccessFlags() & ~(ACC_PUBLIC|ACC_PRIVATE|ACC_PROTECTED|ACC_STATIC|ACC_FINAL|ACC_VOLATILE|ACC_TRANSIENT)) > 0){
+                addMessage("Field '"+tostring(obj)+"' has access flag(s) other than ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_VOLATILE, ACC_TRANSIENT set (ignored).");
+            }
+
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = obj.getName();
+            if (! validFieldName(name)){
+                throw new ClassConstraintException("Field '"+tostring(obj)+"' has illegal name '"+obj.getName()+"'.");
+            }
+
+            // A descriptor is often named signature in BCEL
+            checkIndex(obj, obj.getSignatureIndex(), CONST_Utf8);
+
+            String sig  = ((ConstantUtf8) (cp.getConstant(obj.getSignatureIndex()))).getBytes(); // Field or Method signature(=descriptor)
+
+            try{
+                Type.getType(sig);  /* Don't need the return value */
+            }
+            catch (ClassFormatException cfe){
+                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
+            }
+
+            String nameanddesc = (name+sig);
+            if (field_names_and_desc.contains(nameanddesc)){
+                throw new ClassConstraintException("No two fields (like '"+tostring(obj)+"') are allowed have same names and descriptors!");
+            }
+            if (field_names.contains(name)){
+                addMessage("More than one field of name '"+name+"' detected (but with different type descriptors). This is very unusual.");
+            }
+            field_names_and_desc.add(nameanddesc);
+            field_names.add(name);
+
+            Attribute[] atts = obj.getAttributes();
+            for (Attribute att : atts) {
+                if ((!(att instanceof ConstantValue)) &&
+                        (!(att instanceof Synthetic)) &&
+                        (!(att instanceof Deprecated))) {
+                    addMessage("Attribute '" + tostring(att) + "' as an attribute of Field '" + tostring(obj) + "' is unknown and will therefore be ignored.");
+                }
+                if (!(att instanceof ConstantValue)) {
+                    addMessage("Attribute '" + tostring(att) + "' as an attribute of Field '" + tostring(obj) + "' is not a ConstantValue and is therefore only of use for debuggers and such.");
+                }
+            }
+        }
+        ///////////////////////////
+        // METHODS (vmspec2 4.6) //
+        ///////////////////////////
+        @Override
+        public void visitMethod(Method obj){
+
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = obj.getName();
+            if (! validMethodName(name, true)){
+                throw new ClassConstraintException("Method '"+tostring(obj)+"' has illegal name '"+name+"'.");
+            }
+
+            // A descriptor is often named signature in BCEL
+            checkIndex(obj, obj.getSignatureIndex(), CONST_Utf8);
+
+            String sig  = ((ConstantUtf8) (cp.getConstant(obj.getSignatureIndex()))).getBytes(); // Method's signature(=descriptor)
+
+            Type t;
+            Type[] ts; // needed below the try block.
+            try{
+                t  = Type.getReturnType(sig);
+                ts = Type.getArgumentTypes(sig);
+            }
+            catch (ClassFormatException cfe){
+                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by Method '"+tostring(obj)+"'.", cfe);
+            }
+
+            // Check if referenced objects exist.
+            Type act = t;
+            if (act instanceof ArrayType) {
+                act = ((ArrayType) act).getBasicType();
+            }
+            if (act instanceof ObjectType){
+                Verifier v = VerifierFactory.getVerifier( ((ObjectType) act).getClassName() );
+                VerificationResult vr = v.doPass1();
+                if (vr != VerificationResult.VR_OK) {
+                    throw new ClassConstraintException("Method '"+tostring(obj)+"' has a return type that does not pass verification pass 1: '"+vr+"'.");
+                }
+            }
+
+            for (Type element : ts) {
+                act = element;
+                if (act instanceof ArrayType) {
+                    act = ((ArrayType) act).getBasicType();
+                }
+                if (act instanceof ObjectType){
+                    Verifier v = VerifierFactory.getVerifier( ((ObjectType) act).getClassName() );
+                    VerificationResult vr = v.doPass1();
+                    if (vr != VerificationResult.VR_OK) {
+                        throw new ClassConstraintException("Method '"+tostring(obj)+"' has an argument type that does not pass verification pass 1: '"+vr+"'.");
+                    }
+                }
+            }
+
+            // Nearly forgot this! Funny return values are allowed, but a non-empty arguments list makes a different method out of it!
+            if (name.equals(STATIC_INITIALIZER_NAME) && (ts.length != 0)){
+                throw new ClassConstraintException("Method '"+tostring(obj)+"' has illegal name '"+name+"'. It's name resembles the class or interface initialization method which it isn't because of its arguments (==descriptor).");
+            }
+
+            if (jc.isClass()){
+                int maxone=0;
+                if (obj.isPrivate()) {
+                    maxone++;
+                }
+                if (obj.isProtected()) {
+                    maxone++;
+                }
+                if (obj.isPublic()) {
+                    maxone++;
+                }
+                if (maxone > 1){
+                    throw new ClassConstraintException("Method '"+tostring(obj)+"' must only have at most one of its ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC modifiers set.");
+                }
+
+                if (obj.isAbstract()){
+                    if (obj.isFinal()) {
+                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_FINAL modifier set.");
+                    }
+                    if (obj.isNative()) {
+                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_NATIVE modifier set.");
+                    }
+                    if (obj.isPrivate()) {
+                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_PRIVATE modifier set.");
+                    }
+                    if (obj.isStatic()) {
+                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_STATIC modifier set.");
+                    }
+                    if (obj.isStrictfp()) {
+                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_STRICT modifier set.");
+                    }
+                    if (obj.isSynchronized()) {
+                        throw new ClassConstraintException("Abstract method '"+tostring(obj)+"' must not have the ACC_SYNCHRONIZED modifier set.");
+                    }
+                }
+
+                // A specific instance initialization method... (vmspec2,Page 116).
+                if (name.equals(CONSTRUCTOR_NAME)) {
+                    //..may have at most one of ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC set: is checked above.
+                    //..may also have ACC_STRICT set, but none of the other flags in table 4.5 (vmspec2, page 115)
+                    if (obj.isStatic() ||
+                            obj.isFinal() ||
+                            obj.isSynchronized() ||
+                            obj.isNative() ||
+                            obj.isAbstract()) {
+                        throw new ClassConstraintException("Instance initialization method '" + tostring(obj) + "' must not have any of the ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT modifiers set.");
+                    }
+                }
+            }
+            else{ // isInterface!
+                if (!name.equals(STATIC_INITIALIZER_NAME)){//vmspec2, p.116, 2nd paragraph
+                    if (jc.getMajor() >= MAJOR_1_8) {
+                        if (!(obj.isPublic() ^ obj.isPrivate())) {
+                            throw new ClassConstraintException("Interface method '" + tostring(obj) + "' must have exactly one of its ACC_PUBLIC and ACC_PRIVATE modifiers set.");
+                        }
+                        if (obj.isProtected()
+                                || obj.isFinal()
+                                || obj.isSynchronized()
+                                || obj.isNative()) {
+                            throw new ClassConstraintException("Interface method '"+tostring(obj)+"' must not have any of the ACC_PROTECTED, ACC_FINAL, ACC_SYNCHRONIZED, or ACC_NATIVE modifiers set.");
+                        }
+
+                    } else {
+                        if (!obj.isPublic()){
+                            throw new ClassConstraintException("Interface method '"+tostring(obj)+"' must have the ACC_PUBLIC modifier set but hasn't!");
+                        }
+                        if (!obj.isAbstract()){
+                            throw new ClassConstraintException("Interface method '"+tostring(obj)+"' must have the ACC_ABSTRACT modifier set but hasn't!");
+                        }
+                        if (obj.isPrivate()
+                                || obj.isProtected()
+                                || obj.isStatic()
+                                || obj.isFinal()
+                                || obj.isSynchronized()
+                                || obj.isNative()
+                                || obj.isStrictfp() ) {
+                            throw new ClassConstraintException("Interface method '"+tostring(obj)+"' must not have any of the ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT, ACC_STRICT modifiers set.");
+                        }
+                    }
+                }
+            }
+
+            if ((obj.getAccessFlags() & ~(ACC_PUBLIC|ACC_PRIVATE|ACC_PROTECTED|ACC_STATIC|ACC_FINAL|ACC_SYNCHRONIZED|ACC_NATIVE|ACC_ABSTRACT|ACC_STRICT)) > 0){
+                addMessage("Method '"+tostring(obj)+"' has access flag(s) other than ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT, ACC_STRICT set (ignored).");
+            }
+
+            String nameanddesc = (name+sig);
+            if (method_names_and_desc.contains(nameanddesc)){
+                throw new ClassConstraintException("No two methods (like '"+tostring(obj)+"') are allowed have same names and desciptors!");
+            }
+            method_names_and_desc.add(nameanddesc);
+
+            Attribute[] atts = obj.getAttributes();
+            int num_code_atts = 0;
+            for (Attribute att : atts) {
+                if ((!(att instanceof Code)) &&
+                        (!(att instanceof ExceptionTable)) &&
+                        (!(att instanceof Synthetic)) &&
+                        (!(att instanceof Deprecated))) {
+                    addMessage("Attribute '" + tostring(att) + "' as an attribute of Method '" + tostring(obj) + "' is unknown and will therefore be ignored.");
+                }
+                if ((!(att instanceof Code)) &&
+                        (!(att instanceof ExceptionTable))) {
+                    addMessage("Attribute '" + tostring(att) + "' as an attribute of Method '" + tostring(obj) + "' is neither Code nor Exceptions and is therefore only of use for debuggers and such.");
+                }
+                if ((att instanceof Code) && (obj.isNative() || obj.isAbstract())) {
+                    throw new ClassConstraintException("Native or abstract methods like '" + tostring(obj) + "' must not have a Code attribute like '" + tostring(att) + "'."); //vmspec2 page120, 4.7.3
+                }
+                if (att instanceof Code) {
+                    num_code_atts++;
+                }
+            }
+            if ( !obj.isNative() && !obj.isAbstract() && num_code_atts != 1){
+                throw new ClassConstraintException("Non-native, non-abstract methods like '"+tostring(obj)+"' must have exactly one Code attribute (found: "+num_code_atts+").");
+            }
+        }
+        ///////////////////////////////////////////////////////
+        // ClassFile-structure-ATTRIBUTES (vmspec2 4.1, 4.7) //
+        ///////////////////////////////////////////////////////
+        @Override
+        public void visitSourceFile(SourceFile obj){//vmspec2 4.7.7
+
+            // zero or one SourceFile attr per ClassFile: see visitJavaClass()
+
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+            if (! name.equals("SourceFile")){
+                throw new ClassConstraintException("The SourceFile attribute '"+tostring(obj)+"' is not correctly named 'SourceFile' but '"+name+"'.");
+            }
+
+            checkIndex(obj, obj.getSourceFileIndex(), CONST_Utf8);
+
+            String sourcefilename = ((ConstantUtf8) cp.getConstant(obj.getSourceFileIndex())).getBytes(); //==obj.getSourceFileName() ?
+            String sourcefilenamelc = sourcefilename.toLowerCase(Locale.ENGLISH);
+
+            if (    (sourcefilename.indexOf('/') != -1) ||
+                        (sourcefilename.indexOf('\\') != -1) ||
+                        (sourcefilename.indexOf(':') != -1) ||
+                        (sourcefilenamelc.lastIndexOf(".java") == -1)    ){
+                addMessage("SourceFile attribute '"+tostring(obj)+"' has a funny name: remember not to confuse certain parsers working on javap's output. Also, this name ('"+sourcefilename+"') is considered an unqualified (simple) file name only.");
+            }
+        }
+        @Override
+        public void visitDeprecated(Deprecated obj){//vmspec2 4.7.10
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+            if (! name.equals("Deprecated")){
+                throw new ClassConstraintException("The Deprecated attribute '"+tostring(obj)+"' is not correctly named 'Deprecated' but '"+name+"'.");
+            }
+        }
+        @Override
+        public void visitSynthetic(Synthetic obj){//vmspec2 4.7.6
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+            if (! name.equals("Synthetic")){
+                throw new ClassConstraintException("The Synthetic attribute '"+tostring(obj)+"' is not correctly named 'Synthetic' but '"+name+"'.");
+            }
+        }
+        @Override
+        public void visitInnerClasses(InnerClasses obj){//vmspec2 4.7.5
+
+            // exactly one InnerClasses attr per ClassFile if some inner class is refernced: see visitJavaClass()
+
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+            if (! name.equals("InnerClasses")){
+                throw new ClassConstraintException("The InnerClasses attribute '"+tostring(obj)+"' is not correctly named 'InnerClasses' but '"+name+"'.");
+            }
+
+            InnerClass[] ics = obj.getInnerClasses();
+
+            for (InnerClass ic : ics) {
+                checkIndex(obj, ic.getInnerClassIndex(), CONST_Class);
+                int outer_idx = ic.getOuterClassIndex();
+                if (outer_idx != 0){
+                    checkIndex(obj, outer_idx, CONST_Class);
+                }
+                int innername_idx = ic.getInnerNameIndex();
+                if (innername_idx != 0){
+                    checkIndex(obj, innername_idx, CONST_Utf8);
+                }
+                int acc = ic.getInnerAccessFlags();
+                acc = acc & (~ (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED | ACC_STATIC | ACC_FINAL | ACC_INTERFACE | ACC_ABSTRACT));
+                if (acc != 0){
+                    addMessage("Unknown access flag for inner class '"+tostring(ic)+"' set (InnerClasses attribute '"+tostring(obj)+"').");
+                }
+            }
+            // Semantical consistency is not yet checked by Sun, see vmspec2 4.7.5.
+            // [marked TODO in JustIce]
+        }
+        ////////////////////////////////////////////////////////
+        // field_info-structure-ATTRIBUTES (vmspec2 4.5, 4.7) //
+        ////////////////////////////////////////////////////////
+        @Override
+        public void visitConstantValue(ConstantValue obj){//vmspec2 4.7.2
+            // Despite its name, this really is an Attribute,
+            // not a constant!
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+            if (! name.equals("ConstantValue")){
+                throw new ClassConstraintException("The ConstantValue attribute '"+tostring(obj)+"' is not correctly named 'ConstantValue' but '"+name+"'.");
+            }
+
+            Object pred = carrier.predecessor();
+            if (pred instanceof Field){ //ConstantValue attributes are quite senseless if the predecessor is not a field.
+                Field f = (Field) pred;
+                // Field constraints have been checked before -- so we are safe using their type information.
+                Type field_type = Type.getType(((ConstantUtf8) (cp.getConstant(f.getSignatureIndex()))).getBytes());
+
+                int index = obj.getConstantValueIndex();
+                if ((index < 0) || (index >= cplen)){
+                    throw new ClassConstraintException("Invalid index '"+index+"' used by '"+tostring(obj)+"'.");
+                }
+                Constant c = cp.getConstant(index);
+
+                if (CONST_Long.isInstance(c) && field_type.equals(Type.LONG)){
+                    return;
+                }
+                if (CONST_Float.isInstance(c) && field_type.equals(Type.FLOAT)){
+                    return;
+                }
+                if (CONST_Double.isInstance(c) && field_type.equals(Type.DOUBLE)){
+                    return;
+                }
+                if (CONST_Integer.isInstance(c) && (field_type.equals(Type.INT) || field_type.equals(Type.SHORT) || field_type.equals(Type.CHAR) || field_type.equals(Type.BYTE) || field_type.equals(Type.BOOLEAN))){
+                    return;
+                }
+                if (CONST_String.isInstance(c) && field_type.equals(Type.STRING)){
+                    return;
+                }
+
+                throw new ClassConstraintException("Illegal type of ConstantValue '"+obj+"' embedding Constant '"+c+"'. It is referenced by field '"+tostring(f)+"' expecting a different type: '"+field_type+"'.");
+            }
+        }
+        // SYNTHETIC: see above
+        // DEPRECATED: see above
+        /////////////////////////////////////////////////////////
+        // method_info-structure-ATTRIBUTES (vmspec2 4.6, 4.7) //
+        /////////////////////////////////////////////////////////
+        @Override
+        public void visitCode(Code obj){//vmspec2 4.7.3
+            try {
+            // No code attribute allowed for native or abstract methods: see visitMethod(Method).
+            // Code array constraints are checked in Pass3 (3a and 3b).
+
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+            if (! name.equals("Code")){
+                throw new ClassConstraintException("The Code attribute '"+tostring(obj)+"' is not correctly named 'Code' but '"+name+"'.");
+            }
+
+            Method m = null; // satisfy compiler
+            if (!(carrier.predecessor() instanceof Method)){
+                addMessage("Code attribute '"+tostring(obj)+"' is not declared in a method_info structure but in '"+carrier.predecessor()+"'. Ignored.");
+                return;
+            }
+            m = (Method) carrier.predecessor();    // we can assume this method was visited before;
+                                                                                    // i.e. the data consistency was verified.
+
+            if (obj.getCode().length == 0){
+                throw new ClassConstraintException("Code array of Code attribute '"+tostring(obj)+"' (method '"+m+"') must not be empty.");
+            }
+
+            //In JustIce, the check for correct offsets into the code array is delayed to Pass 3a.
+            CodeException[] exc_table = obj.getExceptionTable();
+            for (CodeException element : exc_table) {
+                int exc_index = element.getCatchType();
+                if (exc_index != 0){ // if 0, it catches all Throwables
+                    checkIndex(obj, exc_index, CONST_Class);
+                    ConstantClass cc = (ConstantClass) (cp.getConstant(exc_index));
+                    checkIndex(cc, cc.getNameIndex(), CONST_Utf8); // cannot be sure this ConstantClass has already been visited (checked)!
+                    String cname = ((ConstantUtf8) cp.getConstant(cc.getNameIndex())).getBytes().replace('/','.');
+
+                    Verifier v = VerifierFactory.getVerifier(cname);
+                    VerificationResult vr = v.doPass1();
+
+                    if (vr != VerificationResult.VR_OK){
+                        throw new ClassConstraintException("Code attribute '"+tostring(obj)+"' (method '"+m+"') has an exception_table entry '"+tostring(element)+"' that references '"+cname+"' as an Exception but it does not pass verification pass 1: "+vr);
+                    }
+                    // We cannot safely trust any other "instanceof" mechanism. We need to transitively verify
+                    // the ancestor hierarchy.
+                    JavaClass e = Repository.lookupClass(cname);
+                    JavaClass t = Repository.lookupClass(Type.THROWABLE.getClassName());
+                    JavaClass o = Repository.lookupClass(Type.OBJECT.getClassName());
+                    while (e != o){
+                        if (e == t) {
+                            break; // It's a subclass of Throwable, OKAY, leave.
+                        }
+
+                        v = VerifierFactory.getVerifier(e.getSuperclassName());
+                        vr = v.doPass1();
+                        if (vr != VerificationResult.VR_OK){
+                            throw new ClassConstraintException("Code attribute '"+tostring(obj)+"' (method '"+m+"') has an exception_table entry '"+tostring(element)+"' that references '"+cname+"' as an Exception but '"+e.getSuperclassName()+"' in the ancestor hierachy does not pass verification pass 1: "+vr);
+                        }
+                        e = Repository.lookupClass(e.getSuperclassName());
+                    }
+                    if (e != t) {
+                        throw new ClassConstraintException("Code attribute '"+tostring(obj)+"' (method '"+m+"') has an exception_table entry '"+tostring(element)+"' that references '"+cname+"' as an Exception but it is not a subclass of '"+t.getClassName()+"'.");
+                    }
+                }
+            }
+
+            // Create object for local variables information
+            // This is highly unelegant due to usage of the Visitor pattern.
+            // TODO: rework it.
+            int method_number = -1;
+            Method[] ms = Repository.lookupClass(myOwner.getClassName()).getMethods();
+            for (int mn=0; mn<ms.length; mn++){
+                if (m == ms[mn]){
+                    method_number = mn;
+                    break;
+                }
+            }
+            if (method_number < 0){ // Mmmmh. Can we be sure BCEL does not sometimes instantiate new objects?
+                throw new AssertionViolatedException("Could not find a known BCEL Method object in the corresponding BCEL JavaClass object.");
+            }
+            localVariablesInfos[method_number] = new LocalVariablesInfo(obj.getMaxLocals());
+
+            int num_of_lvt_attribs = 0;
+            // Now iterate through the attributes the Code attribute has.
+            Attribute[] atts = obj.getAttributes();
+            for (int a=0; a<atts.length; a++){
+                if ((! (atts[a] instanceof LineNumberTable)) &&
+                    (! (atts[a] instanceof LocalVariableTable))){
+                    addMessage("Attribute '"+tostring(atts[a])+"' as an attribute of Code attribute '"+tostring(obj)+"' (method '"+m+"') is unknown and will therefore be ignored.");
+                }
+                else{// LineNumberTable or LocalVariableTable
+                    addMessage("Attribute '"+tostring(atts[a])+"' as an attribute of Code attribute '"+tostring(obj)+"' (method '"+m+"') will effectively be ignored and is only useful for debuggers and such.");
+                }
+
+                //LocalVariableTable check (partially delayed to Pass3a).
+                //Here because its easier to collect the information of the
+                //(possibly more than one) LocalVariableTables belonging to
+                //one certain Code attribute.
+                if (atts[a] instanceof LocalVariableTable){ // checks conforming to vmspec2 4.7.9
+
+                    LocalVariableTable lvt = (LocalVariableTable) atts[a];
+
+                    checkIndex(lvt, lvt.getNameIndex(), CONST_Utf8);
+
+                    String lvtname = ((ConstantUtf8) cp.getConstant(lvt.getNameIndex())).getBytes();
+                    if (! lvtname.equals("LocalVariableTable")){
+                        throw new ClassConstraintException("The LocalVariableTable attribute '"+tostring(lvt)+"' is not correctly named 'LocalVariableTable' but '"+lvtname+"'.");
+                    }
+
+                    Code code = obj;
+
+                    //In JustIce, the check for correct offsets into the code array is delayed to Pass 3a.
+                    LocalVariable[] localvariables = lvt.getLocalVariableTable();
+
+                    for (LocalVariable localvariable : localvariables) {
+                        checkIndex(lvt, localvariable.getNameIndex(), CONST_Utf8);
+                        String localname = ((ConstantUtf8) cp.getConstant(localvariable.getNameIndex())).getBytes();
+                        if (!validJavaIdentifier(localname)){
+                            throw new ClassConstraintException("LocalVariableTable '"+tostring(lvt)+"' references a local variable by the name '"+localname+"' which is not a legal Java simple name.");
+                        }
+
+                        checkIndex(lvt, localvariable.getSignatureIndex(), CONST_Utf8);
+                        String localsig  = ((ConstantUtf8) (cp.getConstant(localvariable.getSignatureIndex()))).getBytes(); // Local signature(=descriptor)
+                        Type t;
+                        try{
+                            t = Type.getType(localsig);
+                        }
+                        catch (ClassFormatException cfe){
+                            throw new ClassConstraintException("Illegal descriptor (==signature) '"+localsig+"' used by LocalVariable '"+tostring(localvariable)+"' referenced by '"+tostring(lvt)+"'.", cfe);
+                        }
+                        int localindex = localvariable.getIndex();
+                        if ( ( (t==Type.LONG || t==Type.DOUBLE)? localindex+1:localindex) >= code.getMaxLocals()){
+                            throw new ClassConstraintException("LocalVariableTable attribute '"+tostring(lvt)+"' references a LocalVariable '"+tostring(localvariable)+"' with an index that exceeds the surrounding Code attribute's max_locals value of '"+code.getMaxLocals()+"'.");
+                        }
+
+                        try{
+                            localVariablesInfos[method_number].add(localindex, localname, localvariable.getStartPC(), localvariable.getLength(), t);
+                        }
+                        catch(LocalVariableInfoInconsistentException lviie){
+                            throw new ClassConstraintException("Conflicting information in LocalVariableTable '"+tostring(lvt)+"' found in Code attribute '"+tostring(obj)+"' (method '"+tostring(m)+"'). "+lviie.getMessage(), lviie);
+                        }
+                    }// for all local variables localvariables[i] in the LocalVariableTable attribute atts[a] END
+
+                    num_of_lvt_attribs++;
+                    if (!m.isStatic() && num_of_lvt_attribs > obj.getMaxLocals()){
+                        throw new ClassConstraintException("Number of LocalVariableTable attributes of Code attribute '"+tostring(obj)+"' (method '"+tostring(m)+"') exceeds number of local variable slots '"+obj.getMaxLocals()+"' ('There may be no more than one LocalVariableTable attribute per local variable in the Code attribute.').");
+                    }
+                }// if atts[a] instanceof LocalVariableTable END
+            }// for all attributes atts[a] END
+
+            } catch (ClassNotFoundException e) {
+            // FIXME: this might not be the best way to handle missing classes.
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+
+        }// visitCode(Code) END
+
+        @Override
+        public void visitExceptionTable(ExceptionTable obj){//vmspec2 4.7.4
+            try {
+            // incorrectly named, it's the Exceptions attribute (vmspec2 4.7.4)
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+            if (! name.equals("Exceptions")){
+                throw new ClassConstraintException("The Exceptions attribute '"+tostring(obj)+"' is not correctly named 'Exceptions' but '"+name+"'.");
+            }
+
+            int[] exc_indices = obj.getExceptionIndexTable();
+
+            for (int exc_indice : exc_indices) {
+                checkIndex(obj, exc_indice, CONST_Class);
+
+                ConstantClass cc = (ConstantClass) (cp.getConstant(exc_indice));
+                checkIndex(cc, cc.getNameIndex(), CONST_Utf8); // cannot be sure this ConstantClass has already been visited (checked)!
+                String cname = ((ConstantUtf8) cp.getConstant(cc.getNameIndex())).getBytes().replace('/','.'); //convert internal notation on-the-fly to external notation
+
+                Verifier v = VerifierFactory.getVerifier(cname);
+                VerificationResult vr = v.doPass1();
+
+                if (vr != VerificationResult.VR_OK){
+                    throw new ClassConstraintException("Exceptions attribute '"+tostring(obj)+"' references '"+cname+"' as an Exception but it does not pass verification pass 1: "+vr);
+                }
+                else{
+                    // We cannot safely trust any other "instanceof" mechanism. We need to transitively verify
+                    // the ancestor hierarchy.
+                    JavaClass e = Repository.lookupClass(cname);
+                    JavaClass t = Repository.lookupClass(Type.THROWABLE.getClassName());
+                    JavaClass o = Repository.lookupClass(Type.OBJECT.getClassName());
+                    while (e != o){
+                        if (e == t) {
+                            break; // It's a subclass of Throwable, OKAY, leave.
+                        }
+
+                        v = VerifierFactory.getVerifier(e.getSuperclassName());
+                        vr = v.doPass1();
+                        if (vr != VerificationResult.VR_OK){
+                            throw new ClassConstraintException("Exceptions attribute '"+tostring(obj)+"' references '"+cname+"' as an Exception but '"+e.getSuperclassName()+"' in the ancestor hierachy does not pass verification pass 1: "+vr);
+                        }
+                        else{
+                            e = Repository.lookupClass(e.getSuperclassName());
+                        }
+                    }
+                    if (e != t) {
+                        throw new ClassConstraintException("Exceptions attribute '"+tostring(obj)+"' references '"+cname+"' as an Exception but it is not a subclass of '"+t.getClassName()+"'.");
+                    }
+                }
+            }
+
+            } catch (ClassNotFoundException e) {
+            // FIXME: this might not be the best way to handle missing classes.
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+        }
+        // SYNTHETIC: see above
+        // DEPRECATED: see above
+        //////////////////////////////////////////////////////////////
+        // code_attribute-structure-ATTRIBUTES (vmspec2 4.7.3, 4.7) //
+        //////////////////////////////////////////////////////////////
+        @Override
+        public void visitLineNumberTable(LineNumberTable obj){//vmspec2 4.7.8
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
+            if (! name.equals("LineNumberTable")){
+                throw new ClassConstraintException("The LineNumberTable attribute '"+tostring(obj)+"' is not correctly named 'LineNumberTable' but '"+name+"'.");
+            }
+
+            //In JustIce,this check is delayed to Pass 3a.
+            //LineNumber[] linenumbers = obj.getLineNumberTable();
+            // ...validity check...
+
+        }
+        @Override
+        public void visitLocalVariableTable(LocalVariableTable obj){//vmspec2 4.7.9
+            //In JustIce,this check is partially delayed to Pass 3a.
+            //The other part can be found in the visitCode(Code) method.
+        }
+        ////////////////////////////////////////////////////
+        // MISC-structure-ATTRIBUTES (vmspec2 4.7.1, 4.7) //
+        ////////////////////////////////////////////////////
+        @Override
+        public void visitUnknown(Unknown obj){//vmspec2 4.7.1
+            // Represents an unknown attribute.
+            checkIndex(obj, obj.getNameIndex(), CONST_Utf8);
+
+            // Maybe only misnamed? Give a (warning) message.
+            addMessage("Unknown attribute '"+tostring(obj)+"'. This attribute is not known in any context!");
+        }
+        //////////
+        // BCEL //
+        //////////
+        @Override
+        public void visitLocalVariable(LocalVariable obj){
+            // This does not represent an Attribute but is only
+            // related to internal BCEL data representation.
+
+            // see visitLocalVariableTable(LocalVariableTable)
+        }
+        @Override
+        public void visitCodeException(CodeException obj){
+            // Code constraints are checked in Pass3 (3a and 3b).
+            // This does not represent an Attribute but is only
+            // related to internal BCEL data representation.
+
+            // see visitCode(Code)
+        }
+        @Override
+        public void visitConstantPool(ConstantPool obj){
+            // No need to. We're piggybacked by the DescendingVisitor.
+            // This does not represent an Attribute but is only
+            // related to internal BCEL data representation.
+        }
+        @Override
+        public void visitInnerClass(InnerClass obj){
+            // This does not represent an Attribute but is only
+            // related to internal BCEL data representation.
+        }
+        @Override
+        public void visitLineNumber(LineNumber obj){
+            // This does not represent an Attribute but is only
+            // related to internal BCEL data representation.
+
+            // see visitLineNumberTable(LineNumberTable)
+        }
+    }
+
+    /**
+     * Ensures that the ConstantCP-subclassed entries of the constant
+     * pool are valid. According to "Yellin: Low Level Security in Java",
+     * this method does not verify the existence of referenced entities
+     * (such as classes) but only the formal correctness (such as well-formed
+     * signatures).
+     * The visitXXX() methods throw ClassConstraintException instances otherwise.
+     * <B>Precondition: index-style cross referencing in the constant
+     * pool must be valid. Simply invoke constant_pool_entries_satisfy_static_constraints()
+     * before.</B>
+     *
+     * @throws ClassConstraintException otherwise.
+     * @see #constant_pool_entries_satisfy_static_constraints()
+     */
+    private void field_and_method_refs_are_valid(){
+        try {
+        JavaClass jc = Repository.lookupClass(myOwner.getClassName());
+        DescendingVisitor v = new DescendingVisitor(jc, new FAMRAV_Visitor(jc));
+        v.visit();
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: this might not be the best way to handle missing classes.
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * A Visitor class that ensures the ConstantCP-subclassed entries
+     * of the constant pool are valid.
+     * <B>Precondition: index-style cross referencing in the constant
+     * pool must be valid.</B>
+     *
+     * @see #constant_pool_entries_satisfy_static_constraints()
+     * @see org.apache.commons.bcel6.classfile.ConstantCP
+     */
+    private class FAMRAV_Visitor extends EmptyVisitor{
+        private final ConstantPool cp; // ==jc.getConstantPool() -- only here to save typing work.
+        private FAMRAV_Visitor(JavaClass _jc){
+            cp = _jc.getConstantPool();
+        }
+
+        @Override
+        public void visitConstantFieldref(ConstantFieldref obj){
+            if (obj.getTag() != Constants.CONSTANT_Fieldref){
+                throw new ClassConstraintException("ConstantFieldref '"+tostring(obj)+"' has wrong tag!");
+            }
+            int name_and_type_index = obj.getNameAndTypeIndex();
+            ConstantNameAndType cnat = (ConstantNameAndType) (cp.getConstant(name_and_type_index));
+            String name = ((ConstantUtf8) (cp.getConstant(cnat.getNameIndex()))).getBytes(); // Field or Method name
+            if (!validFieldName(name)){
+                throw new ClassConstraintException("Invalid field name '"+name+"' referenced by '"+tostring(obj)+"'.");
+            }
+
+            int class_index = obj.getClassIndex();
+            ConstantClass cc = (ConstantClass) (cp.getConstant(class_index));
+            String className = ((ConstantUtf8) (cp.getConstant(cc.getNameIndex()))).getBytes(); // Class Name in internal form
+            if (! validClassName(className)){
+                throw new ClassConstraintException("Illegal class name '"+className+"' used by '"+tostring(obj)+"'.");
+            }
+
+            String sig  = ((ConstantUtf8) (cp.getConstant(cnat.getSignatureIndex()))).getBytes(); // Field or Method signature(=descriptor)
+
+            try{
+                Type.getType(sig); /* Don't need the return value */
+            }
+            catch (ClassFormatException cfe){
+                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
+            }
+        }
+
+        @Override
+        public void visitConstantMethodref(ConstantMethodref obj){
+            if (obj.getTag() != Constants.CONSTANT_Methodref){
+                throw new ClassConstraintException("ConstantMethodref '"+tostring(obj)+"' has wrong tag!");
+            }
+            int name_and_type_index = obj.getNameAndTypeIndex();
+            ConstantNameAndType cnat = (ConstantNameAndType) (cp.getConstant(name_and_type_index));
+            String name = ((ConstantUtf8) (cp.getConstant(cnat.getNameIndex()))).getBytes(); // Field or Method name
+            if (!validClassMethodName(name)){
+                throw new ClassConstraintException("Invalid (non-interface) method name '"+name+"' referenced by '"+tostring(obj)+"'.");
+            }
+
+            int class_index = obj.getClassIndex();
+            ConstantClass cc = (ConstantClass) (cp.getConstant(class_index));
+            String className = ((ConstantUtf8) (cp.getConstant(cc.getNameIndex()))).getBytes(); // Class Name in internal form
+            if (! validClassName(className)){
+                throw new ClassConstraintException("Illegal class name '"+className+"' used by '"+tostring(obj)+"'.");
+            }
+
+            String sig  = ((ConstantUtf8) (cp.getConstant(cnat.getSignatureIndex()))).getBytes(); // Field or Method signature(=descriptor)
+
+            try{
+                Type   t  = Type.getReturnType(sig);
+                if ( name.equals(CONSTRUCTOR_NAME) && (t != Type.VOID) ){
+                    throw new ClassConstraintException("Instance initialization method must have VOID return type.");
+                }
+            }
+            catch (ClassFormatException cfe){
+                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
+            }
+        }
+
+        @Override
+        public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj){
+            if (obj.getTag() != Constants.CONSTANT_InterfaceMethodref){
+                throw new ClassConstraintException("ConstantInterfaceMethodref '"+tostring(obj)+"' has wrong tag!");
+            }
+            int name_and_type_index = obj.getNameAndTypeIndex();
+            ConstantNameAndType cnat = (ConstantNameAndType) (cp.getConstant(name_and_type_index));
+            String name = ((ConstantUtf8) (cp.getConstant(cnat.getNameIndex()))).getBytes(); // Field or Method name
+            if (!validInterfaceMethodName(name)){
+                throw new ClassConstraintException("Invalid (interface) method name '"+name+"' referenced by '"+tostring(obj)+"'.");
+            }
+
+            int class_index = obj.getClassIndex();
+            ConstantClass cc = (ConstantClass) (cp.getConstant(class_index));
+            String className = ((ConstantUtf8) (cp.getConstant(cc.getNameIndex()))).getBytes(); // Class Name in internal form
+            if (! validClassName(className)){
+                throw new ClassConstraintException("Illegal class name '"+className+"' used by '"+tostring(obj)+"'.");
+            }
+
+            String sig  = ((ConstantUtf8) (cp.getConstant(cnat.getSignatureIndex()))).getBytes(); // Field or Method signature(=descriptor)
+
+            try{
+                Type   t  = Type.getReturnType(sig);
+                if ( name.equals(STATIC_INITIALIZER_NAME) && (t != Type.VOID) ){
+                    addMessage("Class or interface initialization method '"+STATIC_INITIALIZER_NAME+"' usually has VOID return type instead of '"+t+"'. Note this is really not a requirement of The Java Virtual Machine Specification, Second Edition.");
+                }
+            }
+            catch (ClassFormatException cfe){
+                throw new ClassConstraintException("Illegal descriptor (==signature) '"+sig+"' used by '"+tostring(obj)+"'.", cfe);
+            }
+
+        }
+
+    }
+
+    /**
+     * This method returns true if and only if the supplied String
+     * represents a valid Java class name.
+     */
+    private static boolean validClassName(String name){
+        /*
+         * TODO: implement.
+         * Are there any restrictions?
+         */
+        return true;
+    }
+    /**
+     * This method returns true if and only if the supplied String
+     * represents a valid method name.
+     * This is basically the same as a valid identifier name in the
+     * Java programming language, but the special name for
+     * the instance initialization method is allowed and the special name
+     * for the class/interface initialization method may be allowed.
+     */
+    private static boolean validMethodName(String name, boolean allowStaticInit){
+        if (validJavaLangMethodName(name)) {
+            return true;
+        }
+
+        if (allowStaticInit){
+            return (name.equals(CONSTRUCTOR_NAME) || name.equals(STATIC_INITIALIZER_NAME));
+        }
+        else{
+            return name.equals(CONSTRUCTOR_NAME);
+        }
+    }
+
+    /**
+     * This method returns true if and only if the supplied String
+     * represents a valid method name that may be referenced by
+     * ConstantMethodref objects.
+     */
+    private static boolean validClassMethodName(String name){
+        return validMethodName(name, false);
+    }
+
+    /**
+     * This method returns true if and only if the supplied String
+     * represents a valid Java programming language method name stored as a simple
+     * (non-qualified) name.
+     * Conforming to: The Java Virtual Machine Specification, Second Edition, �2.7, �2.7.1, �2.2.
+     */
+    private static boolean validJavaLangMethodName(String name){
+        if (!Character.isJavaIdentifierStart(name.charAt(0))) {
+            return false;
+        }
+
+        for (int i=1; i<name.length(); i++){
+            if (!Character.isJavaIdentifierPart(name.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * This method returns true if and only if the supplied String
+     * represents a valid Java interface method name that may be
+     * referenced by ConstantInterfaceMethodref objects.
+     */
+    private static boolean validInterfaceMethodName(String name){
+        // I guess we should assume special names forbidden here.
+        if (name.startsWith("<")) {
+            return false;
+        }
+        return validJavaLangMethodName(name);
+    }
+
+    /**
+     * This method returns true if and only if the supplied String
+     * represents a valid Java identifier (so-called simple name).
+     */
+    private static boolean validJavaIdentifier(String name){
+    if  (name.length() == 0) {
+        return false; // must not be empty, reported by <francis.andre@easynet.fr>, thanks!
+    }
+
+        // vmspec2 2.7, vmspec2 2.2
+        if (!Character.isJavaIdentifierStart(name.charAt(0))) {
+            return false;
+        }
+
+        for (int i=1; i<name.length(); i++){
+            if (!Character.isJavaIdentifierPart(name.charAt(i))) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * This method returns true if and only if the supplied String
+     * represents a valid Java field name.
+     */
+    private static boolean validFieldName(String name){
+        // vmspec2 2.7, vmspec2 2.2
+        return validJavaIdentifier(name);
+    }
+
+    /**
+     * This class serves for finding out if a given JavaClass' ConstantPool
+     * references an Inner Class.
+     * The Java Virtual Machine Specification, Second Edition is not very precise
+     * about when an "InnerClasses" attribute has to appear. However, it states that
+     * there has to be exactly one InnerClasses attribute in the ClassFile structure
+     * if the constant pool of a class or interface refers to any class or interface
+     * "that is not a member of a package". Sun does not mean "member of the default
+     * package". In "Inner Classes Specification" they point out how a "bytecode name"
+     * is derived so one has to deduce what a class name of a class "that is not a
+     * member of a package" looks like: there is at least one character in the byte-
+     * code name that cannot be part of a legal Java Language Class name (and not equal
+     * to '/'). This assumption is wrong as the delimiter is '$' for which
+     * Character.isJavaIdentifierPart() == true.
+     * Hence, you really run into trouble if you have a toplevel class called
+     * "A$XXX" and another toplevel class called "A" with in inner class called "XXX".
+     * JustIce cannot repair this; please note that existing verifiers at this
+     * time even fail to detect missing InnerClasses attributes in pass 2.
+     */
+    private static class InnerClassDetector extends EmptyVisitor{
+        private boolean hasInnerClass = false;
+        private final JavaClass jc;
+        private final ConstantPool cp;
+
+        /** Constructs an InnerClassDetector working on the JavaClass _jc. */
+        public InnerClassDetector(JavaClass _jc){
+            jc = _jc;
+            cp = jc.getConstantPool();
+            (new DescendingVisitor(jc, this)).visit();
+        }
+        /**
+         * Returns if the JavaClass this InnerClassDetector is working on
+         * has an Inner Class reference in its constant pool.
+         */
+        public boolean innerClassReferenced(){
+            return hasInnerClass;
+        }
+        /** This method casually visits ConstantClass references. */
+        @Override
+        public void visitConstantClass(ConstantClass obj){
+            Constant c = cp.getConstant(obj.getNameIndex());
+            if (c instanceof ConstantUtf8){ //Ignore the case where it's not a ConstantUtf8 here, we'll find out later.
+                String classname = ((ConstantUtf8) c).getBytes();
+                if (classname.startsWith(jc.getClassName().replace('.','/')+"$")){
+                    hasInnerClass = true;
+                }
+            }
+        }
+    }
+
+    /**
+     * This method is here to save typing work and improve code readability.
+     */
+    private static String tostring(Node n){
+        return new StringRepresentation(n).toString();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass3aVerifier.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass3aVerifier.java
new file mode 100644
index 0000000..14936cf
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/Pass3aVerifier.java
@@ -0,0 +1,1283 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.CodeException;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantDouble;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantFloat;
+import org.apache.commons.bcel6.classfile.ConstantInteger;
+import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
+import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantMethodref;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantString;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.LineNumber;
+import org.apache.commons.bcel6.classfile.LineNumberTable;
+import org.apache.commons.bcel6.classfile.LocalVariable;
+import org.apache.commons.bcel6.classfile.LocalVariableTable;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.ALOAD;
+import org.apache.commons.bcel6.generic.ANEWARRAY;
+import org.apache.commons.bcel6.generic.ASTORE;
+import org.apache.commons.bcel6.generic.ATHROW;
+import org.apache.commons.bcel6.generic.ArrayType;
+import org.apache.commons.bcel6.generic.BREAKPOINT;
+import org.apache.commons.bcel6.generic.CHECKCAST;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.DLOAD;
+import org.apache.commons.bcel6.generic.DSTORE;
+import org.apache.commons.bcel6.generic.FLOAD;
+import org.apache.commons.bcel6.generic.FSTORE;
+import org.apache.commons.bcel6.generic.FieldInstruction;
+import org.apache.commons.bcel6.generic.GETSTATIC;
+import org.apache.commons.bcel6.generic.GotoInstruction;
+import org.apache.commons.bcel6.generic.IINC;
+import org.apache.commons.bcel6.generic.ILOAD;
+import org.apache.commons.bcel6.generic.IMPDEP1;
+import org.apache.commons.bcel6.generic.IMPDEP2;
+import org.apache.commons.bcel6.generic.INSTANCEOF;
+import org.apache.commons.bcel6.generic.INVOKEDYNAMIC;
+import org.apache.commons.bcel6.generic.INVOKEINTERFACE;
+import org.apache.commons.bcel6.generic.INVOKESPECIAL;
+import org.apache.commons.bcel6.generic.INVOKESTATIC;
+import org.apache.commons.bcel6.generic.INVOKEVIRTUAL;
+import org.apache.commons.bcel6.generic.ISTORE;
+import org.apache.commons.bcel6.generic.Instruction;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.InvokeInstruction;
+import org.apache.commons.bcel6.generic.JsrInstruction;
+import org.apache.commons.bcel6.generic.LDC;
+import org.apache.commons.bcel6.generic.LDC2_W;
+import org.apache.commons.bcel6.generic.LLOAD;
+import org.apache.commons.bcel6.generic.LOOKUPSWITCH;
+import org.apache.commons.bcel6.generic.LSTORE;
+import org.apache.commons.bcel6.generic.LoadClass;
+import org.apache.commons.bcel6.generic.MULTIANEWARRAY;
+import org.apache.commons.bcel6.generic.NEW;
+import org.apache.commons.bcel6.generic.NEWARRAY;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.PUTSTATIC;
+import org.apache.commons.bcel6.generic.RET;
+import org.apache.commons.bcel6.generic.ReturnInstruction;
+import org.apache.commons.bcel6.generic.TABLESWITCH;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.verifier.PassVerifier;
+import org.apache.commons.bcel6.verifier.VerificationResult;
+import org.apache.commons.bcel6.verifier.Verifier;
+import org.apache.commons.bcel6.verifier.VerifierFactory;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.ClassConstraintException;
+import org.apache.commons.bcel6.verifier.exc.InvalidMethodException;
+import org.apache.commons.bcel6.verifier.exc.StaticCodeConstraintException;
+import org.apache.commons.bcel6.verifier.exc.StaticCodeInstructionConstraintException;
+import org.apache.commons.bcel6.verifier.exc.StaticCodeInstructionOperandConstraintException;
+
+/**
+ * This PassVerifier verifies a class file according to
+ * pass 3, static part as described in The Java Virtual
+ * Machine Specification, 2nd edition.
+ * More detailed information is to be found at the do_verify()
+ * method's documentation. 
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see #do_verify()
+ */
+public final class Pass3aVerifier extends PassVerifier{
+
+    /** The Verifier that created this. */
+    private final Verifier myOwner;
+
+    /** 
+     * The method number to verify.
+     * This is the index in the array returned
+     * by JavaClass.getMethods().
+     */
+    private final int method_no;
+
+    /** The one and only InstructionList object used by an instance of this class. It's here for performance reasons by do_verify() and its callees. */    
+    InstructionList instructionList;
+    /** The one and only Code object used by an instance of this class. It's here for performance reasons by do_verify() and its callees. */    
+    Code code;
+
+    /** Should only be instantiated by a Verifier. */
+    public Pass3aVerifier(Verifier owner, int method_no){
+        myOwner = owner;
+        this.method_no = method_no;
+    }
+
+    /**
+     * Pass 3a is the verification of static constraints of
+     * JVM code (such as legal targets of branch instructions).
+     * This is the part of pass 3 where you do not need data
+     * flow analysis.
+     * JustIce also delays the checks for a correct exception
+     * table of a Code attribute and correct line number entries
+     * in a LineNumberTable attribute of a Code attribute (which
+     * conceptually belong to pass 2) to this pass. Also, most
+     * of the check for valid local variable entries in a
+     * LocalVariableTable attribute of a Code attribute is
+     * delayed until this pass.
+     * All these checks need access to the code array of the
+     * Code attribute.
+     *
+     * @throws InvalidMethodException if the method to verify does not exist.
+     */
+    @Override
+    public VerificationResult do_verify(){
+        try {
+        if (myOwner.doPass2().equals(VerificationResult.VR_OK)){
+            // Okay, class file was loaded correctly by Pass 1
+            // and satisfies static constraints of Pass 2.
+            JavaClass jc = Repository.lookupClass(myOwner.getClassName());
+            Method[] methods = jc.getMethods();
+            if (method_no >= methods.length){
+                throw new InvalidMethodException("METHOD DOES NOT EXIST!");
+            }
+            Method method = methods[method_no];
+            code = method.getCode();
+
+            // No Code? Nothing to verify!
+            if ( method.isAbstract() || method.isNative() ){ // IF mg HAS NO CODE (static constraint of Pass 2)
+                return VerificationResult.VR_OK;
+            }
+
+            // TODO:
+            // We want a very sophisticated code examination here with good explanations
+            // on where to look for an illegal instruction or such.
+            // Only after that we should try to build an InstructionList and throw an
+            // AssertionViolatedException if after our examination InstructionList building
+            // still fails.
+            // That examination should be implemented in a byte-oriented way, i.e. look for
+            // an instruction, make sure its validity, count its length, find the next
+            // instruction and so on.
+            try{
+                instructionList = new InstructionList(method.getCode().getCode());
+            }
+            catch(RuntimeException re){
+                return new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Bad bytecode in the code array of the Code attribute of method '"+method+"'.");
+            }
+
+            instructionList.setPositions(true);
+
+            // Start verification.
+            VerificationResult vr = VerificationResult.VR_OK; //default
+            try{
+                delayedPass2Checks();
+            }
+            catch(ClassConstraintException cce){
+                vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, cce.getMessage());
+                return vr;
+            }
+            try{
+                pass3StaticInstructionChecks();
+                pass3StaticInstructionOperandsChecks();
+            }
+            catch(StaticCodeConstraintException scce){
+                vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, scce.getMessage());
+            }
+            catch(ClassCastException cce){
+                vr = new VerificationResult(VerificationResult.VERIFIED_REJECTED, "Class Cast Exception: " + cce.getMessage());
+            }
+            return vr;
+        }
+        //did not pass Pass 2.
+        return VerificationResult.VR_NOTYET;
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * These are the checks that could be done in pass 2 but are delayed to pass 3
+     * for performance reasons. Also, these checks need access to the code array
+     * of the Code attribute of a Method so it's okay to perform them here.
+     * Also see the description of the do_verify() method.
+     *
+     * @throws ClassConstraintException if the verification fails.
+     * @see #do_verify()
+     */
+    private void delayedPass2Checks(){
+
+        int[] instructionPositions = instructionList.getInstructionPositions();
+        int codeLength = code.getCode().length;
+
+        /////////////////////
+        // LineNumberTable //
+        /////////////////////
+        LineNumberTable lnt = code.getLineNumberTable();
+        if (lnt != null){
+            LineNumber[] lineNumbers = lnt.getLineNumberTable();
+            IntList offsets = new IntList();
+            lineNumber_loop:
+            for (LineNumber lineNumber : lineNumbers) { // may appear in any order.
+                for (int instructionPosition : instructionPositions) {
+                    // TODO: Make this a binary search! The instructionPositions array is naturally ordered!
+                    int offset = lineNumber.getStartPC();
+                    if (instructionPosition == offset) {
+                        if (offsets.contains(offset)) {
+                            addMessage("LineNumberTable attribute '" + code.getLineNumberTable() + "' refers to the same code offset ('" + offset + "') more than once which is violating the semantics [but is sometimes produced by IBM's 'jikes' compiler].");
+                        } else {
+                            offsets.add(offset);
+                        }
+                        continue lineNumber_loop;
+                    }
+                }
+                throw new ClassConstraintException("Code attribute '" + code + "' has a LineNumberTable attribute '" + code.getLineNumberTable() + "' referring to a code offset ('" + lineNumber.getStartPC() + "') that does not exist.");
+            }
+        }
+
+        ///////////////////////////
+        // LocalVariableTable(s) //
+        ///////////////////////////
+        /* We cannot use code.getLocalVariableTable() because there could be more
+           than only one. This is a bug in BCEL. */
+        Attribute[] atts = code.getAttributes();
+        for (Attribute att : atts) {
+            if (att instanceof LocalVariableTable) {
+                LocalVariableTable lvt = (LocalVariableTable) att;
+                LocalVariable[] localVariables = lvt.getLocalVariableTable();
+                for (LocalVariable localVariable : localVariables) {
+                    int startpc = localVariable.getStartPC();
+                    int length = localVariable.getLength();
+
+                    if (!contains(instructionPositions, startpc)) {
+                        throw new ClassConstraintException("Code attribute '" + code
+                                + "' has a LocalVariableTable attribute '" + code.getLocalVariableTable()
+                                + "' referring to a code offset ('" + startpc + "') that does not exist.");
+                    }
+                    if ((!contains(instructionPositions, startpc + length)) && (startpc + length != codeLength)) {
+                        throw new ClassConstraintException("Code attribute '" + code
+                                + "' has a LocalVariableTable attribute '" + code.getLocalVariableTable()
+                                + "' referring to a code offset start_pc+length ('" + (startpc + length)
+                                + "') that does not exist.");
+                    }
+                }
+            }
+        }
+
+        ////////////////////
+        // ExceptionTable //
+        ////////////////////
+        // In BCEL's "classfile" API, the startPC/endPC-notation is
+        // inclusive/exclusive as in the Java Virtual Machine Specification.
+        // WARNING: This is not true for BCEL's "generic" API.
+        CodeException[] exceptionTable = code.getExceptionTable();
+        for (CodeException element : exceptionTable) {
+            int startpc = element.getStartPC();
+            int endpc = element.getEndPC();
+            int handlerpc = element.getHandlerPC();
+            if (startpc >= endpc){
+                throw new ClassConstraintException("Code attribute '"+code+"' has an exception_table entry '"+element+"' that has its start_pc ('"+startpc+"') not smaller than its end_pc ('"+endpc+"').");
+            }
+            if (!contains(instructionPositions, startpc)){
+                throw new ClassConstraintException("Code attribute '"+code+"' has an exception_table entry '"+element+"' that has a non-existant bytecode offset as its start_pc ('"+startpc+"').");
+            }
+            if ( (!contains(instructionPositions, endpc)) && (endpc != codeLength)){
+                throw new ClassConstraintException("Code attribute '"+code+"' has an exception_table entry '"+element+"' that has a non-existant bytecode offset as its end_pc ('"+startpc+"') [that is also not equal to code_length ('"+codeLength+"')].");
+            }
+            if (!contains(instructionPositions, handlerpc)){
+                throw new ClassConstraintException("Code attribute '"+code+"' has an exception_table entry '"+element+"' that has a non-existant bytecode offset as its handler_pc ('"+handlerpc+"').");
+            }
+        }
+    }
+
+    /**
+     * These are the checks if constraints are satisfied which are described in the
+     * Java Virtual Machine Specification, Second Edition as Static Constraints on
+     * the instructions of Java Virtual Machine Code (chapter 4.8.1).
+     *
+     * @throws StaticCodeConstraintException if the verification fails.
+     */
+    private void pass3StaticInstructionChecks(){
+
+        // Code array must not be empty:
+        // Enforced in pass 2 (also stated in the static constraints of the Code
+        // array in vmspec2), together with pass 1 (reading code_length bytes and
+        // interpreting them as code[]). So this must not be checked again here.
+
+        if (! (code.getCode().length < 65536)){// contradicts vmspec2 page 152 ("Limitations"), but is on page 134.
+            throw new StaticCodeInstructionConstraintException("Code array in code attribute '"+code+"' too big: must be smaller than 65536 bytes.");
+        }
+
+        // First opcode at offset 0: okay, that's clear. Nothing to do.
+
+        // Only instances of the instructions documented in Section 6.4 may appear in
+        // the code array.
+
+        // For BCEL's sake, we cannot handle WIDE stuff, but hopefully BCEL does its job right :)
+
+        // The last byte of the last instruction in the code array must be the byte at index
+        // code_length-1 : See the do_verify() comments. We actually don't iterate through the
+        // byte array, but use an InstructionList so we cannot check for this. But BCEL does
+        // things right, so it's implicitly okay.
+
+        // TODO: Check how BCEL handles (and will handle) instructions like IMPDEP1, IMPDEP2,
+        //       BREAKPOINT... that BCEL knows about but which are illegal anyway.
+        //       We currently go the safe way here.
+        InstructionHandle ih = instructionList.getStart();
+        while (ih != null){
+            Instruction i = ih.getInstruction();
+            if (i instanceof IMPDEP1){
+                throw new StaticCodeInstructionConstraintException("IMPDEP1 must not be in the code, it is an illegal instruction for _internal_ JVM use!");
+            }
+            if (i instanceof IMPDEP2){
+                throw new StaticCodeInstructionConstraintException("IMPDEP2 must not be in the code, it is an illegal instruction for _internal_ JVM use!");
+            }
+            if (i instanceof BREAKPOINT){
+                throw new StaticCodeInstructionConstraintException("BREAKPOINT must not be in the code, it is an illegal instruction for _internal_ JVM use!");
+            }
+            ih = ih.getNext();
+        }
+
+        // The original verifier seems to do this check here, too.
+        // An unreachable last instruction may also not fall through the
+        // end of the code, which is stupid -- but with the original
+        // verifier's subroutine semantics one cannot predict reachability.
+        Instruction last = instructionList.getEnd().getInstruction();
+        if (! ((last instanceof ReturnInstruction)    ||
+                    (last instanceof RET)                                ||
+                    (last instanceof GotoInstruction)            ||
+                    (last instanceof ATHROW) )) {
+            throw new StaticCodeInstructionConstraintException("Execution must not fall off the bottom of the code array. This constraint is enforced statically as some existing verifiers do - so it may be a false alarm if the last instruction is not reachable.");
+        }
+    }
+
+    /**
+     * These are the checks for the satisfaction of constraints which are described in the
+     * Java Virtual Machine Specification, Second Edition as Static Constraints on
+     * the operands of instructions of Java Virtual Machine Code (chapter 4.8.1).
+     * BCEL parses the code array to create an InstructionList and therefore has to check
+     * some of these constraints. Additional checks are also implemented here.
+     *
+     * @throws StaticCodeConstraintException if the verification fails.
+     */
+    private void pass3StaticInstructionOperandsChecks(){
+        try {
+        // When building up the InstructionList, BCEL has already done all those checks
+        // mentioned in The Java Virtual Machine Specification, Second Edition, as
+        // "static constraints on the operands of instructions in the code array".
+        // TODO: see the do_verify() comments. Maybe we should really work on the
+        //       byte array first to give more comprehensive messages.
+        // TODO: Review Exception API, possibly build in some "offending instruction" thing
+        //       when we're ready to insulate the offending instruction by doing the
+        //       above thing.
+
+        // TODO: Implement as much as possible here. BCEL does _not_ check everything.
+
+        ConstantPoolGen cpg = new ConstantPoolGen(Repository.lookupClass(myOwner.getClassName()).getConstantPool());
+        InstOperandConstraintVisitor v = new InstOperandConstraintVisitor(cpg);
+
+        // Checks for the things BCEL does _not_ handle itself.
+        InstructionHandle ih = instructionList.getStart();
+        while (ih != null){
+            Instruction i = ih.getInstruction();
+
+            // An "own" constraint, due to JustIce's new definition of what "subroutine" means.
+            if (i instanceof JsrInstruction){
+                InstructionHandle target = ((JsrInstruction) i).getTarget();
+                if (target == instructionList.getStart()){
+                    throw new StaticCodeInstructionOperandConstraintException("Due to JustIce's clear definition of subroutines, no JSR or JSR_W may have a top-level instruction (such as the very first instruction, which is targeted by instruction '"+ih+"' as its target.");
+                }
+                if (!(target.getInstruction() instanceof ASTORE)){
+                    throw new StaticCodeInstructionOperandConstraintException("Due to JustIce's clear definition of subroutines, no JSR or JSR_W may target anything else than an ASTORE instruction. Instruction '"+ih+"' targets '"+target+"'.");
+                }
+            }
+
+            // vmspec2, page 134-137
+            ih.accept(v);
+
+            ih = ih.getNext();
+        }
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /** A small utility method returning if a given int i is in the given int[] ints. */
+    private static boolean contains(int[] ints, int i){
+        for (int k : ints) {
+            if (k==i) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /** Returns the method number as supplied when instantiating. */
+    public int getMethodNo(){
+        return method_no;
+    }
+
+    /**
+     * This visitor class does the actual checking for the instruction
+     * operand's constraints.
+     */
+    private class InstOperandConstraintVisitor extends org.apache.commons.bcel6.generic.EmptyVisitor{
+        /** The ConstantPoolGen instance this Visitor operates on. */
+        private final ConstantPoolGen cpg;
+
+        /** The only Constructor. */
+        InstOperandConstraintVisitor(ConstantPoolGen cpg){
+            this.cpg = cpg;
+        }
+
+        /**
+         * Utility method to return the max_locals value of the method verified
+         * by the surrounding Pass3aVerifier instance.
+         */
+        private int max_locals(){
+           try {
+            return Repository.lookupClass(myOwner.getClassName()).getMethods()[method_no].getCode().getMaxLocals();
+            } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+        }
+
+        /**
+         * A utility method to always raise an exeption.
+         */
+        private void constraintViolated(Instruction i, String message) {
+            throw new StaticCodeInstructionOperandConstraintException("Instruction "+i+" constraint violated: "+message);
+        }
+
+        /**
+         * A utility method to raise an exception if the index is not
+         * a valid constant pool index.
+         */
+        private void indexValid(Instruction i, int idx){
+            if (idx < 0 || idx >= cpg.getSize()){
+                constraintViolated(i, "Illegal constant pool index '"+idx+"'.");
+            }
+        }
+
+        ///////////////////////////////////////////////////////////
+        // The Java Virtual Machine Specification, pages 134-137 //
+        ///////////////////////////////////////////////////////////
+        /**
+         * Assures the generic preconditions of a LoadClass instance.
+         * The referenced class is loaded and pass2-verified.
+         */
+        @Override
+        public void visitLoadClass(LoadClass o){
+            ObjectType t = o.getLoadClassType(cpg);
+            if (t != null){// null means "no class is loaded"
+                Verifier v = VerifierFactory.getVerifier(t.getClassName());
+                VerificationResult vr = v.doPass1();
+                if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                    constraintViolated((Instruction) o, "Class '"+o.getLoadClassType(cpg).getClassName()+"' is referenced, but cannot be loaded: '"+vr+"'.");
+                }
+            }
+        }
+
+        // The target of each jump and branch instruction [...] must be the opcode [...]
+        // BCEL _DOES_ handle this.
+
+        // tableswitch: BCEL will do it, supposedly.
+
+        // lookupswitch: BCEL will do it, supposedly.
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        // LDC and LDC_W (LDC_W is a subclass of LDC in BCEL's model)
+        @Override
+        public void visitLDC(LDC o){
+            indexValid(o, o.getIndex());
+            Constant c = cpg.getConstant(o.getIndex());
+            if (c instanceof ConstantClass){
+              addMessage("Operand of LDC or LDC_W is CONSTANT_Class '"+c+"' - this is only supported in JDK 1.5 and higher.");
+            }
+            else{
+              if (! ( (c instanceof ConstantInteger)    ||
+                      (c instanceof ConstantFloat)         ||
+                (c instanceof ConstantString) ) ){
+            constraintViolated(o, "Operand of LDC or LDC_W must be one of CONSTANT_Integer, CONSTANT_Float or CONSTANT_String, but is '"+c+"'.");
+              }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        // LDC2_W
+        @Override
+        public void visitLDC2_W(LDC2_W o){
+            indexValid(o, o.getIndex());
+            Constant c = cpg.getConstant(o.getIndex());
+            if (! ( (c instanceof ConstantLong)    ||
+                            (c instanceof ConstantDouble) ) ){
+                constraintViolated(o, "Operand of LDC2_W must be CONSTANT_Long or CONSTANT_Double, but is '"+c+"'.");
+            }
+            try{
+                indexValid(o, o.getIndex()+1);
+            }
+            catch(StaticCodeInstructionOperandConstraintException e){
+                throw new AssertionViolatedException("OOPS: Does not BCEL handle that? LDC2_W operand has a problem.", e);
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+         //getfield, putfield, getstatic, putstatic
+         @Override
+        public void visitFieldInstruction(FieldInstruction o){
+           try {
+            indexValid(o, o.getIndex());
+            Constant c = cpg.getConstant(o.getIndex());
+            if (! (c instanceof ConstantFieldref)){
+                constraintViolated(o, "Indexing a constant that's not a CONSTANT_Fieldref but a '"+c+"'.");
+            }
+
+            String field_name = o.getFieldName(cpg);
+
+            JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
+            Field[] fields = jc.getFields();
+            Field f = null;
+            for (Field field : fields) {
+                if (field.getName().equals(field_name)){
+                  Type f_type = Type.getType(field.getSignature());
+                  Type o_type = o.getType(cpg);
+                    /* TODO: Check if assignment compatibility is sufficient.
+                   * What does Sun do?
+                   */
+                  if (f_type.equals(o_type)){
+                        f = field;
+                        break;
+                    }
+                }
+            }
+            if (f == null){
+                JavaClass[] superclasses = jc.getSuperClasses();
+                outer:
+                for (JavaClass superclass : superclasses) {
+                    fields = superclass.getFields();
+                    for (Field field : fields) {
+                        if (field.getName().equals(field_name)) {
+                            Type f_type = Type.getType(field.getSignature());
+                            Type o_type = o.getType(cpg);
+                            if (f_type.equals(o_type)) {
+                                f = field;
+                                if ((f.getAccessFlags() & (Constants.ACC_PUBLIC | Constants.ACC_PROTECTED)) == 0) {
+                                    f = null;
+                                }
+                                break outer;
+                            }
+                        }
+                    }
+                }
+                if (f == null) {
+                    constraintViolated(o, "Referenced field '"+field_name+"' does not exist in class '"+jc.getClassName()+"'.");
+                }
+            }
+            else{
+                /* TODO: Check if assignment compatibility is sufficient.
+                   What does Sun do? */
+                Type.getType(f.getSignature());
+                o.getType(cpg);
+//                Type f_type = Type.getType(f.getSignature());
+//                Type o_type = o.getType(cpg);
+
+                // Argh. Sun's implementation allows us to have multiple fields of
+                // the same name but with a different signature.
+                //if (! f_type.equals(o_type)){
+                //    constraintViolated(o, "Referenced field '"+field_name+"' has type '"+f_type+"' instead of '"+o_type+"' as expected.");
+                //}
+
+                /* TODO: Check for access modifiers here. */
+            }
+            } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+        }    
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitInvokeInstruction(InvokeInstruction o){
+            indexValid(o, o.getIndex());
+            if (    (o instanceof INVOKEVIRTUAL)    ||
+                        (o instanceof INVOKESPECIAL)    ||
+                        (o instanceof INVOKESTATIC)    ){
+                Constant c = cpg.getConstant(o.getIndex());
+                if (! (c instanceof ConstantMethodref)){
+                    constraintViolated(o, "Indexing a constant that's not a CONSTANT_Methodref but a '"+c+"'.");
+                }
+                else{
+                    // Constants are okay due to pass2.
+                    ConstantNameAndType cnat = (ConstantNameAndType) (cpg.getConstant(((ConstantMethodref) c).getNameAndTypeIndex()));
+                    ConstantUtf8 cutf8 = (ConstantUtf8) (cpg.getConstant(cnat.getNameIndex()));
+                    if (cutf8.getBytes().equals(Constants.CONSTRUCTOR_NAME) && (!(o instanceof INVOKESPECIAL)) ){
+                        constraintViolated(o, "Only INVOKESPECIAL is allowed to invoke instance initialization methods.");
+                    }
+                    if ( (! (cutf8.getBytes().equals(Constants.CONSTRUCTOR_NAME)) ) && (cutf8.getBytes().startsWith("<")) ){
+                        constraintViolated(o, "No method with a name beginning with '<' other than the instance initialization methods may be called by the method invocation instructions.");
+                    }
+                }
+            }
+            else{ //if (o instanceof INVOKEINTERFACE){
+                Constant c = cpg.getConstant(o.getIndex());
+                if (! (c instanceof ConstantInterfaceMethodref)){
+                    constraintViolated(o, "Indexing a constant that's not a CONSTANT_InterfaceMethodref but a '"+c+"'.");
+                }
+                // TODO: From time to time check if BCEL allows to detect if the
+                // 'count' operand is consistent with the information in the
+                // CONSTANT_InterfaceMethodref and if the last operand is zero.
+                // By now, BCEL hides those two operands because they're superfluous.
+
+                // Invoked method must not be <init> or <clinit>
+                ConstantNameAndType cnat = (ConstantNameAndType) (cpg.getConstant(((ConstantInterfaceMethodref)c).getNameAndTypeIndex()));
+                String name = ((ConstantUtf8) (cpg.getConstant(cnat.getNameIndex()))).getBytes();
+                if (name.equals(Constants.CONSTRUCTOR_NAME)){
+                    constraintViolated(o, "Method to invoke must not be '"+Constants.CONSTRUCTOR_NAME+"'.");
+                }
+                if (name.equals(Constants.STATIC_INITIALIZER_NAME)){
+                    constraintViolated(o, "Method to invoke must not be '"+Constants.STATIC_INITIALIZER_NAME+"'.");
+                }
+            }
+
+            // The LoadClassType is the method-declaring class, so we have to check the other types.
+
+            Type t = o.getReturnType(cpg);
+            if (t instanceof ArrayType){
+                t = ((ArrayType) t).getBasicType();
+            }
+            if (t instanceof ObjectType){
+                Verifier v = VerifierFactory.getVerifier(((ObjectType) t).getClassName());
+                VerificationResult vr = v.doPass2();
+                if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                    constraintViolated(o, "Return type class/interface could not be verified successfully: '"+vr.getMessage()+"'.");
+                }
+            }
+
+            Type[] ts = o.getArgumentTypes(cpg);
+            for (Type element : ts) {
+                t = element;
+                if (t instanceof ArrayType){
+                    t = ((ArrayType) t).getBasicType();
+                }
+                if (t instanceof ObjectType){
+                    Verifier v = VerifierFactory.getVerifier(((ObjectType) t).getClassName());
+                    VerificationResult vr = v.doPass2();
+                    if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                        constraintViolated(o, "Argument type class/interface could not be verified successfully: '"+vr.getMessage()+"'.");
+                    }
+                }
+            }
+
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitINSTANCEOF(INSTANCEOF o){
+            indexValid(o, o.getIndex());
+            Constant c = cpg.getConstant(o.getIndex());
+            if (!    (c instanceof ConstantClass)){
+                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitCHECKCAST(CHECKCAST o){
+            indexValid(o, o.getIndex());
+            Constant c = cpg.getConstant(o.getIndex());
+            if (!    (c instanceof ConstantClass)){
+                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitNEW(NEW o){
+            indexValid(o, o.getIndex());
+            Constant c = cpg.getConstant(o.getIndex());
+            if (!    (c instanceof ConstantClass)){
+                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
+            }
+            else{
+                ConstantUtf8 cutf8 = (ConstantUtf8) (cpg.getConstant( ((ConstantClass) c).getNameIndex() ));
+                Type t = Type.getType("L"+cutf8.getBytes()+";");
+                if (t instanceof ArrayType){
+                    constraintViolated(o, "NEW must not be used to create an array.");
+                }
+            }
+
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitMULTIANEWARRAY(MULTIANEWARRAY o){
+            indexValid(o, o.getIndex());
+            Constant c = cpg.getConstant(o.getIndex());
+            if (!    (c instanceof ConstantClass)){
+                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
+            }
+            int dimensions2create = o.getDimensions();
+            if (dimensions2create < 1){
+                constraintViolated(o, "Number of dimensions to create must be greater than zero.");
+            }
+            Type t = o.getType(cpg);
+            if (t instanceof ArrayType){
+                int dimensions = ((ArrayType) t).getDimensions();
+                if (dimensions < dimensions2create){
+                    constraintViolated(o, "Not allowed to create array with more dimensions ('+dimensions2create+') than the one referenced by the CONSTANT_Class '"+t+"'.");
+                }
+            }
+            else{
+                constraintViolated(o, "Expecting a CONSTANT_Class referencing an array type. [Constraint not found in The Java Virtual Machine Specification, Second Edition, 4.8.1]");
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitANEWARRAY(ANEWARRAY o){
+            indexValid(o, o.getIndex());
+            Constant c = cpg.getConstant(o.getIndex());
+            if (!    (c instanceof ConstantClass)){
+                constraintViolated(o, "Expecting a CONSTANT_Class operand, but found a '"+c+"'.");
+            }
+            Type t = o.getType(cpg);
+            if (t instanceof ArrayType){
+                int dimensions = ((ArrayType) t).getDimensions();
+                if (dimensions >= 255){
+                    constraintViolated(o, "Not allowed to create an array with more than 255 dimensions.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitNEWARRAY(NEWARRAY o){
+            byte t = o.getTypecode();
+            if (!    (    (t == Constants.T_BOOLEAN)    ||
+                            (t == Constants.T_CHAR)            ||
+                            (t == Constants.T_FLOAT)        ||
+                            (t == Constants.T_DOUBLE)        ||
+                            (t == Constants.T_BYTE)            ||
+                            (t == Constants.T_SHORT)        ||
+                            (t == Constants.T_INT)            ||
+                            (t == Constants.T_LONG)    )    ){
+                constraintViolated(o, "Illegal type code '+t+' for 'atype' operand.");
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitILOAD(ILOAD o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
+            }
+            else{
+                int maxminus1 =  max_locals()-1;
+                if (idx > maxminus1){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitFLOAD(FLOAD o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
+            }
+            else{
+                int maxminus1 =  max_locals()-1;
+                if (idx > maxminus1){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitALOAD(ALOAD o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
+            }
+            else{
+                int maxminus1 =  max_locals()-1;
+                if (idx > maxminus1){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitISTORE(ISTORE o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
+            }
+            else{
+                int maxminus1 =  max_locals()-1;
+                if (idx > maxminus1){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitFSTORE(FSTORE o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
+            }
+            else{
+                int maxminus1 =  max_locals()-1;
+                if (idx > maxminus1){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitASTORE(ASTORE o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
+            }
+            else{
+                int maxminus1 =  max_locals()-1;
+                if (idx > maxminus1){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitIINC(IINC o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
+            }
+            else{
+                int maxminus1 =  max_locals()-1;
+                if (idx > maxminus1){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitRET(RET o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative.");
+            }
+            else{
+                int maxminus1 =  max_locals()-1;
+                if (idx > maxminus1){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-1 '"+maxminus1+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitLLOAD(LLOAD o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative. [Constraint by JustIce as an analogon to the single-slot xLOAD/xSTORE instructions; may not happen anyway.]");
+            }
+            else{
+                int maxminus2 =  max_locals()-2;
+                if (idx > maxminus2){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-2 '"+maxminus2+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitDLOAD(DLOAD o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative. [Constraint by JustIce as an analogon to the single-slot xLOAD/xSTORE instructions; may not happen anyway.]");
+            }
+            else{
+                int maxminus2 =  max_locals()-2;
+                if (idx > maxminus2){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-2 '"+maxminus2+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitLSTORE(LSTORE o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative. [Constraint by JustIce as an analogon to the single-slot xLOAD/xSTORE instructions; may not happen anyway.]");
+            }
+            else{
+                int maxminus2 =  max_locals()-2;
+                if (idx > maxminus2){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-2 '"+maxminus2+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitDSTORE(DSTORE o){
+            int idx = o.getIndex();
+            if (idx < 0){
+                constraintViolated(o, "Index '"+idx+"' must be non-negative. [Constraint by JustIce as an analogon to the single-slot xLOAD/xSTORE instructions; may not happen anyway.]");
+            }
+            else{
+                int maxminus2 =  max_locals()-2;
+                if (idx > maxminus2){
+                    constraintViolated(o, "Index '"+idx+"' must not be greater than max_locals-2 '"+maxminus2+"'.");
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitLOOKUPSWITCH(LOOKUPSWITCH o){
+            int[] matchs = o.getMatchs();
+            int max = Integer.MIN_VALUE;
+            for (int i=0; i<matchs.length; i++){
+                if (matchs[i] == max && i != 0){
+                    constraintViolated(o, "Match '"+matchs[i]+"' occurs more than once.");
+                }
+                if (matchs[i] < max){
+                    constraintViolated(o, "Lookup table must be sorted but isn't.");
+                }
+                else{
+                    max = matchs[i];
+                }
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitTABLESWITCH(TABLESWITCH o){     
+            // "high" must be >= "low". We cannot check this, as BCEL hides
+            // it from us.
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitPUTSTATIC(PUTSTATIC o){
+            try {
+            String field_name = o.getFieldName(cpg);
+            JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
+            Field[] fields = jc.getFields();
+            Field f = null;
+            for (Field field : fields) {
+                if (field.getName().equals(field_name)){
+                    f = field;
+                    break;
+                }
+            }
+            if (f == null){
+                throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
+            }
+
+            if (f.isFinal()){
+                if (!(myOwner.getClassName().equals(o.getClassType(cpg).getClassName()))){
+                    constraintViolated(o, "Referenced field '"+f+"' is final and must therefore be declared in the current class '"+myOwner.getClassName()+"' which is not the case: it is declared in '"+o.getClassType(cpg).getClassName()+"'.");
+                }
+            }
+
+            if (! (f.isStatic())){
+                constraintViolated(o, "Referenced field '"+f+"' is not static which it should be.");
+            }
+
+            String meth_name = Repository.lookupClass(myOwner.getClassName()).getMethods()[method_no].getName();
+
+            // If it's an interface, it can be set only in <clinit>.
+            if ((!(jc.isClass())) && (!(meth_name.equals(Constants.STATIC_INITIALIZER_NAME)))){
+                constraintViolated(o, "Interface field '"+f+"' must be set in a '"+Constants.STATIC_INITIALIZER_NAME+"' method.");
+            }
+            } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitGETSTATIC(GETSTATIC o){
+            try {
+            String field_name = o.getFieldName(cpg);
+            JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
+            Field[] fields = jc.getFields();
+            Field f = null;
+            for (Field field : fields) {
+                if (field.getName().equals(field_name)){
+                    f = field;
+                    break;
+                }
+            }
+            if (f == null){
+                throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
+            }
+
+            if (! (f.isStatic())){
+                constraintViolated(o, "Referenced field '"+f+"' is not static which it should be.");
+            }
+            } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+        }
+
+        /* Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        //public void visitPUTFIELD(PUTFIELD o){
+            // for performance reasons done in Pass 3b
+        //}
+
+        /* Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        //public void visitGETFIELD(GETFIELD o){
+            // for performance reasons done in Pass 3b
+        //}
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitINVOKEDYNAMIC(INVOKEDYNAMIC o){
+            throw new RuntimeException("INVOKEDYNAMIC instruction is not supported at this time");
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitINVOKEINTERFACE(INVOKEINTERFACE o){
+            try {
+            // INVOKEINTERFACE is a LoadClass; the Class where the referenced method is declared in,
+            // is therefore resolved/verified.
+            // INVOKEINTERFACE is an InvokeInstruction, the argument and return types are resolved/verified,
+            // too. So are the allowed method names.
+            String classname = o.getClassName(cpg);
+            JavaClass jc = Repository.lookupClass(classname);
+            Method m = getMethodRecursive(jc, o);
+            if (m == null){
+                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature '"+o.getSignature(cpg)+"' not found in class '"+jc.getClassName()+"'.");
+            }
+            if (jc.isClass()){
+                constraintViolated(o, "Referenced class '"+jc.getClassName()+"' is a class, but not an interface as expected.");
+            }
+            } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+        }
+
+        /**
+         * Looks for the method referenced by the given invoke instruction in the given class or its super classes and super interfaces.
+         * @param jc the class that defines the referenced method
+         * @param invoke the instruction that references the method
+         * @return the referenced method or null if not found.
+         */
+        private Method getMethodRecursive(JavaClass jc, InvokeInstruction invoke) throws ClassNotFoundException{
+            Method m;
+            //look in the given class
+            m = getMethod(jc, invoke);
+            if(m != null){
+                //method found in given class
+                return m;
+            }
+            //method not found, look in super classes
+            for(JavaClass superclass : jc.getSuperClasses()){
+                m = getMethod(superclass, invoke);
+                if(m != null){
+                    //method found in super class
+                    return m;
+                }
+            }
+            //method not found, look in super interfaces
+            for(JavaClass superclass : jc.getInterfaces()){
+                m = getMethod(superclass, invoke);
+                if(m != null){
+                    //method found in super interface
+                    return m;
+                }
+            }
+            //method not found in the hierarchy
+            return null;
+        }
+        /**
+         * Looks for the method referenced by the given invoke instruction in the given class.
+         * @param jc the class that defines the referenced method
+         * @param invoke the instruction that references the method
+         * @return the referenced method or null if not found.
+         */
+        private Method getMethod(JavaClass jc, InvokeInstruction invoke){
+            Method[] ms = jc.getMethods();
+            Method m = null;
+            for (Method element : ms) {
+                if ( (element.getName().equals(invoke.getMethodName(cpg))) &&
+                     (Type.getReturnType(element.getSignature()).equals(invoke.getReturnType(cpg))) &&
+                     (objarrayequals(Type.getArgumentTypes(element.getSignature()), invoke.getArgumentTypes(cpg))) ){
+                    return element;
+                }
+            }
+            
+            return null;
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitINVOKESPECIAL(INVOKESPECIAL o){
+            try {
+            // INVOKESPECIAL is a LoadClass; the Class where the referenced method is declared in,
+            // is therefore resolved/verified.
+            // INVOKESPECIAL is an InvokeInstruction, the argument and return types are resolved/verified,
+            // too. So are the allowed method names.
+            String classname = o.getClassName(cpg);
+            JavaClass jc = Repository.lookupClass(classname);
+            Method m = getMethodRecursive(jc, o);
+            if (m == null){
+                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature '"+o.getSignature(cpg)+"' not found in class '"+jc.getClassName()+"'.");
+            }
+
+            JavaClass current = Repository.lookupClass(myOwner.getClassName());
+            if (current.isSuper()){
+
+                if ((Repository.instanceOf( current, jc )) && (!current.equals(jc))){
+
+                    if (! (o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME) )){
+                        // Special lookup procedure for ACC_SUPER classes.
+
+                        int supidx = -1;
+
+                        Method meth = null;
+                        while (supidx != 0){
+                            supidx = current.getSuperclassNameIndex();
+                            current = Repository.lookupClass(current.getSuperclassName());
+
+                            Method[] meths = current.getMethods();
+                            for (Method meth2 : meths) {
+                                if    ( (meth2.getName().equals(o.getMethodName(cpg))) &&
+                                     (Type.getReturnType(meth2.getSignature()).equals(o.getReturnType(cpg))) &&
+                                     (objarrayequals(Type.getArgumentTypes(meth2.getSignature()), o.getArgumentTypes(cpg))) ){
+                                    meth = meth2;
+                                    break;
+                                }
+                            }
+                            if (meth != null) {
+                                break;
+                            }
+                        }
+                        if (meth == null){
+                            constraintViolated(o, "ACC_SUPER special lookup procedure not successful: method '"+o.getMethodName(cpg)+"' with proper signature not declared in superclass hierarchy.");
+                        }                        
+                    }
+                }
+            }
+
+            } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+
+        }
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitINVOKESTATIC(INVOKESTATIC o){
+            try {
+            // INVOKESTATIC is a LoadClass; the Class where the referenced method is declared in,
+            // is therefore resolved/verified.
+            // INVOKESTATIC is an InvokeInstruction, the argument and return types are resolved/verified,
+            // too. So are the allowed method names.
+            String classname = o.getClassName(cpg);
+            JavaClass jc = Repository.lookupClass(classname);
+            Method m = getMethodRecursive(jc, o);
+            if (m == null){
+                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature '"+o.getSignature(cpg) +"' not found in class '"+jc.getClassName()+"'.");
+            } else if (! (m.isStatic())){ // implies it's not abstract, verified in pass 2.
+                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' has ACC_STATIC unset.");
+            }
+
+            } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+        }
+
+
+        /** Checks if the constraints of operands of the said instruction(s) are satisfied. */
+        @Override
+        public void visitINVOKEVIRTUAL(INVOKEVIRTUAL o){
+            try {
+            // INVOKEVIRTUAL is a LoadClass; the Class where the referenced method is declared in,
+            // is therefore resolved/verified.
+            // INVOKEVIRTUAL is an InvokeInstruction, the argument and return types are resolved/verified,
+            // too. So are the allowed method names.
+            String classname = o.getClassName(cpg);
+            JavaClass jc = Repository.lookupClass(classname);
+            Method m = getMethodRecursive(jc, o);
+            if (m == null){
+                constraintViolated(o, "Referenced method '"+o.getMethodName(cpg)+"' with expected signature '"+o.getSignature(cpg)+"' not found in class '"+jc.getClassName()+"'.");
+            }
+            if (! (jc.isClass())){
+                constraintViolated(o, "Referenced class '"+jc.getClassName()+"' is an interface, but not a class as expected.");
+            }
+
+            } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+            }
+        }
+
+
+        // WIDE stuff is BCEL-internal and cannot be checked here.
+
+        /**
+         * A utility method like equals(Object) for arrays.
+         * The equality of the elements is based on their equals(Object)
+         * method instead of their object identity.
+         */ 
+        private boolean objarrayequals(Object[] o, Object[] p){
+            if (o.length != p.length){
+                return false;
+            }
+
+            for (int i=0; i<o.length; i++){
+                if (! (o[i].equals(p[i])) ){
+                    return false;
+                }
+            }
+
+            return true;
+        }
+
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/statics/StringRepresentation.java b/src/main/java/org/apache/commons/bcel6/verifier/statics/StringRepresentation.java
new file mode 100644
index 0000000..4baba7c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/statics/StringRepresentation.java
@@ -0,0 +1,323 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.statics;
+
+
+import org.apache.commons.bcel6.classfile.Annotations;
+import org.apache.commons.bcel6.classfile.BootstrapMethods;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.CodeException;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantDouble;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantFloat;
+import org.apache.commons.bcel6.classfile.ConstantInteger;
+import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
+import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantMethodref;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantString;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ConstantValue;
+import org.apache.commons.bcel6.classfile.Deprecated;
+import org.apache.commons.bcel6.classfile.EnclosingMethod;
+import org.apache.commons.bcel6.classfile.ExceptionTable;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.InnerClass;
+import org.apache.commons.bcel6.classfile.InnerClasses;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.LineNumber;
+import org.apache.commons.bcel6.classfile.LineNumberTable;
+import org.apache.commons.bcel6.classfile.LocalVariable;
+import org.apache.commons.bcel6.classfile.LocalVariableTable;
+import org.apache.commons.bcel6.classfile.LocalVariableTypeTable;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.MethodParameters;
+import org.apache.commons.bcel6.classfile.Node;
+import org.apache.commons.bcel6.classfile.Signature;
+import org.apache.commons.bcel6.classfile.SourceFile;
+import org.apache.commons.bcel6.classfile.StackMap;
+import org.apache.commons.bcel6.classfile.StackMapTable;
+import org.apache.commons.bcel6.classfile.Synthetic;
+import org.apache.commons.bcel6.classfile.Unknown;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+
+/**
+ * BCEL's Node classes (those from the classfile API that <B>accept()</B> Visitor
+ * instances) have <B>toString()</B> methods that were not designed to be robust,
+ * this gap is closed by this class.
+ * When performing class file verification, it may be useful to output which
+ * entity (e.g. a <B>Code</B> instance) is not satisfying the verifier's
+ * constraints, but in this case it could be possible for the <B>toString()</B>
+ * method to throw a RuntimeException.
+ * A (new StringRepresentation(Node n)).toString() never throws any exception.
+ * Note that this class also serves as a placeholder for more sophisticated message
+ * handling in future versions of JustIce.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class StringRepresentation extends org.apache.commons.bcel6.classfile.EmptyVisitor {
+    /** The string representation, created by a visitXXX() method, output by toString(). */
+    private String tostring;
+    /** The node we ask for its string representation. Not really needed; only for debug output. */
+    private final Node n;
+
+    /**
+     * Creates a new StringRepresentation object which is the representation of n.
+     *
+     * @see #toString()
+     */
+    public StringRepresentation(Node n) {
+        this.n = n;
+        n.accept(this); // assign a string representation to field 'tostring' if we know n's class.
+    }
+
+    /**
+     * Returns the String representation.
+     */
+    @Override
+    public String toString() {
+// The run-time check below is needed because we don't want to omit inheritance
+// of "EmptyVisitor" and provide a thousand empty methods.
+// However, in terms of performance this would be a better idea.
+// If some new "Node" is defined in BCEL (such as some concrete "Attribute"), we
+// want to know that this class has also to be adapted.
+        if (tostring == null) {
+            throw new AssertionViolatedException("Please adapt '" + getClass() + "' to deal with objects of class '" + n.getClass() + "'.");
+        }
+        return tostring;
+    }
+
+    /**
+     * Returns the String representation of the Node object obj;
+     * this is obj.toString() if it does not throw any RuntimeException,
+     * or else it is a string derived only from obj's class name.
+     */
+    private String toString(Node obj) {
+        String ret;
+        try {
+            ret = obj.toString();
+        }
+        catch (RuntimeException e) { // including ClassFormatException, trying to convert the "signature" of a ReturnaddressType LocalVariable (shouldn't occur, but people do crazy things)
+            String s = obj.getClass().getName();
+            s = s.substring(s.lastIndexOf(".") + 1);
+            ret = "<<" + s + ">>";
+        }
+        return ret;
+    }
+
+    ////////////////////////////////
+    // Visitor methods start here //
+    ////////////////////////////////
+    // We don't of course need to call some default implementation:
+    // e.g. we could also simply output "Code" instead of a possibly
+    // lengthy Code attribute's toString().
+    @Override
+    public void visitCode(Code obj) {
+        //tostring = toString(obj);
+        tostring = "<CODE>"; // We don't need real code outputs.
+    }
+
+    @Override
+    public void visitAnnotation(Annotations obj)
+    {
+        //this is invoked whenever an annotation is found
+        //when verifier is passed over a class
+        tostring = toString(obj);
+    }
+    
+    @Override
+    public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
+    {
+        //this is invoked whenever a local variable type is found
+        //when verifier is passed over a class
+        tostring = toString(obj);
+    }
+    
+    @Override
+    public void visitCodeException(CodeException obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantClass(ConstantClass obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantDouble(ConstantDouble obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantFieldref(ConstantFieldref obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantFloat(ConstantFloat obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantInteger(ConstantInteger obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantLong(ConstantLong obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantMethodref(ConstantMethodref obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantNameAndType(ConstantNameAndType obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantPool(ConstantPool obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantString(ConstantString obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantUtf8(ConstantUtf8 obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitConstantValue(ConstantValue obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitDeprecated(Deprecated obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitExceptionTable(ExceptionTable obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitField(Field obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitInnerClass(InnerClass obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitInnerClasses(InnerClasses obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitJavaClass(JavaClass obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitLineNumber(LineNumber obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitLineNumberTable(LineNumberTable obj) {
+        tostring = "<LineNumberTable: " + toString(obj) + ">";
+    }
+
+    @Override
+    public void visitLocalVariable(LocalVariable obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitLocalVariableTable(LocalVariableTable obj) {
+        tostring = "<LocalVariableTable: " + toString(obj) + ">";
+    }
+
+    @Override
+    public void visitMethod(Method obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitSignature(Signature obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitSourceFile(SourceFile obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitStackMap(StackMap obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitStackMapTable(StackMapTable obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitSynthetic(Synthetic obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitUnknown(Unknown obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitEnclosingMethod(EnclosingMethod obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitBootstrapMethods(BootstrapMethods obj) {
+        tostring = toString(obj);
+    }
+
+    @Override
+    public void visitMethodParameters(MethodParameters obj) {
+        tostring = toString(obj);
+    }
+}
diff --git a/src/main/java/org/apache/bcel/verifier/statics/package.html b/src/main/java/org/apache/commons/bcel6/verifier/statics/package.html
similarity index 100%
rename from src/main/java/org/apache/bcel/verifier/statics/package.html
rename to src/main/java/org/apache/commons/bcel6/verifier/statics/package.html
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/ControlFlowGraph.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/ControlFlowGraph.java
new file mode 100644
index 0000000..1b2c5ae
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/ControlFlowGraph.java
@@ -0,0 +1,455 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.bcel6.generic.ATHROW;
+import org.apache.commons.bcel6.generic.BranchInstruction;
+import org.apache.commons.bcel6.generic.GotoInstruction;
+import org.apache.commons.bcel6.generic.Instruction;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.JsrInstruction;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.RET;
+import org.apache.commons.bcel6.generic.ReturnInstruction;
+import org.apache.commons.bcel6.generic.Select;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException;
+
+/**
+ * This class represents a control flow graph of a method.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class ControlFlowGraph{
+
+    /**
+     * Objects of this class represent a node in a ControlFlowGraph.
+     * These nodes are instructions, not basic blocks.
+     */
+    private class InstructionContextImpl implements InstructionContext{
+
+        /**
+         * The TAG field is here for external temporary flagging, such
+         * as graph colouring.
+         *
+         * @see #getTag()
+         * @see #setTag(int)
+         */
+        private int TAG;
+
+        /**
+         * The InstructionHandle this InstructionContext is wrapped around.
+         */
+        private final InstructionHandle instruction;
+
+        /**
+         * The 'incoming' execution Frames.
+         */
+        private final Map<InstructionContext, Frame> inFrames;    // key: the last-executed JSR
+
+        /**
+         * The 'outgoing' execution Frames.
+         */
+        private final Map<InstructionContext, Frame> outFrames; // key: the last-executed JSR 
+
+        /**
+         * The 'execution predecessors' - a list of type InstructionContext 
+         * of those instances that have been execute()d before in that order.
+         */
+        private List<InstructionContext> executionPredecessors = null; // Type: InstructionContext
+
+        /**
+         * Creates an InstructionHandleImpl object from an InstructionHandle.
+         * Creation of one per InstructionHandle suffices. Don't create more.
+         */
+        public InstructionContextImpl(InstructionHandle inst){
+            if (inst == null) {
+                throw new AssertionViolatedException("Cannot instantiate InstructionContextImpl from NULL.");
+            }
+
+            instruction = inst;
+            inFrames = new HashMap<InstructionContext, Frame>();
+            outFrames = new HashMap<InstructionContext, Frame>();
+        }
+
+        /* Satisfies InstructionContext.getTag(). */
+        public int getTag(){
+            return TAG;
+        }
+
+        /* Satisfies InstructionContext.setTag(int). */
+        public void setTag(int tag){
+            TAG = tag;
+        }
+
+        /**
+         * Returns the exception handlers of this instruction.
+         */
+        public ExceptionHandler[] getExceptionHandlers(){
+            return exceptionhandlers.getExceptionHandlers(getInstruction());
+        }
+
+        /**
+         * Returns a clone of the "outgoing" frame situation with respect to the given ExecutionChain.
+         */    
+        public Frame getOutFrame(ArrayList<InstructionContext> execChain){
+            executionPredecessors = execChain;
+
+            Frame org;
+
+            InstructionContext jsr = lastExecutionJSR();
+
+            org = outFrames.get(jsr);
+
+            if (org == null){
+                throw new AssertionViolatedException("outFrame not set! This:\n"+this+"\nExecutionChain: "+getExecutionChain()+"\nOutFrames: '"+outFrames+"'.");
+            }
+            return org.getClone();
+        }
+
+    public Frame getInFrame() {
+          Frame org;
+
+            InstructionContext jsr = lastExecutionJSR();
+
+            org = inFrames.get(jsr);
+
+            if (org == null){
+                throw new AssertionViolatedException("inFrame not set! This:\n"+this+"\nInFrames: '"+inFrames+"'.");
+      }
+      return org.getClone();
+    }
+
+        /**
+         * "Merges in" (vmspec2, page 146) the "incoming" frame situation;
+         * executes the instructions symbolically
+         * and therefore calculates the "outgoing" frame situation.
+         * Returns: True iff the "incoming" frame situation changed after
+         * merging with "inFrame".
+         * The execPreds ArrayList must contain the InstructionContext
+         * objects executed so far in the correct order. This is just
+         * one execution path [out of many]. This is needed to correctly
+         * "merge" in the special case of a RET's successor.
+         * <B>The InstConstraintVisitor and ExecutionVisitor instances
+         * must be set up correctly.</B>
+         * @return true - if and only if the "outgoing" frame situation
+         * changed from the one before execute()ing.
+         */
+        public boolean execute(Frame inFrame, ArrayList<InstructionContext> execPreds, InstConstraintVisitor icv, ExecutionVisitor ev){
+
+            executionPredecessors = (List<InstructionContext>) execPreds.clone();
+
+            //sanity check
+            if ( (lastExecutionJSR() == null) && (subroutines.subroutineOf(getInstruction()) != subroutines.getTopLevel() ) ){
+                throw new AssertionViolatedException("Huh?! Am I '"+this+"' part of a subroutine or not?");
+            }
+            if ( (lastExecutionJSR() != null) && (subroutines.subroutineOf(getInstruction()) == subroutines.getTopLevel() ) ){
+                throw new AssertionViolatedException("Huh?! Am I '"+this+"' part of a subroutine or not?");
+            }
+
+            Frame inF = inFrames.get(lastExecutionJSR());
+            if (inF == null){// no incoming frame was set, so set it.
+                inFrames.put(lastExecutionJSR(), inFrame);
+                inF = inFrame;
+            }
+            else{// if there was an "old" inFrame
+                if (inF.equals(inFrame)){ //shortcut: no need to merge equal frames.
+                    return false;
+                }
+                if (! mergeInFrames(inFrame)){
+                    return false;
+                }
+            }
+
+            // Now we're sure the inFrame has changed!
+
+            // new inFrame is already merged in, see above.        
+            Frame workingFrame = inF.getClone();
+
+            try{
+                // This verifies the InstructionConstraint for the current
+                // instruction, but does not modify the workingFrame object.
+//InstConstraintVisitor icv = InstConstraintVisitor.getInstance(VerifierFactory.getVerifier(method_gen.getClassName()));
+                icv.setFrame(workingFrame);
+                getInstruction().accept(icv);
+            }
+            catch(StructuralCodeConstraintException ce){
+                ce.extendMessage("","\nInstructionHandle: "+getInstruction()+"\n");
+                ce.extendMessage("","\nExecution Frame:\n"+workingFrame);
+                extendMessageWithFlow(ce);
+                throw ce;
+            }
+
+            // This executes the Instruction.
+            // Therefore the workingFrame object is modified.
+//ExecutionVisitor ev = ExecutionVisitor.getInstance(VerifierFactory.getVerifier(method_gen.getClassName()));
+            ev.setFrame(workingFrame);
+            getInstruction().accept(ev);
+            //getInstruction().accept(ExecutionVisitor.withFrame(workingFrame));
+            outFrames.put(lastExecutionJSR(), workingFrame);
+
+            return true;    // new inFrame was different from old inFrame so merging them
+                                        // yielded a different this.inFrame.
+        }
+
+        /**
+         * Returns a simple String representation of this InstructionContext.
+         */
+        @Override
+        public String toString(){
+        //TODO: Put information in the brackets, e.g.
+        //      Is this an ExceptionHandler? Is this a RET? Is this the start of
+        //      a subroutine?
+            String ret = getInstruction().toString(false)+"\t[InstructionContext]";
+            return ret;
+        }
+
+        /**
+         * Does the actual merging (vmspec2, page 146).
+         * Returns true IFF this.inFrame was changed in course of merging with inFrame.
+         */
+        private boolean mergeInFrames(Frame inFrame) {
+            // TODO: Can be performance-improved.
+            Frame inF = inFrames.get(lastExecutionJSR());
+            OperandStack oldstack = inF.getStack().getClone();
+            LocalVariables oldlocals = inF.getLocals().getClone();
+            try {
+                inF.getStack().merge(inFrame.getStack());
+                inF.getLocals().merge(inFrame.getLocals());
+            } catch (StructuralCodeConstraintException sce) {
+                extendMessageWithFlow(sce);
+                throw sce;
+            }
+            return !(oldstack.equals(inF.getStack()) && oldlocals.equals(inF.getLocals()));
+        }
+
+        /**
+         * Returns the control flow execution chain. This is built
+         * while execute(Frame, ArrayList)-ing the code represented
+         * by the surrounding ControlFlowGraph.
+         */
+        private String getExecutionChain(){
+            String s = this.toString();
+            for (int i=executionPredecessors.size()-1; i>=0; i--){
+                s = executionPredecessors.get(i)+"\n" + s;
+            }
+            return s;
+        }
+
+
+        /**
+         * Extends the StructuralCodeConstraintException ("e") object with an at-the-end-extended message.
+         * This extended message will then reflect the execution flow needed to get to the constraint
+         * violation that triggered the throwing of the "e" object.
+         */
+        private void extendMessageWithFlow(StructuralCodeConstraintException e){
+            String s = "Execution flow:\n";
+            e.extendMessage("", s+getExecutionChain());
+        }
+
+        /*
+         * Fulfils the contract of InstructionContext.getInstruction().
+         */
+        public InstructionHandle getInstruction(){
+            return instruction;
+        }
+
+        /**
+         * Returns the InstructionContextImpl with an JSR/JSR_W
+         * that was last in the ExecutionChain, without
+         * a corresponding RET, i.e.
+         * we were called by this one.
+         * Returns null if we were called from the top level.
+         */
+        private InstructionContextImpl lastExecutionJSR(){
+
+            int size = executionPredecessors.size();
+            int retcount = 0;
+
+            for (int i=size-1; i>=0; i--){
+                InstructionContextImpl current = (InstructionContextImpl) (executionPredecessors.get(i));
+                Instruction currentlast = current.getInstruction().getInstruction();
+                if (currentlast instanceof RET) {
+                    retcount++;
+                }
+                if (currentlast instanceof JsrInstruction){
+                    retcount--;
+                    if (retcount == -1) {
+                        return current;
+                    }
+                }
+            }
+            return null;
+        }
+
+        /* Satisfies InstructionContext.getSuccessors(). */
+        public InstructionContext[] getSuccessors(){
+            return contextsOf(_getSuccessors());
+        }
+
+        /**
+         * A utility method that calculates the successors of a given InstructionHandle
+         * That means, a RET does have successors as defined here.
+         * A JsrInstruction has its target as its successor
+         * (opposed to its physical successor) as defined here.
+         */
+// TODO: implement caching!
+        private InstructionHandle[] _getSuccessors(){
+            final InstructionHandle[] empty = new InstructionHandle[0];
+            final InstructionHandle[] single = new InstructionHandle[1];
+
+            Instruction inst = getInstruction().getInstruction();
+
+            if (inst instanceof RET){
+                Subroutine s = subroutines.subroutineOf(getInstruction());
+                if (s==null){ //return empty; // RET in dead code. "empty" would be the correct answer, but we know something about the surrounding project...
+                    throw new AssertionViolatedException("Asking for successors of a RET in dead code?!");
+                }
+
+//TODO: remove. Only JustIce must not use it, but foreign users of the ControlFlowGraph
+//      will want it. Thanks Johannes Wust.
+//throw new AssertionViolatedException("DID YOU REALLY WANT TO ASK FOR RET'S SUCCS?");
+
+                InstructionHandle[] jsrs = s.getEnteringJsrInstructions();
+                InstructionHandle[] ret = new InstructionHandle[jsrs.length];
+                for (int i=0; i<jsrs.length; i++){
+                    ret[i] = jsrs[i].getNext();
+                }
+                return ret;
+            }
+
+            // Terminates method normally.
+            if (inst instanceof ReturnInstruction){
+                return empty;
+            }
+
+            // Terminates method abnormally, because JustIce mandates
+            // subroutines not to be protected by exception handlers.
+            if (inst instanceof ATHROW){
+                return empty;
+            }
+
+            // See method comment.
+            if (inst instanceof JsrInstruction){
+                single[0] = ((JsrInstruction) inst).getTarget();
+                return single;
+            }
+
+            if (inst instanceof GotoInstruction){
+                single[0] = ((GotoInstruction) inst).getTarget();
+                return single;
+            }
+
+            if (inst instanceof BranchInstruction){
+                if (inst instanceof Select){
+                    // BCEL's getTargets() returns only the non-default targets,
+                    // thanks to Eli Tilevich for reporting.
+                    InstructionHandle[] matchTargets = ((Select) inst).getTargets();
+                    InstructionHandle[] ret = new InstructionHandle[matchTargets.length+1];
+                    ret[0] = ((Select) inst).getTarget();
+                    System.arraycopy(matchTargets, 0, ret, 1, matchTargets.length);
+                    return ret;
+                }
+                final InstructionHandle[] pair = new InstructionHandle[2];
+                pair[0] = getInstruction().getNext();
+                pair[1] = ((BranchInstruction) inst).getTarget();
+                return pair;
+            }
+
+            // default case: Fall through.        
+            single[0] = getInstruction().getNext();
+            return single;
+        }
+
+    } // End Inner InstructionContextImpl Class.
+
+    ///** The MethodGen object we're working on. */
+    //private final MethodGen method_gen;
+
+    /** The Subroutines object for the method whose control flow is represented by this ControlFlowGraph. */
+    private final Subroutines subroutines;
+
+    /** The ExceptionHandlers object for the method whose control flow is represented by this ControlFlowGraph. */
+    private final ExceptionHandlers exceptionhandlers;
+
+    /** All InstructionContext instances of this ControlFlowGraph. */
+    private final Map<InstructionHandle, InstructionContext> instructionContexts = new HashMap<InstructionHandle, InstructionContext>(); //keys: InstructionHandle, values: InstructionContextImpl
+
+    /** 
+     * A Control Flow Graph.
+     */
+    public ControlFlowGraph(MethodGen method_gen){
+        subroutines = new Subroutines(method_gen);
+        exceptionhandlers = new ExceptionHandlers(method_gen);
+
+        InstructionHandle[] instructionhandles = method_gen.getInstructionList().getInstructionHandles();
+        for (InstructionHandle instructionhandle : instructionhandles) {
+            instructionContexts.put(instructionhandle, new InstructionContextImpl(instructionhandle));
+        }
+
+        //this.method_gen = method_gen;
+    }
+
+    /**
+     * Returns the InstructionContext of a given instruction.
+     */
+    public InstructionContext contextOf(InstructionHandle inst){
+        InstructionContext ic = instructionContexts.get(inst);
+        if (ic == null){
+            throw new AssertionViolatedException("InstructionContext requested for an InstructionHandle that's not known!");
+        }
+        return ic;
+    }
+
+    /**
+     * Returns the InstructionContext[] of a given InstructionHandle[],
+     * in a naturally ordered manner.
+     */
+    public InstructionContext[] contextsOf(InstructionHandle[] insts){
+        InstructionContext[] ret = new InstructionContext[insts.length];
+        for (int i=0; i<insts.length; i++){
+            ret[i] = contextOf(insts[i]);
+        }
+        return ret;
+    }
+
+    /**
+     * Returns an InstructionContext[] with all the InstructionContext instances
+     * for the method whose control flow is represented by this ControlFlowGraph
+     * <B>(NOT ORDERED!)</B>.
+     */
+    public InstructionContext[] getInstructionContexts(){
+        InstructionContext[] ret = new InstructionContext[instructionContexts.values().size()];
+        return instructionContexts.values().toArray(ret);
+    }
+
+    /**
+     * Returns true, if and only if the said instruction is not reachable; that means,
+     * if it is not part of this ControlFlowGraph.
+     */
+    public boolean isDead(InstructionHandle i){
+        return subroutines.subroutineOf(i) == null;
+    }     
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExceptionHandler.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExceptionHandler.java
new file mode 100644
index 0000000..f437f4c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExceptionHandler.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.ObjectType;
+
+/**
+ * This class represents an exception handler; that is, an ObjectType
+ * representing a subclass of java.lang.Throwable and the instruction
+ * the handler starts off (represented by an InstructionContext).
+ * 
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class ExceptionHandler{
+    /** The type of the exception to catch. NULL means ANY. */
+    private final ObjectType catchtype;
+
+    /** The InstructionHandle where the handling begins. */
+    private final InstructionHandle handlerpc;
+
+    /** Leave instance creation to JustIce. */
+    ExceptionHandler(ObjectType catch_type, InstructionHandle handler_pc){
+        catchtype = catch_type;
+        handlerpc = handler_pc;
+    }
+
+    /**
+     * Returns the type of the exception that's handled. <B>'null' means 'ANY'.</B>
+     */
+    public ObjectType getExceptionType(){
+        return catchtype;
+    }
+
+    /**
+     * Returns the InstructionHandle where the handler starts off.
+     */
+    public InstructionHandle getHandlerStart(){
+        return handlerpc;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExceptionHandlers.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExceptionHandlers.java
new file mode 100644
index 0000000..4ec7d88
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExceptionHandlers.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.bcel6.generic.CodeExceptionGen;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.MethodGen;
+
+/**
+ * This class allows easy access to ExceptionHandler objects.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class ExceptionHandlers{
+    /**
+     * The ExceptionHandler instances.
+     * Key: InstructionHandle objects, Values: HashSet<ExceptionHandler> instances.
+     */
+    private final Map<InstructionHandle, Set<ExceptionHandler>> exceptionhandlers;
+
+    /**
+     * Constructor. Creates a new ExceptionHandlers instance.
+     */
+    public ExceptionHandlers(MethodGen mg){
+        exceptionhandlers = new HashMap<InstructionHandle, Set<ExceptionHandler>>();
+        CodeExceptionGen[] cegs = mg.getExceptionHandlers();
+        for (CodeExceptionGen ceg : cegs) {
+            ExceptionHandler eh = new ExceptionHandler(ceg.getCatchType(), ceg.getHandlerPC());
+            for (InstructionHandle ih=ceg.getStartPC(); ih != ceg.getEndPC().getNext(); ih=ih.getNext()){
+                Set<ExceptionHandler> hs;
+                hs = exceptionhandlers.get(ih);
+                if (hs == null){
+                    hs = new HashSet<ExceptionHandler>();
+                    exceptionhandlers.put(ih, hs);
+                }
+                hs.add(eh);
+            }
+        }
+    }
+
+    /**
+     * Returns all the ExceptionHandler instances representing exception
+     * handlers that protect the instruction ih.
+     */
+    public ExceptionHandler[] getExceptionHandlers(InstructionHandle ih){
+        Set<ExceptionHandler> hsSet = exceptionhandlers.get(ih);
+        if (hsSet == null) {
+            return new ExceptionHandler[0];
+        }
+        return hsSet.toArray(new ExceptionHandler[hsSet.size()]);
+    }
+
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExecutionVisitor.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExecutionVisitor.java
new file mode 100644
index 0000000..b5bdd01
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/ExecutionVisitor.java
@@ -0,0 +1,1270 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantDouble;
+import org.apache.commons.bcel6.classfile.ConstantFloat;
+import org.apache.commons.bcel6.classfile.ConstantInteger;
+import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantString;
+import org.apache.commons.bcel6.generic.*;
+
+/**
+ * This Visitor class may be used for a type-based Java Virtual Machine
+ * simulation.
+ * 
+ * <p>It does not check for correct types on the OperandStack or in the
+ * LocalVariables; nor does it check their sizes are sufficiently big.
+ * Thus, to use this Visitor for bytecode verifying, you have to make sure
+ * externally that the type constraints of the Java Virtual Machine instructions
+ * are satisfied. An InstConstraintVisitor may be used for this.
+ * Anyway, this Visitor does not mandate it. For example, when you
+ * visitIADD(IADD o), then there are two stack slots popped and one
+ * stack slot containing a Type.INT is pushed (where you could also
+ * pop only one slot if you know there are two Type.INT on top of the
+ * stack). Monitor-specific behaviour is not simulated.</p>
+ * 
+ * <b>Conventions:</b>
+ *
+ * <p>Type.VOID will never be pushed onto the stack. Type.DOUBLE and Type.LONG
+ * that would normally take up two stack slots (like Double_HIGH and
+ * Double_LOW) are represented by a simple single Type.DOUBLE or Type.LONG
+ * object on the stack here.</p>
+ * 
+ * <p>If a two-slot type is stored into a local variable, the next variable
+ * is given the type Type.UNKNOWN.</p>
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see #visitDSTORE(DSTORE o)
+ * @see InstConstraintVisitor
+ */
+public class ExecutionVisitor extends EmptyVisitor{
+
+    /**
+     * The executionframe we're operating on.
+     */
+    private Frame frame = null;
+
+    /**
+     * The ConstantPoolGen we're working with.
+     * @see #setConstantPoolGen(ConstantPoolGen)
+     */
+    private ConstantPoolGen cpg = null;
+
+    /**
+     * Constructor. Constructs a new instance of this class.
+     */
+    public ExecutionVisitor(){}
+
+    /**
+     * The OperandStack from the current Frame we're operating on.
+     * @see #setFrame(Frame)
+     */
+    private OperandStack stack(){
+        return frame.getStack();
+    }
+
+    /**
+     * The LocalVariables from the current Frame we're operating on.
+     * @see #setFrame(Frame)
+     */
+    private LocalVariables locals(){
+        return frame.getLocals();
+    }
+
+    /**
+     * Sets the ConstantPoolGen needed for symbolic execution.
+     */
+    public void setConstantPoolGen(ConstantPoolGen cpg){
+        this.cpg = cpg;
+    }
+
+    /**
+     * The only method granting access to the single instance of
+     * the ExecutionVisitor class. Before actively using this
+     * instance, <B>SET THE ConstantPoolGen FIRST</B>.
+     * @see #setConstantPoolGen(ConstantPoolGen)
+     */
+    public void setFrame(Frame f){
+        this.frame = f;
+    }
+
+    ///** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    //public void visitWIDE(WIDE o){
+    // The WIDE instruction is modelled as a flag
+    // of the embedded instructions in BCEL.
+    // Therefore BCEL checks for possible errors
+    // when parsing in the .class file: We don't
+    // have even the possibilty to care for WIDE
+    // here.
+    //}
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitAALOAD(AALOAD o){
+        stack().pop();                                                        // pop the index int
+//System.out.print(stack().peek());
+        Type t = stack().pop(); // Pop Array type
+        if (t == Type.NULL){
+            stack().push(Type.NULL);
+        }    // Do nothing stackwise --- a NullPointerException is thrown at Run-Time
+        else{
+            ArrayType at = (ArrayType) t;    
+            stack().push(at.getElementType());
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitAASTORE(AASTORE o){
+        stack().pop();
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitACONST_NULL(ACONST_NULL o){
+        stack().push(Type.NULL);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitALOAD(ALOAD o){
+        stack().push(locals().get(o.getIndex()));
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitANEWARRAY(ANEWARRAY o){
+        stack().pop(); //count
+        stack().push( new ArrayType(o.getType(cpg), 1) );
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitARETURN(ARETURN o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitARRAYLENGTH(ARRAYLENGTH o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitASTORE(ASTORE o){
+        locals().set(o.getIndex(), stack().pop());
+        //System.err.println("TODO-DEBUG:    set LV '"+o.getIndex()+"' to '"+locals().get(o.getIndex())+"'.");
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitATHROW(ATHROW o){
+        Type t = stack().pop();
+        stack().clear();
+        if (t.equals(Type.NULL)) {
+            stack().push(Type.getType("Ljava/lang/NullPointerException;"));
+        } else {
+            stack().push(t);
+        }
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitBALOAD(BALOAD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitBASTORE(BASTORE o){
+        stack().pop();
+        stack().pop();
+        stack().pop();
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitBIPUSH(BIPUSH o){
+        stack().push(Type.INT);
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitCALOAD(CALOAD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitCASTORE(CASTORE o){
+        stack().pop();
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitCHECKCAST(CHECKCAST o){
+        // It's possibly wrong to do so, but SUN's
+        // ByteCode verifier seems to do (only) this, too.
+        // TODO: One could use a sophisticated analysis here to check
+        //       if a type cannot possibly be cated to another and by
+        //       so doing predict the ClassCastException at run-time.
+        stack().pop();
+        stack().push(o.getType(cpg));
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitD2F(D2F o){
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitD2I(D2I o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitD2L(D2L o){
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDADD(DADD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDALOAD(DALOAD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDASTORE(DASTORE o){
+        stack().pop();
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDCMPG(DCMPG o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDCMPL(DCMPL o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDCONST(DCONST o){
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDDIV(DDIV o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDLOAD(DLOAD o){
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDMUL(DMUL o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDNEG(DNEG o){
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDREM(DREM o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDRETURN(DRETURN o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDSTORE(DSTORE o){
+        locals().set(o.getIndex(), stack().pop());
+        locals().set(o.getIndex()+1, Type.UNKNOWN);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDSUB(DSUB o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDUP(DUP o){
+        Type t = stack().pop();
+        stack().push(t);
+        stack().push(t);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDUP_X1(DUP_X1 o){
+        Type w1 = stack().pop();
+        Type w2 = stack().pop();
+        stack().push(w1);
+        stack().push(w2);
+        stack().push(w1);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDUP_X2(DUP_X2 o){
+        Type w1 = stack().pop();
+        Type w2 = stack().pop();
+        if (w2.getSize() == 2){
+            stack().push(w1);
+            stack().push(w2);
+            stack().push(w1);
+        }
+        else{
+            Type w3 = stack().pop();
+            stack().push(w1);
+            stack().push(w3);
+            stack().push(w2);
+            stack().push(w1);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDUP2(DUP2 o){
+        Type t = stack().pop();
+        if (t.getSize() == 2){
+            stack().push(t);
+            stack().push(t);
+        }
+        else{ // t.getSize() is 1
+            Type u = stack().pop();
+            stack().push(u);
+            stack().push(t);
+            stack().push(u);
+            stack().push(t);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDUP2_X1(DUP2_X1 o){
+        Type t = stack().pop();
+        if (t.getSize() == 2){
+            Type u = stack().pop();
+            stack().push(t);
+            stack().push(u);
+            stack().push(t);
+        }
+        else{ //t.getSize() is1
+            Type u = stack().pop();
+            Type v = stack().pop();
+            stack().push(u);
+            stack().push(t);
+            stack().push(v);
+            stack().push(u);
+            stack().push(t);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitDUP2_X2(DUP2_X2 o){
+        Type t = stack().pop();
+        if (t.getSize() == 2){
+            Type u = stack().pop();
+            if (u.getSize() == 2){
+                stack().push(t);
+                stack().push(u);
+                stack().push(t);
+            }else{
+                Type v = stack().pop();
+                stack().push(t);
+                stack().push(v);
+                stack().push(u);
+                stack().push(t);
+            }
+        }
+        else{ //t.getSize() is 1
+            Type u = stack().pop();
+            Type v = stack().pop();
+            if (v.getSize() == 2){
+                stack().push(u);
+                stack().push(t);
+                stack().push(v);
+                stack().push(u);
+                stack().push(t);
+            }else{
+                Type w = stack().pop();
+                stack().push(u);
+                stack().push(t);
+                stack().push(w);
+                stack().push(v);
+                stack().push(u);
+                stack().push(t);
+            }
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitF2D(F2D o){
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitF2I(F2I o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitF2L(F2L o){
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFADD(FADD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFALOAD(FALOAD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFASTORE(FASTORE o){
+        stack().pop();
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFCMPG(FCMPG o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFCMPL(FCMPL o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFCONST(FCONST o){
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFDIV(FDIV o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFLOAD(FLOAD o){
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFMUL(FMUL o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFNEG(FNEG o){
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFREM(FREM o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFRETURN(FRETURN o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFSTORE(FSTORE o){
+        locals().set(o.getIndex(), stack().pop());
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitFSUB(FSUB o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitGETFIELD(GETFIELD o){
+        stack().pop();
+        Type t = o.getFieldType(cpg);
+        if (    t.equals(Type.BOOLEAN)    ||
+                    t.equals(Type.CHAR)            ||
+                    t.equals(Type.BYTE)         ||
+                    t.equals(Type.SHORT)        ) {
+            t = Type.INT;
+        }
+        stack().push(t);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitGETSTATIC(GETSTATIC o){
+        Type t = o.getFieldType(cpg);
+        if (    t.equals(Type.BOOLEAN)    ||
+                    t.equals(Type.CHAR)            ||
+                    t.equals(Type.BYTE)         ||
+                    t.equals(Type.SHORT)        ) {
+            t = Type.INT;
+        }
+        stack().push(t);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitGOTO(GOTO o){
+        // no stack changes.
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitGOTO_W(GOTO_W o){
+        // no stack changes.
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitI2B(I2B o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitI2C(I2C o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitI2D(I2D o){
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitI2F(I2F o){
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitI2L(I2L o){
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitI2S(I2S o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIADD(IADD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIALOAD(IALOAD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIAND(IAND o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIASTORE(IASTORE o){
+        stack().pop();
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitICONST(ICONST o){
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIDIV(IDIV o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIF_ACMPEQ(IF_ACMPEQ o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIF_ACMPNE(IF_ACMPNE o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIF_ICMPEQ(IF_ICMPEQ o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIF_ICMPGE(IF_ICMPGE o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIF_ICMPGT(IF_ICMPGT o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIF_ICMPLE(IF_ICMPLE o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIF_ICMPLT(IF_ICMPLT o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIF_ICMPNE(IF_ICMPNE o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIFEQ(IFEQ o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIFGE(IFGE o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIFGT(IFGT o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIFLE(IFLE o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIFLT(IFLT o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIFNE(IFNE o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIFNONNULL(IFNONNULL o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIFNULL(IFNULL o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIINC(IINC o){
+        // stack is not changed.
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitILOAD(ILOAD o){
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIMUL(IMUL o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitINEG(INEG o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitINSTANCEOF(INSTANCEOF o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitINVOKEDYNAMIC(INVOKEDYNAMIC o){
+        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
+            stack().pop();
+        }
+        // We are sure the invoked method will xRETURN eventually
+        // We simulate xRETURNs functionality here because we
+        // don't really "jump into" and simulate the invoked
+        // method.
+        if (o.getReturnType(cpg) != Type.VOID){
+            Type t = o.getReturnType(cpg);
+            if (    t.equals(Type.BOOLEAN)    ||
+                        t.equals(Type.CHAR)            ||
+                        t.equals(Type.BYTE)         ||
+                        t.equals(Type.SHORT)        ) {
+                t = Type.INT;
+            }
+            stack().push(t);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitINVOKEINTERFACE(INVOKEINTERFACE o){
+        stack().pop();    //objectref
+        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
+            stack().pop();
+        }
+        // We are sure the invoked method will xRETURN eventually
+        // We simulate xRETURNs functionality here because we
+        // don't really "jump into" and simulate the invoked
+        // method.
+        if (o.getReturnType(cpg) != Type.VOID){
+            Type t = o.getReturnType(cpg);
+            if (    t.equals(Type.BOOLEAN)    ||
+                        t.equals(Type.CHAR)            ||
+                        t.equals(Type.BYTE)         ||
+                        t.equals(Type.SHORT)        ) {
+                t = Type.INT;
+            }
+            stack().push(t);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitINVOKESPECIAL(INVOKESPECIAL o){
+        if (o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME)){
+            UninitializedObjectType t = (UninitializedObjectType) stack().peek(o.getArgumentTypes(cpg).length);
+            if (t == Frame._this){    
+                Frame._this = null;
+            }
+            stack().initializeObject(t);
+            locals().initializeObject(t);
+        }
+        stack().pop();    //objectref
+        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
+            stack().pop();
+        }
+        // We are sure the invoked method will xRETURN eventually
+        // We simulate xRETURNs functionality here because we
+        // don't really "jump into" and simulate the invoked
+        // method.
+        if (o.getReturnType(cpg) != Type.VOID){
+            Type t = o.getReturnType(cpg);
+            if (    t.equals(Type.BOOLEAN)    ||
+                        t.equals(Type.CHAR)            ||
+                        t.equals(Type.BYTE)         ||
+                        t.equals(Type.SHORT)        ) {
+                t = Type.INT;
+            }
+            stack().push(t);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitINVOKESTATIC(INVOKESTATIC o){
+        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
+            stack().pop();
+        }
+        // We are sure the invoked method will xRETURN eventually
+        // We simulate xRETURNs functionality here because we
+        // don't really "jump into" and simulate the invoked
+        // method.
+        if (o.getReturnType(cpg) != Type.VOID){
+            Type t = o.getReturnType(cpg);
+            if (    t.equals(Type.BOOLEAN)    ||
+                        t.equals(Type.CHAR)            ||
+                        t.equals(Type.BYTE)         ||
+                        t.equals(Type.SHORT)        ) {
+                t = Type.INT;
+            }
+            stack().push(t);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitINVOKEVIRTUAL(INVOKEVIRTUAL o){
+        stack().pop(); //objectref
+        for (int i=0; i<o.getArgumentTypes(cpg).length; i++){
+            stack().pop();
+        }
+        // We are sure the invoked method will xRETURN eventually
+        // We simulate xRETURNs functionality here because we
+        // don't really "jump into" and simulate the invoked
+        // method.
+        if (o.getReturnType(cpg) != Type.VOID){
+            Type t = o.getReturnType(cpg);
+            if (    t.equals(Type.BOOLEAN)    ||
+                        t.equals(Type.CHAR)            ||
+                        t.equals(Type.BYTE)         ||
+                        t.equals(Type.SHORT)        ) {
+                t = Type.INT;
+            }
+            stack().push(t);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIOR(IOR o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIREM(IREM o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIRETURN(IRETURN o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitISHL(ISHL o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitISHR(ISHR o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitISTORE(ISTORE o){
+        locals().set(o.getIndex(), stack().pop());
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitISUB(ISUB o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIUSHR(IUSHR o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitIXOR(IXOR o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitJSR(JSR o){
+        stack().push(new ReturnaddressType(o.physicalSuccessor()));
+//System.err.println("TODO-----------:"+o.physicalSuccessor());
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitJSR_W(JSR_W o){
+        stack().push(new ReturnaddressType(o.physicalSuccessor()));
+    }
+
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitL2D(L2D o){
+        stack().pop();
+        stack().push(Type.DOUBLE);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitL2F(L2F o){
+        stack().pop();
+        stack().push(Type.FLOAT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitL2I(L2I o){
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLADD(LADD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLALOAD(LALOAD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLAND(LAND o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLASTORE(LASTORE o){
+        stack().pop();
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLCMP(LCMP o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLCONST(LCONST o){
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLDC(LDC o){
+        Constant c = cpg.getConstant(o.getIndex());
+        if (c instanceof ConstantInteger){
+            stack().push(Type.INT);
+        }
+        if (c instanceof ConstantFloat){
+            stack().push(Type.FLOAT);
+        }
+        if (c instanceof ConstantString){
+            stack().push(Type.STRING);
+        }
+        if (c instanceof ConstantClass){
+            stack().push(Type.CLASS);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    public void visitLDC_W(LDC_W o){
+        Constant c = cpg.getConstant(o.getIndex());
+        if (c instanceof ConstantInteger){
+            stack().push(Type.INT);
+        }
+        if (c instanceof ConstantFloat){
+            stack().push(Type.FLOAT);
+        }
+        if (c instanceof ConstantString){
+            stack().push(Type.STRING);
+        }
+        if (c instanceof ConstantClass){
+            stack().push(Type.CLASS);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLDC2_W(LDC2_W o){
+        Constant c = cpg.getConstant(o.getIndex());
+        if (c instanceof ConstantLong){
+            stack().push(Type.LONG);
+        }
+        if (c instanceof ConstantDouble){
+            stack().push(Type.DOUBLE);
+        }
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLDIV(LDIV o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLLOAD(LLOAD o){
+        stack().push(locals().get(o.getIndex()));
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLMUL(LMUL o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLNEG(LNEG o){
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLOOKUPSWITCH(LOOKUPSWITCH o){
+        stack().pop(); //key
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLOR(LOR o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLREM(LREM o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLRETURN(LRETURN o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLSHL(LSHL o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLSHR(LSHR o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLSTORE(LSTORE o){
+        locals().set(o.getIndex(), stack().pop());
+        locals().set(o.getIndex()+1, Type.UNKNOWN);        
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLSUB(LSUB o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLUSHR(LUSHR o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitLXOR(LXOR o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.LONG);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitMONITORENTER(MONITORENTER o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitMONITOREXIT(MONITOREXIT o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitMULTIANEWARRAY(MULTIANEWARRAY o){
+        for (int i=0; i<o.getDimensions(); i++){
+            stack().pop();
+        }
+        stack().push(o.getType(cpg));
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitNEW(NEW o){
+        stack().push(new UninitializedObjectType((ObjectType) (o.getType(cpg))));
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitNEWARRAY(NEWARRAY o){
+        stack().pop();
+        stack().push(o.getType());
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitNOP(NOP o){
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitPOP(POP o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitPOP2(POP2 o){
+        Type t = stack().pop();
+        if (t.getSize() == 1){
+            stack().pop();
+        }        
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitPUTFIELD(PUTFIELD o){
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitPUTSTATIC(PUTSTATIC o){
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitRET(RET o){
+        // do nothing, return address
+        // is in in the local variables.
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitRETURN(RETURN o){
+        // do nothing.
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitSALOAD(SALOAD o){
+        stack().pop();
+        stack().pop();
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitSASTORE(SASTORE o){
+        stack().pop();
+        stack().pop();
+        stack().pop();
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitSIPUSH(SIPUSH o){
+        stack().push(Type.INT);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitSWAP(SWAP o){
+        Type t = stack().pop();
+        Type u = stack().pop();
+        stack().push(t);
+        stack().push(u);
+    }
+    /** Symbolically executes the corresponding Java Virtual Machine instruction. */ 
+    @Override
+    public void visitTABLESWITCH(TABLESWITCH o){
+        stack().pop();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/Frame.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/Frame.java
new file mode 100644
index 0000000..37dbb6c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/Frame.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+
+/**
+ * This class represents a JVM execution frame; that means,
+ * a local variable array and an operand stack.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+
+public class Frame{
+
+    /**
+     * For instance initialization methods, it is important to remember
+     * which instance it is that is not initialized yet. It will be
+     * initialized invoking another constructor later.
+     * NULL means the instance already *is* initialized.
+     */
+    protected static UninitializedObjectType _this;
+
+    /**
+     *
+     */
+    private final LocalVariables locals;
+
+    /**
+     *
+     */
+    private final OperandStack stack;
+
+    /**
+     *
+     */
+    public Frame(int maxLocals, int maxStack){
+        locals = new LocalVariables(maxLocals);
+        stack = new OperandStack(maxStack);
+    }
+
+    /**
+     *
+     */
+    public Frame(LocalVariables locals, OperandStack stack){
+        this.locals = locals;
+        this.stack = stack;
+    }
+
+    /**
+     *
+     */
+    @Override
+    protected Object clone(){
+        Frame f = new Frame(locals.getClone(), stack.getClone());
+        return f;
+    }
+
+    /**
+     *
+     */
+    public Frame getClone(){
+        return (Frame) clone();
+    }
+
+    /**
+     *
+     */
+    public LocalVariables getLocals(){
+        return locals;
+    }
+
+    /**
+     *
+     */
+    public OperandStack getStack(){
+        return stack;
+    }
+
+    /** @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() { return stack.hashCode() ^ locals.hashCode(); }
+
+    /**
+     *
+     */
+    @Override
+    public boolean equals(Object o){
+        if (!(o instanceof Frame)) {
+            return false; // implies "null" is non-equal.
+        }
+        Frame f = (Frame) o;
+        return this.stack.equals(f.stack) && this.locals.equals(f.locals);
+    }
+
+    /**
+     * Returns a String representation of the Frame instance.
+     */
+    @Override
+    public String toString(){
+        String s="Local Variables:\n";
+        s += locals;
+        s += "OperandStack:\n";
+        s += stack;
+        return s;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/GenericArray.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/GenericArray.java
new file mode 100644
index 0000000..929f3bd
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/GenericArray.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+/**
+ * A placeholder class that can be used to create an ObjectType of which
+ * has some of the properties arrays have. They implement java.lang.Cloneable
+ * and java.io.Serializable and they extend java.lang.Object.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */ 
+public class GenericArray extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable{
+
+    private static final long serialVersionUID = 1991183963515237894L;
+
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        return super.clone();
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/InstConstraintVisitor.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/InstConstraintVisitor.java
new file mode 100644
index 0000000..e47c39d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/InstConstraintVisitor.java
@@ -0,0 +1,2881 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.Constant;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantDouble;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantFloat;
+import org.apache.commons.bcel6.classfile.ConstantInteger;
+import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantString;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.generic.*;
+import org.apache.commons.bcel6.verifier.VerificationResult;
+import org.apache.commons.bcel6.verifier.Verifier;
+import org.apache.commons.bcel6.verifier.VerifierFactory;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException;
+
+
+/**
+ * A Visitor class testing for valid preconditions of JVM instructions.
+ * The instance of this class will throw a StructuralCodeConstraintException
+ * instance if an instruction is visitXXX()ed which has preconditions that are
+ * not satisfied.
+ * TODO: Currently, the JVM's behaviour concerning monitors (MONITORENTER,
+ * MONITOREXIT) is not modeled in JustIce.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException
+ * @see org.apache.commons.bcel6.verifier.exc.LinkingConstraintException
+ */
+public class InstConstraintVisitor extends EmptyVisitor{
+
+    private static final ObjectType GENERIC_ARRAY = ObjectType.getInstance("org.apache.commons.bcel6.verifier.structurals.GenericArray");
+
+    /**
+     * The constructor. Constructs a new instance of this class.
+     */
+    public InstConstraintVisitor(){}
+
+    /**
+     * The Execution Frame we're working on.
+     *
+     * @see #setFrame(Frame f)
+     * @see #locals()
+     * @see #stack()
+     */
+    private Frame frame = null;
+
+    /**
+     * The ConstantPoolGen we're working on.
+     *
+     * @see #setConstantPoolGen(ConstantPoolGen cpg)
+     */
+    private ConstantPoolGen cpg = null;
+
+    /**
+     * The MethodGen we're working on.
+     *
+     * @see #setMethodGen(MethodGen mg)
+     */
+    private MethodGen mg = null;
+
+    /**
+     * The OperandStack we're working on.
+     *
+     * @see #setFrame(Frame f)
+     */
+    private OperandStack stack(){
+        return frame.getStack();
+    }
+
+    /**
+     * The LocalVariables we're working on.
+     *
+     * @see #setFrame(Frame f)
+     */
+    private LocalVariables locals(){
+        return frame.getLocals();
+    }
+
+    /**
+   * This method is called by the visitXXX() to notify the acceptor of this InstConstraintVisitor
+   * that a constraint violation has occured. This is done by throwing an instance of a
+   * StructuralCodeConstraintException.
+   * @throws org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException always.
+   */
+    private void constraintViolated(Instruction violator, String description){
+        String fq_classname = violator.getClass().getName();
+        throw new StructuralCodeConstraintException("Instruction "+ fq_classname.substring(fq_classname.lastIndexOf('.')+1) +" constraint violated: " + description);
+    }
+
+    /**
+     * This returns the single instance of the InstConstraintVisitor class.
+     * To operate correctly, other values must have been set before actually
+     * using the instance.
+     * Use this method for performance reasons.
+     *
+     * @see #setConstantPoolGen(ConstantPoolGen cpg)
+     * @see #setMethodGen(MethodGen mg)
+     */
+    public void setFrame(Frame f){
+        this.frame = f;
+        //if (singleInstance.mg == null || singleInstance.cpg == null) throw new AssertionViolatedException("Forgot to set important values first.");
+    }
+
+    /**
+     * Sets the ConstantPoolGen instance needed for constraint
+     * checking prior to execution.
+     */
+    public void setConstantPoolGen(ConstantPoolGen cpg){
+        this.cpg = cpg;
+    }
+
+    /**
+     * Sets the MethodGen instance needed for constraint
+     * checking prior to execution.
+     */
+    public void setMethodGen(MethodGen mg){
+        this.mg = mg;
+    }
+
+    /**
+     * Assures index is of type INT.
+     * @throws org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException if the above constraint is not satisfied.
+     */
+    private void indexOfInt(Instruction o, Type index){
+        if (! index.equals(Type.INT)) {
+            constraintViolated(o, "The 'index' is not of type int but of type "+index+".");
+        }
+    }
+
+    /**
+     * Assures the ReferenceType r is initialized (or Type.NULL).
+     * Formally, this means (!(r instanceof UninitializedObjectType)), because
+     * there are no uninitialized array types.
+     * @throws org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException if the above constraint is not satisfied.
+     */
+    private void referenceTypeIsInitialized(Instruction o, ReferenceType r){
+        if (r instanceof UninitializedObjectType){
+            constraintViolated(o, "Working on an uninitialized object '"+r+"'.");
+        }
+    }
+
+    /** Assures value is of type INT. */
+    private void valueOfInt(Instruction o, Type value){
+        if (! value.equals(Type.INT)) {
+            constraintViolated(o, "The 'value' is not of type int but of type "+value+".");
+        }
+    }
+
+    /**
+     * Assures arrayref is of ArrayType or NULL;
+     * returns true if and only if arrayref is non-NULL.
+     * @throws org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException if the above constraint is violated.
+      */
+    private boolean arrayrefOfArrayType(Instruction o, Type arrayref){
+        if (! ((arrayref instanceof ArrayType) || arrayref.equals(Type.NULL)) ) {
+            constraintViolated(o, "The 'arrayref' does not refer to an array but is of type "+arrayref+".");
+        }
+        return (arrayref instanceof ArrayType);
+    }
+
+    /***************************************************************/
+    /* MISC                                                        */
+    /***************************************************************/
+    /**
+     * Ensures the general preconditions of an instruction that accesses the stack.
+     * This method is here because BCEL has no such superinterface for the stack
+     * accessing instructions; and there are funny unexpected exceptions in the
+     * semantices of the superinterfaces and superclasses provided.
+     * E.g. SWAP is a StackConsumer, but DUP_X1 is not a StackProducer.
+     * Therefore, this method is called by all StackProducer, StackConsumer,
+     * and StackInstruction instances via their visitXXX() method.
+     * Unfortunately, as the superclasses and superinterfaces overlap, some instructions
+     * cause this method to be called two or three times. [TODO: Fix this.]
+     *
+     * @see #visitStackConsumer(StackConsumer o)
+     * @see #visitStackProducer(StackProducer o)
+     * @see #visitStackInstruction(StackInstruction o)
+     */
+    private void _visitStackAccessor(Instruction o){
+        int consume = o.consumeStack(cpg); // Stack values are always consumed first; then produced.
+        if (consume > stack().slotsUsed()){
+            constraintViolated(o, "Cannot consume "+consume+" stack slots: only "+stack().slotsUsed()+" slot(s) left on stack!\nStack:\n"+stack());
+        }
+
+        int produce = o.produceStack(cpg) - o.consumeStack(cpg); // Stack values are always consumed first; then produced.
+        if ( produce + stack().slotsUsed() > stack().maxStack() ){
+            constraintViolated(o, "Cannot produce "+produce+" stack slots: only "+(stack().maxStack()-stack().slotsUsed())+" free stack slot(s) left.\nStack:\n"+stack());
+        }
+    }
+
+    /***************************************************************/
+    /* "generic"visitXXXX methods where XXXX is an interface       */
+    /* therefore, we don't know the order of visiting; but we know */
+    /* these methods are called before the visitYYYY methods below */
+    /***************************************************************/
+
+    /**
+     * Assures the generic preconditions of a LoadClass instance.
+     * The referenced class is loaded and pass2-verified.
+     */
+    @Override
+    public void visitLoadClass(LoadClass o){
+        ObjectType t = o.getLoadClassType(cpg);
+        if (t != null){// null means "no class is loaded"
+            Verifier v = VerifierFactory.getVerifier(t.getClassName());
+            VerificationResult vr = v.doPass2();
+            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                constraintViolated((Instruction) o, "Class '"+o.getLoadClassType(cpg).getClassName()+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
+            }
+        }
+    }
+
+    /**
+     * Ensures the general preconditions of a StackConsumer instance.
+     */
+    @Override
+    public void visitStackConsumer(StackConsumer o){
+        _visitStackAccessor((Instruction) o);
+    }
+
+    /**
+     * Ensures the general preconditions of a StackProducer instance.
+     */
+    @Override
+    public void visitStackProducer(StackProducer o){
+        _visitStackAccessor((Instruction) o);
+    }
+
+
+    /***************************************************************/
+    /* "generic" visitYYYY methods where YYYY is a superclass.     */
+    /* therefore, we know the order of visiting; we know           */
+    /* these methods are called after the visitXXXX methods above. */
+    /***************************************************************/
+    /**
+     * Ensures the general preconditions of a CPInstruction instance.
+     */
+    @Override
+    public void visitCPInstruction(CPInstruction o){
+        int idx = o.getIndex();
+        if ((idx < 0) || (idx >= cpg.getSize())){
+            throw new AssertionViolatedException("Huh?! Constant pool index of instruction '"+o+"' illegal? Pass 3a should have checked this!");
+        }
+    }
+
+    /**
+     * Ensures the general preconditions of a FieldInstruction instance.
+     */
+     @Override
+    public void visitFieldInstruction(FieldInstruction o){
+         // visitLoadClass(o) has been called before: Every FieldOrMethod
+         // implements LoadClass.
+         // visitCPInstruction(o) has been called before.
+        // A FieldInstruction may be: GETFIELD, GETSTATIC, PUTFIELD, PUTSTATIC
+            Constant c = cpg.getConstant(o.getIndex());
+            if (!(c instanceof ConstantFieldref)){
+                constraintViolated(o, "Index '"+o.getIndex()+"' should refer to a CONSTANT_Fieldref_info structure, but refers to '"+c+"'.");
+            }
+            // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
+            Type t = o.getType(cpg);
+            if (t instanceof ObjectType){
+                String name = ((ObjectType)t).getClassName();
+                Verifier v = VerifierFactory.getVerifier( name );
+                VerificationResult vr = v.doPass2();
+                if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                    constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
+                }
+            }
+     }
+
+    /**
+     * Ensures the general preconditions of an InvokeInstruction instance.
+     */
+     @Override
+    public void visitInvokeInstruction(InvokeInstruction o){
+         // visitLoadClass(o) has been called before: Every FieldOrMethod
+         // implements LoadClass.
+         // visitCPInstruction(o) has been called before.
+        //TODO
+     }
+
+    /**
+     * Ensures the general preconditions of a StackInstruction instance.
+     */
+    @Override
+    public void visitStackInstruction(StackInstruction o){
+        _visitStackAccessor(o);
+    }
+
+    /**
+     * Assures the generic preconditions of a LocalVariableInstruction instance.
+     * That is, the index of the local variable must be valid.
+     */
+    @Override
+    public void visitLocalVariableInstruction(LocalVariableInstruction o){
+        if (locals().maxLocals() <= (o.getType(cpg).getSize()==1? o.getIndex() : o.getIndex()+1) ){
+            constraintViolated(o, "The 'index' is not a valid index into the local variable array.");
+        }
+    }
+
+    /**
+     * Assures the generic preconditions of a LoadInstruction instance.
+     */
+    @Override
+    public void visitLoadInstruction(LoadInstruction o){
+        //visitLocalVariableInstruction(o) is called before, because it is more generic.
+
+        // LOAD instructions must not read Type.UNKNOWN
+        if (locals().get(o.getIndex()) == Type.UNKNOWN){
+            constraintViolated(o, "Read-Access on local variable "+o.getIndex()+" with unknown content.");
+        }
+
+        // LOAD instructions, two-slot-values at index N must have Type.UNKNOWN
+        // as a symbol for the higher halve at index N+1
+        // [suppose some instruction put an int at N+1--- our double at N is defective]
+        if (o.getType(cpg).getSize() == 2){
+            if (locals().get(o.getIndex()+1) != Type.UNKNOWN){
+                constraintViolated(o, "Reading a two-locals value from local variables "+o.getIndex()+" and "+(o.getIndex()+1)+" where the latter one is destroyed.");
+            }
+        }
+
+        // LOAD instructions must read the correct type.
+        if (!(o instanceof ALOAD)){
+            if (locals().get(o.getIndex()) != o.getType(cpg) ){
+                constraintViolated(o, "Local Variable type and LOADing Instruction type mismatch: Local Variable: '"+locals().get(o.getIndex())+"'; Instruction type: '"+o.getType(cpg)+"'.");
+            }
+        }
+        else{ // we deal with an ALOAD
+            if (!(locals().get(o.getIndex()) instanceof ReferenceType)){
+                constraintViolated(o, "Local Variable type and LOADing Instruction type mismatch: Local Variable: '"+locals().get(o.getIndex())+"'; Instruction expects a ReferenceType.");
+            }
+            // ALOAD __IS ALLOWED__ to put uninitialized objects onto the stack!
+            //referenceTypeIsInitialized(o, (ReferenceType) (locals().get(o.getIndex())));
+        }
+
+        // LOAD instructions must have enough free stack slots.
+        if ((stack().maxStack() - stack().slotsUsed()) < o.getType(cpg).getSize()){
+            constraintViolated(o, "Not enough free stack slots to load a '"+o.getType(cpg)+"' onto the OperandStack.");
+        }
+    }
+
+    /**
+     * Assures the generic preconditions of a StoreInstruction instance.
+     */
+    @Override
+    public void visitStoreInstruction(StoreInstruction o){
+        //visitLocalVariableInstruction(o) is called before, because it is more generic.
+
+        if (stack().isEmpty()){ // Don't bother about 1 or 2 stack slots used. This check is implicitely done below while type checking.
+            constraintViolated(o, "Cannot STORE: Stack to read from is empty.");
+        }
+
+        if ( (!(o instanceof ASTORE)) ){
+            if (! (stack().peek() == o.getType(cpg)) ){// the other xSTORE types are singletons in BCEL.
+                constraintViolated(o, "Stack top type and STOREing Instruction type mismatch: Stack top: '"+stack().peek()+"'; Instruction type: '"+o.getType(cpg)+"'.");
+            }
+        }
+        else{ // we deal with ASTORE
+            Type stacktop = stack().peek();
+            if ( (!(stacktop instanceof ReferenceType)) && (!(stacktop instanceof ReturnaddressType)) ){
+                constraintViolated(o, "Stack top type and STOREing Instruction type mismatch: Stack top: '"+stack().peek()+"'; Instruction expects a ReferenceType or a ReturnadressType.");
+            }
+            //if (stacktop instanceof ReferenceType){
+            //    referenceTypeIsInitialized(o, (ReferenceType) stacktop);
+            //}
+        }
+    }
+
+    /**
+     * Assures the generic preconditions of a ReturnInstruction instance.
+     */
+    @Override
+    public void visitReturnInstruction(ReturnInstruction o){
+        Type method_type = mg.getType();
+        if (method_type == Type.BOOLEAN ||
+            method_type == Type.BYTE ||
+            method_type == Type.SHORT ||
+            method_type == Type.CHAR){
+                method_type = Type.INT;
+            }
+
+        if (o instanceof RETURN){
+            if (method_type != Type.VOID){
+                constraintViolated(o, "RETURN instruction in non-void method.");
+            }
+            else{
+                return;
+            }
+        }
+        if (o instanceof ARETURN){
+            if (method_type == Type.VOID){
+                constraintViolated(o, "ARETURN instruction in void method.");
+            }
+            if (stack().peek() == Type.NULL){
+                return;
+            }
+            if (! (stack().peek() instanceof ReferenceType)){
+                constraintViolated(o, "Reference type expected on top of stack, but is: '"+stack().peek()+"'.");
+            }
+            referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()));
+            //ReferenceType objectref = (ReferenceType) (stack().peek());
+            // TODO: This can only be checked if using Staerk-et-al's "set of object types" instead of a
+            // "wider cast object type" created during verification.
+            //if (! (objectref.isAssignmentCompatibleWith(mg.getType())) ){
+            //    constraintViolated(o, "Type on stack top which should be returned is a '"+stack().peek()+"' which is not assignment compatible with the return type of this method, '"+mg.getType()+"'.");
+            //}
+        }
+        else{
+            if (! ( method_type.equals( stack().peek() ))){
+                constraintViolated(o, "Current method has return type of '"+mg.getType()+"' expecting a '"+method_type+"' on top of the stack. But stack top is a '"+stack().peek()+"'.");
+            }
+        }
+    }
+
+    /***************************************************************/
+    /* "special"visitXXXX methods for one type of instruction each */
+    /***************************************************************/
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitAALOAD(AALOAD o){
+        Type arrayref = stack().peek(1);
+        Type index    = stack().peek(0);
+
+        indexOfInt(o, index);
+        if (arrayrefOfArrayType(o, arrayref)){
+            if (! (((ArrayType) arrayref).getElementType() instanceof ReferenceType)){
+                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of a ReferenceType but to an array of "+((ArrayType) arrayref).getElementType()+".");
+            }
+            //referenceTypeIsInitialized(o, (ReferenceType) (((ArrayType) arrayref).getElementType()));
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitAASTORE(AASTORE o){
+        Type arrayref = stack().peek(2);
+        Type index    = stack().peek(1);
+        Type value    = stack().peek(0);
+
+        indexOfInt(o, index);
+        if (!(value instanceof ReferenceType)){
+            constraintViolated(o, "The 'value' is not of a ReferenceType but of type "+value+".");
+        }else{
+            //referenceTypeIsInitialized(o, (ReferenceType) value);
+        }
+        // Don't bother further with "referenceTypeIsInitialized()", there are no arrays
+        // of an uninitialized object type.
+        if (arrayrefOfArrayType(o, arrayref)){
+            if (! (((ArrayType) arrayref).getElementType() instanceof ReferenceType)){
+                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of a ReferenceType but to an array of "+((ArrayType) arrayref).getElementType()+".");
+            }
+            // No check for array element assignment compatibility. This is done at runtime.
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitACONST_NULL(ACONST_NULL o){
+        // Nothing needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitALOAD(ALOAD o){
+        //visitLoadInstruction(LoadInstruction) is called before.
+
+        // Nothing else needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitANEWARRAY(ANEWARRAY o){
+        if (!stack().peek().equals(Type.INT)) {
+            constraintViolated(o, "The 'count' at the stack top is not of type '"+Type.INT+"' but of type '"+stack().peek()+"'.");
+        // The runtime constant pool item at that index must be a symbolic reference to a class,
+        // array, or interface type. See Pass 3a.
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitARETURN(ARETURN o){
+        if (! (stack().peek() instanceof ReferenceType) ){
+            constraintViolated(o, "The 'objectref' at the stack top is not of a ReferenceType but of type '"+stack().peek()+"'.");
+        }
+        ReferenceType objectref = (ReferenceType) (stack().peek());
+        referenceTypeIsInitialized(o, objectref);
+
+        // The check below should already done via visitReturnInstruction(ReturnInstruction), see there.
+        // It cannot be done using Staerk-et-al's "set of object types" instead of a
+        // "wider cast object type", anyway.
+        //if (! objectref.isAssignmentCompatibleWith(mg.getReturnType() )){
+        //    constraintViolated(o, "The 'objectref' type "+objectref+" at the stack top is not assignment compatible with the return type '"+mg.getReturnType()+"' of the method.");
+        //}
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitARRAYLENGTH(ARRAYLENGTH o){
+        Type arrayref = stack().peek(0);
+        arrayrefOfArrayType(o, arrayref);
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitASTORE(ASTORE o){
+        if (! ( (stack().peek() instanceof ReferenceType) || (stack().peek() instanceof ReturnaddressType) ) ){
+            constraintViolated(o, "The 'objectref' is not of a ReferenceType or of ReturnaddressType but of "+stack().peek()+".");
+        }
+        //if (stack().peek() instanceof ReferenceType){
+        //    referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
+        //}
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitATHROW(ATHROW o){
+        try {
+        // It's stated that 'objectref' must be of a ReferenceType --- but since Throwable is
+        // not derived from an ArrayType, it follows that 'objectref' must be of an ObjectType or Type.NULL.
+        if (! ((stack().peek() instanceof ObjectType) || (stack().peek().equals(Type.NULL))) ){
+            constraintViolated(o, "The 'objectref' is not of an (initialized) ObjectType but of type "+stack().peek()+".");
+        }
+
+        // NULL is a subclass of every class, so to speak.
+        if (stack().peek().equals(Type.NULL)) {
+            return;
+        }
+
+        ObjectType exc = (ObjectType) (stack().peek());
+        ObjectType throwable = (ObjectType) (Type.getType("Ljava/lang/Throwable;"));
+        if ( (! (exc.subclassOf(throwable)) ) && (! (exc.equals(throwable))) ){
+            constraintViolated(o, "The 'objectref' is not of class Throwable or of a subclass of Throwable, but of '"+stack().peek()+"'.");
+        }
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitBALOAD(BALOAD o){
+        Type arrayref = stack().peek(1);
+        Type index    = stack().peek(0);
+        indexOfInt(o, index);
+        if (arrayrefOfArrayType(o, arrayref)){
+            if (! ( (((ArrayType) arrayref).getElementType().equals(Type.BOOLEAN)) ||
+                    (((ArrayType) arrayref).getElementType().equals(Type.BYTE)) ) ){
+                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of a Type.BYTE or Type.BOOLEAN but to an array of '"+((ArrayType) arrayref).getElementType()+"'.");
+            }
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitBASTORE(BASTORE o){
+        Type arrayref = stack().peek(2);
+        Type index    = stack().peek(1);
+        Type value    = stack().peek(0);
+
+        indexOfInt(o, index);
+        valueOfInt(o, value);
+        if (arrayrefOfArrayType(o, arrayref)){
+            if (! ( (((ArrayType) arrayref).getElementType().equals(Type.BOOLEAN)) ||
+                    (((ArrayType) arrayref).getElementType().equals(Type.BYTE)) ) ) {
+                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of a Type.BYTE or Type.BOOLEAN but to an array of '"+((ArrayType) arrayref).getElementType()+"'.");
+            }
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitBIPUSH(BIPUSH o){
+        // Nothing to do...
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitBREAKPOINT(BREAKPOINT o){
+        throw new AssertionViolatedException("In this JustIce verification pass there should not occur an illegal instruction such as BREAKPOINT.");
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitCALOAD(CALOAD o){
+        Type arrayref = stack().peek(1);
+        Type index = stack().peek(0);
+
+        indexOfInt(o, index);
+        arrayrefOfArrayType(o, arrayref);
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitCASTORE(CASTORE o){
+        Type arrayref = stack().peek(2);
+        Type index = stack().peek(1);
+        Type value = stack().peek(0);
+
+        indexOfInt(o, index);
+        valueOfInt(o, value);
+        if (arrayrefOfArrayType(o, arrayref)){
+            if (! ((ArrayType) arrayref).getElementType().equals(Type.CHAR) ){
+                constraintViolated(o, "The 'arrayref' does not refer to an array with elements of type char but to an array of type "+((ArrayType) arrayref).getElementType()+".");
+            }
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitCHECKCAST(CHECKCAST o){
+        // The objectref must be of type reference.
+        Type objectref = stack().peek(0);
+        if (!(objectref instanceof ReferenceType)){
+            constraintViolated(o, "The 'objectref' is not of a ReferenceType but of type "+objectref+".");
+        }
+        //else{
+        //    referenceTypeIsInitialized(o, (ReferenceType) objectref);
+        //}
+        // The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the
+        // current class (�3.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant
+        // pool item at the index must be a symbolic reference to a class, array, or interface type.
+        Constant c = cpg.getConstant(o.getIndex());
+        if (! (c instanceof ConstantClass)){
+            constraintViolated(o, "The Constant at 'index' is not a ConstantClass, but '"+c+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitD2F(D2F o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitD2I(D2I o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitD2L(D2L o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDADD(DADD o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDALOAD(DALOAD o){
+        indexOfInt(o, stack().peek());
+        if (stack().peek(1) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(1) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-top must be of type double[] but is '"+stack().peek(1)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
+        if (t != Type.DOUBLE){
+            constraintViolated(o, "Stack next-to-top must be of type double[] but is '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDASTORE(DASTORE o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+        indexOfInt(o, stack().peek(1));
+        if (stack().peek(2) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(2) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type double[] but is '"+stack().peek(2)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
+        if (t != Type.DOUBLE){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type double[] but is '"+stack().peek(2)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDCMPG(DCMPG o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDCMPL(DCMPL o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDCONST(DCONST o){
+        // There's nothing to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDDIV(DDIV o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDLOAD(DLOAD o){
+        //visitLoadInstruction(LoadInstruction) is called before.
+
+        // Nothing else needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDMUL(DMUL o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDNEG(DNEG o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDREM(DREM o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDRETURN(DRETURN o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDSTORE(DSTORE o){
+        //visitStoreInstruction(StoreInstruction) is called before.
+
+        // Nothing else needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDSUB(DSUB o){
+        if (stack().peek() != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.DOUBLE){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'double', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDUP(DUP o){
+        if (stack().peek().getSize() != 1){
+            constraintViolated(o, "Won't DUP type on stack top '"+stack().peek()+"' because it must occupy exactly one slot, not '"+stack().peek().getSize()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDUP_X1(DUP_X1 o){
+        if (stack().peek().getSize() != 1){
+            constraintViolated(o, "Type on stack top '"+stack().peek()+"' should occupy exactly one slot, not '"+stack().peek().getSize()+"'.");
+        }
+        if (stack().peek(1).getSize() != 1){
+            constraintViolated(o, "Type on stack next-to-top '"+stack().peek(1)+"' should occupy exactly one slot, not '"+stack().peek(1).getSize()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDUP_X2(DUP_X2 o){
+        if (stack().peek().getSize() != 1){
+            constraintViolated(o, "Stack top type must be of size 1, but is '"+stack().peek()+"' of size '"+stack().peek().getSize()+"'.");
+        }
+        if (stack().peek(1).getSize() == 2){
+            return; // Form 2, okay.
+        }
+        //stack().peek(1).getSize == 1.
+        if (stack().peek(2).getSize() != 1){
+            constraintViolated(o, "If stack top's size is 1 and stack next-to-top's size is 1, stack next-to-next-to-top's size must also be 1, but is: '"+stack().peek(2)+"' of size '"+stack().peek(2).getSize()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDUP2(DUP2 o){
+        if (stack().peek().getSize() == 2){
+            return; // Form 2, okay.
+        }
+        //stack().peek().getSize() == 1.
+        if (stack().peek(1).getSize() != 1){
+            constraintViolated(o, "If stack top's size is 1, then stack next-to-top's size must also be 1. But it is '"+stack().peek(1)+"' of size '"+stack().peek(1).getSize()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDUP2_X1(DUP2_X1 o){
+        if (stack().peek().getSize() == 2){
+            if (stack().peek(1).getSize() != 1){
+                constraintViolated(o, "If stack top's size is 2, then stack next-to-top's size must be 1. But it is '"+stack().peek(1)+"' of size '"+stack().peek(1).getSize()+"'.");
+            }
+            else{
+                return; // Form 2
+            }
+        }
+        else{ // stack top is of size 1
+            if ( stack().peek(1).getSize() != 1 ){
+                constraintViolated(o, "If stack top's size is 1, then stack next-to-top's size must also be 1. But it is '"+stack().peek(1)+"' of size '"+stack().peek(1).getSize()+"'.");
+            }
+            if ( stack().peek(2).getSize() != 1 ){
+                constraintViolated(o, "If stack top's size is 1, then stack next-to-next-to-top's size must also be 1. But it is '"+stack().peek(2)+"' of size '"+stack().peek(2).getSize()+"'.");
+            }
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitDUP2_X2(DUP2_X2 o){
+
+        if (stack().peek(0).getSize() == 2){
+             if (stack().peek(1).getSize() == 2){
+                return; // Form 4
+            }
+            // stack top size is 2, next-to-top's size is 1
+            if ( stack().peek(2).getSize() != 1 ){
+                constraintViolated(o, "If stack top's size is 2 and stack-next-to-top's size is 1, then stack next-to-next-to-top's size must also be 1. But it is '"+stack().peek(2)+"' of size '"+stack().peek(2).getSize()+"'.");
+            }
+            else{
+                return; // Form 2
+            }
+        }
+        else{// stack top is of size 1
+            if (stack().peek(1).getSize() == 1){
+                if ( stack().peek(2).getSize() == 2 ){
+                    return; // Form 3
+                }
+                if ( stack().peek(3).getSize() == 1){
+                    return; // Form 1
+                }
+            }
+        }
+        constraintViolated(o, "The operand sizes on the stack do not match any of the four forms of usage of this instruction.");
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitF2D(F2D o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitF2I(F2I o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitF2L(F2L o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFADD(FADD o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.FLOAT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFALOAD(FALOAD o){
+        indexOfInt(o, stack().peek());
+        if (stack().peek(1) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(1) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-top must be of type float[] but is '"+stack().peek(1)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
+        if (t != Type.FLOAT){
+            constraintViolated(o, "Stack next-to-top must be of type float[] but is '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFASTORE(FASTORE o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+        indexOfInt(o, stack().peek(1));
+        if (stack().peek(2) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(2) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type float[] but is '"+stack().peek(2)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
+        if (t != Type.FLOAT){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type float[] but is '"+stack().peek(2)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFCMPG(FCMPG o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.FLOAT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFCMPL(FCMPL o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.FLOAT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFCONST(FCONST o){
+        // nothing to do here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFDIV(FDIV o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.FLOAT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFLOAD(FLOAD o){
+        //visitLoadInstruction(LoadInstruction) is called before.
+
+        // Nothing else needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFMUL(FMUL o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.FLOAT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFNEG(FNEG o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFREM(FREM o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.FLOAT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFRETURN(FRETURN o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFSTORE(FSTORE o){
+        //visitStoreInstruction(StoreInstruction) is called before.
+
+        // Nothing else needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitFSUB(FSUB o){
+        if (stack().peek() != Type.FLOAT){
+            constraintViolated(o, "The value at the stack top is not of type 'float', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.FLOAT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'float', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitGETFIELD(GETFIELD o){
+        try {
+        Type objectref = stack().peek();
+        if (! ( (objectref instanceof ObjectType) || (objectref == Type.NULL) ) ){
+            constraintViolated(o, "Stack top should be an object reference that's not an array reference, but is '"+objectref+"'.");
+        }
+
+        String field_name = o.getFieldName(cpg);
+
+        JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
+        Field[] fields = jc.getFields();
+        Field f = null;
+        for (Field field : fields) {
+            if (field.getName().equals(field_name)){
+                  Type f_type = Type.getType(field.getSignature());
+                  Type o_type = o.getType(cpg);
+                    /* TODO: Check if assignment compatibility is sufficient.
+                   * What does Sun do?
+                   */
+                  if (f_type.equals(o_type)){
+                        f = field;
+                        break;
+                    }
+            }
+        }
+
+        if (f == null){
+            JavaClass[] superclasses = jc.getSuperClasses();
+            outer:
+            for (JavaClass superclass : superclasses) {
+                fields = superclass.getFields();
+                for (Field field : fields) {
+                    if (field.getName().equals(field_name)) {
+                        Type f_type = Type.getType(field.getSignature());
+                        Type o_type = o.getType(cpg);
+                        if (f_type.equals(o_type)) {
+                            f = field;
+                            if ((f.getAccessFlags() & (Constants.ACC_PUBLIC | Constants.ACC_PROTECTED)) == 0) {
+                                f = null;
+                            }
+                            break outer;
+                        }
+                    }
+                }
+            }
+            if (f == null) {
+                throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
+            }
+        }
+
+        if (f.isProtected()){
+            ObjectType classtype = o.getClassType(cpg);
+            ObjectType curr = ObjectType.getInstance(mg.getClassName());
+
+            if (    classtype.equals(curr) ||
+                        curr.subclassOf(classtype)    ){
+                Type t = stack().peek();
+                if (t == Type.NULL){
+                    return;
+                }
+                if (! (t instanceof ObjectType) ){
+                    constraintViolated(o, "The 'objectref' must refer to an object that's not an array. Found instead: '"+t+"'.");
+                }
+                ObjectType objreftype = (ObjectType) t;
+                if (! ( objreftype.equals(curr) ||
+                            objreftype.subclassOf(curr) ) ){
+                    //TODO: One day move to Staerk-et-al's "Set of object types" instead of "wider" object types
+                    //      created during the verification.
+                    //      "Wider" object types don't allow us to check for things like that below.
+                    //constraintViolated(o, "The referenced field has the ACC_PROTECTED modifier, and it's a member of the current class or a superclass of the current class. However, the referenced object type '"+stack().peek()+"' is not the current class or a subclass of the current class.");
+                }
+            }
+        }
+
+        // TODO: Could go into Pass 3a.
+        if (f.isStatic()){
+            constraintViolated(o, "Referenced field '"+f+"' is static which it shouldn't be.");
+        }
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitGETSTATIC(GETSTATIC o){
+        // Field must be static: see Pass 3a.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitGOTO(GOTO o){
+        // nothing to do here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitGOTO_W(GOTO_W o){
+        // nothing to do here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitI2B(I2B o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitI2C(I2C o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitI2D(I2D o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitI2F(I2F o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitI2L(I2L o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitI2S(I2S o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIADD(IADD o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIALOAD(IALOAD o){
+        indexOfInt(o, stack().peek());
+        if (stack().peek(1) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(1) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-top must be of type int[] but is '"+stack().peek(1)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
+        if (t != Type.INT){
+            constraintViolated(o, "Stack next-to-top must be of type int[] but is '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIAND(IAND o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIASTORE(IASTORE o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        indexOfInt(o, stack().peek(1));
+        if (stack().peek(2) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(2) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type int[] but is '"+stack().peek(2)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
+        if (t != Type.INT){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type int[] but is '"+stack().peek(2)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitICONST(ICONST o){
+        //nothing to do here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIDIV(IDIV o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIF_ACMPEQ(IF_ACMPEQ o){
+        if (!(stack().peek() instanceof ReferenceType)){
+            constraintViolated(o, "The value at the stack top is not of a ReferenceType, but of type '"+stack().peek()+"'.");
+        }
+        //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
+
+        if (!(stack().peek(1) instanceof ReferenceType)){
+            constraintViolated(o, "The value at the stack next-to-top is not of a ReferenceType, but of type '"+stack().peek(1)+"'.");
+        }
+        //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek(1)) );
+
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIF_ACMPNE(IF_ACMPNE o){
+        if (!(stack().peek() instanceof ReferenceType)){
+            constraintViolated(o, "The value at the stack top is not of a ReferenceType, but of type '"+stack().peek()+"'.");
+            //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
+        }
+        if (!(stack().peek(1) instanceof ReferenceType)){
+            constraintViolated(o, "The value at the stack next-to-top is not of a ReferenceType, but of type '"+stack().peek(1)+"'.");
+            //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek(1)) );
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIF_ICMPEQ(IF_ICMPEQ o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIF_ICMPGE(IF_ICMPGE o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIF_ICMPGT(IF_ICMPGT o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIF_ICMPLE(IF_ICMPLE o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIF_ICMPLT(IF_ICMPLT o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIF_ICMPNE(IF_ICMPNE o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIFEQ(IFEQ o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIFGE(IFGE o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIFGT(IFGT o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIFLE(IFLE o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIFLT(IFLT o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIFNE(IFNE o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIFNONNULL(IFNONNULL o){
+        if (!(stack().peek() instanceof ReferenceType)){
+            constraintViolated(o, "The value at the stack top is not of a ReferenceType, but of type '"+stack().peek()+"'.");
+        }
+        referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIFNULL(IFNULL o){
+        if (!(stack().peek() instanceof ReferenceType)){
+            constraintViolated(o, "The value at the stack top is not of a ReferenceType, but of type '"+stack().peek()+"'.");
+        }
+        referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIINC(IINC o){
+        // Mhhh. In BCEL, at this time "IINC" is not a LocalVariableInstruction.
+        if (locals().maxLocals() <= (o.getType(cpg).getSize()==1? o.getIndex() : o.getIndex()+1) ){
+            constraintViolated(o, "The 'index' is not a valid index into the local variable array.");
+        }
+
+        indexOfInt(o, locals().get(o.getIndex()));
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitILOAD(ILOAD o){
+        // All done by visitLocalVariableInstruction(), visitLoadInstruction()
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIMPDEP1(IMPDEP1 o){
+        throw new AssertionViolatedException("In this JustIce verification pass there should not occur an illegal instruction such as IMPDEP1.");
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIMPDEP2(IMPDEP2 o){
+        throw new AssertionViolatedException("In this JustIce verification pass there should not occur an illegal instruction such as IMPDEP2.");
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIMUL(IMUL o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitINEG(INEG o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitINSTANCEOF(INSTANCEOF o){
+        // The objectref must be of type reference.
+        Type objectref = stack().peek(0);
+        if (!(objectref instanceof ReferenceType)){
+            constraintViolated(o, "The 'objectref' is not of a ReferenceType but of type "+objectref+".");
+        }
+        //else{
+        //    referenceTypeIsInitialized(o, (ReferenceType) objectref);
+        //}
+        // The unsigned indexbyte1 and indexbyte2 are used to construct an index into the runtime constant pool of the
+        // current class (�3.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The runtime constant
+        // pool item at the index must be a symbolic reference to a class, array, or interface type.
+        Constant c = cpg.getConstant(o.getIndex());
+        if (! (c instanceof ConstantClass)){
+            constraintViolated(o, "The Constant at 'index' is not a ConstantClass, but '"+c+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitINVOKEDYNAMIC(INVOKEDYNAMIC o){
+        throw new RuntimeException("INVOKEDYNAMIC instruction is not supported at this time");
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitINVOKEINTERFACE(INVOKEINTERFACE o){
+        // Method is not native, otherwise pass 3 would not happen.
+
+        int count = o.getCount();
+        if (count == 0){
+            constraintViolated(o, "The 'count' argument must not be 0.");
+        }
+        // It is a ConstantInterfaceMethodref, Pass 3a made it sure.
+        // TODO: Do we want to do anything with it?
+        //ConstantInterfaceMethodref cimr = (ConstantInterfaceMethodref) (cpg.getConstant(o.getIndex()));
+
+        // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
+
+        Type t = o.getType(cpg);
+        if (t instanceof ObjectType){
+            String name = ((ObjectType)t).getClassName();
+            Verifier v = VerifierFactory.getVerifier( name );
+            VerificationResult vr = v.doPass2();
+            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
+            }
+        }
+
+
+        Type[] argtypes = o.getArgumentTypes(cpg);
+        int nargs = argtypes.length;
+
+        for (int i=nargs-1; i>=0; i--){
+            Type fromStack = stack().peek( (nargs-1) - i );    // 0 to nargs-1
+            Type fromDesc = argtypes[i];
+            if (fromDesc == Type.BOOLEAN ||
+                    fromDesc == Type.BYTE ||
+                    fromDesc == Type.CHAR ||
+                    fromDesc == Type.SHORT){
+                fromDesc = Type.INT;
+            }
+            if (! fromStack.equals(fromDesc)){
+                if (fromStack instanceof ReferenceType && fromDesc instanceof ReferenceType){
+                    ReferenceType rFromStack = (ReferenceType) fromStack;
+                    //ReferenceType rFromDesc = (ReferenceType) fromDesc;
+                    // TODO: This can only be checked when using Staerk-et-al's "set of object types"
+                    // instead of a "wider cast object type" created during verification.
+                    //if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ){
+                    //    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack (which is not assignment compatible).");
+                    //}
+                    referenceTypeIsInitialized(o, rFromStack);
+                }
+                else{
+                    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack.");
+                }
+            }
+        }
+
+        Type objref = stack().peek(nargs);
+        if (objref == Type.NULL){
+            return;
+        }
+        if (! (objref instanceof ReferenceType) ){
+            constraintViolated(o, "Expecting a reference type as 'objectref' on the stack, not a '"+objref+"'.");
+        }
+        referenceTypeIsInitialized(o, (ReferenceType) objref);
+        if (!(objref instanceof ObjectType)){
+            if (!(objref instanceof ArrayType)){
+                constraintViolated(o, "Expecting an ObjectType as 'objectref' on the stack, not a '"+objref+"'."); // could be a ReturnaddressType
+            }
+            else{
+                objref = GENERIC_ARRAY;
+            }
+        }
+
+        // String objref_classname = ((ObjectType) objref).getClassName();
+        // String theInterface = o.getClassName(cpg);
+        // TODO: This can only be checked if we're using Staerk-et-al's "set of object types"
+        //       instead of "wider cast object types" generated during verification.
+        //if ( ! Repository.implementationOf(objref_classname, theInterface) ){
+        //    constraintViolated(o, "The 'objref' item '"+objref+"' does not implement '"+theInterface+"' as expected.");
+        //}
+
+        int counted_count = 1; // 1 for the objectref
+        for (int i=0; i<nargs; i++){
+            counted_count += argtypes[i].getSize();
+        }
+        if (count != counted_count){
+            constraintViolated(o, "The 'count' argument should probably read '"+counted_count+"' but is '"+count+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitINVOKESPECIAL(INVOKESPECIAL o){
+        try {
+        // Don't init an object twice.
+        if ( (o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME)) && (!(stack().peek(o.getArgumentTypes(cpg).length) instanceof UninitializedObjectType)) ){
+            constraintViolated(o, "Possibly initializing object twice. A valid instruction sequence must not have an uninitialized object on the operand stack or in a local variable during a backwards branch, or in a local variable in code protected by an exception handler. Please see The Java Virtual Machine Specification, Second Edition, 4.9.4 (pages 147 and 148) for details.");
+        }
+
+        // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
+
+        Type t = o.getType(cpg);
+        if (t instanceof ObjectType){
+            String name = ((ObjectType)t).getClassName();
+            Verifier v = VerifierFactory.getVerifier( name );
+            VerificationResult vr = v.doPass2();
+            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
+            }
+        }
+
+
+        Type[] argtypes = o.getArgumentTypes(cpg);
+        int nargs = argtypes.length;
+
+        for (int i=nargs-1; i>=0; i--){
+            Type fromStack = stack().peek( (nargs-1) - i );    // 0 to nargs-1
+            Type fromDesc = argtypes[i];
+            if (fromDesc == Type.BOOLEAN ||
+                    fromDesc == Type.BYTE ||
+                    fromDesc == Type.CHAR ||
+                    fromDesc == Type.SHORT){
+                fromDesc = Type.INT;
+            }
+            if (! fromStack.equals(fromDesc)){
+                if (fromStack instanceof ReferenceType && fromDesc instanceof ReferenceType){
+                    ReferenceType rFromStack = (ReferenceType) fromStack;
+                    ReferenceType rFromDesc = (ReferenceType) fromDesc;
+                    // TODO: This can only be checked using Staerk-et-al's "set of object types", not
+                    // using a "wider cast object type".
+                    if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ){
+                        constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack (which is not assignment compatible).");
+                    }
+                    referenceTypeIsInitialized(o, rFromStack);
+                }
+                else{
+                    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack.");
+                }
+            }
+        }
+
+        Type objref = stack().peek(nargs);
+        if (objref == Type.NULL){
+            return;
+        }
+        if (! (objref instanceof ReferenceType) ){
+            constraintViolated(o, "Expecting a reference type as 'objectref' on the stack, not a '"+objref+"'.");
+        }
+        String objref_classname = null;
+        if ( !(o.getMethodName(cpg).equals(Constants.CONSTRUCTOR_NAME))){
+            referenceTypeIsInitialized(o, (ReferenceType) objref);
+            if (!(objref instanceof ObjectType)){
+                if (!(objref instanceof ArrayType)){
+                    constraintViolated(o, "Expecting an ObjectType as 'objectref' on the stack, not a '"+objref+"'."); // could be a ReturnaddressType
+                }
+                else{
+                    objref = GENERIC_ARRAY;
+                }
+            }
+
+            objref_classname = ((ObjectType) objref).getClassName();
+        }
+        else{
+            if (!(objref instanceof UninitializedObjectType)){
+                constraintViolated(o, "Expecting an UninitializedObjectType as 'objectref' on the stack, not a '"+objref+"'. Otherwise, you couldn't invoke a method since an array has no methods (not to speak of a return address).");
+            }
+            objref_classname = ((UninitializedObjectType) objref).getInitialized().getClassName();
+        }
+
+
+        String theClass = o.getClassName(cpg);
+        if ( ! Repository.instanceOf(objref_classname, theClass) ){
+            constraintViolated(o, "The 'objref' item '"+objref+"' does not implement '"+theClass+"' as expected.");
+        }
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitINVOKESTATIC(INVOKESTATIC o){
+        try {
+        // Method is not native, otherwise pass 3 would not happen.
+
+        Type t = o.getType(cpg);
+        if (t instanceof ObjectType){
+            String name = ((ObjectType)t).getClassName();
+            Verifier v = VerifierFactory.getVerifier( name );
+            VerificationResult vr = v.doPass2();
+            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
+            }
+        }
+
+        Type[] argtypes = o.getArgumentTypes(cpg);
+        int nargs = argtypes.length;
+
+        for (int i=nargs-1; i>=0; i--){
+            Type fromStack = stack().peek( (nargs-1) - i );    // 0 to nargs-1
+            Type fromDesc = argtypes[i];
+            if (fromDesc == Type.BOOLEAN ||
+                    fromDesc == Type.BYTE ||
+                    fromDesc == Type.CHAR ||
+                    fromDesc == Type.SHORT){
+                fromDesc = Type.INT;
+            }
+            if (! fromStack.equals(fromDesc)){
+                if (fromStack instanceof ReferenceType && fromDesc instanceof ReferenceType){
+                    ReferenceType rFromStack = (ReferenceType) fromStack;
+                    ReferenceType rFromDesc = (ReferenceType) fromDesc;
+                    // TODO: This check can possibly only be done using Staerk-et-al's "set of object types"
+                    // instead of a "wider cast object type" created during verification.
+                    if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ){
+                        constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack (which is not assignment compatible).");
+                    }
+                    referenceTypeIsInitialized(o, rFromStack);
+                }
+                else{
+                    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack.");
+                }
+            }
+        }
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitINVOKEVIRTUAL(INVOKEVIRTUAL o){
+        try {
+        // the o.getClassType(cpg) type has passed pass 2; see visitLoadClass(o).
+
+        Type t = o.getType(cpg);
+        if (t instanceof ObjectType){
+            String name = ((ObjectType)t).getClassName();
+            Verifier v = VerifierFactory.getVerifier( name );
+            VerificationResult vr = v.doPass2();
+            if (vr.getStatus() != VerificationResult.VERIFIED_OK){
+                constraintViolated(o, "Class '"+name+"' is referenced, but cannot be loaded and resolved: '"+vr+"'.");
+            }
+        }
+
+
+        Type[] argtypes = o.getArgumentTypes(cpg);
+        int nargs = argtypes.length;
+
+        for (int i=nargs-1; i>=0; i--){
+            Type fromStack = stack().peek( (nargs-1) - i );    // 0 to nargs-1
+            Type fromDesc = argtypes[i];
+            if (fromDesc == Type.BOOLEAN ||
+                    fromDesc == Type.BYTE ||
+                    fromDesc == Type.CHAR ||
+                    fromDesc == Type.SHORT){
+                fromDesc = Type.INT;
+            }
+            if (! fromStack.equals(fromDesc)){
+                if (fromStack instanceof ReferenceType && fromDesc instanceof ReferenceType){
+                    ReferenceType rFromStack = (ReferenceType) fromStack;
+                    ReferenceType rFromDesc = (ReferenceType) fromDesc;
+                    // TODO: This can possibly only be checked when using Staerk-et-al's "set of object types" instead
+                    // of a single "wider cast object type" created during verification.
+                    if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ){
+                        constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack (which is not assignment compatible).");
+                    }
+                    referenceTypeIsInitialized(o, rFromStack);
+                }
+                else{
+                    constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+"' on the stack.");
+                }
+            }
+        }
+
+        Type objref = stack().peek(nargs);
+        if (objref == Type.NULL){
+            return;
+        }
+        if (! (objref instanceof ReferenceType) ){
+            constraintViolated(o, "Expecting a reference type as 'objectref' on the stack, not a '"+objref+"'.");
+        }
+        referenceTypeIsInitialized(o, (ReferenceType) objref);
+        if (!(objref instanceof ObjectType)){
+            if (!(objref instanceof ArrayType)){
+                constraintViolated(o, "Expecting an ObjectType as 'objectref' on the stack, not a '"+objref+"'."); // could be a ReturnaddressType
+            }
+            else{
+                objref = GENERIC_ARRAY;
+            }
+        }
+
+        String objref_classname = ((ObjectType) objref).getClassName();
+
+        String theClass = o.getClassName(cpg);
+
+        if ( ! Repository.instanceOf(objref_classname, theClass) ){
+            constraintViolated(o, "The 'objref' item '"+objref+"' does not implement '"+theClass+"' as expected.");
+        }
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIOR(IOR o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIREM(IREM o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIRETURN(IRETURN o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitISHL(ISHL o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitISHR(ISHR o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitISTORE(ISTORE o){
+        //visitStoreInstruction(StoreInstruction) is called before.
+
+        // Nothing else needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitISUB(ISUB o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIUSHR(IUSHR o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitIXOR(IXOR o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.INT){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'int', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitJSR(JSR o){
+        // nothing to do here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitJSR_W(JSR_W o){
+        // nothing to do here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitL2D(L2D o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitL2F(L2F o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitL2I(L2I o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLADD(LADD o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLALOAD(LALOAD o){
+        indexOfInt(o, stack().peek());
+        if (stack().peek(1) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(1) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-top must be of type long[] but is '"+stack().peek(1)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
+        if (t != Type.LONG){
+            constraintViolated(o, "Stack next-to-top must be of type long[] but is '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLAND(LAND o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLASTORE(LASTORE o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        indexOfInt(o, stack().peek(1));
+        if (stack().peek(2) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(2) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type long[] but is '"+stack().peek(2)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
+        if (t != Type.LONG){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type long[] but is '"+stack().peek(2)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLCMP(LCMP o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLCONST(LCONST o){
+        // Nothing to do here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLDC(LDC o){
+        // visitCPInstruction is called first.
+
+        Constant c = cpg.getConstant(o.getIndex());
+        if     (!    (    ( c instanceof ConstantInteger) ||
+                    ( c instanceof ConstantFloat    )    ||
+                    ( c instanceof ConstantString    )    ||
+                    ( c instanceof ConstantClass    ) )    ){
+            constraintViolated(o, "Referenced constant should be a CONSTANT_Integer, a CONSTANT_Float, a CONSTANT_String or a CONSTANT_Class, but is '"+c+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    public void visitLDC_W(LDC_W o){
+        // visitCPInstruction is called first.
+
+        Constant c = cpg.getConstant(o.getIndex());
+        if     (!    (    ( c instanceof ConstantInteger) ||
+                    ( c instanceof ConstantFloat    )    ||
+                    ( c instanceof ConstantString    )    ||
+                    ( c instanceof ConstantClass    ) )    ){
+            constraintViolated(o, "Referenced constant should be a CONSTANT_Integer, a CONSTANT_Float, a CONSTANT_String or a CONSTANT_Class, but is '"+c+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLDC2_W(LDC2_W o){
+        // visitCPInstruction is called first.
+
+        Constant c = cpg.getConstant(o.getIndex());
+        if     (!    (    ( c instanceof ConstantLong) ||
+                            ( c instanceof ConstantDouble )    )    ){
+            constraintViolated(o, "Referenced constant should be a CONSTANT_Integer, a CONSTANT_Float or a CONSTANT_String, but is '"+c+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLDIV(LDIV o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLLOAD(LLOAD o){
+        //visitLoadInstruction(LoadInstruction) is called before.
+
+        // Nothing else needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLMUL(LMUL o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLNEG(LNEG o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLOOKUPSWITCH(LOOKUPSWITCH o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        // See also pass 3a.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLOR(LOR o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLREM(LREM o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLRETURN(LRETURN o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLSHL(LSHL o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLSHR(LSHR o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLSTORE(LSTORE o){
+        //visitStoreInstruction(StoreInstruction) is called before.
+
+        // Nothing else needs to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLSUB(LSUB o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLUSHR(LUSHR o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitLXOR(LXOR o){
+        if (stack().peek() != Type.LONG){
+            constraintViolated(o, "The value at the stack top is not of type 'long', but of type '"+stack().peek()+"'.");
+        }
+        if (stack().peek(1) != Type.LONG){
+            constraintViolated(o, "The value at the stack next-to-top is not of type 'long', but of type '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitMONITORENTER(MONITORENTER o){
+        if (! ((stack().peek()) instanceof ReferenceType)){
+            constraintViolated(o, "The stack top should be of a ReferenceType, but is '"+stack().peek()+"'.");
+        }
+        //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitMONITOREXIT(MONITOREXIT o){
+        if (! ((stack().peek()) instanceof ReferenceType)){
+            constraintViolated(o, "The stack top should be of a ReferenceType, but is '"+stack().peek()+"'.");
+        }
+        //referenceTypeIsInitialized(o, (ReferenceType) (stack().peek()) );
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitMULTIANEWARRAY(MULTIANEWARRAY o){
+        int dimensions = o.getDimensions();
+        // Dimensions argument is okay: see Pass 3a.
+        for (int i=0; i<dimensions; i++){
+            if (stack().peek(i) != Type.INT){
+                constraintViolated(o, "The '"+dimensions+"' upper stack types should be 'int' but aren't.");
+            }
+        }
+        // The runtime constant pool item at that index must be a symbolic reference to a class,
+        // array, or interface type. See Pass 3a.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitNEW(NEW o){
+        //visitCPInstruction(CPInstruction) has been called before.
+        //visitLoadClass(LoadClass) has been called before.
+
+        Type t = o.getType(cpg);
+        if (! (t instanceof ReferenceType)){
+            throw new AssertionViolatedException("NEW.getType() returning a non-reference type?!");
+        }
+        if (! (t instanceof ObjectType)){
+            constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+t+"'.");
+        }
+        ObjectType obj = (ObjectType) t;
+
+        //e.g.: Don't instantiate interfaces
+        if (! obj.referencesClass()){
+            constraintViolated(o, "Expecting a class type (ObjectType) to work on. Found: '"+obj+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitNEWARRAY(NEWARRAY o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitNOP(NOP o){
+        // nothing is to be done here.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitPOP(POP o){
+        if (stack().peek().getSize() != 1){
+            constraintViolated(o, "Stack top size should be 1 but stack top is '"+stack().peek()+"' of size '"+stack().peek().getSize()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitPOP2(POP2 o){
+        if (stack().peek().getSize() != 2){
+            constraintViolated(o, "Stack top size should be 2 but stack top is '"+stack().peek()+"' of size '"+stack().peek().getSize()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitPUTFIELD(PUTFIELD o){
+        try {
+
+        Type objectref = stack().peek(1);
+        if (! ( (objectref instanceof ObjectType) || (objectref == Type.NULL) ) ){
+            constraintViolated(o, "Stack next-to-top should be an object reference that's not an array reference, but is '"+objectref+"'.");
+        }
+
+        String field_name = o.getFieldName(cpg);
+
+        JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
+        Field[] fields = jc.getFields();
+        Field f = null;
+        for (Field field : fields) {
+            if (field.getName().equals(field_name)){
+                  Type f_type = Type.getType(field.getSignature());
+                  Type o_type = o.getType(cpg);
+                    /* TODO: Check if assignment compatibility is sufficient.
+                   * What does Sun do?
+                   */
+                  if (f_type.equals(o_type)){
+                        f = field;
+                        break;
+                    }
+            }
+        }
+        if (f == null){
+            throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
+        }
+
+        Type value = stack().peek();
+        Type t = Type.getType(f.getSignature());
+        Type shouldbe = t;
+        if (shouldbe == Type.BOOLEAN ||
+                shouldbe == Type.BYTE ||
+                shouldbe == Type.CHAR ||
+                shouldbe == Type.SHORT){
+            shouldbe = Type.INT;
+        }
+        if (t instanceof ReferenceType){
+            ReferenceType rvalue = null;
+            if (value instanceof ReferenceType){
+                rvalue = (ReferenceType) value;
+                referenceTypeIsInitialized(o, rvalue);
+            }
+            else{
+                constraintViolated(o, "The stack top type '"+value+"' is not of a reference type as expected.");
+            }
+            // TODO: This can possibly only be checked using Staerk-et-al's "set-of-object types", not
+            // using "wider cast object types" created during verification.
+            // Comment it out if you encounter problems. See also the analogon at visitPUTSTATIC.
+            if (!(rvalue.isAssignmentCompatibleWith(shouldbe))){
+                constraintViolated(o, "The stack top type '"+value+"' is not assignment compatible with '"+shouldbe+"'.");
+            }
+        }
+        else{
+            if (shouldbe != value){
+                constraintViolated(o, "The stack top type '"+value+"' is not of type '"+shouldbe+"' as expected.");
+            }
+        }
+
+        if (f.isProtected()){
+            ObjectType classtype = o.getClassType(cpg);
+            ObjectType curr = ObjectType.getInstance(mg.getClassName());
+
+            if (    classtype.equals(curr) ||
+                        curr.subclassOf(classtype)    ){
+                Type tp = stack().peek(1);
+                if (tp == Type.NULL){
+                    return;
+                }
+                if (! (tp instanceof ObjectType) ){
+                    constraintViolated(o, "The 'objectref' must refer to an object that's not an array. Found instead: '"+tp+"'.");
+                }
+                ObjectType objreftype = (ObjectType) tp;
+                if (! ( objreftype.equals(curr) ||
+                            objreftype.subclassOf(curr) ) ){
+                    constraintViolated(o, "The referenced field has the ACC_PROTECTED modifier, and it's a member of the current class or a superclass of the current class. However, the referenced object type '"+stack().peek()+"' is not the current class or a subclass of the current class.");
+                }
+            }
+        }
+
+        // TODO: Could go into Pass 3a.
+        if (f.isStatic()){
+            constraintViolated(o, "Referenced field '"+f+"' is static which it shouldn't be.");
+        }
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitPUTSTATIC(PUTSTATIC o){
+        try {
+        String field_name = o.getFieldName(cpg);
+        JavaClass jc = Repository.lookupClass(o.getClassType(cpg).getClassName());
+        Field[] fields = jc.getFields();
+        Field f = null;
+        for (Field field : fields) {
+            if (field.getName().equals(field_name)){
+                    Type f_type = Type.getType(field.getSignature());
+                  Type o_type = o.getType(cpg);
+                    /* TODO: Check if assignment compatibility is sufficient.
+                   * What does Sun do?
+                   */
+                  if (f_type.equals(o_type)){
+                        f = field;
+                        break;
+                    }
+            }
+        }
+        if (f == null){
+            throw new AssertionViolatedException("Field '" + field_name + "' not found in " + jc.getClassName());
+        }
+        Type value = stack().peek();
+        Type t = Type.getType(f.getSignature());
+        Type shouldbe = t;
+        if (shouldbe == Type.BOOLEAN ||
+                shouldbe == Type.BYTE ||
+                shouldbe == Type.CHAR ||
+                shouldbe == Type.SHORT){
+            shouldbe = Type.INT;
+        }
+        if (t instanceof ReferenceType){
+            ReferenceType rvalue = null;
+            if (value instanceof ReferenceType){
+                rvalue = (ReferenceType) value;
+                referenceTypeIsInitialized(o, rvalue);
+            }
+            else{
+                constraintViolated(o, "The stack top type '"+value+"' is not of a reference type as expected.");
+            }
+            // TODO: This can possibly only be checked using Staerk-et-al's "set-of-object types", not
+            // using "wider cast object types" created during verification.
+            // Comment it out if you encounter problems. See also the analogon at visitPUTFIELD.
+            if (!(rvalue.isAssignmentCompatibleWith(shouldbe))){
+                constraintViolated(o, "The stack top type '"+value+"' is not assignment compatible with '"+shouldbe+"'.");
+            }
+        }
+        else{
+            if (shouldbe != value){
+                constraintViolated(o, "The stack top type '"+value+"' is not of type '"+shouldbe+"' as expected.");
+            }
+        }
+        // TODO: Interface fields may be assigned to only once. (Hard to implement in
+        //       JustIce's execution model). This may only happen in <clinit>, see Pass 3a.
+
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitRET(RET o){
+        if (! (locals().get(o.getIndex()) instanceof ReturnaddressType)){
+            constraintViolated(o, "Expecting a ReturnaddressType in local variable "+o.getIndex()+".");
+        }
+        if (locals().get(o.getIndex()) == ReturnaddressType.NO_TARGET){
+            throw new AssertionViolatedException("Oops: RET expecting a target!");
+        }
+        // Other constraints such as non-allowed overlapping subroutines are enforced
+        // while building the Subroutines data structure.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitRETURN(RETURN o){
+        if (mg.getName().equals(Constants.CONSTRUCTOR_NAME)){// If we leave an <init> method
+            if ((Frame._this != null) && (!(mg.getClassName().equals(Type.OBJECT.getClassName()))) ) {
+                constraintViolated(o, "Leaving a constructor that itself did not call a constructor.");
+            }
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitSALOAD(SALOAD o){
+        indexOfInt(o, stack().peek());
+        if (stack().peek(1) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(1) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-top must be of type short[] but is '"+stack().peek(1)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(1))).getBasicType();
+        if (t != Type.SHORT){
+            constraintViolated(o, "Stack next-to-top must be of type short[] but is '"+stack().peek(1)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitSASTORE(SASTORE o){
+        if (stack().peek() != Type.INT){
+            constraintViolated(o, "The value at the stack top is not of type 'int', but of type '"+stack().peek()+"'.");
+        }
+        indexOfInt(o, stack().peek(1));
+        if (stack().peek(2) == Type.NULL){
+            return;
+        }
+        if (! (stack().peek(2) instanceof ArrayType)){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type short[] but is '"+stack().peek(2)+"'.");
+        }
+        Type t = ((ArrayType) (stack().peek(2))).getBasicType();
+        if (t != Type.SHORT){
+            constraintViolated(o, "Stack next-to-next-to-top must be of type short[] but is '"+stack().peek(2)+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitSIPUSH(SIPUSH o){
+        // nothing to do here. Generic visitXXX() methods did the trick before.
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitSWAP(SWAP o){
+        if (stack().peek().getSize() != 1){
+            constraintViolated(o, "The value at the stack top is not of size '1', but of size '"+stack().peek().getSize()+"'.");
+        }
+        if (stack().peek(1).getSize() != 1){
+            constraintViolated(o, "The value at the stack next-to-top is not of size '1', but of size '"+stack().peek(1).getSize()+"'.");
+        }
+    }
+
+    /**
+     * Ensures the specific preconditions of the said instruction.
+     */
+    @Override
+    public void visitTABLESWITCH(TABLESWITCH o){
+        indexOfInt(o, stack().peek());
+        // See Pass 3a.
+    }
+
+}
+
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/InstructionContext.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/InstructionContext.java
new file mode 100644
index 0000000..a43671d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/InstructionContext.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import java.util.ArrayList;
+
+import org.apache.commons.bcel6.generic.InstructionHandle;
+
+/**
+ * An InstructionContext offers convenient access
+ * to information like control flow successors and
+ * such.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public interface InstructionContext{
+
+    /**
+     * The getTag and setTag methods may be used for
+     * temporary flagging, such as graph colouring.
+     * Nothing in the InstructionContext object depends
+     * on the value of the tag. JustIce does not use it.
+     * 
+     * @see #setTag(int tag)
+     */
+    int getTag();
+
+    /**
+     * The getTag and setTag methods may be used for
+     * temporary flagging, such as graph colouring.
+     * Nothing in the InstructionContext object depends
+     * on the value of the tag. JustIce does not use it.
+     * 
+     * @see #getTag()
+     */
+    void setTag(int tag);
+
+    /**
+     * This method symbolically executes the Instruction
+     * held in the InstructionContext.
+     * It "merges in" the incoming execution frame situation
+     * (see The Java Virtual Machine Specification, 2nd
+     * edition, page 146).
+     * By so doing, the outgoing execution frame situation
+     * is calculated.
+     *
+     * This method is JustIce-specific and is usually of
+     * no sense for users of the ControlFlowGraph class.
+     * They should use getInstruction().accept(Visitor),
+     * possibly in conjunction with the ExecutionVisitor.
+     * 
+     *
+     * @see ControlFlowGraph
+     * @see ExecutionVisitor
+     * @see #getOutFrame(ArrayList)
+     * @return true -  if and only if the "outgoing" frame situation
+     * changed from the one before execute()ing.
+     */
+    boolean execute(Frame inFrame, ArrayList<InstructionContext> executionPredecessors, InstConstraintVisitor icv, ExecutionVisitor ev);
+
+    Frame getInFrame();
+
+    /**
+     * This method returns the outgoing execution frame situation;
+     * therefore <B>it has to be calculated by execute(Frame, ArrayList)
+     * first.</B>
+     *
+     * @see #execute(Frame, ArrayList, InstConstraintVisitor, ExecutionVisitor)
+     */
+    Frame getOutFrame(ArrayList<InstructionContext> executionPredecessors);
+
+    /**
+     * Returns the InstructionHandle this InstructionContext is wrapped around.
+     *
+     * @return The InstructionHandle this InstructionContext is wrapped around.
+     */
+    InstructionHandle getInstruction();
+
+    /**
+     * Returns the usual control flow successors.
+     * @see #getExceptionHandlers()
+     */
+    InstructionContext[] getSuccessors();
+
+    /**
+     * Returns the exception handlers that protect this instruction.
+     * They are special control flow successors.
+     */
+    ExceptionHandler[] getExceptionHandlers();
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/LocalVariables.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/LocalVariables.java
new file mode 100644
index 0000000..cc2f159
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/LocalVariables.java
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import org.apache.commons.bcel6.generic.ReferenceType;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException;
+
+/**
+ * This class implements an array of local variables used for symbolic JVM
+ * simulation.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class LocalVariables{
+    /** The Type[] containing the local variable slots. */
+    private final Type[] locals;
+
+    /**
+     * Creates a new LocalVariables object.
+     */
+    public LocalVariables(int maxLocals){
+        locals = new Type[maxLocals];
+        for (int i=0; i<maxLocals; i++){
+            locals[i] = Type.UNKNOWN;
+        }
+    }
+
+    /**
+     * Returns a deep copy of this object; i.e. the clone
+     * operates on a new local variable array.
+     * However, the Type objects in the array are shared.
+     */
+    @Override
+    protected Object clone(){
+        LocalVariables lvs = new LocalVariables(locals.length);
+        for (int i=0; i<locals.length; i++){
+            lvs.locals[i] = this.locals[i];
+        }
+        return lvs;
+    }
+
+    /**
+     * Returns the type of the local variable slot i.
+     */
+    public Type get(int i){
+        return locals[i];
+    }
+
+    /**
+     * Returns a (correctly typed) clone of this object.
+     * This is equivalent to ((LocalVariables) this.clone()).
+     */
+    public LocalVariables getClone(){
+        return (LocalVariables) this.clone();
+    }
+
+    /**
+     * Returns the number of local variable slots this
+     * LocalVariables instance has.
+     */
+    public int maxLocals(){
+        return locals.length;
+    }
+
+    /**
+     * Sets a new Type for the given local variable slot.
+     */
+    public void set(int i, Type type){
+        if (type == Type.BYTE || type == Type.SHORT || type == Type.BOOLEAN || type == Type.CHAR){
+            throw new AssertionViolatedException("LocalVariables do not know about '"+type+"'. Use Type.INT instead.");
+        }
+        locals[i] = type;
+    }
+
+    /** @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() { return locals.length; }
+
+    /*
+     * Fulfills the general contract of Object.equals().
+     */
+    @Override
+    public boolean equals(Object o){
+        if (!(o instanceof LocalVariables)) {
+            return false;
+        }
+        LocalVariables lv = (LocalVariables) o;
+        if (this.locals.length != lv.locals.length) {
+            return false;
+        }
+        for (int i=0; i<this.locals.length; i++){
+            if (!this.locals[i].equals(lv.locals[i])){
+                //System.out.println(this.locals[i]+" is not "+lv.locals[i]);
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Merges two local variables sets as described in the Java Virtual Machine Specification,
+     * Second Edition, section 4.9.2, page 146.
+     */
+    public void merge(LocalVariables lv){
+
+        if (this.locals.length != lv.locals.length){
+            throw new AssertionViolatedException("Merging LocalVariables of different size?!? From different methods or what?!?");
+        }
+
+        for (int i=0; i<locals.length; i++){
+            merge(lv, i);
+        }
+    }
+
+    /**
+     * Merges a single local variable.
+     *
+     * @see #merge(LocalVariables)
+     */
+    private void merge(LocalVariables lv, int i){
+        try {
+
+        // We won't accept an unitialized object if we know it was initialized;
+        // compare vmspec2, 4.9.4, last paragraph.
+        if ( (!(locals[i] instanceof UninitializedObjectType)) && (lv.locals[i] instanceof UninitializedObjectType) ){
+            throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object in the local variables detected.");
+        }
+        // Even harder, what about _different_ uninitialized object types?!
+        if ( (!(locals[i].equals(lv.locals[i]))) && (locals[i] instanceof UninitializedObjectType) && (lv.locals[i] instanceof UninitializedObjectType) ){
+            throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object in the local variables detected.");
+        }
+        // If we just didn't know that it was initialized, we have now learned.
+        if (locals[i] instanceof UninitializedObjectType){
+            if (! (lv.locals[i] instanceof UninitializedObjectType)){
+                locals[i] = ((UninitializedObjectType) locals[i]).getInitialized();
+            }
+        }
+        if ((locals[i] instanceof ReferenceType) && (lv.locals[i] instanceof ReferenceType)){
+            if (! locals[i].equals(lv.locals[i])){ // needed in case of two UninitializedObjectType instances
+                Type sup = ((ReferenceType) locals[i]).getFirstCommonSuperclass((ReferenceType) (lv.locals[i]));
+
+                if (sup != null){
+                    locals[i] = sup;
+                }
+                else{
+                    // We should have checked this in Pass2!
+                    throw new AssertionViolatedException("Could not load all the super classes of '"+locals[i]+"' and '"+lv.locals[i]+"'.");
+                }
+            }
+        }
+        else{
+            if (! (locals[i].equals(lv.locals[i])) ){
+/*TODO
+                if ((locals[i] instanceof org.apache.commons.bcel6.generic.ReturnaddressType) && (lv.locals[i] instanceof org.apache.commons.bcel6.generic.ReturnaddressType)){
+                    //System.err.println("merging "+locals[i]+" and "+lv.locals[i]);
+                    throw new AssertionViolatedException("Merging different ReturnAddresses: '"+locals[i]+"' and '"+lv.locals[i]+"'.");
+                }
+*/
+                locals[i] = Type.UNKNOWN;
+            }
+        }
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Returns a String representation of this object.
+     */
+    @Override
+    public String toString(){
+        StringBuilder sb = new StringBuilder();
+        for (int i=0; i<locals.length; i++){
+            sb.append(Integer.toString(i));
+            sb.append(": ");
+            sb.append(locals[i]);
+            sb.append("\n");
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Replaces all occurences of u in this local variables set
+     * with an "initialized" ObjectType.
+     */
+    public void initializeObject(UninitializedObjectType u){
+        for (int i=0; i<locals.length; i++){
+            if (locals[i] == u){
+                locals[i] = u.getInitialized();
+            }
+        }
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java
new file mode 100644
index 0000000..8f3ee21
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/OperandStack.java
@@ -0,0 +1,269 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import java.util.ArrayList;
+
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.ReferenceType;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException;
+
+/**
+ * This class implements a stack used for symbolic JVM stack simulation.
+ * [It's used an an operand stack substitute.]
+ * Elements of this stack are org.apache.commons.bcel6.generic.Type objects.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class OperandStack{
+
+    /** We hold the stack information here. */
+    private ArrayList<Type> stack = new ArrayList<Type>();
+
+    /** The maximum number of stack slots this OperandStack instance may hold. */
+    private final int maxStack;
+
+    /**
+     * Creates an empty stack with a maximum of maxStack slots.
+     */
+    public OperandStack(int maxStack){
+        this.maxStack = maxStack;
+    }
+
+    /**
+     * Creates an otherwise empty stack with a maximum of maxStack slots and
+     * the ObjectType 'obj' at the top.
+     */
+    public OperandStack(int maxStack, ObjectType obj){
+        this.maxStack = maxStack;
+        this.push(obj);
+    }    
+    /**
+     * Returns a deep copy of this object; that means, the clone operates
+     * on a new stack. However, the Type objects on the stack are
+     * shared.
+     */
+    @Override
+    protected Object clone(){
+        OperandStack newstack = new OperandStack(this.maxStack);
+        newstack.stack = (ArrayList<Type>) this.stack.clone();
+        return newstack;
+    }
+
+    /**
+     * Clears the stack.
+     */
+    public void clear(){
+        stack = new ArrayList<Type>();
+    }
+
+    /** @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() { return stack.hashCode(); }
+
+    /**
+     * Returns true if and only if this OperandStack
+     * equals another, meaning equal lengths and equal
+     * objects on the stacks.
+     */
+    @Override
+    public boolean equals(Object o){
+        if (!(o instanceof OperandStack)) {
+            return false;
+        }
+        OperandStack s = (OperandStack) o;
+        return this.stack.equals(s.stack);
+    }
+
+    /**
+     * Returns a (typed!) clone of this.
+     *
+     * @see #clone()
+     */
+    public OperandStack getClone(){
+        return (OperandStack) this.clone();
+    }
+
+    /**
+     * Returns true IFF this OperandStack is empty.
+   */
+    public boolean isEmpty(){
+        return stack.isEmpty();
+    }
+
+    /**
+     * Returns the number of stack slots this stack can hold.
+     */
+    public int maxStack(){
+        return this.maxStack;
+    }
+
+    /**
+     * Returns the element on top of the stack. The element is not popped off the stack!
+     */
+    public Type peek(){
+        return peek(0);
+    }
+
+    /**
+   * Returns the element that's i elements below the top element; that means,
+   * iff i==0 the top element is returned. The element is not popped off the stack!
+   */
+    public Type peek(int i){
+        return stack.get(size()-i-1);
+    }
+
+    /**
+     * Returns the element on top of the stack. The element is popped off the stack.
+     */
+    public Type pop(){
+        Type e = stack.remove(size()-1);
+        return e;
+    }
+
+    /**
+     * Pops i elements off the stack. ALWAYS RETURNS "null"!!!
+     */
+    public Type pop(int i){
+        for (int j=0; j<i; j++){
+            pop();
+        }
+        return null;
+    }
+
+    /**
+     * Pushes a Type object onto the stack.
+     */
+    public void push(Type type){
+        if (type == null) {
+            throw new AssertionViolatedException("Cannot push NULL onto OperandStack.");
+        }
+        if (type == Type.BOOLEAN || type == Type.CHAR || type == Type.BYTE || type == Type.SHORT){
+            throw new AssertionViolatedException("The OperandStack does not know about '"+type+"'; use Type.INT instead.");
+        }
+        if (slotsUsed() >= maxStack){
+            throw new AssertionViolatedException("OperandStack too small, should have thrown proper Exception elsewhere. Stack: "+this);
+        }
+        stack.add(type);
+    }
+
+    /**
+     * Returns the size of this OperandStack; that means, how many Type objects there are.
+     */
+    public int size(){
+        return stack.size();
+    }
+
+    /**
+     * Returns the number of stack slots used.
+     * @see #maxStack()
+     */    
+    public int slotsUsed(){
+        /*  XXX change this to a better implementation using a variable
+            that keeps track of the actual slotsUsed()-value monitoring
+            all push()es and pop()s.
+        */
+        int slots = 0;
+        for (int i=0; i<stack.size(); i++){
+            slots += peek(i).getSize();
+        }
+        return slots;
+    }
+
+    /**
+     * Returns a String representation of this OperandStack instance.
+     */
+    @Override
+    public String toString(){
+        StringBuilder sb = new StringBuilder();
+        sb.append("Slots used: ");
+        sb.append(slotsUsed());
+        sb.append(" MaxStack: ");
+        sb.append(maxStack);
+        sb.append(".\n");
+        for (int i=0; i<size(); i++){
+            sb.append(peek(i));
+            sb.append(" (Size: ");
+            sb.append(String.valueOf(peek(i).getSize()));
+            sb.append(")\n");
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Merges another stack state into this instance's stack state.
+     * See the Java Virtual Machine Specification, Second Edition, page 146: 4.9.2
+     * for details.
+     */
+    public void merge(OperandStack s){
+        try {
+        if ( (slotsUsed() != s.slotsUsed()) || (size() != s.size()) ) {
+            throw new StructuralCodeConstraintException("Cannot merge stacks of different size:\nOperandStack A:\n"+this+"\nOperandStack B:\n"+s);
+        }
+
+        for (int i=0; i<size(); i++){
+            // If the object _was_ initialized and we're supposed to merge
+            // in some uninitialized object, we reject the code (see vmspec2, 4.9.4, last paragraph).
+            if ( (! (stack.get(i) instanceof UninitializedObjectType)) && (s.stack.get(i) instanceof UninitializedObjectType) ){
+                throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object on the stack detected.");
+            }
+            // Even harder, we're not initialized but are supposed to broaden
+            // the known object type
+            if ( (!(stack.get(i).equals(s.stack.get(i)))) && (stack.get(i) instanceof UninitializedObjectType) && (!(s.stack.get(i) instanceof UninitializedObjectType))){
+                throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object on the stack detected.");
+            }
+            // on the other hand...
+            if (stack.get(i) instanceof UninitializedObjectType){ //if we have an uninitialized object here
+                if (! (s.stack.get(i) instanceof UninitializedObjectType)){ //that has been initialized by now
+                    stack.set(i, ((UninitializedObjectType) (stack.get(i))).getInitialized() ); //note that.
+                }
+            }
+            if (! stack.get(i).equals(s.stack.get(i))){
+                if (    (stack.get(i) instanceof ReferenceType) &&
+                            (s.stack.get(i) instanceof ReferenceType)  ){
+                    stack.set(i, ((ReferenceType) stack.get(i)).getFirstCommonSuperclass((ReferenceType) (s.stack.get(i))));
+                }
+                else{
+                    throw new StructuralCodeConstraintException("Cannot merge stacks of different types:\nStack A:\n"+this+"\nStack B:\n"+s);
+                }
+            }
+        }
+        } catch (ClassNotFoundException e) {
+        // FIXME: maybe not the best way to handle this
+        throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+    }
+
+    /**
+     * Replaces all occurences of u in this OperandStack instance
+     * with an "initialized" ObjectType.
+     */
+    public void initializeObject(UninitializedObjectType u){
+        for (int i=0; i<stack.size(); i++){
+            if (stack.get(i) == u){
+                stack.set(i, u.getInitialized());
+            }
+        }
+    }
+
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/Pass3bVerifier.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/Pass3bVerifier.java
new file mode 100644
index 0000000..2ba9f7d
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/Pass3bVerifier.java
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import java.util.Vector;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.JsrInstruction;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.RET;
+import org.apache.commons.bcel6.generic.ReferenceType;
+import org.apache.commons.bcel6.generic.ReturnInstruction;
+import org.apache.commons.bcel6.generic.ReturnaddressType;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.verifier.PassVerifier;
+import org.apache.commons.bcel6.verifier.VerificationResult;
+import org.apache.commons.bcel6.verifier.Verifier;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException;
+import org.apache.commons.bcel6.verifier.exc.VerifierConstraintViolatedException;
+
+/**
+ * This PassVerifier verifies a method of class file according to pass 3,
+ * so-called structural verification as described in The Java Virtual Machine
+ * Specification, 2nd edition.
+ * More detailed information is to be found at the do_verify() method's
+ * documentation.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ * @see #do_verify()
+ */
+
+public final class Pass3bVerifier extends PassVerifier{
+    /* TODO:    Throughout pass 3b, upper halves of LONG and DOUBLE
+                        are represented by Type.UNKNOWN. This should be changed
+                        in favour of LONG_Upper and DOUBLE_Upper as in pass 2. */
+
+    /**
+     * An InstructionContextQueue is a utility class that holds
+     * (InstructionContext, ArrayList) pairs in a Queue data structure.
+     * This is used to hold information about InstructionContext objects
+     * externally --- i.e. that information is not saved inside the
+     * InstructionContext object itself. This is useful to save the
+     * execution path of the symbolic execution of the
+     * Pass3bVerifier - this is not information
+     * that belongs into the InstructionContext object itself.
+     * Only at "execute()"ing
+     * time, an InstructionContext object will get the current information
+     * we have about its symbolic execution predecessors.
+     */
+    private static final class InstructionContextQueue{
+        private final List<InstructionContext> ics = new Vector<InstructionContext>();
+        private final List<ArrayList<InstructionContext>> ecs = new Vector<ArrayList<InstructionContext>>();
+        public void add(InstructionContext ic, ArrayList<InstructionContext> executionChain){
+            ics.add(ic);
+            ecs.add(executionChain);
+        }
+        public boolean isEmpty(){
+            return ics.isEmpty();
+        }
+        public void remove(int i){
+            ics.remove(i);
+            ecs.remove(i);
+        }
+        public InstructionContext getIC(int i){
+            return ics.get(i);
+        }
+        public ArrayList<InstructionContext> getEC(int i){
+            return ecs.get(i);
+        }
+        public int size(){
+            return ics.size();
+        }
+    } // end Inner Class InstructionContextQueue
+
+    /** In DEBUG mode, the verification algorithm is not randomized. */
+    private static final boolean DEBUG = true;
+
+    /** The Verifier that created this. */
+    private final Verifier myOwner;
+
+    /** The method number to verify. */
+    private final int method_no;
+
+    /**
+     * This class should only be instantiated by a Verifier.
+     *
+     * @see org.apache.commons.bcel6.verifier.Verifier
+     */
+    public Pass3bVerifier(Verifier owner, int method_no){
+        myOwner = owner;
+        this.method_no = method_no;
+    }
+
+    /**
+     * Whenever the outgoing frame
+     * situation of an InstructionContext changes, all its successors are
+     * put [back] into the queue [as if they were unvisited].
+   * The proof of termination is about the existence of a
+   * fix point of frame merging.
+     */
+    private void circulationPump(MethodGen m,ControlFlowGraph cfg, InstructionContext start, Frame vanillaFrame, InstConstraintVisitor icv, ExecutionVisitor ev){
+        final Random random = new Random();
+        InstructionContextQueue icq = new InstructionContextQueue();
+
+        start.execute(vanillaFrame, new ArrayList<InstructionContext>(), icv, ev);    // new ArrayList() <=>    no Instruction was executed before
+                                                                                                    //                                    => Top-Level routine (no jsr call before)
+        icq.add(start, new ArrayList<InstructionContext>());
+
+        // LOOP!
+        while (!icq.isEmpty()){
+            InstructionContext u;
+            ArrayList<InstructionContext> ec;
+            if (!DEBUG){
+                int r = random.nextInt(icq.size());
+                u = icq.getIC(r);
+                ec = icq.getEC(r);
+                icq.remove(r);
+            }
+            else{
+                u  = icq.getIC(0);
+                ec = icq.getEC(0);
+                icq.remove(0);
+            }
+
+            @SuppressWarnings("unchecked") // ec is of type ArrayList<InstructionContext>
+            ArrayList<InstructionContext> oldchain = (ArrayList<InstructionContext>) (ec.clone());
+            @SuppressWarnings("unchecked") // ec is of type ArrayList<InstructionContext>
+            ArrayList<InstructionContext> newchain = (ArrayList<InstructionContext>) (ec.clone());
+            newchain.add(u);
+
+            if ((u.getInstruction().getInstruction()) instanceof RET){
+//System.err.println(u);
+                // We can only follow _one_ successor, the one after the
+                // JSR that was recently executed.
+                RET ret = (RET) (u.getInstruction().getInstruction());
+                ReturnaddressType t = (ReturnaddressType) u.getOutFrame(oldchain).getLocals().get(ret.getIndex());
+                InstructionContext theSuccessor = cfg.contextOf(t.getTarget());
+
+                // Sanity check
+                InstructionContext lastJSR = null;
+                int skip_jsr = 0;
+                for (int ss=oldchain.size()-1; ss >= 0; ss--){
+                    if (skip_jsr < 0){
+                        throw new AssertionViolatedException("More RET than JSR in execution chain?!");
+                    }
+//System.err.println("+"+oldchain.get(ss));
+                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof JsrInstruction){
+                        if (skip_jsr == 0){
+                            lastJSR = oldchain.get(ss);
+                            break;
+                        }
+                        skip_jsr--;
+                    }
+                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof RET){
+                        skip_jsr++;
+                    }
+                }
+                if (lastJSR == null){
+                    throw new AssertionViolatedException("RET without a JSR before in ExecutionChain?! EC: '"+oldchain+"'.");
+                }
+                JsrInstruction jsr = (JsrInstruction) (lastJSR.getInstruction().getInstruction());
+                if ( theSuccessor != (cfg.contextOf(jsr.physicalSuccessor())) ){
+                    throw new AssertionViolatedException("RET '"+u.getInstruction()+"' info inconsistent: jump back to '"+theSuccessor+"' or '"+cfg.contextOf(jsr.physicalSuccessor())+"'?");
+                }
+
+                if (theSuccessor.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
+                    @SuppressWarnings("unchecked") // newchain is already of type ArrayList<InstructionContext>
+                    ArrayList<InstructionContext> newchainClone = (ArrayList<InstructionContext>) newchain.clone();
+                    icq.add(theSuccessor, newchainClone);
+                }
+            }
+            else{// "not a ret"
+
+                // Normal successors. Add them to the queue of successors.
+                InstructionContext[] succs = u.getSuccessors();
+                for (InstructionContext v : succs) {
+                    if (v.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
+                        @SuppressWarnings("unchecked") // newchain is already of type ArrayList<InstructionContext>
+                        ArrayList<InstructionContext> newchainClone = (ArrayList<InstructionContext>) newchain.clone();
+                        icq.add(v, newchainClone);
+                    }
+                }
+            }// end "not a ret"
+
+            // Exception Handlers. Add them to the queue of successors.
+            // [subroutines are never protected; mandated by JustIce]
+            ExceptionHandler[] exc_hds = u.getExceptionHandlers();
+            for (ExceptionHandler exc_hd : exc_hds) {
+                InstructionContext v = cfg.contextOf(exc_hd.getHandlerStart());
+                // TODO: the "oldchain" and "newchain" is used to determine the subroutine
+                // we're in (by searching for the last JSR) by the InstructionContext
+                // implementation. Therefore, we should not use this chain mechanism
+                // when dealing with exception handlers.
+                // Example: a JSR with an exception handler as its successor does not
+                // mean we're in a subroutine if we go to the exception handler.
+                // We should address this problem later; by now we simply "cut" the chain
+                // by using an empty chain for the exception handlers.
+                //if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(), new OperandStack (u.getOutFrame().getStack().maxStack(), (exc_hds[s].getExceptionType()==null? Type.THROWABLE : exc_hds[s].getExceptionType())) ), newchain), icv, ev){
+                    //icq.add(v, (ArrayList) newchain.clone());
+                if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(), new OperandStack (u.getOutFrame(oldchain).getStack().maxStack(), (exc_hd.getExceptionType()==null? Type.THROWABLE : exc_hd.getExceptionType())) ), new ArrayList<InstructionContext>(), icv, ev)){
+                    icq.add(v, new ArrayList<InstructionContext>());
+                }
+            }
+
+        }// while (!icq.isEmpty()) END
+
+        InstructionHandle ih = start.getInstruction();
+        do{
+            if ((ih.getInstruction() instanceof ReturnInstruction) && (!(cfg.isDead(ih)))) {
+                InstructionContext ic = cfg.contextOf(ih);
+                Frame f = ic.getOutFrame(new ArrayList<InstructionContext>()); // TODO: This is buggy, we check only the top-level return instructions this way. Maybe some maniac returns from a method when in a subroutine?
+                LocalVariables lvs = f.getLocals();
+                for (int i=0; i<lvs.maxLocals(); i++){
+                    if (lvs.get(i) instanceof UninitializedObjectType){
+                        this.addMessage("Warning: ReturnInstruction '"+ic+"' may leave method with an uninitialized object in the local variables array '"+lvs+"'.");
+                    }
+                }
+                OperandStack os = f.getStack();
+                for (int i=0; i<os.size(); i++){
+                    if (os.peek(i) instanceof UninitializedObjectType){
+                        this.addMessage("Warning: ReturnInstruction '"+ic+"' may leave method with an uninitialized object on the operand stack '"+os+"'.");
+                    }
+                }
+                //see JVM $4.8.2
+                Type returnedType = null;
+                OperandStack inStack = ic.getInFrame().getStack();
+                if (inStack.size() >= 1) {
+                    returnedType = inStack.peek();
+                } else {
+                    returnedType = Type.VOID;
+                }
+
+                if (returnedType != null) {
+                    if (returnedType instanceof ReferenceType) {
+                        try {
+                            if (!((ReferenceType) returnedType).isCastableTo(m.getReturnType())) {
+                                invalidReturnTypeError(returnedType, m);
+                            }
+                        } catch (ClassNotFoundException e) {
+                            // Don't know what do do now, so raise RuntimeException
+                            throw new RuntimeException(e);
+                        }
+                    } else if (!returnedType.equals(m.getReturnType().normalizeForStackOrLocal())) {
+                        invalidReturnTypeError(returnedType, m);
+                    }
+                }
+            }
+        } while ((ih = ih.getNext()) != null);
+
+     }
+
+    /**
+     * Throws an exception indicating the returned type is not compatible with the return type of the given method
+     * @throws StructuralCodeConstraintException always
+     */
+    public void invalidReturnTypeError(Type returnedType, MethodGen m){
+        throw new StructuralCodeConstraintException("Returned type "+returnedType+" does not match Method's return type "+m.getReturnType());
+    }
+
+    /**
+     * Pass 3b implements the data flow analysis as described in the Java Virtual
+     * Machine Specification, Second Edition.
+      * Later versions will use LocalVariablesInfo objects to verify if the
+      * verifier-inferred types and the class file's debug information (LocalVariables
+      * attributes) match [TODO].
+      *
+      * @see org.apache.commons.bcel6.verifier.statics.LocalVariablesInfo
+      * @see org.apache.commons.bcel6.verifier.statics.Pass2Verifier#getLocalVariablesInfo(int)
+      */
+    @Override
+    public VerificationResult do_verify(){
+        if (! myOwner.doPass3a(method_no).equals(VerificationResult.VR_OK)){
+            return VerificationResult.VR_NOTYET;
+        }
+
+        // Pass 3a ran before, so it's safe to assume the JavaClass object is
+        // in the BCEL repository.
+        JavaClass jc;
+        try {
+            jc = Repository.lookupClass(myOwner.getClassName());
+        } catch (ClassNotFoundException e) {
+            // FIXME: maybe not the best way to handle this
+            throw new AssertionViolatedException("Missing class: " + e, e);
+        }
+
+        ConstantPoolGen constantPoolGen = new ConstantPoolGen(jc.getConstantPool());
+        // Init Visitors
+        InstConstraintVisitor icv = new InstConstraintVisitor();
+        icv.setConstantPoolGen(constantPoolGen);
+
+        ExecutionVisitor ev = new ExecutionVisitor();
+        ev.setConstantPoolGen(constantPoolGen);
+
+        Method[] methods = jc.getMethods(); // Method no "method_no" exists, we ran Pass3a before on it!
+
+        try{
+
+            MethodGen mg = new MethodGen(methods[method_no], myOwner.getClassName(), constantPoolGen);
+
+            icv.setMethodGen(mg);
+
+            ////////////// DFA BEGINS HERE ////////////////
+            if (! (mg.isAbstract() || mg.isNative()) ){ // IF mg HAS CODE (See pass 2)
+
+                ControlFlowGraph cfg = new ControlFlowGraph(mg);
+
+                // Build the initial frame situation for this method.
+                Frame f = new Frame(mg.getMaxLocals(),mg.getMaxStack());
+                if ( !mg.isStatic() ){
+                    if (mg.getName().equals(Constants.CONSTRUCTOR_NAME)){
+                        Frame._this = new UninitializedObjectType(ObjectType.getInstance(jc.getClassName()));
+                        f.getLocals().set(0, Frame._this);
+                    }
+                    else{
+                        Frame._this = null;
+                        f.getLocals().set(0, ObjectType.getInstance(jc.getClassName()));
+                    }
+                }
+                Type[] argtypes = mg.getArgumentTypes();
+                int twoslotoffset = 0;
+                for (int j=0; j<argtypes.length; j++){
+                    if (argtypes[j] == Type.SHORT || argtypes[j] == Type.BYTE || argtypes[j] == Type.CHAR || argtypes[j] == Type.BOOLEAN){
+                        argtypes[j] = Type.INT;
+                    }
+                    f.getLocals().set(twoslotoffset + j + (mg.isStatic()?0:1), argtypes[j]);
+                    if (argtypes[j].getSize() == 2){
+                        twoslotoffset++;
+                        f.getLocals().set(twoslotoffset + j + (mg.isStatic()?0:1), Type.UNKNOWN);
+                    }
+                }
+                circulationPump(mg,cfg, cfg.contextOf(mg.getInstructionList().getStart()), f, icv, ev);
+            }
+        }
+        catch (VerifierConstraintViolatedException ce){
+            ce.extendMessage("Constraint violated in method '"+methods[method_no]+"':\n","");
+            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, ce.getMessage());
+        }
+        catch (RuntimeException re){
+            // These are internal errors
+
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            re.printStackTrace(pw);
+
+            throw new AssertionViolatedException("Some RuntimeException occured while verify()ing class '"+jc.getClassName()+"', method '"+methods[method_no]+"'. Original RuntimeException's stack trace:\n---\n"+sw+"---\n", re);
+        }
+        return VerificationResult.VR_OK;
+    }
+
+    /** Returns the method number as supplied when instantiating. */
+    public int getMethodNo(){
+        return method_no;
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/Subroutine.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/Subroutine.java
new file mode 100644
index 0000000..7f1f27c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/Subroutine.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import org.apache.commons.bcel6.generic.InstructionHandle;
+
+/**
+ * This interface defines properties of JVM bytecode subroutines.
+ * Note that it is 'abused' to maintain the top-level code in a
+ * consistent fashion, too.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public interface Subroutine{
+    /**
+     * Returns all the JsrInstructions that have the
+     * first instruction of this subroutine as their target.
+     * <B>Must not be invoked on the 'top-level subroutine'.</B>
+     */
+    InstructionHandle[] getEnteringJsrInstructions();
+
+    /**
+     * Returns the one and only RET that leaves the subroutine.
+     * Note that JustIce has a pretty rigid notion of a subroutine.
+     * <B>Must not be invoked on the 'top-level subroutine'.</B>
+     *
+     * @see org.apache.commons.bcel6.verifier.structurals.Subroutines
+     */
+    InstructionHandle getLeavingRET();
+
+    /**
+     * Returns all instructions that together form this subroutine.
+     * Note that an instruction is part of exactly one subroutine
+     * (the top-level code is considered to be a special subroutine) -
+     * else it is not reachable at all (dead code).
+     */
+    InstructionHandle[] getInstructions();
+
+    /**
+     * Returns if the given InstructionHandle refers to an instruction
+     * that is part of this subroutine. This is a convenience method
+     * that saves iteration over the InstructionHandle objects returned
+     * by getInstructions().
+     *
+     * @see #getInstructions()
+     */
+    boolean contains(InstructionHandle inst);
+
+    /**
+     * Returns an int[] containing the indices of the local variable slots
+     * accessed by this Subroutine (read-accessed, write-accessed or both);
+     * local variables referenced by subroutines of this subroutine are
+     * not included.
+     *
+     * @see #getRecursivelyAccessedLocalsIndices()
+     */
+    int[] getAccessedLocalsIndices();
+
+    /**
+     * Returns an int[] containing the indices of the local variable slots
+     * accessed by this Subroutine (read-accessed, write-accessed or both);
+     * local variables referenced by subroutines of this subroutine are
+     * included.
+     *
+     * @see #getAccessedLocalsIndices()
+     */
+    int[] getRecursivelyAccessedLocalsIndices();
+
+    /**
+     * Returns the subroutines that are directly called from this subroutine.
+     */
+    Subroutine[] subSubs();
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/Subroutines.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/Subroutines.java
new file mode 100644
index 0000000..d76dc35
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/Subroutines.java
@@ -0,0 +1,637 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.bcel6.generic.ASTORE;
+import org.apache.commons.bcel6.generic.ATHROW;
+import org.apache.commons.bcel6.generic.BranchInstruction;
+import org.apache.commons.bcel6.generic.CodeExceptionGen;
+import org.apache.commons.bcel6.generic.GotoInstruction;
+import org.apache.commons.bcel6.generic.IndexedInstruction;
+import org.apache.commons.bcel6.generic.Instruction;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.JsrInstruction;
+import org.apache.commons.bcel6.generic.LocalVariableInstruction;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.RET;
+import org.apache.commons.bcel6.generic.ReturnInstruction;
+import org.apache.commons.bcel6.generic.Select;
+import org.apache.commons.bcel6.verifier.exc.AssertionViolatedException;
+import org.apache.commons.bcel6.verifier.exc.StructuralCodeConstraintException;
+
+    /**
+     * Instances of this class contain information about the subroutines
+     * found in a code array of a method.
+     * This implementation considers the top-level (the instructions
+     * reachable without a JSR or JSR_W starting off from the first
+     * instruction in a code array of a method) being a special subroutine;
+     * see getTopLevel() for that.
+     * Please note that the definition of subroutines in the Java Virtual
+     * Machine Specification, Second Edition is somewhat incomplete.
+     * Therefore, JustIce uses an own, more rigid notion.
+     * Basically, a subroutine is a piece of code that starts at the target
+     * of a JSR of JSR_W instruction and ends at a corresponding RET
+     * instruction. Note also that the control flow of a subroutine
+     * may be complex and non-linear; and that subroutines may be nested.
+     * JustIce also mandates subroutines not to be protected by exception
+     * handling code (for the sake of control flow predictability).
+     * To understand JustIce's notion of subroutines, please read
+   *
+     * TODO: refer to the paper.
+     *
+     * @version $Id$
+     * @author Enver Haase
+     * @see #getTopLevel()
+     */
+public class Subroutines{
+    /**
+     * This inner class implements the Subroutine interface.
+     */
+    private class SubroutineImpl implements Subroutine{
+        /**
+         * UNSET, a symbol for an uninitialized localVariable
+         * field. This is used for the "top-level" Subroutine;
+         * i.e. no subroutine.
+         */
+        private static final int UNSET = -1;
+
+        /**
+         * The Local Variable slot where the first
+         * instruction of this subroutine (an ASTORE) stores
+         * the JsrInstruction's ReturnAddress in and
+         * the RET of this subroutine operates on.
+         */
+        private int localVariable = UNSET;
+
+        /** The instructions that belong to this subroutine. */
+        private final Set<InstructionHandle> instructions = new HashSet<InstructionHandle>(); // Elements: InstructionHandle
+
+        /*
+         * Refer to the Subroutine interface for documentation.
+         */
+        public boolean contains(InstructionHandle inst){
+            return instructions.contains(inst);
+        }
+
+        /**
+         * The JSR or JSR_W instructions that define this
+         * subroutine by targeting it.
+         */
+        private final Set<InstructionHandle> theJSRs = new HashSet<InstructionHandle>();
+
+        /**
+         * The RET instruction that leaves this subroutine.
+         */
+        private InstructionHandle theRET;
+
+        /**
+         * Returns a String representation of this object, merely
+         * for debugging purposes.
+         * (Internal) Warning: Verbosity on a problematic subroutine may cause
+         * stack overflow errors due to recursive subSubs() calls.
+         * Don't use this, then.
+         */
+        @Override
+        public String toString(){
+            String ret = "Subroutine: Local variable is '"+localVariable+"', JSRs are '"+theJSRs+"', RET is '"+theRET+"', Instructions: '"+instructions+"'.";
+
+            ret += " Accessed local variable slots: '";
+            int[] alv = getAccessedLocalsIndices();
+            for (int element : alv) {
+                ret += element+" ";
+            }
+            ret+="'.";
+
+            ret += " Recursively (via subsub...routines) accessed local variable slots: '";
+            alv = getRecursivelyAccessedLocalsIndices();
+            for (int element : alv) {
+                ret += element+" ";
+            }
+            ret+="'.";
+
+            return ret;
+        }
+
+        /**
+         * Sets the leaving RET instruction. Must be invoked after all instructions are added.
+         * Must not be invoked for top-level 'subroutine'.
+         */
+        void setLeavingRET(){
+            if (localVariable == UNSET){
+                throw new AssertionViolatedException("setLeavingRET() called for top-level 'subroutine' or forgot to set local variable first.");
+            }
+            InstructionHandle ret = null;
+            for (InstructionHandle actual : instructions) {
+                if (actual.getInstruction() instanceof RET){
+                    if (ret != null){
+                        throw new StructuralCodeConstraintException("Subroutine with more then one RET detected: '"+ret+"' and '"+actual+"'.");
+                    }
+                    ret = actual;
+                }
+            }
+            if (ret == null){
+                throw new StructuralCodeConstraintException("Subroutine without a RET detected.");
+            }
+            if (((RET) ret.getInstruction()).getIndex() != localVariable){
+                throw new StructuralCodeConstraintException("Subroutine uses '"+ret+"' which does not match the correct local variable '"+localVariable+"'.");
+            }
+            theRET = ret;
+        }
+
+        /*
+         * Refer to the Subroutine interface for documentation.
+         */
+        public InstructionHandle[] getEnteringJsrInstructions(){
+            if (this == TOPLEVEL) {
+                throw new AssertionViolatedException("getLeavingRET() called on top level pseudo-subroutine.");
+            }
+            InstructionHandle[] jsrs = new InstructionHandle[theJSRs.size()];
+            return theJSRs.toArray(jsrs);
+        }
+
+        /**
+         * Adds a new JSR or JSR_W that has this subroutine as its target.
+         */
+        public void addEnteringJsrInstruction(InstructionHandle jsrInst){
+            if ( (jsrInst == null) || (! (jsrInst.getInstruction() instanceof JsrInstruction))){
+                throw new AssertionViolatedException("Expecting JsrInstruction InstructionHandle.");
+            }
+            if (localVariable == UNSET){
+                throw new AssertionViolatedException("Set the localVariable first!");
+            }
+            // Something is wrong when an ASTORE is targeted that does not operate on the same local variable than the rest of the
+            // JsrInstruction-targets and the RET.
+            // (We don't know out leader here so we cannot check if we're really targeted!)
+            if (localVariable != ((ASTORE) (((JsrInstruction) jsrInst.getInstruction()).getTarget().getInstruction())).getIndex()){
+                throw new AssertionViolatedException("Setting a wrong JsrInstruction.");
+            }
+            theJSRs.add(jsrInst);
+        }
+
+        /*
+         * Refer to the Subroutine interface for documentation.
+         */
+        public InstructionHandle getLeavingRET(){
+            if (this == TOPLEVEL) {
+                throw new AssertionViolatedException("getLeavingRET() called on top level pseudo-subroutine.");
+            }
+            return theRET;
+        }
+
+        /*
+         * Refer to the Subroutine interface for documentation.
+         */
+        public InstructionHandle[] getInstructions(){
+            InstructionHandle[] ret = new InstructionHandle[instructions.size()];
+            return instructions.toArray(ret);
+        }
+
+        /*
+         * Adds an instruction to this subroutine.
+         * All instructions must have been added before invoking setLeavingRET().
+         * @see #setLeavingRET
+         */
+        void addInstruction(InstructionHandle ih){
+            if (theRET != null){
+                throw new AssertionViolatedException("All instructions must have been added before invoking setLeavingRET().");
+            }
+            instructions.add(ih);
+        }
+
+        /* Satisfies Subroutine.getRecursivelyAccessedLocalsIndices(). */
+        public int[] getRecursivelyAccessedLocalsIndices(){
+            Set<Integer> s = new HashSet<Integer>();
+            int[] lvs = getAccessedLocalsIndices();
+            for (int lv : lvs) {
+                s.add(Integer.valueOf(lv));
+            }
+            _getRecursivelyAccessedLocalsIndicesHelper(s, this.subSubs());
+            int[] ret = new int[s.size()];
+            int j=-1;
+            for (Integer index : s) {
+                j++;
+                ret[j] = index.intValue();
+            }
+            return ret;
+        }
+
+        /**
+         * A recursive helper method for getRecursivelyAccessedLocalsIndices().
+         * @see #getRecursivelyAccessedLocalsIndices()
+         */
+        private void _getRecursivelyAccessedLocalsIndicesHelper(Set<Integer> s, Subroutine[] subs){
+            for (Subroutine sub : subs) {
+                int[] lvs = sub.getAccessedLocalsIndices();
+                for (int lv : lvs) {
+                    s.add(Integer.valueOf(lv));
+                }
+                if(sub.subSubs().length != 0){
+                    _getRecursivelyAccessedLocalsIndicesHelper(s, sub.subSubs());
+                }
+            }
+        }
+
+        /*
+         * Satisfies Subroutine.getAccessedLocalIndices().
+         */
+        public int[] getAccessedLocalsIndices(){
+            //TODO: Implement caching.
+            Set<Integer> acc = new HashSet<Integer>();
+            if (theRET == null && this != TOPLEVEL){
+                throw new AssertionViolatedException("This subroutine object must be built up completely before calculating accessed locals.");
+            }
+            {
+                for (InstructionHandle ih : instructions) {
+                    // RET is not a LocalVariableInstruction in the current version of BCEL.
+                    if (ih.getInstruction() instanceof LocalVariableInstruction || ih.getInstruction() instanceof RET){
+                        int idx = ((IndexedInstruction) (ih.getInstruction())).getIndex();
+                        acc.add(Integer.valueOf(idx));
+                        // LONG? DOUBLE?.
+                        try{
+                            // LocalVariableInstruction instances are typed without the need to look into
+                            // the constant pool.
+                            if (ih.getInstruction() instanceof LocalVariableInstruction){
+                                int s = ((LocalVariableInstruction) ih.getInstruction()).getType(null).getSize();
+                                if (s==2) {
+                                    acc.add(Integer.valueOf(idx+1));
+                                }
+                            }
+                        }
+                        catch(RuntimeException re){
+                            throw new AssertionViolatedException("Oops. BCEL did not like NULL as a ConstantPoolGen object.", re);
+                        }
+                    }
+                }
+            }
+
+            {
+                int[] ret = new int[acc.size()];
+                int j=-1;
+                for (Integer accessedLocal : acc) {
+                    j++;
+                    ret[j] = accessedLocal.intValue();
+                }
+                return ret;
+            }
+        }
+
+        /*
+         * Satisfies Subroutine.subSubs().
+         */
+        public Subroutine[] subSubs(){
+            Set<Subroutine> h = new HashSet<Subroutine>();
+
+            for (InstructionHandle ih : instructions) {
+                Instruction inst = ih.getInstruction();
+                if (inst instanceof JsrInstruction){
+                    InstructionHandle targ = ((JsrInstruction) inst).getTarget();
+                    h.add(getSubroutine(targ));
+                }
+            }
+            Subroutine[] ret = new Subroutine[h.size()];
+            return h.toArray(ret);
+        }
+
+        /*
+         * Sets the local variable slot the ASTORE that is targeted
+         * by the JsrInstructions of this subroutine operates on.
+         * This subroutine's RET operates on that same local variable
+         * slot, of course.
+         */
+        void setLocalVariable(int i){
+            if (localVariable != UNSET){
+                throw new AssertionViolatedException("localVariable set twice.");
+            }
+            localVariable = i;
+        }
+
+        /**
+         * The default constructor.
+         */
+        public SubroutineImpl(){
+        }
+
+    }// end Inner Class SubrouteImpl
+
+    //Node coloring constants
+    private static final Integer WHITE = Integer.valueOf(0);
+    private static final Integer GRAY = Integer.valueOf(1);
+    private static final Integer BLACK = Integer.valueOf(2);
+
+    /**
+     * The map containing the subroutines found.
+     * Key: InstructionHandle of the leader of the subroutine.
+     * Elements: SubroutineImpl objects.
+     */
+    private final Map<InstructionHandle, Subroutine> subroutines = new HashMap<InstructionHandle, Subroutine>();
+
+    /**
+     * This is referring to a special subroutine, namely the
+     * top level. This is not really a subroutine but we use
+     * it to distinguish between top level instructions and
+     * unreachable instructions.
+     */
+    public final Subroutine TOPLEVEL;
+
+    /**
+     * Constructor.
+     * @param mg A MethodGen object representing method to
+     * create the Subroutine objects of.
+     */
+    public Subroutines(MethodGen mg){
+
+        InstructionHandle[] all = mg.getInstructionList().getInstructionHandles();
+        CodeExceptionGen[] handlers = mg.getExceptionHandlers();
+
+        // Define our "Toplevel" fake subroutine.
+        TOPLEVEL = new SubroutineImpl();
+
+        // Calculate "real" subroutines.
+        Set<InstructionHandle> sub_leaders = new HashSet<InstructionHandle>(); // Elements: InstructionHandle
+        for (InstructionHandle element : all) {
+            Instruction inst = element.getInstruction();
+            if (inst instanceof JsrInstruction){
+                sub_leaders.add(((JsrInstruction) inst).getTarget());
+            }
+        }
+
+        // Build up the database.
+        for (InstructionHandle astore : sub_leaders) {
+            SubroutineImpl sr = new SubroutineImpl();
+            sr.setLocalVariable( ((ASTORE) (astore.getInstruction())).getIndex() );
+            subroutines.put(astore, sr);
+        }
+
+        // Fake it a bit. We want a virtual "TopLevel" subroutine.
+        subroutines.put(all[0], TOPLEVEL);
+        sub_leaders.add(all[0]);
+
+        // Tell the subroutines about their JsrInstructions.
+        // Note that there cannot be a JSR targeting the top-level
+        // since "Jsr 0" is disallowed in Pass 3a.
+        // Instructions shared by a subroutine and the toplevel are
+        // disallowed and checked below, after the BFS.
+        for (InstructionHandle element : all) {
+            Instruction inst = element.getInstruction();
+            if (inst instanceof JsrInstruction){
+                InstructionHandle leader = ((JsrInstruction) inst).getTarget();
+                ((SubroutineImpl) getSubroutine(leader)).addEnteringJsrInstruction(element);
+            }
+        }
+
+        // Now do a BFS from every subroutine leader to find all the
+        // instructions that belong to a subroutine.
+        Set<InstructionHandle> instructions_assigned = new HashSet<InstructionHandle>(); // we don't want to assign an instruction to two or more Subroutine objects.
+
+        Map<InstructionHandle, Integer> colors = new HashMap<InstructionHandle, Integer>(); //Graph colouring. Key: InstructionHandle, Value: Integer .
+
+        List<InstructionHandle> Q = new ArrayList<InstructionHandle>();        
+        for (InstructionHandle actual : sub_leaders) {
+            // Do some BFS with "actual" as the root of the graph.
+            // Init colors
+            for (InstructionHandle element : all) {
+                colors.put(element, WHITE);
+            }
+            colors.put(actual, GRAY);
+            // Init Queue
+
+            Q.clear();
+            Q.add(actual); // add(Obj) adds to the end, remove(0) removes from the start.
+
+            /* BFS ALGORITHM MODIFICATION: Start out with multiple "root" nodes, as exception handlers are starting points of top-level code, too. [why top-level? TODO: Refer to the special JustIce notion of subroutines.]*/
+            if (actual == all[0]){
+                for (CodeExceptionGen handler : handlers) {
+                    colors.put(handler.getHandlerPC(), GRAY);
+                    Q.add(handler.getHandlerPC());
+                }
+            }
+            /* CONTINUE NORMAL BFS ALGORITHM */
+
+            // Loop until Queue is empty
+            while (Q.size() != 0){
+                InstructionHandle u = Q.remove(0);
+                InstructionHandle[] successors = getSuccessors(u);
+                for (InstructionHandle successor : successors) {
+                    if (colors.get(successor) == WHITE){
+                        colors.put(successor, GRAY);
+                        Q.add(successor);
+                    }
+                }
+                colors.put(u, BLACK);
+            }
+            // BFS ended above.
+            for (InstructionHandle element : all) {
+                if (colors.get(element) == BLACK){
+                    ((SubroutineImpl) (actual==all[0]?getTopLevel():getSubroutine(actual))).addInstruction(element);
+                    if (instructions_assigned.contains(element)){
+                        throw new StructuralCodeConstraintException("Instruction '"+element+"' is part of more than one subroutine (or of the top level and a subroutine).");
+                    }
+                    instructions_assigned.add(element);
+                }
+            }
+            if (actual != all[0]){// If we don't deal with the top-level 'subroutine'
+                ((SubroutineImpl) getSubroutine(actual)).setLeavingRET();
+            }
+        }
+
+        // Now make sure no instruction of a Subroutine is protected by exception handling code
+        // as is mandated by JustIces notion of subroutines.
+        for (CodeExceptionGen handler : handlers) {
+            InstructionHandle _protected = handler.getStartPC();
+            while (_protected != handler.getEndPC().getNext()){// Note the inclusive/inclusive notation of "generic API" exception handlers!
+                for (Subroutine sub : subroutines.values()) {
+                    if (sub != subroutines.get(all[0])){    // We don't want to forbid top-level exception handlers.
+                        if (sub.contains(_protected)){
+                            throw new StructuralCodeConstraintException("Subroutine instruction '"+_protected+"' is protected by an exception handler, '"+handler+"'. This is forbidden by the JustIce verifier due to its clear definition of subroutines.");
+                        }
+                    }
+                }
+                _protected = _protected.getNext();
+            }
+        }
+
+        // Now make sure no subroutine is calling a subroutine
+        // that uses the same local variable for the RET as themselves
+        // (recursively).
+        // This includes that subroutines may not call themselves
+        // recursively, even not through intermediate calls to other
+        // subroutines.
+        noRecursiveCalls(getTopLevel(), new HashSet<Integer>());
+
+    }
+
+    /**
+     * This (recursive) utility method makes sure that
+     * no subroutine is calling a subroutine
+     * that uses the same local variable for the RET as themselves
+     * (recursively).
+     * This includes that subroutines may not call themselves
+     * recursively, even not through intermediate calls to other
+     * subroutines.
+     *
+     * @throws StructuralCodeConstraintException if the above constraint is not satisfied.
+     */
+    private void noRecursiveCalls(Subroutine sub, Set<Integer> set){
+        Subroutine[] subs = sub.subSubs();
+
+        for (Subroutine sub2 : subs) {
+            int index = ((RET) (sub2.getLeavingRET().getInstruction())).getIndex();
+
+            if (!set.add(Integer.valueOf(index))){
+                // Don't use toString() here because of possibly infinite recursive subSubs() calls then.
+                SubroutineImpl si = (SubroutineImpl) sub2;
+                throw new StructuralCodeConstraintException("Subroutine with local variable '"+si.localVariable+"', JSRs '"+si.theJSRs+"', RET '"+si.theRET+"' is called by a subroutine which uses the same local variable index as itself; maybe even a recursive call? JustIce's clean definition of a subroutine forbids both.");
+            }
+
+            noRecursiveCalls(sub2, set);
+
+            set.remove(Integer.valueOf(index));
+        }
+    } 
+
+    /**
+     * Returns the Subroutine object associated with the given
+     * leader (that is, the first instruction of the subroutine).
+     * You must not use this to get the top-level instructions
+     * modeled as a Subroutine object.
+     *
+     * @see #getTopLevel()
+     */
+    public Subroutine getSubroutine(InstructionHandle leader){
+        Subroutine ret = subroutines.get(leader);
+
+        if (ret == null){
+            throw new AssertionViolatedException("Subroutine requested for an InstructionHandle that is not a leader of a subroutine.");
+        }
+
+        if (ret == TOPLEVEL){
+            throw new AssertionViolatedException("TOPLEVEL special subroutine requested; use getTopLevel().");
+        }
+
+        return ret;
+    }
+
+    /**
+     * Returns the subroutine object associated with the
+     * given instruction. This is a costly operation, you
+     * should consider using getSubroutine(InstructionHandle).
+     * Returns 'null' if the given InstructionHandle lies
+     * in so-called 'dead code', i.e. code that can never
+     * be executed.
+     *
+     * @see #getSubroutine(InstructionHandle)
+     * @see #getTopLevel()
+     */
+    public Subroutine subroutineOf(InstructionHandle any){
+        for (Subroutine s : subroutines.values()) {
+            if (s.contains(any)) {
+                return s;
+            }
+        }
+System.err.println("DEBUG: Please verify '"+any.toString(true)+"' lies in dead code.");
+        return null;
+        //throw new AssertionViolatedException("No subroutine for InstructionHandle found (DEAD CODE?).");
+    }
+
+    /**
+     * For easy handling, the piece of code that is <B>not</B> a
+     * subroutine, the top-level, is also modeled as a Subroutine
+     * object.
+     * It is a special Subroutine object where <B>you must not invoke
+     * getEnteringJsrInstructions() or getLeavingRET()</B>.
+     *
+     * @see Subroutine#getEnteringJsrInstructions()
+     * @see Subroutine#getLeavingRET()
+     */
+    public Subroutine getTopLevel(){
+        return TOPLEVEL;
+    }
+    /**
+     * A utility method that calculates the successors of a given InstructionHandle
+     * <B>in the same subroutine</B>. That means, a RET does not have any successors
+     * as defined here. A JsrInstruction has its physical successor as its successor
+     * (opposed to its target) as defined here.
+     */
+    private static InstructionHandle[] getSuccessors(InstructionHandle instruction){
+        final InstructionHandle[] empty = new InstructionHandle[0];
+        final InstructionHandle[] single = new InstructionHandle[1];
+
+        Instruction inst = instruction.getInstruction();
+
+        if (inst instanceof RET){
+            return empty;
+        }
+
+        // Terminates method normally.
+        if (inst instanceof ReturnInstruction){
+            return empty;
+        }
+
+        // Terminates method abnormally, because JustIce mandates
+        // subroutines not to be protected by exception handlers.
+        if (inst instanceof ATHROW){
+            return empty;
+        }
+
+        // See method comment.
+        if (inst instanceof JsrInstruction){
+            single[0] = instruction.getNext();
+            return single;
+        }
+
+        if (inst instanceof GotoInstruction){
+            single[0] = ((GotoInstruction) inst).getTarget();
+            return single;
+        }
+
+        if (inst instanceof BranchInstruction){
+            if (inst instanceof Select){
+                // BCEL's getTargets() returns only the non-default targets,
+                // thanks to Eli Tilevich for reporting.
+                InstructionHandle[] matchTargets = ((Select) inst).getTargets();
+                InstructionHandle[] ret = new InstructionHandle[matchTargets.length+1];
+                ret[0] = ((Select) inst).getTarget();
+                System.arraycopy(matchTargets, 0, ret, 1, matchTargets.length);
+                return ret;
+            }
+            final InstructionHandle[] pair = new InstructionHandle[2];
+            pair[0] = instruction.getNext();
+            pair[1] = ((BranchInstruction) inst).getTarget();
+            return pair;
+        }
+
+        // default case: Fall through.        
+        single[0] = instruction.getNext();
+        return single;
+    }
+
+    /**
+     * Returns a String representation of this object; merely for debugging puposes.
+     */
+    @Override
+    public String toString(){
+        return "---\n"+subroutines+"\n---\n";
+    }
+}
diff --git a/src/main/java/org/apache/commons/bcel6/verifier/structurals/UninitializedObjectType.java b/src/main/java/org/apache/commons/bcel6/verifier/structurals/UninitializedObjectType.java
new file mode 100644
index 0000000..4fcb48c
--- /dev/null
+++ b/src/main/java/org/apache/commons/bcel6/verifier/structurals/UninitializedObjectType.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */ 
+package org.apache.commons.bcel6.verifier.structurals;
+
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.ReferenceType;
+
+/**
+ * This class represents an uninitialized object type; see The Java
+ * Virtual Machine Specification, Second Edition, page 147: 4.9.4 for
+ * more details.
+ *
+ * @version $Id$
+ * @author Enver Haase
+ */
+public class UninitializedObjectType extends ReferenceType implements Constants{
+
+    private static final long serialVersionUID = -1228341777713117641L;
+    /** The "initialized" version. */
+    private final ObjectType initialized;
+
+    /** Creates a new instance. */
+    public UninitializedObjectType(ObjectType t){
+        super(T_UNKNOWN, "<UNINITIALIZED OBJECT OF TYPE '"+t.getClassName()+"'>");
+        initialized = t;
+    }
+
+    /**
+     * Returns the ObjectType of the same class as the one of the uninitialized object
+     * represented by this UninitializedObjectType instance.
+     */
+    public ObjectType getInitialized(){
+        return initialized;
+    }
+
+    /** @return a hash code value for the object.
+     */
+    @Override
+    public int hashCode() { return initialized.hashCode(); }
+
+    /**
+     * Returns true on equality of this and o.
+     * Equality means the ObjectType instances of "initialized"
+     * equal one another in this and the o instance.
+     *
+     */
+    @Override
+    public boolean equals(Object o){
+        if (! (o instanceof UninitializedObjectType)) {
+            return false;
+        }
+        return initialized.equals(((UninitializedObjectType)o).initialized);
+    }
+}
diff --git a/src/main/java/org/apache/bcel/verifier/structurals/package.html b/src/main/java/org/apache/commons/bcel6/verifier/structurals/package.html
similarity index 100%
rename from src/main/java/org/apache/bcel/verifier/structurals/package.html
rename to src/main/java/org/apache/commons/bcel6/verifier/structurals/package.html
diff --git a/src/site/site.xml b/src/site/site.xml
index 8f77bfb..f343307 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -36,7 +36,8 @@
       <item name="Manual" href="manual.html"/>
       <item name="FAQ" href="faq.html"/>
       <item name="Used by" href="projects.html"/>
-      <item name="Javadoc 6.0" href="javadocs/api-release/index.html"/>
+      <item name="Javadoc (Latest release)" href="javadocs/api-release/index.html"/>
+      <item name="Javadoc (SVN latest)" href="apidocs/index.html"/>
     </menu>
 
   </body>
diff --git a/src/site/xdoc/download_bcel.xml b/src/site/xdoc/download_bcel.xml
index 3594155..c9f9f50 100644
--- a/src/site/xdoc/download_bcel.xml
+++ b/src/site/xdoc/download_bcel.xml
@@ -95,32 +95,32 @@
       </p>
     </subsection>
     </section>
-    <section name="Apache Commons BCEL 6.0">
+    <section name="Apache Commons BCEL 6.0 (Java 5.0+)">
       <subsection name="Binaries">
         <table>
           <tr>
-              <td><a href="[preferred]/commons/bcel/binaries/bcel-6.0-bin.tar.gz">bcel-6.0-bin.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/bcel/binaries/bcel-6.0-bin.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/bcel/binaries/bcel-6.0-bin.tar.gz.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/bcel/binaries/commons-bcel6-6.0-bin.tar.gz">commons-bcel6-6.0-bin.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/bcel/binaries/commons-bcel6-6.0-bin.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/bcel/binaries/commons-bcel6-6.0-bin.tar.gz.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/commons/bcel/binaries/bcel-6.0-bin.zip">bcel-6.0-bin.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/bcel/binaries/bcel-6.0-bin.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/bcel/binaries/bcel-6.0-bin.zip.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/bcel/binaries/commons-bcel6-6.0-bin.zip">commons-bcel6-6.0-bin.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/bcel/binaries/commons-bcel6-6.0-bin.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/bcel/binaries/commons-bcel6-6.0-bin.zip.asc">pgp</a></td>
           </tr>
         </table>
       </subsection>
       <subsection name="Source">
         <table>
           <tr>
-              <td><a href="[preferred]/commons/bcel/source/bcel-6.0-src.tar.gz">bcel-6.0-src.tar.gz</a></td>
-              <td><a href="http://www.apache.org/dist/commons/bcel/source/bcel-6.0-src.tar.gz.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/bcel/source/bcel-6.0-src.tar.gz.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/bcel/source/commons-bcel6-6.0-src.tar.gz">commons-bcel6-6.0-src.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/bcel/source/commons-bcel6-6.0-src.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/bcel/source/commons-bcel6-6.0-src.tar.gz.asc">pgp</a></td>
           </tr>
           <tr>
-              <td><a href="[preferred]/commons/bcel/source/bcel-6.0-src.zip">bcel-6.0-src.zip</a></td>
-              <td><a href="http://www.apache.org/dist/commons/bcel/source/bcel-6.0-src.zip.md5">md5</a></td>
-              <td><a href="http://www.apache.org/dist/commons/bcel/source/bcel-6.0-src.zip.asc">pgp</a></td>
+              <td><a href="[preferred]/commons/bcel/source/commons-bcel6-6.0-src.zip">commons-bcel6-6.0-src.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/bcel/source/commons-bcel6-6.0-src.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/bcel/source/commons-bcel6-6.0-src.zip.asc">pgp</a></td>
           </tr>
         </table>
       </subsection>
diff --git a/src/site/xdoc/faq.xml b/src/site/xdoc/faq.xml
index 4c071d1..9522fec 100644
--- a/src/site/xdoc/faq.xml
+++ b/src/site/xdoc/faq.xml
@@ -31,7 +31,7 @@
       <b>Q: </b>How can I ... with BCEL?
       <br/>
       <b>A: </b>Take a look at
-      <tt>org.apache.bcel.util.BCELifier</tt>, it takes a given class
+      <tt>org.apache.commons.bcel6.util.BCELifier</tt>, it takes a given class
       and converts it to a BCEL program (in Java, of course). It will
       show you how certain code is generated using BCEL.
     </p>
@@ -85,7 +85,7 @@
       <b>A:</b> Use the JustIce verifier that comes together with BCEL
       to get more detailed information:
        <pre>
-       java org.apache.bcel.verifier.Verifier &lt;your class&gt;</pre>
+       java org.apache.commons.bcel6.verifier.Verifier &lt;your class&gt;</pre>
     </p>
     
     </section>
diff --git a/src/site/xdoc/manual.xml b/src/site/xdoc/manual.xml
index d9ab982..463eb9e 100644
--- a/src/site/xdoc/manual.xml
+++ b/src/site/xdoc/manual.xml
@@ -623,7 +623,7 @@
   <p>
     The "static" component of the <font
      face="helvetica,arial">BCEL</font> API resides in the package
-     <tt>org.apache.bcel.classfile</tt> and closely represents class
+     <tt>org.apache.commons.bcel6.classfile</tt> and closely represents class
      files. All of the binary components and data structures declared
      in the <a
      href="http://docs.oracle.com/javase/specs/">JVM
@@ -751,7 +751,7 @@
 
   <section name="3.3 ClassGen">
   <p>
-    This part of the API (package <tt>org.apache.bcel.generic</tt>)
+    This part of the API (package <tt>org.apache.commons.bcel6.generic</tt>)
     supplies an abstraction level for creating or transforming class
     files dynamically. It makes the static constraints of Java class
     files like the hard-coded byte code addresses "generic". The
@@ -1095,7 +1095,7 @@
 
   <p>
     The <tt>search()</tt> method of class
-    <tt>org.apache.bcel.util.InstructionFinder</tt> gets a regular
+    <tt>org.apache.commons.bcel6.util.InstructionFinder</tt> gets a regular
     expression and a starting point as arguments and returns an
     iterator describing the area of matched instructions. Additional
     constraints to the matching area of instructions, which can not be
@@ -1577,10 +1577,10 @@
 import java.io.*;
 
 import java.util.Iterator;
-import org.apache.bcel.classfile.*;
-import org.apache.bcel.generic.*;
-import org.apache.bcel.Repository;
-import org.apache.bcel.util.InstructionFinder;
+import org.apache.commons.bcel6.classfile.*;
+import org.apache.commons.bcel6.generic.*;
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.util.InstructionFinder;
 
 public class Peephole {
 
diff --git a/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java b/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java
deleted file mode 100644
index e6ed03a..0000000
--- a/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import org.apache.bcel.classfile.DescendingVisitor;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.visitors.CounterVisitor;
-
-public abstract class AbstractCounterVisitorTestCase extends AbstractTestCase
-{
-    protected abstract JavaClass getTestClass() throws ClassNotFoundException;
-
-    private CounterVisitor visitor = null;
-
-    @Override
-    public void setUp() throws ClassNotFoundException
-    {
-        visitor = new CounterVisitor();
-        new DescendingVisitor(getTestClass(), getVisitor()).visit();
-    }
-
-    public CounterVisitor getVisitor()
-    {
-        if (visitor == null) {
-            visitor = new CounterVisitor();
-        }
-        return visitor;
-    }
-
-    public void setVisitor(CounterVisitor visitor)
-    {
-        this.visitor = visitor;
-    }
-}
diff --git a/src/test/java/org/apache/bcel/AbstractTestCase.java b/src/test/java/org/apache/bcel/AbstractTestCase.java
deleted file mode 100644
index 4b047f6..0000000
--- a/src/test/java/org/apache/bcel/AbstractTestCase.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.AnnotationEntryGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.ElementValueGen;
-import org.apache.bcel.generic.ElementValuePairGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.SimpleElementValueGen;
-import org.apache.bcel.util.ClassPath;
-import org.apache.bcel.util.SyntheticRepository;
-
-public abstract class AbstractTestCase extends TestCase
-{
-    private final boolean verbose = false;
-
-    protected File createTestdataFile(String name)
-    {
-        return new File("target" + File.separator + "testdata" + File.separator
-                + name);
-    }
-
-    protected JavaClass getTestClass(String name) throws ClassNotFoundException
-    {
-        return SyntheticRepository.getInstance().loadClass(name);
-    }
-
-    protected Method getMethod(JavaClass cl, String methodname)
-    {
-        Method[] methods = cl.getMethods();
-        for (Method m : methods) {
-            if (m.getName().equals(methodname))
-            {
-                return m;
-            }
-        }
-        return null;
-    }
-
-    protected boolean wipe(String name)
-    {
-        return new File("target" + File.separator + "testdata" + File.separator
-                + name).delete();
-    }
-
-    protected boolean wipe(String dir, String name)
-    {
-        boolean b = wipe(dir + File.separator + name);
-        String[] files = new File(dir).list();
-        if (files == null || files.length == 0)
-        {
-            new File(dir).delete(); // Why does this not succeed? stupid thing
-        }
-        return b;
-    }
-
-    public SyntheticRepository createRepos(String cpentry)
-    {
-        ClassPath cp = new ClassPath("target" + File.separator + "testdata"
-                + File.separator + cpentry + File.separator);
-        return SyntheticRepository.getInstance(cp);
-    }
-
-    protected Attribute[] findAttribute(String name, JavaClass clazz)
-    {
-        Attribute[] all = clazz.getAttributes();
-        List<Attribute> chosenAttrsList = new ArrayList<Attribute>();
-        for (Attribute element : all) {
-            if (verbose) {
-                System.err.println("Attribute: " + element.getName());
-            }
-            if (element.getName().equals(name)) {
-                chosenAttrsList.add(element);
-            }
-        }
-        return chosenAttrsList.toArray(new Attribute[] {});
-    }
-
-    protected Attribute findAttribute(String name, Attribute[] all)
-    {
-        List<Attribute> chosenAttrsList = new ArrayList<Attribute>();
-        for (Attribute element : all) {
-            if (verbose) {
-                System.err.println("Attribute: " + element.getName());
-            }
-            if (element.getName().equals(name)) {
-                chosenAttrsList.add(element);
-            }
-        }
-        assertTrue("Should be one match: " + chosenAttrsList.size(),
-                chosenAttrsList.size() == 1);
-        return chosenAttrsList.get(0);
-    }
-
-    protected String dumpAttributes(Attribute[] as)
-    {
-        StringBuilder result = new StringBuilder();
-        result.append("AttributeArray:[");
-        for (int i = 0; i < as.length; i++)
-        {
-            Attribute attr = as[i];
-            result.append(attr.toString());
-            if (i + 1 < as.length) {
-                result.append(",");
-            }
-        }
-        result.append("]");
-        return result.toString();
-    }
-
-    protected String dumpAnnotationEntries(AnnotationEntry[] as)
-    {
-        StringBuilder result = new StringBuilder();
-        result.append("[");
-        for (int i = 0; i < as.length; i++)
-        {
-            AnnotationEntry annotation = as[i];
-            result.append(annotation.toShortString());
-            if (i + 1 < as.length) {
-                result.append(",");
-            }
-        }
-        result.append("]");
-        return result.toString();
-    }
-
-    protected String dumpAnnotationEntries(AnnotationEntryGen[] as)
-    {
-        StringBuilder result = new StringBuilder();
-        result.append("[");
-        for (int i = 0; i < as.length; i++)
-        {
-            AnnotationEntryGen annotation = as[i];
-            result.append(annotation.toShortString());
-            if (i + 1 < as.length) {
-                result.append(",");
-            }
-        }
-        result.append("]");
-        return result.toString();
-    }
-
-    public AnnotationEntryGen createFruitAnnotationEntry(ConstantPoolGen cp,
-            String aFruit, boolean visibility)
-    {
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.STRING, cp, aFruit);
-        ElementValuePairGen nvGen = new ElementValuePairGen("fruit", evg, cp);
-        ObjectType t = new ObjectType("SimpleStringAnnotation");
-        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
-        elements.add(nvGen);
-        return new AnnotationEntryGen(t, elements, visibility, cp);
-    }
-}
diff --git a/src/test/java/org/apache/bcel/AnnotationAccessFlagTestCase.java b/src/test/java/org/apache/bcel/AnnotationAccessFlagTestCase.java
deleted file mode 100644
index fa381e1..0000000
--- a/src/test/java/org/apache/bcel/AnnotationAccessFlagTestCase.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import org.apache.bcel.classfile.JavaClass;
-
-public class AnnotationAccessFlagTestCase extends AbstractTestCase
-{
-    /**
-     * If you write an annotation and compile it, the class file generated
-     * should be marked as an annotation type - which is detectable through
-     * BCEL.
-     */
-    public void testAnnotationClassSaysItIs() throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.SimpleAnnotation");
-        assertTrue(
-                "Expected SimpleAnnotation class to say it was an annotation - but it didn't !",
-                clazz.isAnnotation());
-        clazz = getTestClass("org.apache.bcel.data.SimpleClass");
-        assertTrue(
-                "Expected SimpleClass class to say it was not an annotation - but it didn't !",
-                !clazz.isAnnotation());
-    }
-}
diff --git a/src/test/java/org/apache/bcel/AnnotationDefaultAttributeTestCase.java b/src/test/java/org/apache/bcel/AnnotationDefaultAttributeTestCase.java
deleted file mode 100644
index 24c3a5e..0000000
--- a/src/test/java/org/apache/bcel/AnnotationDefaultAttributeTestCase.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import org.apache.bcel.classfile.AnnotationDefault;
-import org.apache.bcel.classfile.ElementValue;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.SimpleElementValue;
-
-public class AnnotationDefaultAttributeTestCase extends AbstractTestCase
-{
-    /**
-     * For values in an annotation that have default values, we should be able
-     * to query the AnnotationDefault attribute against the method to discover
-     * the default value that was originally declared.
-     */
-    public void testMethodAnnotations() throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.SimpleAnnotation");
-        Method m = getMethod(clazz, "fruit");
-        AnnotationDefault a = (AnnotationDefault) findAttribute(
-                "AnnotationDefault", m.getAttributes());
-        SimpleElementValue val = (SimpleElementValue) a.getDefaultValue();
-        assertTrue("Should be STRING but is " + val.getElementValueType(), val
-                .getElementValueType() == ElementValue.STRING);
-        assertTrue("Should have default of bananas but default is "
-                + val.getValueString(), val.getValueString().equals("bananas"));
-    }
-}
diff --git a/src/test/java/org/apache/bcel/AnonymousClassTestCase.java b/src/test/java/org/apache/bcel/AnonymousClassTestCase.java
deleted file mode 100644
index f43f9c7..0000000
--- a/src/test/java/org/apache/bcel/AnonymousClassTestCase.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import org.apache.bcel.classfile.JavaClass;
-
-public class AnonymousClassTestCase extends AbstractTestCase
-{
-    public void testRegularClassIsNotAnonymous() throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AnonymousClassTest");
-        assertFalse("regular outer classes are not anonymous", clazz
-                .isAnonymous());
-        assertFalse("regular outer classes are not nested", clazz.isNested());
-    }
-
-    public void testNamedInnerClassIsNotAnonymous()
-            throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AnonymousClassTest$X");
-        assertFalse("regular inner classes are not anonymous", clazz
-                .isAnonymous());
-        assertTrue("regular inner classes are nested", clazz.isNested());
-    }
-
-    public void testStaticInnerClassIsNotAnonymous()
-            throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AnonymousClassTest$Y");
-        assertFalse("regular static inner classes are not anonymous", clazz
-                .isAnonymous());
-        assertTrue("regular static inner classes are nested", clazz.isNested());
-    }
-
-    public void testAnonymousInnerClassIsAnonymous()
-            throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AnonymousClassTest$1");
-        assertTrue("anonymous inner classes are anonymous", clazz.isAnonymous());
-        assertTrue("anonymous inner classes are anonymous", clazz.isNested());
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/BCELBenchmark.java b/src/test/java/org/apache/bcel/BCELBenchmark.java
deleted file mode 100644
index 257ffc9..0000000
--- a/src/test/java/org/apache/bcel/BCELBenchmark.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.bcel;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.commons.collections4.Predicate;
-import org.apache.commons.collections4.iterators.EnumerationIterator;
-import org.apache.commons.collections4.iterators.FilterIterator;
-import org.apache.commons.collections4.iterators.IteratorIterable;
-import org.apache.commons.io.IOUtils;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.BenchmarkMode;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Measurement;
-import org.openjdk.jmh.annotations.Mode;
-import org.openjdk.jmh.annotations.OutputTimeUnit;
-import org.openjdk.jmh.annotations.Threads;
-import org.openjdk.jmh.annotations.Warmup;
-import org.openjdk.jmh.infra.Blackhole;
-
-@BenchmarkMode(Mode.AverageTime)
-@Fork(value = 1, jvmArgs = "-server")
-@Threads(1)
-@Warmup(iterations = 10)
-@Measurement(iterations = 20)
-@OutputTimeUnit(TimeUnit.MILLISECONDS)
-public class BCELBenchmark {
-
-    private JarFile getJarFile() throws IOException {
-        String javaHome = System.getProperty("java.home");
-        return new JarFile(javaHome + "/lib/rt.jar");
-    }
-
-    private Iterable<JarEntry> getClasses(JarFile jar) {
-        return new IteratorIterable<JarEntry>(new FilterIterator<JarEntry>(new EnumerationIterator<JarEntry>(jar.entries()), new Predicate<JarEntry>() {
-            public boolean evaluate(JarEntry entry) {
-                return entry.getName().endsWith(".class");
-            }
-        }));
-    }
-
-    /**
-     * Baseline benchmark. Read the classes but don't parse them.
-     */
-    @Benchmark
-    public void baseline(Blackhole bh) throws IOException {
-        JarFile jar = getJarFile();
-
-        for (JarEntry entry : getClasses(jar)) {
-            byte[] bytes = IOUtils.toByteArray(jar.getInputStream(entry));
-            bh.consume(bytes);
-        }
-
-        jar.close();
-    }
-
-    @Benchmark
-    public void parser(Blackhole bh) throws IOException {
-        JarFile jar = getJarFile();
-
-        for (JarEntry entry : getClasses(jar)) {
-            byte[] bytes = IOUtils.toByteArray(jar.getInputStream(entry));
-
-            JavaClass clazz = new ClassParser(new ByteArrayInputStream(bytes), entry.getName()).parse();
-            bh.consume(clazz);
-        }
-
-        jar.close();
-    }
-
-    @Benchmark
-    public void generator(Blackhole bh) throws IOException {
-        JarFile jar = getJarFile();
-
-        for (JarEntry entry : getClasses(jar)) {
-            byte[] bytes = IOUtils.toByteArray(jar.getInputStream(entry));
-
-            JavaClass clazz = new ClassParser(new ByteArrayInputStream(bytes), entry.getName()).parse();
-
-            ClassGen cg = new ClassGen(clazz);
-
-            for (Method m : cg.getMethods()) {
-                MethodGen mg = new MethodGen(m, cg.getClassName(), cg.getConstantPool());
-                InstructionList il = mg.getInstructionList();
-
-                if (il != null) {
-                    mg.getInstructionList().setPositions();
-                    mg.setMaxLocals();
-                    mg.setMaxStack();
-                }
-                cg.replaceMethod(m, mg.getMethod());
-            }
-
-            bh.consume(cg.getJavaClass().getBytes());
-        }
-
-        jar.close();
-    }
-}
diff --git a/src/test/java/org/apache/bcel/CounterVisitorTestCase.java b/src/test/java/org/apache/bcel/CounterVisitorTestCase.java
deleted file mode 100644
index 0a4ffb0..0000000
--- a/src/test/java/org/apache/bcel/CounterVisitorTestCase.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import org.apache.bcel.classfile.JavaClass;
-
-public class CounterVisitorTestCase extends AbstractCounterVisitorTestCase
-{
-    @Override
-    protected JavaClass getTestClass() throws ClassNotFoundException
-    {
-        return getTestClass("org.apache.bcel.data.MarkedType");
-    }
-
-    public void testAnnotationsCount()
-    {
-        assertEquals("annotationCount", 2, getVisitor().annotationCount);
-    }
-
-    public void testAnnotationDefaultCount()
-    {
-        assertEquals("annotationDefaultCount", 0, getVisitor().annotationDefaultCount);
-    }
-
-    public void testAnnotationEntryCount()
-    {
-        assertEquals("annotationEntryCount", 2, getVisitor().annotationEntryCount);
-    }
-
-    public void testCodeCount()
-    {
-        assertEquals("codeCount", 1, getVisitor().codeCount);
-    }
-
-    public void testCodeExceptionCount()
-    {
-        assertEquals("codeExceptionCount", 0, getVisitor().codeExceptionCount);
-    }
-
-    public void testConstantClassCount()
-    {
-        assertEquals("constantClassCount", 2, getVisitor().constantClassCount);
-    }
-
-    public void testConstantDoubleCount()
-    {
-        assertEquals("constantDoubleCount", 0, getVisitor().constantDoubleCount);
-    }
-
-    public void testConstantFieldrefCount()
-    {
-        assertEquals("constantFieldrefCount", 0, getVisitor().constantFieldrefCount);
-    }
-
-    public void testConstantFloatCount()
-    {
-        assertEquals("constantFloatCount", 0, getVisitor().constantFloatCount);
-    }
-
-    public void testConstantIntegerCount()
-    {
-        assertEquals("constantIntegerCount", 0, getVisitor().constantIntegerCount);
-    }
-
-    public void testConstantInterfaceMethodrefCount()
-    {
-        assertEquals("constantInterfaceMethodrefCount", 0, getVisitor().constantInterfaceMethodrefCount);
-    }
-
-    public void testConstantLongCount()
-    {
-        assertEquals("constantLongCount", 0, getVisitor().constantLongCount);
-    }
-
-    public void testConstantMethodrefCount()
-    {
-        assertEquals("constantMethodrefCount", 1, getVisitor().constantMethodrefCount);
-    }
-
-    public void testConstantNameAndTypeCount()
-    {
-        assertEquals("constantNameAndTypeCount", 1, getVisitor().constantNameAndTypeCount);
-    }
-
-    public void testConstantPoolCount()
-    {
-        assertEquals("constantPoolCount", 1, getVisitor().constantPoolCount);
-    }
-
-    public void testConstantStringCount()
-    {
-        assertEquals("constantStringCount", 0, getVisitor().constantStringCount);
-    }
-
-    public void testConstantValueCount()
-    {
-        assertEquals("constantValueCount", 0, getVisitor().constantValueCount);
-    }
-
-    public void testDeprecatedCount()
-    {
-        assertEquals("deprecatedCount", 0, getVisitor().deprecatedCount);
-    }
-
-    public void testEnclosingMethodCount()
-    {
-        assertEquals("enclosingMethodCount", 0, getVisitor().enclosingMethodCount);
-    }
-
-    public void testExceptionTableCount()
-    {
-        assertEquals("exceptionTableCount", 0, getVisitor().exceptionTableCount);
-    }
-
-    public void testFieldCount()
-    {
-        assertEquals("fieldCount", 0, getVisitor().fieldCount);
-    }
-
-    public void testInnerClassCount()
-    {
-        assertEquals("innerClassCount", 0, getVisitor().innerClassCount);
-    }
-
-    public void testInnerClassesCount()
-    {
-        assertEquals("innerClassesCount", 0, getVisitor().innerClassesCount);
-    }
-
-    public void testJavaClassCount()
-    {
-        assertEquals("javaClassCount", 1, getVisitor().javaClassCount);
-    }
-
-    public void testLineNumberCount()
-    {
-        assertEquals("lineNumberCount", 1, getVisitor().lineNumberCount);
-    }
-
-    public void testLineNumberTableCount()
-    {
-        assertEquals("lineNumberTableCount", 1, getVisitor().lineNumberTableCount);
-    }
-
-    public void testLocalVariableCount()
-    {
-        assertEquals("localVariableCount", 1, getVisitor().localVariableCount);
-    }
-
-    public void testLocalVariableTableCount()
-    {
-        assertEquals("localVariableTableCount", 1, getVisitor().localVariableTableCount);
-    }
-
-    public void testLocalVariableTypeTableCount()
-    {
-        assertEquals("localVariableTypeTableCount", 0, getVisitor().localVariableTypeTableCount);
-    }
-
-    public void testMethodCount()
-    {
-        assertEquals("methodCount", 1, getVisitor().methodCount);
-    }
-
-    public void testParameterAnnotationCount()
-    {
-        assertEquals("parameterAnnotationCount", 0, getVisitor().parameterAnnotationCount);
-    }
-
-    public void testSignatureCount()
-    {
-        assertEquals("signatureAnnotationCount", 0, getVisitor().signatureAnnotationCount);
-    }
-
-    public void testSourceFileCount()
-    {
-        assertEquals("sourceFileCount", 1, getVisitor().sourceFileCount);
-    }
-
-    public void testStackMapCount()
-    {
-        assertEquals("stackMapCount", 0, getVisitor().stackMapCount);
-    }
-
-    public void testStackMapEntryCount()
-    {
-        assertEquals("stackMapEntryCount", 0, getVisitor().stackMapEntryCount);
-    }
-
-    public void testSyntheticCount()
-    {
-        assertEquals("syntheticCount", 0, getVisitor().syntheticCount);
-    }
-
-    public void testUnknownCount()
-    {
-        assertEquals("unknownCount", 0, getVisitor().unknownCount);
-    }
-}
diff --git a/src/test/java/org/apache/bcel/ElementValueGenTestCase.java b/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
deleted file mode 100644
index 8165824..0000000
--- a/src/test/java/org/apache/bcel/ElementValueGenTestCase.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.bcel.Constants;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.ElementValueGen;
-import org.apache.bcel.generic.SimpleElementValueGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.ClassElementValueGen;
-import org.apache.bcel.generic.EnumElementValueGen;
-
-public class ElementValueGenTestCase extends AbstractTestCase
-{
-    private ClassGen createClassGen(String classname)
-    {
-        return new ClassGen(classname, "java.lang.Object", "<generated>",
-                Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
-    }
-
-    /**
-     * Create primitive element values
-     */
-    public void testCreateIntegerElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_INT, cp, 555);
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + cp.lookupInteger(555),
-                evg.getIndex() == cp.lookupInteger(555));
-        checkSerialize(evg, cp);
-    }
-
-    public void testCreateFloatElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_FLOAT, cp, 111.222f);
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + cp.lookupFloat(111.222f), evg
-                .getIndex() == cp.lookupFloat(111.222f));
-        checkSerialize(evg, cp);
-    }
-
-    public void testCreateDoubleElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_DOUBLE, cp, 333.44);
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        int idx = cp.lookupDouble(333.44);
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
-        checkSerialize(evg, cp);
-    }
-
-    public void testCreateLongElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_LONG, cp, 3334455L);
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        int idx = cp.lookupLong(3334455L);
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
-        checkSerialize(evg, cp);
-    }
-
-    public void testCreateCharElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_CHAR, cp, 't');
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        int idx = cp.lookupInteger('t');
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
-        checkSerialize(evg, cp);
-    }
-
-    public void testCreateByteElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_CHAR, cp, (byte) 'z');
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        int idx = cp.lookupInteger((byte) 'z');
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
-        checkSerialize(evg, cp);
-    }
-
-    public void testCreateBooleanElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_BOOLEAN, cp, true);
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        int idx = cp.lookupInteger(1); // 1 == true
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
-        checkSerialize(evg, cp);
-    }
-
-    public void testCreateShortElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_SHORT, cp, (short) 42);
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        int idx = cp.lookupInteger(42);
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
-        checkSerialize(evg, cp);
-    }
-
-    // //
-    // Create string element values
-    public void testCreateStringElementValue()
-    {
-        // Create HelloWorld
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.STRING, cp, "hello");
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        assertTrue("Should have the same index in the constantpool but "
-                + evg.getIndex() + "!=" + cp.lookupUtf8("hello"), evg
-                .getIndex() == cp.lookupUtf8("hello"));
-        checkSerialize(evg, cp);
-    }
-
-    // //
-    // Create enum element value
-    public void testCreateEnumElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        ObjectType enumType = new ObjectType("SimpleEnum"); // Supports rainbow
-                                                            // :)
-        EnumElementValueGen evg = new EnumElementValueGen(enumType, "Red", cp);
-        // Creation of an element like that should leave a new entry in the
-        // cpool
-        assertTrue(
-                "The new ElementValue value index should match the contents of the constantpool but "
-                        + evg.getValueIndex() + "!=" + cp.lookupUtf8("Red"),
-                evg.getValueIndex() == cp.lookupUtf8("Red"));
-        // BCELBUG: Should the class signature or class name be in the constant
-        // pool? (see note in ConstantPool)
-        // assertTrue("The new ElementValue type index should match the contents
-        // of the constantpool but "+
-        // evg.getTypeIndex()+"!="+cp.lookupClass(enumType.getSignature()),
-        // evg.getTypeIndex()==cp.lookupClass(enumType.getSignature()));
-        checkSerialize(evg, cp);
-    }
-
-    // //
-    // Create class element value
-    public void testCreateClassElementValue()
-    {
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        ObjectType classType = new ObjectType("java.lang.Integer");
-        ClassElementValueGen evg = new ClassElementValueGen(classType, cp);
-        assertTrue("Unexpected value for contained class: '"
-                + evg.getClassString() + "'", evg.getClassString().contains("Integer"));
-        checkSerialize(evg, cp);
-    }
-
-    private void checkSerialize(ElementValueGen evgBefore, ConstantPoolGen cpg)
-    {
-        try
-        {
-            String beforeValue = evgBefore.stringifyValue();
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            DataOutputStream dos = new DataOutputStream(baos);
-            evgBefore.dump(dos);
-            dos.flush();
-            dos.close();
-            byte[] bs = baos.toByteArray();
-            ByteArrayInputStream bais = new ByteArrayInputStream(bs);
-            DataInputStream dis = new DataInputStream(bais);
-            ElementValueGen evgAfter = ElementValueGen.readElementValue(dis,
-                    cpg);
-            dis.close();
-            String afterValue = evgAfter.stringifyValue();
-            if (!beforeValue.equals(afterValue))
-            {
-                fail("Deserialization failed: before='" + beforeValue
-                        + "' after='" + afterValue + "'");
-            }
-        }
-        catch (IOException ioe)
-        {
-            fail("Unexpected exception whilst checking serialization: " + ioe);
-        }
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/EnclosingMethodAttributeTestCase.java b/src/test/java/org/apache/bcel/EnclosingMethodAttributeTestCase.java
deleted file mode 100644
index edf7267..0000000
--- a/src/test/java/org/apache/bcel/EnclosingMethodAttributeTestCase.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.bcel;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.EnclosingMethod;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.util.SyntheticRepository;
-
-public class EnclosingMethodAttributeTestCase extends AbstractTestCase
-{
-    /**
-     * Verify for an inner class declared inside the 'main' method that the
-     * enclosing method attribute is set correctly.
-     */
-    public void testCheckMethodLevelNamedInnerClass()
-            throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AttributeTestClassEM01$1S");
-        ConstantPool pool = clazz.getConstantPool();
-        Attribute[] encMethodAttrs = findAttribute("EnclosingMethod", clazz);
-        assertTrue("Expected 1 EnclosingMethod attribute but found "
-                + encMethodAttrs.length, encMethodAttrs.length == 1);
-        EnclosingMethod em = (EnclosingMethod) encMethodAttrs[0];
-        String enclosingClassName = em.getEnclosingClass().getBytes(pool);
-        String enclosingMethodName = em.getEnclosingMethod().getName(pool);
-        assertTrue(
-                "Expected class name to be 'org/apache/bcel/data/AttributeTestClassEM01' but was "
-                        + enclosingClassName, enclosingClassName
-                        .equals("org/apache/bcel/data/AttributeTestClassEM01"));
-        assertTrue("Expected method name to be 'main' but was "
-                + enclosingMethodName, enclosingMethodName.equals("main"));
-    }
-
-    /**
-     * Verify for an inner class declared at the type level that the
-     * EnclosingMethod attribute is set correctly (i.e. to a null value)
-     */
-    public void testCheckClassLevelNamedInnerClass()
-            throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AttributeTestClassEM02$1");
-        ConstantPool pool = clazz.getConstantPool();
-        Attribute[] encMethodAttrs = findAttribute("EnclosingMethod", clazz);
-        assertTrue("Expected 1 EnclosingMethod attribute but found "
-                + encMethodAttrs.length, encMethodAttrs.length == 1);
-        EnclosingMethod em = (EnclosingMethod) encMethodAttrs[0];
-        String enclosingClassName = em.getEnclosingClass().getBytes(pool);
-        assertTrue(
-                "The class is not within a method, so method_index should be null, but it is "
-                        + em.getEnclosingMethodIndex(), em
-                        .getEnclosingMethodIndex() == 0);
-        assertTrue(
-                "Expected class name to be 'org/apache/bcel/data/AttributeTestClassEM02' but was "
-                        + enclosingClassName, enclosingClassName
-                        .equals("org/apache/bcel/data/AttributeTestClassEM02"));
-    }
-
-    /**
-     * Check that we can save and load the attribute correctly.
-     */
-    public void testAttributeSerializtion() throws ClassNotFoundException,
-            IOException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AttributeTestClassEM02$1");
-        ConstantPool pool = clazz.getConstantPool();
-        Attribute[] encMethodAttrs = findAttribute("EnclosingMethod", clazz);
-        assertTrue("Expected 1 EnclosingMethod attribute but found "
-                + encMethodAttrs.length, encMethodAttrs.length == 1);
-        // Write it out
-        File tfile = createTestdataFile("AttributeTestClassEM02$1.class");
-        clazz.dump(tfile);
-        // Read in the new version and check it is OK
-        SyntheticRepository repos2 = createRepos(".");
-        @SuppressWarnings("unused")
-        JavaClass clazz2 = repos2.loadClass("AttributeTestClassEM02$1");
-        EnclosingMethod em = (EnclosingMethod) encMethodAttrs[0];
-        String enclosingClassName = em.getEnclosingClass().getBytes(pool);
-        assertTrue(
-                "The class is not within a method, so method_index should be null, but it is "
-                        + em.getEnclosingMethodIndex(), em
-                        .getEnclosingMethodIndex() == 0);
-        assertTrue(
-                "Expected class name to be 'org/apache/bcel/data/AttributeTestClassEM02' but was "
-                        + enclosingClassName, enclosingClassName
-                        .equals("org/apache/bcel/data/AttributeTestClassEM02"));
-        tfile.deleteOnExit();
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/EnumAccessFlagTestCase.java b/src/test/java/org/apache/bcel/EnumAccessFlagTestCase.java
deleted file mode 100644
index 86a26f3..0000000
--- a/src/test/java/org/apache/bcel/EnumAccessFlagTestCase.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import org.apache.bcel.classfile.JavaClass;
-
-public class EnumAccessFlagTestCase extends AbstractTestCase
-{
-    /**
-     * An enumerated type, once compiled, should result in a class file that is
-     * marked such that we can determine from the access flags (through BCEL)
-     * that it was originally an enum type declaration.
-     */
-    public void testEnumClassSaysItIs() throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.SimpleEnum");
-        assertTrue(
-                "Expected SimpleEnum class to say it was an enum - but it didn't !",
-                clazz.isEnum());
-        clazz = getTestClass("org.apache.bcel.data.SimpleClass");
-        assertTrue(
-                "Expected SimpleClass class to say it was not an enum - but it didn't !",
-                !clazz.isEnum());
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/FieldAnnotationsTestCase.java b/src/test/java/org/apache/bcel/FieldAnnotationsTestCase.java
deleted file mode 100644
index ec65fce..0000000
--- a/src/test/java/org/apache/bcel/FieldAnnotationsTestCase.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import java.io.File;
-import java.io.IOException;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.ElementValuePair;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.FieldGen;
-import org.apache.bcel.generic.AnnotationEntryGen;
-import org.apache.bcel.util.SyntheticRepository;
-
-public class FieldAnnotationsTestCase extends AbstractTestCase
-{
-    /**
-     * Check field AnnotationEntrys are retrievable.
-     */
-    public void testFieldAnnotationEntrys() throws ClassNotFoundException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AnnotatedFields");
-        // TODO L...;?
-        checkAnnotatedField(clazz, "i", "Lorg/apache/bcel/data/SimpleAnnotation;", "id", "1");
-        checkAnnotatedField(clazz, "s", "Lorg/apache/bcel/data/SimpleAnnotation;", "id", "2");
-    }
-
-    /**
-     * Check field AnnotationEntrys (de)serialize ok.
-     */
-    public void testFieldAnnotationEntrysReadWrite() throws ClassNotFoundException,
-            IOException
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AnnotatedFields");
-        checkAnnotatedField(clazz, "i", "Lorg/apache/bcel/data/SimpleAnnotation;", "id", "1");
-        checkAnnotatedField(clazz, "s", "Lorg/apache/bcel/data/SimpleAnnotation;", "id", "2");
-        // Write it out
-        File tfile = createTestdataFile("AnnotatedFields.class");
-        clazz.dump(tfile);
-        SyntheticRepository repos2 = createRepos(".");
-        repos2.loadClass("AnnotatedFields");
-        checkAnnotatedField(clazz, "i", "Lorg/apache/bcel/data/SimpleAnnotation;", "id", "1");
-        checkAnnotatedField(clazz, "s", "Lorg/apache/bcel/data/SimpleAnnotation;", "id", "2");
-        assertTrue(tfile.delete());
-    }
-
-    /**
-     * Check we can load in a class, modify its field AnnotationEntrys, save it,
-     * reload it and everything is correct.
-     */
-    public void testFieldAnnotationModification()
-            throws ClassNotFoundException
-    {
-        boolean dbg = false;
-        JavaClass clazz = getTestClass("org.apache.bcel.data.AnnotatedFields");
-        ClassGen clg = new ClassGen(clazz);
-        Field f = clg.getFields()[0];
-        if (dbg) {
-            System.err.println("Field in freshly constructed class is: " + f);
-        }
-        if (dbg) {
-            System.err.println("AnnotationEntrys on field are: "
-                    + dumpAnnotationEntries(f.getAnnotationEntries()));
-        }
-        AnnotationEntryGen fruitBasedAnnotationEntry = createFruitAnnotationEntry(clg
-                .getConstantPool(), "Tomato", false);
-        FieldGen fg = new FieldGen(f, clg.getConstantPool());
-        if (dbg) {
-            System.err.println("Adding AnnotationEntry to the field");
-        }
-        fg.addAnnotationEntry(fruitBasedAnnotationEntry);
-        if (dbg) {
-            System.err.println("FieldGen (mutable field) is " + fg);
-        }
-        if (dbg) {
-            System.err.println("with AnnotationEntrys: "
-                    + dumpAnnotationEntries(fg.getAnnotationEntries()));
-        }
-        if (dbg) {
-            System.err
-                    .println("Replacing original field with new field that has extra AnnotationEntry");
-        }
-        clg.removeField(f);
-        clg.addField(fg.getField());
-        f = clg.getFields()[1]; // there are two fields in the class, removing
-                                // and readding has changed the order
-        // so this time index [1] is the 'int i' field
-        if (dbg) {
-            System.err.println("Field now looks like this: " + f);
-        }
-        if (dbg) {
-            System.err.println("With AnnotationEntrys: "
-                    + dumpAnnotationEntries(f.getAnnotationEntries()));
-        }
-        assertTrue("Should be 2 AnnotationEntrys on this field, but there are "
-                + f.getAnnotationEntries().length, f.getAnnotationEntries().length == 2);
-    }
-
-    // helper methods
-    public void checkAnnotatedField(JavaClass clazz, String fieldname,
-            String AnnotationEntryName, String AnnotationEntryElementName,
-            String AnnotationEntryElementValue)
-    {
-        Field[] fields = clazz.getFields();
-        for (Field f : fields) {
-            AnnotationEntry[] fieldAnnotationEntrys = f.getAnnotationEntries();
-            if (f.getName().equals(fieldname))
-            {
-                checkAnnotationEntry(fieldAnnotationEntrys[0], AnnotationEntryName,
-                        AnnotationEntryElementName, AnnotationEntryElementValue);
-            }
-        }
-    }
-
-    private void checkAnnotationEntry(AnnotationEntry a, String name, String elementname,
-            String elementvalue)
-    {
-        assertTrue("Expected AnnotationEntry to have name " + name
-                + " but it had name " + a.getAnnotationType(), a.getAnnotationType()
-                .equals(name));
-        assertTrue("Expected AnnotationEntry to have one element but it had "
-                + a.getElementValuePairs().length, a.getElementValuePairs().length == 1);
-        ElementValuePair envp = a.getElementValuePairs()[0];
-        assertTrue("Expected element name " + elementname + " but was "
-                + envp.getNameString(), elementname
-                .equals(envp.getNameString()));
-        assertTrue("Expected element value " + elementvalue + " but was "
-                + envp.getValue().stringifyValue(), elementvalue.equals(envp
-                .getValue().stringifyValue()));
-    }
-
-    // helper methods
-    public void checkValue(AnnotationEntry a, String name, String tostring)
-    {
-        for (int i = 0; i < a.getElementValuePairs().length; i++)
-        {
-            ElementValuePair element = a.getElementValuePairs()[i];
-            if (element.getNameString().equals(name))
-            {
-                if (!element.getValue().stringifyValue().equals(tostring))
-                {
-                    fail("Expected element " + name + " to have value "
-                            + tostring + " but it had value "
-                            + element.getValue().stringifyValue());
-                }
-                return;
-            }
-        }
-        fail("Didnt find named element " + name);
-    }
-}
diff --git a/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java b/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java
deleted file mode 100644
index 64442c9..0000000
--- a/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java
+++ /dev/null
@@ -1,698 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.bcel;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.ArrayElementValue;
-import org.apache.bcel.classfile.ElementValue;
-import org.apache.bcel.classfile.ElementValuePair;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.ParameterAnnotationEntry;
-import org.apache.bcel.classfile.SimpleElementValue;
-import org.apache.bcel.generic.ALOAD;
-import org.apache.bcel.generic.ASTORE;
-import org.apache.bcel.generic.AnnotationElementValueGen;
-import org.apache.bcel.generic.AnnotationEntryGen;
-import org.apache.bcel.generic.ArrayElementValueGen;
-import org.apache.bcel.generic.ArrayType;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.ConstantPoolGen;
-import org.apache.bcel.generic.ElementValueGen;
-import org.apache.bcel.generic.ElementValuePairGen;
-import org.apache.bcel.generic.GOTO;
-import org.apache.bcel.generic.InstructionConstants;
-import org.apache.bcel.generic.InstructionFactory;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.LocalVariableGen;
-import org.apache.bcel.generic.MethodGen;
-import org.apache.bcel.generic.ObjectType;
-import org.apache.bcel.generic.PUSH;
-import org.apache.bcel.generic.SimpleElementValueGen;
-import org.apache.bcel.generic.Type;
-import org.apache.bcel.util.SyntheticRepository;
-
-/**
- * The program that some of the tests generate looks like this:
- *
- * <pre>
- * public class HelloWorld
- * {
- *  public static void main(String[] argv)
- *  {
- *      BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
- *      String name = null;
- *
- *      try
- *      {
- *          name = &quot;Andy&quot;;
- *      }
- *      catch (IOException e)
- *      {
- *          return;
- *      }
- *      System.out.println(&quot;Hello, &quot; + name);
- *  }
- * }
- * </pre>
- */
-public class GeneratingAnnotatedClassesTestCase extends AbstractTestCase
-{
-    /**
-     * Steps in the test:
-     * <ol>
-     * <li>Programmatically construct the HelloWorld program</li>
-     * <li>Add two simple annotations at the class level</li>
-     * <li>Save the class to disk</li>
-     * <li>Reload the class using the 'static' variant of the BCEL classes</li>
-     * <li>Check the attributes are OK</li>
-     * </ol>
-     */
-    public void testGenerateClassLevelAnnotations()
-            throws ClassNotFoundException
-    {
-        // Create HelloWorld
-        ClassGen cg = createClassGen("HelloWorld");
-        cg.setMajor(49);
-        cg.setMinor(0);
-        ConstantPoolGen cp = cg.getConstantPool();
-        InstructionList il = new InstructionList();
-        cg.addAnnotationEntry(createSimpleVisibleAnnotation(cp));
-        cg.addAnnotationEntry(createSimpleInvisibleAnnotation(cp));
-        buildClassContents(cg, cp, il);
-        //System.out.println(cg.getJavaClass().toString());
-        dumpClass(cg, "HelloWorld.class");
-        JavaClass jc = getClassFrom(".", "HelloWorld");
-        AnnotationEntry[] as = jc.getAnnotationEntries();
-        assertTrue("Should be two AnnotationEntries but found " + as.length,
-                as.length == 2);
-        // TODO L??;
-        assertTrue(
-                "Name of annotation 1 should be LSimpleAnnotation; but it is "
-                        + as[0].getAnnotationType(), as[0].getAnnotationType()
-                        .equals("LSimpleAnnotation;"));
-        assertTrue(
-                "Name of annotation 2 should be LSimpleAnnotation; but it is "
-                        + as[1].getAnnotationType(), as[1].getAnnotationType()
-                        .equals("LSimpleAnnotation;"));
-        ElementValuePair[] vals = as[0].getElementValuePairs();
-        ElementValuePair nvp = vals[0];
-        assertTrue(
-                "Name of element in SimpleAnnotation should be 'id' but it is "
-                        + nvp.getNameString(), nvp.getNameString().equals("id"));
-        ElementValue ev = nvp.getValue();
-        assertTrue("Type of element value should be int but it is "
-                + ev.getElementValueType(),
-                ev.getElementValueType() == ElementValue.PRIMITIVE_INT);
-        assertTrue("Value of element should be 4 but it is "
-                + ev.stringifyValue(), ev.stringifyValue().equals("4"));
-        assertTrue(createTestdataFile("HelloWorld.class").delete());
-    }
-
-    /**
-     * Just check that we can dump a class that has a method annotation on it
-     * and it is still there when we read it back in
-     */
-    public void testGenerateMethodLevelAnnotations1()
-            throws ClassNotFoundException
-    {
-        // Create HelloWorld
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        InstructionList il = new InstructionList();
-        buildClassContentsWithAnnotatedMethods(cg, cp, il);
-        // Check annotation is OK
-        int i = cg.getMethods()[0].getAnnotationEntries().length;
-        assertTrue(
-                "Prior to dumping, main method should have 1 annotation but has "
-                        + i, i == 1);
-        dumpClass(cg, "temp1" + File.separator + "HelloWorld.class");
-        JavaClass jc2 = getClassFrom("temp1", "HelloWorld");
-        // Check annotation is OK
-        i = jc2.getMethods()[0].getAnnotationEntries().length;
-        assertTrue("JavaClass should say 1 annotation on main method but says "
-                + i, i == 1);
-        ClassGen cg2 = new ClassGen(jc2);
-        // Check it now it is a ClassGen
-        Method[] m = cg2.getMethods();
-        i = m[0].getAnnotationEntries().length;
-        assertTrue("The main 'Method' should have one annotation but has " + i,
-                i == 1);
-        MethodGen mg = new MethodGen(m[0], cg2.getClassName(), cg2
-                .getConstantPool());
-        // Check it finally when the Method is changed to a MethodGen
-        i = mg.getAnnotationEntries().length;
-        assertTrue("The main 'MethodGen' should have one annotation but has "
-                + i, i == 1);
-        assertTrue(wipe("temp1" + File.separator + "HelloWorld.class"));
-    }
-
-    /**
-     * Going further than the last test - when we reload the method back in,
-     * let's change it (adding a new annotation) and then store that, read it
-     * back in and verify both annotations are there !
-     */
-    public void testGenerateMethodLevelAnnotations2()
-            throws ClassNotFoundException
-    {
-        // Create HelloWorld
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        InstructionList il = new InstructionList();
-        buildClassContentsWithAnnotatedMethods(cg, cp, il);
-        dumpClass(cg, "temp2", "HelloWorld.class");
-        JavaClass jc2 = getClassFrom("temp2", "HelloWorld");
-        ClassGen cg2 = new ClassGen(jc2);
-        // Main method after reading the class back in
-        Method mainMethod1 = jc2.getMethods()[0];
-        assertTrue("The 'Method' should have one annotations but has "
-                + mainMethod1.getAnnotationEntries().length, mainMethod1
-                .getAnnotationEntries().length == 1);
-        MethodGen mainMethod2 = new MethodGen(mainMethod1, cg2.getClassName(),
-                cg2.getConstantPool());
-        assertTrue("The 'MethodGen' should have one annotations but has "
-                + mainMethod2.getAnnotationEntries().length, mainMethod2
-                .getAnnotationEntries().length == 1);
-        mainMethod2.addAnnotationEntry(createFruitAnnotation(cg2
-                .getConstantPool(), "Pear"));
-        cg2.removeMethod(mainMethod1);
-        cg2.addMethod(mainMethod2.getMethod());
-        dumpClass(cg2, "temp3", "HelloWorld.class");
-        JavaClass jc3 = getClassFrom("temp3", "HelloWorld");
-        ClassGen cg3 = new ClassGen(jc3);
-        Method mainMethod3 = cg3.getMethods()[1];
-        int i = mainMethod3.getAnnotationEntries().length;
-        assertTrue("The 'Method' should now have two annotations but has " + i,
-                i == 2);
-        assertTrue(wipe("temp2", "HelloWorld.class"));
-        assertTrue(wipe("temp3", "HelloWorld.class"));
-    }
-
-    // J5TODO: Need to add deleteFile calls to many of these tests
-    /**
-     * Transform simple class from an immutable to a mutable object.
-     */
-    public void testTransformClassToClassGen_SimpleTypes()
-            throws ClassNotFoundException
-    {
-        JavaClass jc = getTestClass("org.apache.bcel.data.SimpleAnnotatedClass");
-        ClassGen cgen = new ClassGen(jc);
-        // Check annotations are correctly preserved
-        AnnotationEntryGen[] annotations = cgen.getAnnotationEntries();
-        assertTrue("Expected one annotation but found " + annotations.length,
-                annotations.length == 1);
-    }
-
-    /**
-     * Transform simple class from an immutable to a mutable object. The class
-     * is annotated with an annotation that uses an enum.
-     */
-    public void testTransformClassToClassGen_EnumType()
-            throws ClassNotFoundException
-    {
-        JavaClass jc = getTestClass("org.apache.bcel.data.AnnotatedWithEnumClass");
-        ClassGen cgen = new ClassGen(jc);
-        // Check annotations are correctly preserved
-        AnnotationEntryGen[] annotations = cgen.getAnnotationEntries();
-        assertTrue("Expected one annotation but found " + annotations.length,
-                annotations.length == 1);
-    }
-
-    /**
-     * Transform simple class from an immutable to a mutable object. The class
-     * is annotated with an annotation that uses an array of SimpleAnnotations.
-     */
-    public void testTransformClassToClassGen_ArrayAndAnnotationTypes()
-            throws ClassNotFoundException
-    {
-        JavaClass jc = getTestClass("org.apache.bcel.data.AnnotatedWithCombinedAnnotation");
-        ClassGen cgen = new ClassGen(jc);
-        // Check annotations are correctly preserved
-        AnnotationEntryGen[] annotations = cgen.getAnnotationEntries();
-        assertTrue("Expected one annotation but found " + annotations.length,
-                annotations.length == 1);
-        AnnotationEntryGen a = annotations[0];
-        assertTrue("That annotation should only have one value but has "
-                + a.getValues().size(), a.getValues().size() == 1);
-        ElementValuePairGen nvp = a.getValues().get(0);
-        ElementValueGen value = nvp.getValue();
-        assertTrue("Value should be ArrayElementValueGen but is " + value,
-                value instanceof ArrayElementValueGen);
-        ArrayElementValueGen arrayValue = (ArrayElementValueGen) value;
-        assertTrue("Array value should be size one but is "
-                + arrayValue.getElementValuesSize(), arrayValue
-                .getElementValuesSize() == 1);
-        ElementValueGen innerValue = arrayValue.getElementValues().get(0);
-        assertTrue(
-                "Value in the array should be AnnotationElementValueGen but is "
-                        + innerValue,
-                innerValue instanceof AnnotationElementValueGen);
-        AnnotationElementValueGen innerAnnotationValue = (AnnotationElementValueGen) innerValue;
-        assertTrue("Should be called Lorg/apache/bcel/data/SimpleAnnotation; but is called: "
-                + innerAnnotationValue.getAnnotation().getTypeName(),
-                innerAnnotationValue.getAnnotation().getTypeSignature().equals(
-                        "Lorg/apache/bcel/data/SimpleAnnotation;"));
-
-        // check the three methods
-        Method[] methods = cgen.getMethods();
-        assertEquals(3, methods.length);
-        for(Method method : methods)
-        {
-            String methodName= method.getName();
-            if(methodName.equals("<init>"))
-            {
-                assertMethodAnnotations(method, 0, 1);
-                assertParameterAnnotations(method, 0, 1);
-            }
-            else if(methodName.equals("methodWithArrayOfZeroAnnotations"))
-            {
-                assertMethodAnnotations(method, 1, 0);
-            }
-            else if(methodName.equals("methodWithArrayOfTwoAnnotations"))
-            {
-                assertMethodAnnotations(method, 1, 2);
-            }
-            else
-            {
-                fail("unexpected method "+method.getName());
-            }
-        }
-    }
-
-    private void assertMethodAnnotations(Method method, int expectedNumberAnnotations, int nExpectedArrayValues)
-    {
-        String methodName= method.getName();
-        AnnotationEntry[] annos= method.getAnnotationEntries();
-        assertEquals("For "+methodName, expectedNumberAnnotations, annos.length);
-        if(expectedNumberAnnotations!=0)
-        {
-            assertArrayElementValue(nExpectedArrayValues, annos[0]);
-        }
-    }
-
-    private void assertArrayElementValue(int nExpectedArrayValues, AnnotationEntry anno)
-    {
-        ElementValuePair elementValuePair = anno.getElementValuePairs()[0];
-        assertEquals("value", elementValuePair.getNameString());
-        ArrayElementValue ev = (ArrayElementValue) elementValuePair.getValue();
-        ElementValue[] eva = ev.getElementValuesArray();
-        assertEquals(nExpectedArrayValues, eva.length);
-    }
-
-    private void assertParameterAnnotations(Method method, int... expectedNumberOfParmeterAnnotations)
-    {
-        String methodName= "For "+method.getName();
-        ParameterAnnotationEntry[] parameterAnnotations= method.getParameterAnnotationEntries();
-        assertEquals(methodName, expectedNumberOfParmeterAnnotations.length, parameterAnnotations.length);
-
-        int i= 0;
-        for(ParameterAnnotationEntry parameterAnnotation : parameterAnnotations)
-        {
-            AnnotationEntry[] annos= parameterAnnotation.getAnnotationEntries();
-            int expectedLength = expectedNumberOfParmeterAnnotations[i++];
-            assertEquals(methodName+" parameter "+i, expectedLength, annos.length);
-            if(expectedLength!=0)
-            {
-                assertSimpleElementValue(annos[0]);
-            }
-        }
-    }
-
-    private void assertSimpleElementValue(AnnotationEntry anno)
-    {
-        ElementValuePair elementValuePair = anno.getElementValuePairs()[0];
-        assertEquals("id", elementValuePair.getNameString());
-        SimpleElementValue ev = (SimpleElementValue)elementValuePair.getValue();
-        assertEquals(42, ev.getValueInt());
-    }
-
-    /**
-     * Transform complex class from an immutable to a mutable object.
-     */
-    public void testTransformComplexClassToClassGen()
-            throws ClassNotFoundException
-    {
-        JavaClass jc = getTestClass("org.apache.bcel.data.ComplexAnnotatedClass");
-        ClassGen cgen = new ClassGen(jc);
-        // Check annotations are correctly preserved
-        AnnotationEntryGen[] annotations = cgen.getAnnotationEntries();
-        assertTrue("Expected one annotation but found " + annotations.length,
-                annotations.length == 1);
-        List<?> l = annotations[0].getValues();
-        boolean found = false;
-        for (Object name : l) {
-            ElementValuePairGen element = (ElementValuePairGen) name;
-            if (element.getNameString().equals("dval"))
-            {
-                if (((SimpleElementValueGen) element.getValue())
-                        .stringifyValue().equals("33.4")) {
-                    found = true;
-                }
-            }
-        }
-        assertTrue("Did not find double annotation value with value 33.4",
-                found);
-    }
-
-    /**
-     * Load a class in and modify it with a new attribute - A SimpleAnnotation
-     * annotation
-     */
-    public void testModifyingClasses1() throws ClassNotFoundException
-    {
-        JavaClass jc = getTestClass("org.apache.bcel.data.SimpleAnnotatedClass");
-        ClassGen cgen = new ClassGen(jc);
-        ConstantPoolGen cp = cgen.getConstantPool();
-        cgen.addAnnotationEntry(createFruitAnnotation(cp, "Pineapple"));
-        assertTrue("Should now have two annotations but has "
-                + cgen.getAnnotationEntries().length, cgen
-                .getAnnotationEntries().length == 2);
-        dumpClass(cgen, "SimpleAnnotatedClass.class");
-        assertTrue(wipe("SimpleAnnotatedClass.class"));
-    }
-
-    /**
-     * Load a class in and modify it with a new attribute - A ComplexAnnotation
-     * annotation
-     */
-    public void testModifyingClasses2() throws ClassNotFoundException
-    {
-        JavaClass jc = getTestClass("org.apache.bcel.data.SimpleAnnotatedClass");
-        ClassGen cgen = new ClassGen(jc);
-        ConstantPoolGen cp = cgen.getConstantPool();
-        cgen.addAnnotationEntry(createCombinedAnnotation(cp));
-        assertTrue("Should now have two annotations but has "
-                + cgen.getAnnotationEntries().length, cgen
-                .getAnnotationEntries().length == 2);
-        dumpClass(cgen, "SimpleAnnotatedClass.class");
-        JavaClass jc2 = getClassFrom(".", "SimpleAnnotatedClass");
-        jc2.getAnnotationEntries();
-        assertTrue(wipe("SimpleAnnotatedClass.class"));
-        // System.err.println(jc2.toString());
-    }
-
-    private void dumpClass(ClassGen cg, String fname)
-    {
-        try
-        {
-            File f = createTestdataFile(fname);
-            cg.getJavaClass().dump(f);
-        }
-        catch (java.io.IOException e)
-        {
-            System.err.println(e);
-        }
-    }
-
-    private void dumpClass(ClassGen cg, String dir, String fname)
-    {
-        dumpClass(cg, dir + File.separator + fname);
-    }
-
-    private void buildClassContentsWithAnnotatedMethods(ClassGen cg,
-            ConstantPoolGen cp, InstructionList il)
-    {
-        // Create method 'public static void main(String[]argv)'
-        MethodGen mg = createMethodGen("main", il, cp);
-        InstructionFactory factory = new InstructionFactory(cg);
-        mg.addAnnotationEntry(createSimpleVisibleAnnotation(mg
-                .getConstantPool()));
-        // We now define some often used types:
-        ObjectType i_stream = new ObjectType("java.io.InputStream");
-        ObjectType p_stream = new ObjectType("java.io.PrintStream");
-        // Create variables in and name : We call the constructors, i.e.,
-        // execute BufferedReader(InputStreamReader(System.in)) . The reference
-        // to the BufferedReader object stays on top of the stack and is stored
-        // in the newly allocated in variable.
-        il.append(factory.createNew("java.io.BufferedReader"));
-        il.append(InstructionConstants.DUP); // Use predefined constant
-        il.append(factory.createNew("java.io.InputStreamReader"));
-        il.append(InstructionConstants.DUP);
-        il.append(factory.createFieldAccess("java.lang.System", "in", i_stream,
-                Constants.GETSTATIC));
-        il.append(factory.createInvoke("java.io.InputStreamReader", "<init>",
-                Type.VOID, new Type[] { i_stream }, Constants.INVOKESPECIAL));
-        il.append(factory.createInvoke("java.io.BufferedReader", "<init>",
-                Type.VOID, new Type[] { new ObjectType("java.io.Reader") },
-                Constants.INVOKESPECIAL));
-        LocalVariableGen lg = mg.addLocalVariable("in", new ObjectType(
-                "java.io.BufferedReader"), null, null);
-        int in = lg.getIndex();
-        lg.setStart(il.append(new ASTORE(in))); // "in" valid from here
-        // Create local variable name and initialize it to null
-        lg = mg.addLocalVariable("name", Type.STRING, null, null);
-        int name = lg.getIndex();
-        il.append(InstructionConstants.ACONST_NULL);
-        lg.setStart(il.append(new ASTORE(name))); // "name" valid from here
-        // Create try-catch block: We remember the start of the block, read a
-        // line from the standard input and store it into the variable name .
-        // InstructionHandle try_start = il.append(factory.createFieldAccess(
-        // "java.lang.System", "out", p_stream, Constants.GETSTATIC));
-        // il.append(new PUSH(cp, "Please enter your name> "));
-        // il.append(factory.createInvoke("java.io.PrintStream", "print",
-        // Type.VOID, new Type[] { Type.STRING },
-        // Constants.INVOKEVIRTUAL));
-        // il.append(new ALOAD(in));
-        // il.append(factory.createInvoke("java.io.BufferedReader", "readLine",
-        // Type.STRING, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
-        InstructionHandle try_start = il.append(new PUSH(cp, "Andy"));
-        il.append(new ASTORE(name));
-        // Upon normal execution we jump behind exception handler, the target
-        // address is not known yet.
-        GOTO g = new GOTO(null);
-        InstructionHandle try_end = il.append(g);
-        // We add the exception handler which simply returns from the method.
-        LocalVariableGen var_ex = mg.addLocalVariable("ex", Type
-                .getType("Ljava.io.IOException;"), null, null);
-        int var_ex_slot = var_ex.getIndex();
-        InstructionHandle handler = il.append(new ASTORE(var_ex_slot));
-        var_ex.setStart(handler);
-        var_ex.setEnd(il.append(InstructionConstants.RETURN));
-        mg.addExceptionHandler(try_start, try_end, handler, new ObjectType(
-                "java.io.IOException"));
-        // "Normal" code continues, now we can set the branch target of the GOTO
-        // .
-        InstructionHandle ih = il.append(factory.createFieldAccess(
-                "java.lang.System", "out", p_stream, Constants.GETSTATIC));
-        g.setTarget(ih);
-        // Printing "Hello": String concatenation compiles to StringBuffer
-        // operations.
-        il.append(factory.createNew(Type.STRINGBUFFER));
-        il.append(InstructionConstants.DUP);
-        il.append(new PUSH(cp, "Hello, "));
-        il
-                .append(factory.createInvoke("java.lang.StringBuffer",
-                        "<init>", Type.VOID, new Type[] { Type.STRING },
-                        Constants.INVOKESPECIAL));
-        il.append(new ALOAD(name));
-        il.append(factory.createInvoke("java.lang.StringBuffer", "append",
-                Type.STRINGBUFFER, new Type[] { Type.STRING },
-                Constants.INVOKEVIRTUAL));
-        il.append(factory.createInvoke("java.lang.StringBuffer", "toString",
-                Type.STRING, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
-        il
-                .append(factory.createInvoke("java.io.PrintStream", "println",
-                        Type.VOID, new Type[] { Type.STRING },
-                        Constants.INVOKEVIRTUAL));
-        il.append(InstructionConstants.RETURN);
-        // Finalization: Finally, we have to set the stack size, which normally
-        // would have to be computed on the fly and add a default constructor
-        // method to the class, which is empty in this case.
-        mg.setMaxStack();
-        mg.setMaxLocals();
-        cg.addMethod(mg.getMethod());
-        il.dispose(); // Allow instruction handles to be reused
-        cg.addEmptyConstructor(Constants.ACC_PUBLIC);
-    }
-
-    private void buildClassContents(ClassGen cg, ConstantPoolGen cp,
-            InstructionList il)
-    {
-        // Create method 'public static void main(String[]argv)'
-        MethodGen mg = createMethodGen("main", il, cp);
-        InstructionFactory factory = new InstructionFactory(cg);
-        // We now define some often used types:
-        ObjectType i_stream = new ObjectType("java.io.InputStream");
-        ObjectType p_stream = new ObjectType("java.io.PrintStream");
-        // Create variables in and name : We call the constructors, i.e.,
-        // execute BufferedReader(InputStreamReader(System.in)) . The reference
-        // to the BufferedReader object stays on top of the stack and is stored
-        // in the newly allocated in variable.
-        il.append(factory.createNew("java.io.BufferedReader"));
-        il.append(InstructionConstants.DUP); // Use predefined constant
-        il.append(factory.createNew("java.io.InputStreamReader"));
-        il.append(InstructionConstants.DUP);
-        il.append(factory.createFieldAccess("java.lang.System", "in", i_stream,
-                Constants.GETSTATIC));
-        il.append(factory.createInvoke("java.io.InputStreamReader", "<init>",
-                Type.VOID, new Type[] { i_stream }, Constants.INVOKESPECIAL));
-        il.append(factory.createInvoke("java.io.BufferedReader", "<init>",
-                Type.VOID, new Type[] { new ObjectType("java.io.Reader") },
-                Constants.INVOKESPECIAL));
-        LocalVariableGen lg = mg.addLocalVariable("in", new ObjectType(
-                "java.io.BufferedReader"), null, null);
-        int in = lg.getIndex();
-        lg.setStart(il.append(new ASTORE(in))); // "in" valid from here
-        // Create local variable name and initialize it to null
-        lg = mg.addLocalVariable("name", Type.STRING, null, null);
-        int name = lg.getIndex();
-        il.append(InstructionConstants.ACONST_NULL);
-        lg.setStart(il.append(new ASTORE(name))); // "name" valid from here
-        // Create try-catch block: We remember the start of the block, read a
-        // line from the standard input and store it into the variable name .
-        // InstructionHandle try_start = il.append(factory.createFieldAccess(
-        // "java.lang.System", "out", p_stream, Constants.GETSTATIC));
-        // il.append(new PUSH(cp, "Please enter your name> "));
-        // il.append(factory.createInvoke("java.io.PrintStream", "print",
-        // Type.VOID, new Type[] { Type.STRING },
-        // Constants.INVOKEVIRTUAL));
-        // il.append(new ALOAD(in));
-        // il.append(factory.createInvoke("java.io.BufferedReader", "readLine",
-        // Type.STRING, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
-        InstructionHandle try_start = il.append(new PUSH(cp, "Andy"));
-        il.append(new ASTORE(name));
-        // Upon normal execution we jump behind exception handler, the target
-        // address is not known yet.
-        GOTO g = new GOTO(null);
-        InstructionHandle try_end = il.append(g);
-        // We add the exception handler which simply returns from the method.
-        LocalVariableGen var_ex = mg.addLocalVariable("ex", Type
-                .getType("Ljava.io.IOException;"), null, null);
-        int var_ex_slot = var_ex.getIndex();
-        InstructionHandle handler = il.append(new ASTORE(var_ex_slot));
-        var_ex.setStart(handler);
-        var_ex.setEnd(il.append(InstructionConstants.RETURN));
-        mg.addExceptionHandler(try_start, try_end, handler, new ObjectType(
-                "java.io.IOException"));
-        // "Normal" code continues, now we can set the branch target of the GOTO
-        // .
-        InstructionHandle ih = il.append(factory.createFieldAccess(
-                "java.lang.System", "out", p_stream, Constants.GETSTATIC));
-        g.setTarget(ih);
-        // Printing "Hello": String concatenation compiles to StringBuffer
-        // operations.
-        il.append(factory.createNew(Type.STRINGBUFFER));
-        il.append(InstructionConstants.DUP);
-        il.append(new PUSH(cp, "Hello, "));
-        il
-                .append(factory.createInvoke("java.lang.StringBuffer",
-                        "<init>", Type.VOID, new Type[] { Type.STRING },
-                        Constants.INVOKESPECIAL));
-        il.append(new ALOAD(name));
-        il.append(factory.createInvoke("java.lang.StringBuffer", "append",
-                Type.STRINGBUFFER, new Type[] { Type.STRING },
-                Constants.INVOKEVIRTUAL));
-        il.append(factory.createInvoke("java.lang.StringBuffer", "toString",
-                Type.STRING, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
-        il
-                .append(factory.createInvoke("java.io.PrintStream", "println",
-                        Type.VOID, new Type[] { Type.STRING },
-                        Constants.INVOKEVIRTUAL));
-        il.append(InstructionConstants.RETURN);
-        // Finalization: Finally, we have to set the stack size, which normally
-        // would have to be computed on the fly and add a default constructor
-        // method to the class, which is empty in this case.
-        mg.setMaxStack();
-        mg.setMaxLocals();
-        cg.addMethod(mg.getMethod());
-        il.dispose(); // Allow instruction handles to be reused
-        cg.addEmptyConstructor(Constants.ACC_PUBLIC);
-    }
-
-    private JavaClass getClassFrom(String where, String clazzname)
-            throws ClassNotFoundException
-    {
-        // System.out.println(where);
-        SyntheticRepository repos = createRepos(where);
-        return repos.loadClass(clazzname);
-    }
-
-    // helper methods
-    private ClassGen createClassGen(String classname)
-    {
-        return new ClassGen(classname, "java.lang.Object", "<generated>",
-                Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
-    }
-
-    private MethodGen createMethodGen(String methodname, InstructionList il,
-            ConstantPoolGen cp)
-    {
-        return new MethodGen(Constants.ACC_STATIC | Constants.ACC_PUBLIC, // access
-                // flags
-                Type.VOID, // return type
-                new Type[] { new ArrayType(Type.STRING, 1) }, // argument
-                // types
-                new String[] { "argv" }, // arg names
-                methodname, "HelloWorld", // method, class
-                il, cp);
-    }
-
-    public AnnotationEntryGen createSimpleVisibleAnnotation(ConstantPoolGen cp)
-    {
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_INT, cp, 4);
-        ElementValuePairGen nvGen = new ElementValuePairGen("id", evg, cp);
-        ObjectType t = new ObjectType("SimpleAnnotation");
-        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
-        elements.add(nvGen);
-        AnnotationEntryGen a = new AnnotationEntryGen(t, elements, true, cp);
-        return a;
-    }
-
-    public AnnotationEntryGen createFruitAnnotation(ConstantPoolGen cp,
-            String aFruit)
-    {
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.STRING, cp, aFruit);
-        ElementValuePairGen nvGen = new ElementValuePairGen("fruit", evg, cp);
-        ObjectType t = new ObjectType("SimpleStringAnnotation");
-        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
-        elements.add(nvGen);
-        return new AnnotationEntryGen(t, elements, true, cp);
-    }
-
-    public AnnotationEntryGen createCombinedAnnotation(ConstantPoolGen cp)
-    {
-        // Create an annotation instance
-        AnnotationEntryGen a = createSimpleVisibleAnnotation(cp);
-        ArrayElementValueGen array = new ArrayElementValueGen(cp);
-        array.addElement(new AnnotationElementValueGen(a, cp));
-        ElementValuePairGen nvp = new ElementValuePairGen("value", array, cp);
-        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
-        elements.add(nvp);
-        return new AnnotationEntryGen(new ObjectType("CombinedAnnotation"),
-                elements, true, cp);
-    }
-
-    public AnnotationEntryGen createSimpleInvisibleAnnotation(ConstantPoolGen cp)
-    {
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_INT, cp, 4);
-        ElementValuePairGen nvGen = new ElementValuePairGen("id", evg, cp);
-        ObjectType t = new ObjectType("SimpleAnnotation");
-        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
-        elements.add(nvGen);
-        AnnotationEntryGen a = new AnnotationEntryGen(t, elements, false, cp);
-        return a;
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/InstructionFinderTestCase.java b/src/test/java/org/apache/bcel/InstructionFinderTestCase.java
deleted file mode 100644
index fe73e59..0000000
--- a/src/test/java/org/apache/bcel/InstructionFinderTestCase.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-package org.apache.bcel;
-
-import java.util.Iterator;
-
-import org.apache.bcel.AbstractTestCase;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.util.InstructionFinder;
-
-public class InstructionFinderTestCase extends AbstractTestCase
-{
-    public void testSearchAll() throws Exception
-    {
-        JavaClass clazz = getTestClass("org.apache.bcel.util.InstructionFinder");
-        Method[] methods = clazz.getMethods();
-        Method searchM = null;
-        for (Method m : methods)
-        {
-            if (m.getName().equals("search") && (m.getArgumentTypes().length == 3))
-            {
-                searchM = m;
-                break;
-            }
-        }
-
-        if (searchM == null) {
-            throw new Exception("search method not found");
-        }
-
-        byte[] bytes = searchM.getCode().getCode();
-        InstructionList il = new InstructionList(bytes);
-        InstructionFinder finder = new InstructionFinder(il);
-        Iterator<?> it = finder.search(".*", il.getStart(), null);
-
-        InstructionHandle[] ihs = (InstructionHandle[])it.next();
-        int size = 0;
-        for (InstructionHandle ih : ihs)
-        {
-            size += ih.getInstruction().getLength();
-        }
-        assertEquals(bytes.length, size);
-
-    }
-}
diff --git a/src/test/java/org/apache/bcel/NanoTimer.java b/src/test/java/org/apache/bcel/NanoTimer.java
deleted file mode 100644
index 3c9978b..0000000
--- a/src/test/java/org/apache/bcel/NanoTimer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-public class NanoTimer {
-
-    private long time = 0;
-
-    public NanoTimer start() {
-        time -= System.nanoTime();
-        return this;
-    }
-
-    public void stop() {
-        time += System.nanoTime();
-    }
-
-    public void subtract(NanoTimer o) {
-        time -= o.time;
-    }
-
-    public void reset() {
-        time = 0;
-    }
-
-    /**
-     * May ony be called after stop has been called as many times as start.
-     */
-    @Override
-    public String toString() {
-        return ((double) (time) / 1000000000) + " s";
-    }
-
-
-
-}
diff --git a/src/test/java/org/apache/bcel/PerformanceTest.java b/src/test/java/org/apache/bcel/PerformanceTest.java
deleted file mode 100644
index d7e3eda..0000000
--- a/src/test/java/org/apache/bcel/PerformanceTest.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Enumeration;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-import org.apache.bcel.classfile.ClassParser;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.generic.ClassGen;
-import org.apache.bcel.generic.InstructionList;
-import org.apache.bcel.generic.MethodGen;
-import org.junit.Assert;
-
-import junit.framework.TestCase;
-
-public final class PerformanceTest extends TestCase {
-
-    private static byte[] read(final InputStream is) throws IOException {
-        if (is == null) {
-            throw new IOException("Class not found");
-        }
-        byte[] b = new byte[is.available()];
-        int len = 0;
-        while (true) {
-            int n = is.read(b, len, b.length - len);
-            if (n == -1) {
-                if (len < b.length) {
-                    byte[] c = new byte[len];
-                    System.arraycopy(b, 0, c, 0, len);
-                    b = c;
-                }
-                return b;
-            }
-            len += n;
-            if (len == b.length) {
-                byte[] c = new byte[b.length + 1000];
-                System.arraycopy(b, 0, c, 0, len);
-                b = c;
-            }
-        }
-    }
-
-    private static void test(File lib) throws IOException {
-        NanoTimer total = new NanoTimer();
-        NanoTimer parseTime = new NanoTimer();
-        NanoTimer cgenTime = new NanoTimer();
-        NanoTimer mgenTime = new NanoTimer();
-        NanoTimer mserTime = new NanoTimer();
-        NanoTimer serTime = new NanoTimer();
-
-        System.out.println("parsing " + lib);
-
-        total.start();
-        JarFile jar = new JarFile(lib);
-        Enumeration<?> en = jar.entries();
-
-        while (en.hasMoreElements()) {
-            JarEntry e = (JarEntry) en.nextElement();
-            if (e.getName().endsWith(".class")) {
-                InputStream in = jar.getInputStream(e);
-                byte[] bytes = read(in);
-
-                parseTime.start();
-                JavaClass clazz = new ClassParser(new ByteArrayInputStream(bytes), e.getName())
-                        .parse();
-                parseTime.stop();
-
-                cgenTime.start();
-                ClassGen cg = new ClassGen(clazz);
-                cgenTime.stop();
-
-                Method[] methods = cg.getMethods();
-                for (Method m : methods) {
-                    mgenTime.start();
-                    MethodGen mg = new MethodGen(m, cg.getClassName(), cg.getConstantPool());
-                    InstructionList il = mg.getInstructionList();
-                    mgenTime.stop();
-
-                    mserTime.start();
-                    if (il != null) {
-                        mg.getInstructionList().setPositions();
-                        mg.setMaxLocals();
-                        mg.setMaxStack();
-                    }
-                    cg.replaceMethod(m, mg.getMethod());
-                    mserTime.stop();
-                }
-
-                serTime.start();
-                cg.getJavaClass().getBytes();
-                serTime.stop();
-            }
-        }
-
-        jar.close();
-        total.stop();
-        System.out.println("ClassParser.parse: " + parseTime);
-        System.out.println("ClassGen.init: " + cgenTime);
-        System.out.println("MethodGen.init: " + mgenTime);
-        System.out.println("MethodGen.getMethod: " + mserTime);
-        System.out.println("ClassGen.getJavaClass.getBytes: " + serTime);
-        System.out.println("Total: " + total);
-        System.out.println();
-    }
-
-    public void testPerformance() throws IOException {
-        File javaLib = new File(System.getProperty("java.home") + "/lib");
-        javaLib.listFiles(new FileFilter() {
-
-            public boolean accept(File file) {
-                if(file.getName().endsWith(".jar")) {
-                    try {
-                        test(file);
-                    } catch (IOException e) {
-                        Assert.fail(e.getMessage());
-                    }
-                }
-                return false;
-            }
-        });
-    }
-
-}
diff --git a/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java b/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java
deleted file mode 100644
index 15cbbe2..0000000
--- a/src/test/java/org/apache/bcel/classfile/UtilityTestCase.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.bcel.classfile;
-
-import junit.framework.TestCase;
-
-public class UtilityTestCase extends TestCase {
-    
-    public void testSignatureToStringWithGenerics() throws Exception {
-        assertEquals("generic signature", "java.util.Map<X, java.util.List<Y>>", Utility.signatureToString("Ljava/util/Map<TX;Ljava/util/List<TY;>;>;"));
-        assertEquals("generic signature", "java.util.Set<? extends java.nio.file.OpenOption>", Utility.signatureToString("Ljava/util/Set<+Ljava/nio/file/OpenOption;>;"));
-        assertEquals("generic signature", "java.nio.file.attribute.FileAttribute<?>...[]", Utility.signatureToString("[Ljava/nio/file/attribute/FileAttribute<*>;"));
-    }
-}
diff --git a/src/test/java/org/apache/bcel/data/AnnotatedFields.java b/src/test/java/org/apache/bcel/data/AnnotatedFields.java
deleted file mode 100644
index 76ae6bd..0000000
--- a/src/test/java/org/apache/bcel/data/AnnotatedFields.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-public class AnnotatedFields {
-  @SimpleAnnotation(id=1) int i;
-
-  @SimpleAnnotation(id=2) String s;
-}
diff --git a/src/test/java/org/apache/bcel/data/AnnotatedWithCombinedAnnotation.java b/src/test/java/org/apache/bcel/data/AnnotatedWithCombinedAnnotation.java
deleted file mode 100644
index a8de8f8..0000000
--- a/src/test/java/org/apache/bcel/data/AnnotatedWithCombinedAnnotation.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.bcel.data;
-
-@CombinedAnnotation( { @SimpleAnnotation(id = 4) })
-public class AnnotatedWithCombinedAnnotation
-{
-    public AnnotatedWithCombinedAnnotation(int param1, @SimpleAnnotation(id=42) int param2) {
-    }
-
-    @CombinedAnnotation( {})
-    public void methodWithArrayOfZeroAnnotations() {
-    }
-
-    @CombinedAnnotation( { @SimpleAnnotation(id=1, fruit="apples"), @SimpleAnnotation(id= 2, fruit="oranges")})
-    public void methodWithArrayOfTwoAnnotations() {
-    }
-}
diff --git a/src/test/java/org/apache/bcel/data/AnnotatedWithEnumClass.java b/src/test/java/org/apache/bcel/data/AnnotatedWithEnumClass.java
deleted file mode 100644
index f238eb4..0000000
--- a/src/test/java/org/apache/bcel/data/AnnotatedWithEnumClass.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-@AnnotationEnumElement(enumval = SimpleEnum.Red)
-public class AnnotatedWithEnumClass
-{
-}
diff --git a/src/test/java/org/apache/bcel/data/AnnotationEnumElement.java b/src/test/java/org/apache/bcel/data/AnnotationEnumElement.java
deleted file mode 100644
index 6e0863c..0000000
--- a/src/test/java/org/apache/bcel/data/AnnotationEnumElement.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-@Retention(RetentionPolicy.RUNTIME)
-public @interface AnnotationEnumElement
-{
-    SimpleEnum enumval();
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/data/AnonymousClassTest.java b/src/test/java/org/apache/bcel/data/AnonymousClassTest.java
deleted file mode 100644
index eabc6cb..0000000
--- a/src/test/java/org/apache/bcel/data/AnonymousClassTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-public class AnonymousClassTest
-{
-    public void foo()
-    {
-        new Runnable()
-        {
-            public void run()
-            {
-            }
-        }.run();
-    }
-
-    class X
-    {
-    }
-
-    static class Y
-    {
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/data/AttributeTestClassEM01.java b/src/test/java/org/apache/bcel/data/AttributeTestClassEM01.java
deleted file mode 100644
index ac477ef..0000000
--- a/src/test/java/org/apache/bcel/data/AttributeTestClassEM01.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-public class AttributeTestClassEM01
-{
-    public static void main(String[] argv)
-    {
-        class S
-        {
-            public void sayhello()
-            {
-                System.err.println("hello");
-            }
-        }
-    }
-}
diff --git a/src/test/java/org/apache/bcel/data/AttributeTestClassEM02.java b/src/test/java/org/apache/bcel/data/AttributeTestClassEM02.java
deleted file mode 100644
index 8a7a039..0000000
--- a/src/test/java/org/apache/bcel/data/AttributeTestClassEM02.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-public class AttributeTestClassEM02
-{
-    Runnable r = new Runnable()
-    {
-        public void run()
-        {
-            System.err.println("hello");
-        }
-    };
-
-    public static void main(String[] argv)
-    {
-    }
-}
diff --git a/src/test/java/org/apache/bcel/data/CombinedAnnotation.java b/src/test/java/org/apache/bcel/data/CombinedAnnotation.java
deleted file mode 100644
index cfa41a3..0000000
--- a/src/test/java/org/apache/bcel/data/CombinedAnnotation.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-@Retention(RetentionPolicy.RUNTIME)
-public @interface CombinedAnnotation
-{
-    public SimpleAnnotation[] value();
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/data/ComplexAnnotatedClass.java b/src/test/java/org/apache/bcel/data/ComplexAnnotatedClass.java
deleted file mode 100644
index 62eef11..0000000
--- a/src/test/java/org/apache/bcel/data/ComplexAnnotatedClass.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-@ComplexAnnotation(ival = 4, bval = 2, cval = '5', fval = 3.0f, dval = 33.4, zval = false, jval = 56, sval = 99)
-public class ComplexAnnotatedClass
-{
-}
diff --git a/src/test/java/org/apache/bcel/data/ComplexAnnotation.java b/src/test/java/org/apache/bcel/data/ComplexAnnotation.java
deleted file mode 100644
index a35450a..0000000
--- a/src/test/java/org/apache/bcel/data/ComplexAnnotation.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ComplexAnnotation
-{
-    int ival();
-
-    byte bval();
-
-    char cval();
-
-    long jval();
-
-    double dval();
-
-    boolean zval();
-
-    short sval();
-
-    float fval();
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/data/MarkedType.java b/src/test/java/org/apache/bcel/data/MarkedType.java
deleted file mode 100644
index 598338c..0000000
--- a/src/test/java/org/apache/bcel/data/MarkedType.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-@MarkerAnnotationInvisible
-@MarkerAnnotation
-public class MarkedType
-{
-}
diff --git a/src/test/java/org/apache/bcel/data/MarkerAnnotation.java b/src/test/java/org/apache/bcel/data/MarkerAnnotation.java
deleted file mode 100644
index bd61f7e..0000000
--- a/src/test/java/org/apache/bcel/data/MarkerAnnotation.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-import java.lang.annotation.*;
-
-@Retention(RetentionPolicy.RUNTIME)
-public @interface MarkerAnnotation
-{
-}
diff --git a/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java b/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java
deleted file mode 100644
index 89b8e4b..0000000
--- a/src/test/java/org/apache/bcel/data/MarkerAnnotationInvisible.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-import java.lang.annotation.*;
-
-@Retention(RetentionPolicy.CLASS)
-public @interface MarkerAnnotationInvisible { }
diff --git a/src/test/java/org/apache/bcel/data/SimpleAnnotatedClass.java b/src/test/java/org/apache/bcel/data/SimpleAnnotatedClass.java
deleted file mode 100644
index eff28aa..0000000
--- a/src/test/java/org/apache/bcel/data/SimpleAnnotatedClass.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-@SimpleAnnotation(id = 4)
-public class SimpleAnnotatedClass
-{
-}
diff --git a/src/test/java/org/apache/bcel/data/SimpleAnnotation.java b/src/test/java/org/apache/bcel/data/SimpleAnnotation.java
deleted file mode 100644
index f6f0876..0000000
--- a/src/test/java/org/apache/bcel/data/SimpleAnnotation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-import java.lang.annotation.*;
-
-@Retention(RetentionPolicy.RUNTIME)
-public @interface SimpleAnnotation
-{
-    int id();
-
-    String fruit() default "bananas";
-}
diff --git a/src/test/java/org/apache/bcel/data/SimpleClass.java b/src/test/java/org/apache/bcel/data/SimpleClass.java
deleted file mode 100644
index 34994d3..0000000
--- a/src/test/java/org/apache/bcel/data/SimpleClass.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-public class SimpleClass
-{
-    public static void main(String[] argv)
-    {
-        // Nothing unusual in this class
-    }
-}
diff --git a/src/test/java/org/apache/bcel/data/SimpleEnum.java b/src/test/java/org/apache/bcel/data/SimpleEnum.java
deleted file mode 100644
index 1db0bbf..0000000
--- a/src/test/java/org/apache/bcel/data/SimpleEnum.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.data;
-
-public enum SimpleEnum { Red,Orange,Yellow,Green,Blue,Indigo,Violet }
diff --git a/src/test/java/org/apache/bcel/generic/AnnotationGenTestCase.java b/src/test/java/org/apache/bcel/generic/AnnotationGenTestCase.java
deleted file mode 100644
index e2c9dcc..0000000
--- a/src/test/java/org/apache/bcel/generic/AnnotationGenTestCase.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.bcel.generic;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.bcel.AbstractTestCase;
-import org.apache.bcel.Constants;
-import org.apache.bcel.classfile.Annotations;
-import org.apache.bcel.classfile.Attribute;
-import org.apache.bcel.classfile.RuntimeInvisibleAnnotations;
-import org.apache.bcel.classfile.RuntimeVisibleAnnotations;
-
-public class AnnotationGenTestCase extends AbstractTestCase
-{
-    private ClassGen createClassGen(String classname)
-    {
-        return new ClassGen(classname, "java.lang.Object", "<generated>",
-                Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
-    }
-
-    /**
-     * Programmatically construct an mutable annotation (AnnotationGen) object.
-     */
-    public void testConstructMutableAnnotation()
-    {
-        // Create the containing class
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        // Create the simple primitive value '4' of type 'int'
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_INT, cp, 4);
-        // Give it a name, call it 'id'
-        ElementValuePairGen nvGen = new ElementValuePairGen("id", evg,
-                cp);
-        // Check it looks right
-        assertTrue(
-                "Should include string 'id=4' but says: " + nvGen.toString(),
-                nvGen.toString().contains("id=4"));
-        ObjectType t = new ObjectType("SimpleAnnotation");
-        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
-        elements.add(nvGen);
-        // Build an annotation of type 'SimpleAnnotation' with 'id=4' as the
-        // only value :)
-        AnnotationEntryGen a = new AnnotationEntryGen(t, elements, true, cp);
-        // Check we can save and load it ok
-        checkSerialize(a, cp);
-    }
-
-    public void testVisibleInvisibleAnnotationGen()
-    {
-        // Create the containing class
-        ClassGen cg = createClassGen("HelloWorld");
-        ConstantPoolGen cp = cg.getConstantPool();
-        // Create the simple primitive value '4' of type 'int'
-        SimpleElementValueGen evg = new SimpleElementValueGen(
-                ElementValueGen.PRIMITIVE_INT, cp, 4);
-        // Give it a name, call it 'id'
-        ElementValuePairGen nvGen = new ElementValuePairGen("id", evg,
-                cp);
-        // Check it looks right
-        assertTrue(
-                "Should include string 'id=4' but says: " + nvGen.toString(),
-                nvGen.toString().contains("id=4"));
-        ObjectType t = new ObjectType("SimpleAnnotation");
-        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
-        elements.add(nvGen);
-        // Build a RV annotation of type 'SimpleAnnotation' with 'id=4' as the
-        // only value :)
-        AnnotationEntryGen a = new AnnotationEntryGen(t, elements, true, cp);
-        List<AnnotationEntryGen> v = new ArrayList<AnnotationEntryGen>();
-        v.add(a);
-        Attribute[] attributes = AnnotationEntryGen.getAnnotationAttributes(cp, v);
-        boolean foundRV = false;
-        for (Attribute attribute : attributes) {
-            if (attribute instanceof RuntimeVisibleAnnotations)
-            {
-                assertTrue(((Annotations) attribute).isRuntimeVisible());
-                foundRV = true;
-            }
-        }
-        assertTrue("Should have seen a RuntimeVisibleAnnotation", foundRV);
-        // Build a RIV annotation of type 'SimpleAnnotation' with 'id=4' as the
-        // only value :)
-        AnnotationEntryGen a2 = new AnnotationEntryGen(t, elements, false, cp);
-        List<AnnotationEntryGen> v2 = new ArrayList<AnnotationEntryGen>();
-        v2.add(a2);
-        Attribute[] attributes2 = AnnotationEntryGen.getAnnotationAttributes(cp, v2);
-        boolean foundRIV = false;
-        for (Attribute attribute : attributes2) {
-            if (attribute instanceof RuntimeInvisibleAnnotations)
-            {
-                assertFalse(((Annotations) attribute).isRuntimeVisible());
-                foundRIV = true;
-            }
-        }
-        assertTrue("Should have seen a RuntimeInvisibleAnnotation", foundRIV);
-    }
-
-    private void checkSerialize(AnnotationEntryGen a, ConstantPoolGen cpg)
-    {
-        try
-        {
-            String beforeName = a.getTypeName();
-            ByteArrayOutputStream baos = new ByteArrayOutputStream();
-            DataOutputStream dos = new DataOutputStream(baos);
-            a.dump(dos);
-            dos.flush();
-            dos.close();
-            byte[] bs = baos.toByteArray();
-            ByteArrayInputStream bais = new ByteArrayInputStream(bs);
-            DataInputStream dis = new DataInputStream(bais);
-            AnnotationEntryGen annAfter = AnnotationEntryGen.read(dis, cpg, a
-                    .isRuntimeVisible());
-            dis.close();
-            String afterName = annAfter.getTypeName();
-            if (!beforeName.equals(afterName))
-            {
-                fail("Deserialization failed: before type='" + beforeName
-                        + "' after type='" + afterName + "'");
-            }
-            if (a.getValues().size() != annAfter.getValues().size())
-            {
-                fail("Different numbers of element name value pairs?? "
-                        + a.getValues().size() + "!="
-                        + annAfter.getValues().size());
-            }
-            for (int i = 0; i < a.getValues().size(); i++)
-            {
-                ElementValuePairGen beforeElement = a.getValues().get(i);
-                ElementValuePairGen afterElement = annAfter.getValues().get(i);
-                if (!beforeElement.getNameString().equals(
-                        afterElement.getNameString()))
-                {
-                    fail("Different names?? " + beforeElement.getNameString()
-                            + "!=" + afterElement.getNameString());
-                }
-            }
-        }
-        catch (IOException ioe)
-        {
-            fail("Unexpected exception whilst checking serialization: " + ioe);
-        }
-    }
-}
diff --git a/src/test/java/org/apache/bcel/generic/MethodGenTestCase.java b/src/test/java/org/apache/bcel/generic/MethodGenTestCase.java
deleted file mode 100644
index 3e64131..0000000
--- a/src/test/java/org/apache/bcel/generic/MethodGenTestCase.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-package org.apache.bcel.generic;
-
-import java.util.Arrays;
-
-import junit.framework.TestCase;
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.Method;
-
-public class MethodGenTestCase extends TestCase {
-
-    public static class Foo {
-        public void bar() {
-            int a = 1;
-        }
-    }
-
-    private MethodGen getMethod(Class cls, String name) throws ClassNotFoundException {
-        JavaClass jc = Repository.lookupClass(cls);
-        ConstantPoolGen cp = new ConstantPoolGen(jc.getConstantPool());
-        for (Method method : jc.getMethods()) {
-            if (method.getName().equals(name)) {
-                return new MethodGen(method, jc.getClassName(), cp);
-            }
-        }
-
-        fail("Method " + name + " not found in class " + cls);
-        return null;
-    }
-
-    public void testRemoveLocalVariable() throws Exception {
-        MethodGen mg = getMethod(Foo.class, "bar");
-
-        LocalVariableGen lv = mg.getLocalVariables()[1];
-        assertEquals("variable name", "a", lv.getName());
-        InstructionHandle start = lv.getStart();
-        InstructionHandle end = lv.getEnd();
-        assertNotNull("scope start", start);
-        assertNotNull("scope end", end);
-        assertTrue("scope start not targeted by the local variable", Arrays.asList(start.getTargeters()).contains(lv));
-        assertTrue("scope end not targeted by the local variable", Arrays.asList(end.getTargeters()).contains(lv));
-
-        // now let's remove the local variable
-        mg.removeLocalVariable(lv);
-
-        assertFalse("scope start still targeted by the removed variable", Arrays.asList(start.getTargeters()).contains(lv));
-        assertFalse("scope end still targeted by the removed variable", Arrays.asList(end.getTargeters()).contains(lv));
-        assertNull("scope start", lv.getStart());
-        assertNull("scope end", lv.getEnd());
-    }
-
-    public void testRemoveLocalVariables() throws Exception {
-        MethodGen mg = getMethod(Foo.class, "bar");
-
-        LocalVariableGen lv = mg.getLocalVariables()[1];
-        assertEquals("variable name", "a", lv.getName());
-        InstructionHandle start = lv.getStart();
-        InstructionHandle end = lv.getEnd();
-        assertNotNull("scope start", start);
-        assertNotNull("scope end", end);
-        assertTrue("scope start not targeted by the local variable", Arrays.asList(start.getTargeters()).contains(lv));
-        assertTrue("scope end not targeted by the local variable", Arrays.asList(end.getTargeters()).contains(lv));
-
-        // now let's remove the local variables
-        mg.removeLocalVariables();
-
-        assertFalse("scope start still targeted by the removed variable", Arrays.asList(start.getTargeters()).contains(lv));
-        assertFalse("scope end still targeted by the removed variable", Arrays.asList(end.getTargeters()).contains(lv));
-        assertNull("scope start", lv.getStart());
-        assertNull("scope end", lv.getEnd());
-    }
-}
diff --git a/src/test/java/org/apache/bcel/util/Class2HTMLTestCase.java b/src/test/java/org/apache/bcel/util/Class2HTMLTestCase.java
deleted file mode 100644
index 008a6b9..0000000
--- a/src/test/java/org/apache/bcel/util/Class2HTMLTestCase.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.bcel.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-
-import junit.framework.TestCase;
-import org.apache.bcel.classfile.ClassParser;
-
-public class Class2HTMLTestCase extends TestCase {
-
-    public void testConvertJavaUtil() throws Exception {
-        File outputDir = new File("target/test-output/html");
-        outputDir.mkdirs();
-
-        FileInputStream file = new FileInputStream("target/test-classes/Java8Example.class");
-
-        ClassParser parser = new ClassParser(file, "Java8Example.class");
-
-        new Class2HTML(parser.parse(), outputDir.getAbsolutePath() + "/");
-    }
-}
diff --git a/src/test/java/org/apache/bcel/util/InstructionFinderTest.java b/src/test/java/org/apache/bcel/util/InstructionFinderTest.java
deleted file mode 100644
index 76e771b..0000000
--- a/src/test/java/org/apache/bcel/util/InstructionFinderTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.util;
-
-import java.util.Iterator;
-
-import org.apache.bcel.AbstractTestCase;
-import org.apache.bcel.generic.IADD;
-import org.apache.bcel.generic.ILOAD;
-import org.apache.bcel.generic.ISTORE;
-import org.apache.bcel.generic.InstructionHandle;
-import org.apache.bcel.generic.InstructionList;
-
-public class InstructionFinderTest extends AbstractTestCase {
-
-    public void testSearch() {
-        InstructionList il = new InstructionList();
-        il.append(new ILOAD(1));
-        il.append(new ILOAD(2));
-        il.append(new IADD());
-        il.append(new ISTORE(3));
-        InstructionFinder finder = new InstructionFinder(il);
-
-        Iterator<?> it = finder.search("ILOAD IADD", il.getInstructionHandles()[0], null );
-        InstructionHandle[] ihs = (InstructionHandle[])it.next();
-        assertEquals(2, ihs.length);
-        assertEquals(ihs[0].getInstruction(), new ILOAD(2));
-        assertEquals(ihs[1].getInstruction(), new IADD());
-    }
-}
diff --git a/src/test/java/org/apache/bcel/verifier/AbstractVerifierTestCase.java b/src/test/java/org/apache/bcel/verifier/AbstractVerifierTestCase.java
deleted file mode 100644
index da5257b..0000000
--- a/src/test/java/org/apache/bcel/verifier/AbstractVerifierTestCase.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.verifier;
-
-import org.apache.bcel.Repository;
-import org.apache.bcel.classfile.JavaClass;
-
-import junit.framework.TestCase;
-
-public abstract class AbstractVerifierTestCase extends TestCase {
-
-    public static final String TEST_PACKAGE = "org.apache.bcel.verifier.tests.";
-
-    /**
-     * Asserts that the verification of the given class is OK. If it isn't it throws an AssertionFailedError with the given message.
-     *
-     * @param classname simple classname of the class to verify
-     * @param message   message displayed if assertion fails
-     */
-    public void assertVerifyOK(String classname, String message) {
-        final String testClassname = TEST_PACKAGE + classname;
-        assertTrue(message, doAllPasses(testClassname));
-    }
-
-    /**
-     * Asserts that the verification of the given class is rejected. If it isn't it throws an AssertionFailedError with the given message.
-     *
-     * @param classname simple classname of the class to verify
-     * @param message   message displayed if assertion fails
-     */
-    public void assertVerifyRejected(String classname, String message) {
-        final String testClassname = TEST_PACKAGE + classname;
-        assertFalse(message, doAllPasses(testClassname));
-    }
-
-    /**
-     * Executes all the verification on the given class.
-     *
-     * @param classname name of the class to verify
-     * @return false if the verification fails, true otherwise
-     */
-    public boolean doAllPasses(String classname) {
-        int nbMethods = 0;
-
-        try {
-            JavaClass jc = Repository.lookupClass(classname);
-            nbMethods = jc.getMethods().length;
-        } catch (ClassNotFoundException e) {
-            fail(e.getMessage());
-            return false;
-        }
-
-        Verifier verifier = VerifierFactory.getVerifier(classname);
-        VerificationResult result = verifier.doPass1();
-        if (result.getStatus() != VerificationResult.VERIFIED_OK) {
-            return false;
-        }
-
-        result = verifier.doPass2();
-        if (result.getStatus() != VerificationResult.VERIFIED_OK) {
-            return false;
-        }
-
-        for (int i = nbMethods; --i >= 0; ) {
-            result = verifier.doPass3a(i);
-            if (result.getStatus() != VerificationResult.VERIFIED_OK) {
-                return false;
-            }
-            result = verifier.doPass3b(i);
-            if (result.getStatus() != VerificationResult.VERIFIED_OK) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-}
diff --git a/src/test/java/org/apache/bcel/verifier/VerifierArrayAccessTestCase.java b/src/test/java/org/apache/bcel/verifier/VerifierArrayAccessTestCase.java
deleted file mode 100644
index b69de12..0000000
--- a/src/test/java/org/apache/bcel/verifier/VerifierArrayAccessTestCase.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.verifier;
-
-
-public class VerifierArrayAccessTestCase extends AbstractVerifierTestCase {
-    
-    public void testInvalidArrayAccess() {
-        assertVerifyRejected("TestArrayAccess03", "Verification of an arraystore instruction on an object must fail.");
-        assertVerifyRejected("TestArrayAccess04", "Verification of an arraystore instruction of an int on an array of references must fail.");
-    }
-    
-    public void testValidArrayAccess() {
-        assertVerifyOK("TestArrayAccess01", "Verification of an arraystore instruction on an array that is not compatible with the stored element must pass.");
-        assertVerifyOK("TestArrayAccess02", "Verification of an arraystore instruction on an array that is not compatible with the stored element must pass.");
-    }
-    
-}
diff --git a/src/test/java/org/apache/bcel/verifier/VerifierInvokeTestCase.java b/src/test/java/org/apache/bcel/verifier/VerifierInvokeTestCase.java
deleted file mode 100644
index c93a0d4..0000000
--- a/src/test/java/org/apache/bcel/verifier/VerifierInvokeTestCase.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.verifier;
-
-
-public class VerifierInvokeTestCase extends AbstractVerifierTestCase {
-
-    public void testLegalInvokeVirtual() {
-        assertVerifyOK("TestLegalInvokeVirtual01", "Verification of invokevirtual on method defined in superclass must pass.");
-        assertVerifyOK("TestLegalInvokeVirtual02", "Verification of invokevirtual on method defined in superinterface must pass.");
-    }
-    
-    public void testLegalInvokeStatic() {
-        assertVerifyOK("TestLegalInvokeStatic01", "Verification of invokestatic on method defined in superclass must pass.");
-    }
-    
-    public void testLegalInvokeInterface() {
-        assertVerifyOK("TestLegalInvokeInterface01", "Verification of invokeinterface on method defined in superinterface must pass.");
-    }
-    
-    public void testLegalInvokeSpecial() {
-        assertVerifyOK("TestLegalInvokeSpecial01", "Verification of invokespecial on method defined in superclass must pass.");
-        assertVerifyOK("TestLegalInvokeSpecial02", "Verification of invokespecial on method defined in superclass must pass.");
-    }
-}
diff --git a/src/test/java/org/apache/bcel/verifier/VerifierReturnTestCase.java b/src/test/java/org/apache/bcel/verifier/VerifierReturnTestCase.java
deleted file mode 100644
index 6ffe402..0000000
--- a/src/test/java/org/apache/bcel/verifier/VerifierReturnTestCase.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.bcel.verifier;
-
-public class VerifierReturnTestCase extends AbstractVerifierTestCase {
-
-    public void testInvalidReturn() {
-        assertVerifyRejected("TestReturn01", "Verification of a void method that returns an object must fail.");
-        assertVerifyRejected("TestReturn03", "Verification of an int method that returns null must fail.");
-    }
-
-    public void testValidReturn() {
-        assertVerifyOK("TestReturn02", "Verification of a method that returns a newly created object must pass.");
-        assertVerifyOK("TestArray01", "Verification of a method that returns an array must pass.");
-    }
-}
diff --git a/src/test/java/org/apache/bcel/verifier/VerifierTestCase.java b/src/test/java/org/apache/bcel/verifier/VerifierTestCase.java
deleted file mode 100644
index cf1451e..0000000
--- a/src/test/java/org/apache/bcel/verifier/VerifierTestCase.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.verifier;
-
-import java.util.Collection;
-
-import junit.framework.TestCase;
-
-public class VerifierTestCase extends TestCase {
-
-    public void testDefaultMethodValidation() {
-        String classname = Collection.class.getName();
-
-        Verifier verifier = VerifierFactory.getVerifier(classname);
-        VerificationResult result = verifier.doPass1();
-
-        assertEquals("Pass 1 verification of " + classname + " failed: " + result.getMessage(), VerificationResult.VERIFIED_OK, result.getStatus());
-
-        result = verifier.doPass2();
-
-        assertEquals("Pass 2 verification of " + classname + " failed: " + result.getMessage(), VerificationResult.VERIFIED_OK, result.getStatus());
-    }
-}
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestArray01.java b/src/test/java/org/apache/bcel/verifier/tests/TestArray01.java
deleted file mode 100644
index 3ae5af7..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestArray01.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.bcel.verifier.tests;
-
-import java.io.Serializable;
-
-public class TestArray01{
-
-    public static Object test1(){
-        String[] a = new String[4];
-        a[0] = "";
-        a.equals(null);
-        test2(a);
-        test3(a);
-        test4(a);
-        return a;
-    }
-
-    @SuppressWarnings("unused")
-    public static void test2(Object o){
-    }
-
-    @SuppressWarnings("unused")
-    public static void test3(Serializable o){
-    }
-
-    @SuppressWarnings("unused")
-    public static void test4(Cloneable o){
-    }
-
-    public static Serializable test5(){
-        return new Object[1];
-    }
-
-    public static Cloneable test6(){
-        return new Object[1];
-    }
-
-    public static Object foo(String s){
-        return s;
-    }
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestArrayAccess01.java b/src/test/java/org/apache/bcel/verifier/tests/TestArrayAccess01.java
deleted file mode 100644
index 25e2e31..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestArrayAccess01.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-package org.apache.bcel.verifier.tests;
-
-
-public class TestArrayAccess01 extends XTestArray01{
-
-    public static void test(){
-        XTestArray01[] array = new TestArrayAccess01[1];
-        array[0] = new XTestArray01();
-    }
-   
-}
-
-class XTestArray01 {
-    
-}
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeInterface01.java b/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeInterface01.java
deleted file mode 100755
index 72ca560..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeInterface01.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.apache.bcel.verifier.tests;
-
-public class TestLegalInvokeInterface01{
-
-    public static void test1(Interface01 t){
-        t.run();
-    }
-}
-
-interface Interface01 extends Runnable {
-    
-}
\ No newline at end of file
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial01.java b/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial01.java
deleted file mode 100755
index 25f2d95..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial01.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.apache.bcel.verifier.tests;
-
-public class TestLegalInvokeSpecial01{
-
-    public static void test1(){
-       new TestLegalInvokeSpecial01().getClass();
-    }
-    
-}
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial02.java b/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial02.java
deleted file mode 100755
index e5f7372..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial02.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.apache.bcel.verifier.tests;
-
-abstract public class TestLegalInvokeSpecial02 implements Runnable{
-
-    public static void test1(TestLegalInvokeSpecial02 t, int i){
-        if(i > 0){
-            t.run();
-        }
-    }
-    
-}
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeStatic01.java b/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeStatic01.java
deleted file mode 100755
index 592f769..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeStatic01.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.apache.bcel.verifier.tests;
-
-public class TestLegalInvokeStatic01 extends Thread{
-
-    public static void test1() throws InterruptedException{
-       Thread.sleep(0);
-    }
-    
-}
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual01.java b/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual01.java
deleted file mode 100755
index 81e23ce..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual01.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.apache.bcel.verifier.tests;
-
-public class TestLegalInvokeVirtual01 {
-
-    public static void test1(){
-        new TestLegalInvokeVirtual01().toString();
-    }
-    
-}
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual02.java b/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual02.java
deleted file mode 100755
index a45cba1..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual02.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.apache.bcel.verifier.tests;
-
-abstract public class TestLegalInvokeVirtual02 implements Runnable{
-
-    public static void test1(TestLegalInvokeVirtual02 t, int i){
-        if(i > 0){
-            t.run();
-        }
-    }
-    
-}
diff --git a/src/test/java/org/apache/bcel/verifier/tests/TestReturn02.java b/src/test/java/org/apache/bcel/verifier/tests/TestReturn02.java
deleted file mode 100644
index 26b6419..0000000
--- a/src/test/java/org/apache/bcel/verifier/tests/TestReturn02.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-package org.apache.bcel.verifier.tests;
-
-public class TestReturn02 {
-
-    public static String test1(char[] data, int offset, int count) {
-        return new String(data, offset, count);
-    }
-    
-    public static Object test2(){
-        return new Object();
-    }
-    
-    public static boolean test3(){
-        return true;
-    }
-    
-    public static byte test4(){
-        return 1;
-    }
-    
-    public static short test5(){
-        return 1;
-    }
-    
-    public static char test6(){
-        return 'a';
-    }
-    
-    public static int test7(){
-        return 1;
-    }
-    
-    public static long test8(){
-        return 1l;
-    }
-    
-    public static float test9(){
-        return 1.0f;
-    }
-    
-    public static double test10(){
-        return 1.0;
-    }
-    
-    public static Object test11(){
-        return null;
-    }
-}
diff --git a/src/test/java/org/apache/bcel/visitors/CounterVisitor.java b/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
deleted file mode 100644
index 10b1778..0000000
--- a/src/test/java/org/apache/bcel/visitors/CounterVisitor.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * 
- */
-
-package org.apache.bcel.visitors;
-
-import org.apache.bcel.classfile.AnnotationDefault;
-import org.apache.bcel.classfile.AnnotationEntry;
-import org.apache.bcel.classfile.Annotations;
-import org.apache.bcel.classfile.BootstrapMethods;
-import org.apache.bcel.classfile.Code;
-import org.apache.bcel.classfile.CodeException;
-import org.apache.bcel.classfile.ConstantClass;
-import org.apache.bcel.classfile.ConstantDouble;
-import org.apache.bcel.classfile.ConstantFieldref;
-import org.apache.bcel.classfile.ConstantFloat;
-import org.apache.bcel.classfile.ConstantInteger;
-import org.apache.bcel.classfile.ConstantInterfaceMethodref;
-import org.apache.bcel.classfile.ConstantInvokeDynamic;
-import org.apache.bcel.classfile.ConstantLong;
-import org.apache.bcel.classfile.ConstantMethodref;
-import org.apache.bcel.classfile.ConstantNameAndType;
-import org.apache.bcel.classfile.ConstantPool;
-import org.apache.bcel.classfile.ConstantString;
-import org.apache.bcel.classfile.ConstantUtf8;
-import org.apache.bcel.classfile.ConstantValue;
-import org.apache.bcel.classfile.Deprecated;
-import org.apache.bcel.classfile.EnclosingMethod;
-import org.apache.bcel.classfile.ExceptionTable;
-import org.apache.bcel.classfile.Field;
-import org.apache.bcel.classfile.InnerClass;
-import org.apache.bcel.classfile.InnerClasses;
-import org.apache.bcel.classfile.JavaClass;
-import org.apache.bcel.classfile.LineNumber;
-import org.apache.bcel.classfile.LineNumberTable;
-import org.apache.bcel.classfile.LocalVariable;
-import org.apache.bcel.classfile.LocalVariableTable;
-import org.apache.bcel.classfile.LocalVariableTypeTable;
-import org.apache.bcel.classfile.Method;
-import org.apache.bcel.classfile.MethodParameters;
-import org.apache.bcel.classfile.ParameterAnnotations;
-import org.apache.bcel.classfile.Signature;
-import org.apache.bcel.classfile.SourceFile;
-import org.apache.bcel.classfile.StackMap;
-import org.apache.bcel.classfile.StackMapEntry;
-import org.apache.bcel.classfile.StackMapTable;
-import org.apache.bcel.classfile.StackMapTableEntry;
-import org.apache.bcel.classfile.Synthetic;
-import org.apache.bcel.classfile.Unknown;
-import org.apache.bcel.classfile.Visitor;
-
-public class CounterVisitor implements Visitor
-{
-    public int unknownCount = 0;
-
-    public int syntheticCount = 0;
-
-    public int stackMapEntryCount = 0;
-
-    public int stackMapCount = 0;
-
-    public int sourceFileCount = 0;
-
-    public int signatureAnnotationCount = 0;
-
-    public int parameterAnnotationCount = 0;
-
-    public int methodCount = 0;
-
-    public int localVariableTypeTableCount = 0;
-
-    public int localVariableTableCount = 0;
-
-    public int localVariableCount = 0;
-
-    public int lineNumberTableCount = 0;
-
-    public int lineNumberCount = 0;
-
-    public int javaClassCount = 0;
-
-    public int innerClassesCount = 0;
-
-    public int innerClassCount = 0;
-
-    public int fieldCount = 0;
-
-    public int exceptionTableCount = 0;
-
-    public int enclosingMethodCount = 0;
-
-    public int deprecatedCount = 0;
-
-    public int constantValueCount = 0;
-
-    public int constantUtf8Count = 0;
-
-    public int constantStringCount = 0;
-
-    public int constantNameAndTypeCount = 0;
-
-    public int constantPoolCount = 0;
-
-    public int constantMethodrefCount = 0;
-
-    public int constantLongCount = 0;
-
-    public int constantIntegerCount = 0;
-
-    public int constantInterfaceMethodrefCount = 0;
-
-    public int constantFloatCount = 0;
-
-    public int constantFieldrefCount = 0;
-
-    public int constantClassCount = 0;
-
-    public int constantDoubleCount = 0;
-
-    public int codeExceptionCount = 0;
-
-    public int codeCount = 0;
-
-    public int annotationEntryCount = 0;
-
-    public int annotationDefaultCount = 0;
-
-    public int annotationCount = 0;
-
-    public int stackMapTableCount = 0;
-
-    public int stackMapTableEntryCount = 0;
-
-    public int bootstrapMethodsCount = 0;
-
-    public int methodParametersCount = 0;
-
-
-    public void visitAnnotation(Annotations obj)
-    {
-        annotationCount++;
-    }
-
-    public void visitAnnotationDefault(AnnotationDefault obj)
-    {
-        annotationDefaultCount++;
-    }
-
-    public void visitAnnotationEntry(AnnotationEntry obj)
-    {
-        annotationEntryCount++;
-    }
-
-    public void visitCode(Code obj)
-    {
-        codeCount++;
-    }
-
-    public void visitCodeException(CodeException obj)
-    {
-        codeExceptionCount++;
-    }
-
-    public void visitConstantClass(ConstantClass obj)
-    {
-        constantClassCount++;
-    }
-
-    public void visitConstantDouble(ConstantDouble obj)
-    {
-        constantDoubleCount++;
-    }
-
-    public void visitConstantFieldref(ConstantFieldref obj)
-    {
-        constantFieldrefCount++;
-    }
-
-    public void visitConstantFloat(ConstantFloat obj)
-    {
-        constantFloatCount++;
-    }
-
-    public void visitConstantInteger(ConstantInteger obj)
-    {
-        constantIntegerCount++;
-    }
-
-    public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)
-    {
-        constantInterfaceMethodrefCount++;
-    }
-
-    public void visitConstantLong(ConstantLong obj)
-    {
-        constantLongCount++;
-    }
-
-    public void visitConstantMethodref(ConstantMethodref obj)
-    {
-        constantMethodrefCount++;
-    }
-
-    public void visitConstantNameAndType(ConstantNameAndType obj)
-    {
-        constantNameAndTypeCount++;
-    }
-
-    public void visitConstantPool(ConstantPool obj)
-    {
-        constantPoolCount++;
-    }
-
-    public void visitConstantString(ConstantString obj)
-    {
-        constantStringCount++;
-    }
-
-    public void visitConstantUtf8(ConstantUtf8 obj)
-    {
-        constantUtf8Count++;
-    }
-
-    public void visitConstantValue(ConstantValue obj)
-    {
-        constantValueCount++;
-    }
-
-    public void visitDeprecated(Deprecated obj)
-    {
-        deprecatedCount++;
-    }
-
-    public void visitEnclosingMethod(EnclosingMethod obj)
-    {
-        enclosingMethodCount++;
-    }
-
-    public void visitExceptionTable(ExceptionTable obj)
-    {
-        exceptionTableCount++;
-    }
-
-    public void visitField(Field obj)
-    {
-        fieldCount++;
-    }
-
-    public void visitInnerClass(InnerClass obj)
-    {
-        innerClassCount++;
-    }
-
-    public void visitInnerClasses(InnerClasses obj)
-    {
-        innerClassesCount++;
-    }
-
-    public void visitJavaClass(JavaClass obj)
-    {
-        javaClassCount++;
-    }
-
-    public void visitLineNumber(LineNumber obj)
-    {
-        lineNumberCount++;
-    }
-
-    public void visitLineNumberTable(LineNumberTable obj)
-    {
-        lineNumberTableCount++;
-    }
-
-    public void visitLocalVariable(LocalVariable obj)
-    {
-        localVariableCount++;
-    }
-
-    public void visitLocalVariableTable(LocalVariableTable obj)
-    {
-        localVariableTableCount++;
-    }
-
-    public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
-    {
-        localVariableTypeTableCount++;
-    }
-
-    public void visitMethod(Method obj)
-    {
-        methodCount++;
-    }
-
-    public void visitParameterAnnotation(ParameterAnnotations obj)
-    {
-        parameterAnnotationCount++;
-    }
-
-    public void visitSignature(Signature obj)
-    {
-        signatureAnnotationCount++;
-    }
-
-    public void visitSourceFile(SourceFile obj)
-    {
-        sourceFileCount++;
-    }
-
-    public void visitStackMap(StackMap obj)
-    {
-        stackMapCount++;
-    }
-
-    public void visitStackMapEntry(StackMapEntry obj)
-    {
-        stackMapEntryCount++;
-    }
-
-    public void visitSynthetic(Synthetic obj)
-    {
-        syntheticCount++;
-    }
-
-    public void visitUnknown(Unknown obj)
-    {
-        unknownCount++;
-    }
-
-    public void visitStackMapTable(StackMapTable obj)
-    {
-        stackMapTableCount++;
-    }
-
-    public void visitStackMapTableEntry(StackMapTableEntry obj)
-    {
-        stackMapTableEntryCount++;
-    }
-
-    public void visitBootstrapMethods(BootstrapMethods obj)
-    {
-        bootstrapMethodsCount++;
-    }
-
-    public void visitMethodParameters(MethodParameters obj)
-    {
-        methodParametersCount++;
-    }
-
-    public void visitConstantInvokeDynamic(ConstantInvokeDynamic obj)
-    {
-    }
-}
diff --git a/src/test/java/org/apache/commons/bcel6/AbstractCounterVisitorTestCase.java b/src/test/java/org/apache/commons/bcel6/AbstractCounterVisitorTestCase.java
new file mode 100644
index 0000000..5459ae7
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/AbstractCounterVisitorTestCase.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import org.apache.commons.bcel6.classfile.DescendingVisitor;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.visitors.CounterVisitor;
+
+public abstract class AbstractCounterVisitorTestCase extends AbstractTestCase
+{
+    protected abstract JavaClass getTestClass() throws ClassNotFoundException;
+
+    private CounterVisitor visitor = null;
+
+    @Override
+    public void setUp() throws ClassNotFoundException
+    {
+        visitor = new CounterVisitor();
+        new DescendingVisitor(getTestClass(), getVisitor()).visit();
+    }
+
+    public CounterVisitor getVisitor()
+    {
+        if (visitor == null) {
+            visitor = new CounterVisitor();
+        }
+        return visitor;
+    }
+
+    public void setVisitor(CounterVisitor visitor)
+    {
+        this.visitor = visitor;
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/AbstractTestCase.java b/src/test/java/org/apache/commons/bcel6/AbstractTestCase.java
new file mode 100644
index 0000000..ac0ba38
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/AbstractTestCase.java
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.AnnotationEntryGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.ElementValueGen;
+import org.apache.commons.bcel6.generic.ElementValuePairGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.SimpleElementValueGen;
+import org.apache.commons.bcel6.util.ClassPath;
+import org.apache.commons.bcel6.util.SyntheticRepository;
+
+import junit.framework.TestCase;
+
+public abstract class AbstractTestCase extends TestCase
+{
+    private final boolean verbose = false;
+
+    protected File createTestdataFile(String name)
+    {
+        return new File("target" + File.separator + "testdata" + File.separator
+                + name);
+    }
+
+    protected JavaClass getTestClass(String name) throws ClassNotFoundException
+    {
+        return SyntheticRepository.getInstance().loadClass(name);
+    }
+
+    protected Method getMethod(JavaClass cl, String methodname)
+    {
+        Method[] methods = cl.getMethods();
+        for (Method m : methods) {
+            if (m.getName().equals(methodname))
+            {
+                return m;
+            }
+        }
+        return null;
+    }
+
+    protected boolean wipe(String name)
+    {
+        return new File("target" + File.separator + "testdata" + File.separator
+                + name).delete();
+    }
+
+    protected boolean wipe(String dir, String name)
+    {
+        boolean b = wipe(dir + File.separator + name);
+        String[] files = new File(dir).list();
+        if (files == null || files.length == 0)
+        {
+            new File(dir).delete(); // Why does this not succeed? stupid thing
+        }
+        return b;
+    }
+
+    public SyntheticRepository createRepos(String cpentry)
+    {
+        ClassPath cp = new ClassPath("target" + File.separator + "testdata"
+                + File.separator + cpentry + File.separator);
+        return SyntheticRepository.getInstance(cp);
+    }
+
+    protected Attribute[] findAttribute(String name, JavaClass clazz)
+    {
+        Attribute[] all = clazz.getAttributes();
+        List<Attribute> chosenAttrsList = new ArrayList<Attribute>();
+        for (Attribute element : all) {
+            if (verbose) {
+                System.err.println("Attribute: " + element.getName());
+            }
+            if (element.getName().equals(name)) {
+                chosenAttrsList.add(element);
+            }
+        }
+        return chosenAttrsList.toArray(new Attribute[] {});
+    }
+
+    protected Attribute findAttribute(String name, Attribute[] all)
+    {
+        List<Attribute> chosenAttrsList = new ArrayList<Attribute>();
+        for (Attribute element : all) {
+            if (verbose) {
+                System.err.println("Attribute: " + element.getName());
+            }
+            if (element.getName().equals(name)) {
+                chosenAttrsList.add(element);
+            }
+        }
+        assertTrue("Should be one match: " + chosenAttrsList.size(),
+                chosenAttrsList.size() == 1);
+        return chosenAttrsList.get(0);
+    }
+
+    protected String dumpAttributes(Attribute[] as)
+    {
+        StringBuilder result = new StringBuilder();
+        result.append("AttributeArray:[");
+        for (int i = 0; i < as.length; i++)
+        {
+            Attribute attr = as[i];
+            result.append(attr.toString());
+            if (i + 1 < as.length) {
+                result.append(",");
+            }
+        }
+        result.append("]");
+        return result.toString();
+    }
+
+    protected String dumpAnnotationEntries(AnnotationEntry[] as)
+    {
+        StringBuilder result = new StringBuilder();
+        result.append("[");
+        for (int i = 0; i < as.length; i++)
+        {
+            AnnotationEntry annotation = as[i];
+            result.append(annotation.toShortString());
+            if (i + 1 < as.length) {
+                result.append(",");
+            }
+        }
+        result.append("]");
+        return result.toString();
+    }
+
+    protected String dumpAnnotationEntries(AnnotationEntryGen[] as)
+    {
+        StringBuilder result = new StringBuilder();
+        result.append("[");
+        for (int i = 0; i < as.length; i++)
+        {
+            AnnotationEntryGen annotation = as[i];
+            result.append(annotation.toShortString());
+            if (i + 1 < as.length) {
+                result.append(",");
+            }
+        }
+        result.append("]");
+        return result.toString();
+    }
+
+    public AnnotationEntryGen createFruitAnnotationEntry(ConstantPoolGen cp,
+            String aFruit, boolean visibility)
+    {
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.STRING, cp, aFruit);
+        ElementValuePairGen nvGen = new ElementValuePairGen("fruit", evg, cp);
+        ObjectType t = new ObjectType("SimpleStringAnnotation");
+        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
+        elements.add(nvGen);
+        return new AnnotationEntryGen(t, elements, visibility, cp);
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/AnnotationAccessFlagTestCase.java b/src/test/java/org/apache/commons/bcel6/AnnotationAccessFlagTestCase.java
new file mode 100644
index 0000000..e40d64c
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/AnnotationAccessFlagTestCase.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+public class AnnotationAccessFlagTestCase extends AbstractTestCase
+{
+    /**
+     * If you write an annotation and compile it, the class file generated
+     * should be marked as an annotation type - which is detectable through
+     * BCEL.
+     */
+    public void testAnnotationClassSaysItIs() throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.SimpleAnnotation");
+        assertTrue(
+                "Expected SimpleAnnotation class to say it was an annotation - but it didn't !",
+                clazz.isAnnotation());
+        clazz = getTestClass("org.apache.commons.bcel6.data.SimpleClass");
+        assertTrue(
+                "Expected SimpleClass class to say it was not an annotation - but it didn't !",
+                !clazz.isAnnotation());
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/AnnotationDefaultAttributeTestCase.java b/src/test/java/org/apache/commons/bcel6/AnnotationDefaultAttributeTestCase.java
new file mode 100644
index 0000000..b9ed106
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/AnnotationDefaultAttributeTestCase.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import org.apache.commons.bcel6.classfile.AnnotationDefault;
+import org.apache.commons.bcel6.classfile.ElementValue;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.SimpleElementValue;
+
+public class AnnotationDefaultAttributeTestCase extends AbstractTestCase
+{
+    /**
+     * For values in an annotation that have default values, we should be able
+     * to query the AnnotationDefault attribute against the method to discover
+     * the default value that was originally declared.
+     */
+    public void testMethodAnnotations() throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.SimpleAnnotation");
+        Method m = getMethod(clazz, "fruit");
+        AnnotationDefault a = (AnnotationDefault) findAttribute(
+                "AnnotationDefault", m.getAttributes());
+        SimpleElementValue val = (SimpleElementValue) a.getDefaultValue();
+        assertTrue("Should be STRING but is " + val.getElementValueType(), val
+                .getElementValueType() == ElementValue.STRING);
+        assertTrue("Should have default of bananas but default is "
+                + val.getValueString(), val.getValueString().equals("bananas"));
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/AnonymousClassTestCase.java b/src/test/java/org/apache/commons/bcel6/AnonymousClassTestCase.java
new file mode 100644
index 0000000..23bc117
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/AnonymousClassTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+public class AnonymousClassTestCase extends AbstractTestCase
+{
+    public void testRegularClassIsNotAnonymous() throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AnonymousClassTest");
+        assertFalse("regular outer classes are not anonymous", clazz
+                .isAnonymous());
+        assertFalse("regular outer classes are not nested", clazz.isNested());
+    }
+
+    public void testNamedInnerClassIsNotAnonymous()
+            throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AnonymousClassTest$X");
+        assertFalse("regular inner classes are not anonymous", clazz
+                .isAnonymous());
+        assertTrue("regular inner classes are nested", clazz.isNested());
+    }
+
+    public void testStaticInnerClassIsNotAnonymous()
+            throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AnonymousClassTest$Y");
+        assertFalse("regular static inner classes are not anonymous", clazz
+                .isAnonymous());
+        assertTrue("regular static inner classes are nested", clazz.isNested());
+    }
+
+    public void testAnonymousInnerClassIsAnonymous()
+            throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AnonymousClassTest$1");
+        assertTrue("anonymous inner classes are anonymous", clazz.isAnonymous());
+        assertTrue("anonymous inner classes are anonymous", clazz.isNested());
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/BCELBenchmark.java b/src/test/java/org/apache/commons/bcel6/BCELBenchmark.java
new file mode 100644
index 0000000..82fc313
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/BCELBenchmark.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.bcel6;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.collections4.Predicate;
+import org.apache.commons.collections4.iterators.EnumerationIterator;
+import org.apache.commons.collections4.iterators.FilterIterator;
+import org.apache.commons.collections4.iterators.IteratorIterable;
+import org.apache.commons.io.IOUtils;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Threads;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.infra.Blackhole;
+
+@BenchmarkMode(Mode.AverageTime)
+@Fork(value = 1, jvmArgs = "-server")
+@Threads(1)
+@Warmup(iterations = 10)
+@Measurement(iterations = 20)
+@OutputTimeUnit(TimeUnit.MILLISECONDS)
+public class BCELBenchmark {
+
+    private JarFile getJarFile() throws IOException {
+        String javaHome = System.getProperty("java.home");
+        return new JarFile(javaHome + "/lib/rt.jar");
+    }
+
+    private Iterable<JarEntry> getClasses(JarFile jar) {
+        return new IteratorIterable<JarEntry>(new FilterIterator<JarEntry>(new EnumerationIterator<JarEntry>(jar.entries()), new Predicate<JarEntry>() {
+            public boolean evaluate(JarEntry entry) {
+                return entry.getName().endsWith(".class");
+            }
+        }));
+    }
+
+    /**
+     * Baseline benchmark. Read the classes but don't parse them.
+     */
+    @Benchmark
+    public void baseline(Blackhole bh) throws IOException {
+        JarFile jar = getJarFile();
+
+        for (JarEntry entry : getClasses(jar)) {
+            byte[] bytes = IOUtils.toByteArray(jar.getInputStream(entry));
+            bh.consume(bytes);
+        }
+
+        jar.close();
+    }
+
+    @Benchmark
+    public void parser(Blackhole bh) throws IOException {
+        JarFile jar = getJarFile();
+
+        for (JarEntry entry : getClasses(jar)) {
+            byte[] bytes = IOUtils.toByteArray(jar.getInputStream(entry));
+
+            JavaClass clazz = new ClassParser(new ByteArrayInputStream(bytes), entry.getName()).parse();
+            bh.consume(clazz);
+        }
+
+        jar.close();
+    }
+
+    @Benchmark
+    public void generator(Blackhole bh) throws IOException {
+        JarFile jar = getJarFile();
+
+        for (JarEntry entry : getClasses(jar)) {
+            byte[] bytes = IOUtils.toByteArray(jar.getInputStream(entry));
+
+            JavaClass clazz = new ClassParser(new ByteArrayInputStream(bytes), entry.getName()).parse();
+
+            ClassGen cg = new ClassGen(clazz);
+
+            for (Method m : cg.getMethods()) {
+                MethodGen mg = new MethodGen(m, cg.getClassName(), cg.getConstantPool());
+                InstructionList il = mg.getInstructionList();
+
+                if (il != null) {
+                    mg.getInstructionList().setPositions();
+                    mg.setMaxLocals();
+                    mg.setMaxStack();
+                }
+                cg.replaceMethod(m, mg.getMethod());
+            }
+
+            bh.consume(cg.getJavaClass().getBytes());
+        }
+
+        jar.close();
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/CounterVisitorTestCase.java b/src/test/java/org/apache/commons/bcel6/CounterVisitorTestCase.java
new file mode 100644
index 0000000..20ee854
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/CounterVisitorTestCase.java
@@ -0,0 +1,215 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+public class CounterVisitorTestCase extends AbstractCounterVisitorTestCase
+{
+    @Override
+    protected JavaClass getTestClass() throws ClassNotFoundException
+    {
+        return getTestClass("org.apache.commons.bcel6.data.MarkedType");
+    }
+
+    public void testAnnotationsCount()
+    {
+        assertEquals("annotationCount", 2, getVisitor().annotationCount);
+    }
+
+    public void testAnnotationDefaultCount()
+    {
+        assertEquals("annotationDefaultCount", 0, getVisitor().annotationDefaultCount);
+    }
+
+    public void testAnnotationEntryCount()
+    {
+        assertEquals("annotationEntryCount", 2, getVisitor().annotationEntryCount);
+    }
+
+    public void testCodeCount()
+    {
+        assertEquals("codeCount", 1, getVisitor().codeCount);
+    }
+
+    public void testCodeExceptionCount()
+    {
+        assertEquals("codeExceptionCount", 0, getVisitor().codeExceptionCount);
+    }
+
+    public void testConstantClassCount()
+    {
+        assertEquals("constantClassCount", 2, getVisitor().constantClassCount);
+    }
+
+    public void testConstantDoubleCount()
+    {
+        assertEquals("constantDoubleCount", 0, getVisitor().constantDoubleCount);
+    }
+
+    public void testConstantFieldrefCount()
+    {
+        assertEquals("constantFieldrefCount", 0, getVisitor().constantFieldrefCount);
+    }
+
+    public void testConstantFloatCount()
+    {
+        assertEquals("constantFloatCount", 0, getVisitor().constantFloatCount);
+    }
+
+    public void testConstantIntegerCount()
+    {
+        assertEquals("constantIntegerCount", 0, getVisitor().constantIntegerCount);
+    }
+
+    public void testConstantInterfaceMethodrefCount()
+    {
+        assertEquals("constantInterfaceMethodrefCount", 0, getVisitor().constantInterfaceMethodrefCount);
+    }
+
+    public void testConstantLongCount()
+    {
+        assertEquals("constantLongCount", 0, getVisitor().constantLongCount);
+    }
+
+    public void testConstantMethodrefCount()
+    {
+        assertEquals("constantMethodrefCount", 1, getVisitor().constantMethodrefCount);
+    }
+
+    public void testConstantNameAndTypeCount()
+    {
+        assertEquals("constantNameAndTypeCount", 1, getVisitor().constantNameAndTypeCount);
+    }
+
+    public void testConstantPoolCount()
+    {
+        assertEquals("constantPoolCount", 1, getVisitor().constantPoolCount);
+    }
+
+    public void testConstantStringCount()
+    {
+        assertEquals("constantStringCount", 0, getVisitor().constantStringCount);
+    }
+
+    public void testConstantValueCount()
+    {
+        assertEquals("constantValueCount", 0, getVisitor().constantValueCount);
+    }
+
+    public void testDeprecatedCount()
+    {
+        assertEquals("deprecatedCount", 0, getVisitor().deprecatedCount);
+    }
+
+    public void testEnclosingMethodCount()
+    {
+        assertEquals("enclosingMethodCount", 0, getVisitor().enclosingMethodCount);
+    }
+
+    public void testExceptionTableCount()
+    {
+        assertEquals("exceptionTableCount", 0, getVisitor().exceptionTableCount);
+    }
+
+    public void testFieldCount()
+    {
+        assertEquals("fieldCount", 0, getVisitor().fieldCount);
+    }
+
+    public void testInnerClassCount()
+    {
+        assertEquals("innerClassCount", 0, getVisitor().innerClassCount);
+    }
+
+    public void testInnerClassesCount()
+    {
+        assertEquals("innerClassesCount", 0, getVisitor().innerClassesCount);
+    }
+
+    public void testJavaClassCount()
+    {
+        assertEquals("javaClassCount", 1, getVisitor().javaClassCount);
+    }
+
+    public void testLineNumberCount()
+    {
+        assertEquals("lineNumberCount", 1, getVisitor().lineNumberCount);
+    }
+
+    public void testLineNumberTableCount()
+    {
+        assertEquals("lineNumberTableCount", 1, getVisitor().lineNumberTableCount);
+    }
+
+    public void testLocalVariableCount()
+    {
+        assertEquals("localVariableCount", 1, getVisitor().localVariableCount);
+    }
+
+    public void testLocalVariableTableCount()
+    {
+        assertEquals("localVariableTableCount", 1, getVisitor().localVariableTableCount);
+    }
+
+    public void testLocalVariableTypeTableCount()
+    {
+        assertEquals("localVariableTypeTableCount", 0, getVisitor().localVariableTypeTableCount);
+    }
+
+    public void testMethodCount()
+    {
+        assertEquals("methodCount", 1, getVisitor().methodCount);
+    }
+
+    public void testParameterAnnotationCount()
+    {
+        assertEquals("parameterAnnotationCount", 0, getVisitor().parameterAnnotationCount);
+    }
+
+    public void testSignatureCount()
+    {
+        assertEquals("signatureAnnotationCount", 0, getVisitor().signatureAnnotationCount);
+    }
+
+    public void testSourceFileCount()
+    {
+        assertEquals("sourceFileCount", 1, getVisitor().sourceFileCount);
+    }
+
+    public void testStackMapCount()
+    {
+        assertEquals("stackMapCount", 0, getVisitor().stackMapCount);
+    }
+
+    public void testStackMapEntryCount()
+    {
+        assertEquals("stackMapEntryCount", 0, getVisitor().stackMapEntryCount);
+    }
+
+    public void testSyntheticCount()
+    {
+        assertEquals("syntheticCount", 0, getVisitor().syntheticCount);
+    }
+
+    public void testUnknownCount()
+    {
+        assertEquals("unknownCount", 0, getVisitor().unknownCount);
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/ElementValueGenTestCase.java b/src/test/java/org/apache/commons/bcel6/ElementValueGenTestCase.java
new file mode 100644
index 0000000..9ae924d
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/ElementValueGenTestCase.java
@@ -0,0 +1,241 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ClassElementValueGen;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.ElementValueGen;
+import org.apache.commons.bcel6.generic.EnumElementValueGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.SimpleElementValueGen;
+
+public class ElementValueGenTestCase extends AbstractTestCase
+{
+    private ClassGen createClassGen(String classname)
+    {
+        return new ClassGen(classname, "java.lang.Object", "<generated>",
+                Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
+    }
+
+    /**
+     * Create primitive element values
+     */
+    public void testCreateIntegerElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_INT, cp, 555);
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + cp.lookupInteger(555),
+                evg.getIndex() == cp.lookupInteger(555));
+        checkSerialize(evg, cp);
+    }
+
+    public void testCreateFloatElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_FLOAT, cp, 111.222f);
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + cp.lookupFloat(111.222f), evg
+                .getIndex() == cp.lookupFloat(111.222f));
+        checkSerialize(evg, cp);
+    }
+
+    public void testCreateDoubleElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_DOUBLE, cp, 333.44);
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        int idx = cp.lookupDouble(333.44);
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
+        checkSerialize(evg, cp);
+    }
+
+    public void testCreateLongElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_LONG, cp, 3334455L);
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        int idx = cp.lookupLong(3334455L);
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
+        checkSerialize(evg, cp);
+    }
+
+    public void testCreateCharElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_CHAR, cp, 't');
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        int idx = cp.lookupInteger('t');
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
+        checkSerialize(evg, cp);
+    }
+
+    public void testCreateByteElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_CHAR, cp, (byte) 'z');
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        int idx = cp.lookupInteger((byte) 'z');
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
+        checkSerialize(evg, cp);
+    }
+
+    public void testCreateBooleanElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_BOOLEAN, cp, true);
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        int idx = cp.lookupInteger(1); // 1 == true
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
+        checkSerialize(evg, cp);
+    }
+
+    public void testCreateShortElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_SHORT, cp, (short) 42);
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        int idx = cp.lookupInteger(42);
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + idx, evg.getIndex() == idx);
+        checkSerialize(evg, cp);
+    }
+
+    // //
+    // Create string element values
+    public void testCreateStringElementValue()
+    {
+        // Create HelloWorld
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.STRING, cp, "hello");
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        assertTrue("Should have the same index in the constantpool but "
+                + evg.getIndex() + "!=" + cp.lookupUtf8("hello"), evg
+                .getIndex() == cp.lookupUtf8("hello"));
+        checkSerialize(evg, cp);
+    }
+
+    // //
+    // Create enum element value
+    public void testCreateEnumElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        ObjectType enumType = new ObjectType("SimpleEnum"); // Supports rainbow
+                                                            // :)
+        EnumElementValueGen evg = new EnumElementValueGen(enumType, "Red", cp);
+        // Creation of an element like that should leave a new entry in the
+        // cpool
+        assertTrue(
+                "The new ElementValue value index should match the contents of the constantpool but "
+                        + evg.getValueIndex() + "!=" + cp.lookupUtf8("Red"),
+                evg.getValueIndex() == cp.lookupUtf8("Red"));
+        // BCELBUG: Should the class signature or class name be in the constant
+        // pool? (see note in ConstantPool)
+        // assertTrue("The new ElementValue type index should match the contents
+        // of the constantpool but "+
+        // evg.getTypeIndex()+"!="+cp.lookupClass(enumType.getSignature()),
+        // evg.getTypeIndex()==cp.lookupClass(enumType.getSignature()));
+        checkSerialize(evg, cp);
+    }
+
+    // //
+    // Create class element value
+    public void testCreateClassElementValue()
+    {
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        ObjectType classType = new ObjectType("java.lang.Integer");
+        ClassElementValueGen evg = new ClassElementValueGen(classType, cp);
+        assertTrue("Unexpected value for contained class: '"
+                + evg.getClassString() + "'", evg.getClassString().contains("Integer"));
+        checkSerialize(evg, cp);
+    }
+
+    private void checkSerialize(ElementValueGen evgBefore, ConstantPoolGen cpg)
+    {
+        try
+        {
+            String beforeValue = evgBefore.stringifyValue();
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            DataOutputStream dos = new DataOutputStream(baos);
+            evgBefore.dump(dos);
+            dos.flush();
+            dos.close();
+            byte[] bs = baos.toByteArray();
+            ByteArrayInputStream bais = new ByteArrayInputStream(bs);
+            DataInputStream dis = new DataInputStream(bais);
+            ElementValueGen evgAfter = ElementValueGen.readElementValue(dis,
+                    cpg);
+            dis.close();
+            String afterValue = evgAfter.stringifyValue();
+            if (!beforeValue.equals(afterValue))
+            {
+                fail("Deserialization failed: before='" + beforeValue
+                        + "' after='" + afterValue + "'");
+            }
+        }
+        catch (IOException ioe)
+        {
+            fail("Unexpected exception whilst checking serialization: " + ioe);
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/EnclosingMethodAttributeTestCase.java b/src/test/java/org/apache/commons/bcel6/EnclosingMethodAttributeTestCase.java
new file mode 100644
index 0000000..502fbb2
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/EnclosingMethodAttributeTestCase.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.commons.bcel6;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.EnclosingMethod;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.util.SyntheticRepository;
+
+public class EnclosingMethodAttributeTestCase extends AbstractTestCase
+{
+    /**
+     * Verify for an inner class declared inside the 'main' method that the
+     * enclosing method attribute is set correctly.
+     */
+    public void testCheckMethodLevelNamedInnerClass()
+            throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AttributeTestClassEM01$1S");
+        ConstantPool pool = clazz.getConstantPool();
+        Attribute[] encMethodAttrs = findAttribute("EnclosingMethod", clazz);
+        assertTrue("Expected 1 EnclosingMethod attribute but found "
+                + encMethodAttrs.length, encMethodAttrs.length == 1);
+        EnclosingMethod em = (EnclosingMethod) encMethodAttrs[0];
+        String enclosingClassName = em.getEnclosingClass().getBytes(pool);
+        String enclosingMethodName = em.getEnclosingMethod().getName(pool);
+        assertTrue(
+                "Expected class name to be 'org/apache/commons/bcel6/data/AttributeTestClassEM01' but was "
+                        + enclosingClassName, enclosingClassName
+                        .equals("org/apache/commons/bcel6/data/AttributeTestClassEM01"));
+        assertTrue("Expected method name to be 'main' but was "
+                + enclosingMethodName, enclosingMethodName.equals("main"));
+    }
+
+    /**
+     * Verify for an inner class declared at the type level that the
+     * EnclosingMethod attribute is set correctly (i.e. to a null value)
+     */
+    public void testCheckClassLevelNamedInnerClass()
+            throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AttributeTestClassEM02$1");
+        ConstantPool pool = clazz.getConstantPool();
+        Attribute[] encMethodAttrs = findAttribute("EnclosingMethod", clazz);
+        assertTrue("Expected 1 EnclosingMethod attribute but found "
+                + encMethodAttrs.length, encMethodAttrs.length == 1);
+        EnclosingMethod em = (EnclosingMethod) encMethodAttrs[0];
+        String enclosingClassName = em.getEnclosingClass().getBytes(pool);
+        assertTrue(
+                "The class is not within a method, so method_index should be null, but it is "
+                        + em.getEnclosingMethodIndex(), em
+                        .getEnclosingMethodIndex() == 0);
+        assertTrue(
+                "Expected class name to be 'org/apache/commons/bcel6/data/AttributeTestClassEM02' but was "
+                        + enclosingClassName, enclosingClassName
+                        .equals("org/apache/commons/bcel6/data/AttributeTestClassEM02"));
+    }
+
+    /**
+     * Check that we can save and load the attribute correctly.
+     */
+    public void testAttributeSerializtion() throws ClassNotFoundException,
+            IOException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AttributeTestClassEM02$1");
+        ConstantPool pool = clazz.getConstantPool();
+        Attribute[] encMethodAttrs = findAttribute("EnclosingMethod", clazz);
+        assertTrue("Expected 1 EnclosingMethod attribute but found "
+                + encMethodAttrs.length, encMethodAttrs.length == 1);
+        // Write it out
+        File tfile = createTestdataFile("AttributeTestClassEM02$1.class");
+        clazz.dump(tfile);
+        // Read in the new version and check it is OK
+        SyntheticRepository repos2 = createRepos(".");
+        @SuppressWarnings("unused")
+        JavaClass clazz2 = repos2.loadClass("AttributeTestClassEM02$1");
+        EnclosingMethod em = (EnclosingMethod) encMethodAttrs[0];
+        String enclosingClassName = em.getEnclosingClass().getBytes(pool);
+        assertTrue(
+                "The class is not within a method, so method_index should be null, but it is "
+                        + em.getEnclosingMethodIndex(), em
+                        .getEnclosingMethodIndex() == 0);
+        assertTrue(
+                "Expected class name to be 'org/apache/commons/bcel6/data/AttributeTestClassEM02' but was "
+                        + enclosingClassName, enclosingClassName
+                        .equals("org/apache/commons/bcel6/data/AttributeTestClassEM02"));
+        tfile.deleteOnExit();
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/EnumAccessFlagTestCase.java b/src/test/java/org/apache/commons/bcel6/EnumAccessFlagTestCase.java
new file mode 100644
index 0000000..9bd3ed6
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/EnumAccessFlagTestCase.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import org.apache.commons.bcel6.classfile.JavaClass;
+
+public class EnumAccessFlagTestCase extends AbstractTestCase
+{
+    /**
+     * An enumerated type, once compiled, should result in a class file that is
+     * marked such that we can determine from the access flags (through BCEL)
+     * that it was originally an enum type declaration.
+     */
+    public void testEnumClassSaysItIs() throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.SimpleEnum");
+        assertTrue(
+                "Expected SimpleEnum class to say it was an enum - but it didn't !",
+                clazz.isEnum());
+        clazz = getTestClass("org.apache.commons.bcel6.data.SimpleClass");
+        assertTrue(
+                "Expected SimpleClass class to say it was not an enum - but it didn't !",
+                !clazz.isEnum());
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/FieldAnnotationsTestCase.java b/src/test/java/org/apache/commons/bcel6/FieldAnnotationsTestCase.java
new file mode 100644
index 0000000..399d56f
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/FieldAnnotationsTestCase.java
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.ElementValuePair;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.generic.AnnotationEntryGen;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.FieldGen;
+import org.apache.commons.bcel6.util.SyntheticRepository;
+
+public class FieldAnnotationsTestCase extends AbstractTestCase
+{
+    /**
+     * Check field AnnotationEntrys are retrievable.
+     */
+    public void testFieldAnnotationEntrys() throws ClassNotFoundException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AnnotatedFields");
+        // TODO L...;?
+        checkAnnotatedField(clazz, "i", "Lorg/apache/commons/bcel6/data/SimpleAnnotation;", "id", "1");
+        checkAnnotatedField(clazz, "s", "Lorg/apache/commons/bcel6/data/SimpleAnnotation;", "id", "2");
+    }
+
+    /**
+     * Check field AnnotationEntrys (de)serialize ok.
+     */
+    public void testFieldAnnotationEntrysReadWrite() throws ClassNotFoundException,
+            IOException
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AnnotatedFields");
+        checkAnnotatedField(clazz, "i", "Lorg/apache/commons/bcel6/data/SimpleAnnotation;", "id", "1");
+        checkAnnotatedField(clazz, "s", "Lorg/apache/commons/bcel6/data/SimpleAnnotation;", "id", "2");
+        // Write it out
+        File tfile = createTestdataFile("AnnotatedFields.class");
+        clazz.dump(tfile);
+        SyntheticRepository repos2 = createRepos(".");
+        repos2.loadClass("AnnotatedFields");
+        checkAnnotatedField(clazz, "i", "Lorg/apache/commons/bcel6/data/SimpleAnnotation;", "id", "1");
+        checkAnnotatedField(clazz, "s", "Lorg/apache/commons/bcel6/data/SimpleAnnotation;", "id", "2");
+        assertTrue(tfile.delete());
+    }
+
+    /**
+     * Check we can load in a class, modify its field AnnotationEntrys, save it,
+     * reload it and everything is correct.
+     */
+    public void testFieldAnnotationModification()
+            throws ClassNotFoundException
+    {
+        boolean dbg = false;
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.data.AnnotatedFields");
+        ClassGen clg = new ClassGen(clazz);
+        Field f = clg.getFields()[0];
+        if (dbg) {
+            System.err.println("Field in freshly constructed class is: " + f);
+        }
+        if (dbg) {
+            System.err.println("AnnotationEntrys on field are: "
+                    + dumpAnnotationEntries(f.getAnnotationEntries()));
+        }
+        AnnotationEntryGen fruitBasedAnnotationEntry = createFruitAnnotationEntry(clg
+                .getConstantPool(), "Tomato", false);
+        FieldGen fg = new FieldGen(f, clg.getConstantPool());
+        if (dbg) {
+            System.err.println("Adding AnnotationEntry to the field");
+        }
+        fg.addAnnotationEntry(fruitBasedAnnotationEntry);
+        if (dbg) {
+            System.err.println("FieldGen (mutable field) is " + fg);
+        }
+        if (dbg) {
+            System.err.println("with AnnotationEntrys: "
+                    + dumpAnnotationEntries(fg.getAnnotationEntries()));
+        }
+        if (dbg) {
+            System.err
+                    .println("Replacing original field with new field that has extra AnnotationEntry");
+        }
+        clg.removeField(f);
+        clg.addField(fg.getField());
+        f = clg.getFields()[1]; // there are two fields in the class, removing
+                                // and readding has changed the order
+        // so this time index [1] is the 'int i' field
+        if (dbg) {
+            System.err.println("Field now looks like this: " + f);
+        }
+        if (dbg) {
+            System.err.println("With AnnotationEntrys: "
+                    + dumpAnnotationEntries(f.getAnnotationEntries()));
+        }
+        assertTrue("Should be 2 AnnotationEntrys on this field, but there are "
+                + f.getAnnotationEntries().length, f.getAnnotationEntries().length == 2);
+    }
+
+    // helper methods
+    public void checkAnnotatedField(JavaClass clazz, String fieldname,
+            String AnnotationEntryName, String AnnotationEntryElementName,
+            String AnnotationEntryElementValue)
+    {
+        Field[] fields = clazz.getFields();
+        for (Field f : fields) {
+            AnnotationEntry[] fieldAnnotationEntrys = f.getAnnotationEntries();
+            if (f.getName().equals(fieldname))
+            {
+                checkAnnotationEntry(fieldAnnotationEntrys[0], AnnotationEntryName,
+                        AnnotationEntryElementName, AnnotationEntryElementValue);
+            }
+        }
+    }
+
+    private void checkAnnotationEntry(AnnotationEntry a, String name, String elementname,
+            String elementvalue)
+    {
+        assertTrue("Expected AnnotationEntry to have name " + name
+                + " but it had name " + a.getAnnotationType(), a.getAnnotationType()
+                .equals(name));
+        assertTrue("Expected AnnotationEntry to have one element but it had "
+                + a.getElementValuePairs().length, a.getElementValuePairs().length == 1);
+        ElementValuePair envp = a.getElementValuePairs()[0];
+        assertTrue("Expected element name " + elementname + " but was "
+                + envp.getNameString(), elementname
+                .equals(envp.getNameString()));
+        assertTrue("Expected element value " + elementvalue + " but was "
+                + envp.getValue().stringifyValue(), elementvalue.equals(envp
+                .getValue().stringifyValue()));
+    }
+
+    // helper methods
+    public void checkValue(AnnotationEntry a, String name, String tostring)
+    {
+        for (int i = 0; i < a.getElementValuePairs().length; i++)
+        {
+            ElementValuePair element = a.getElementValuePairs()[i];
+            if (element.getNameString().equals(name))
+            {
+                if (!element.getValue().stringifyValue().equals(tostring))
+                {
+                    fail("Expected element " + name + " to have value "
+                            + tostring + " but it had value "
+                            + element.getValue().stringifyValue());
+                }
+                return;
+            }
+        }
+        fail("Didnt find named element " + name);
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/GeneratingAnnotatedClassesTestCase.java b/src/test/java/org/apache/commons/bcel6/GeneratingAnnotatedClassesTestCase.java
new file mode 100644
index 0000000..86e8b09
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/GeneratingAnnotatedClassesTestCase.java
@@ -0,0 +1,699 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.ArrayElementValue;
+import org.apache.commons.bcel6.classfile.ElementValue;
+import org.apache.commons.bcel6.classfile.ElementValuePair;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.ParameterAnnotationEntry;
+import org.apache.commons.bcel6.classfile.SimpleElementValue;
+import org.apache.commons.bcel6.generic.ALOAD;
+import org.apache.commons.bcel6.generic.ASTORE;
+import org.apache.commons.bcel6.generic.AnnotationElementValueGen;
+import org.apache.commons.bcel6.generic.AnnotationEntryGen;
+import org.apache.commons.bcel6.generic.ArrayElementValueGen;
+import org.apache.commons.bcel6.generic.ArrayType;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.ElementValueGen;
+import org.apache.commons.bcel6.generic.ElementValuePairGen;
+import org.apache.commons.bcel6.generic.GOTO;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionFactory;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.LocalVariableGen;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.PUSH;
+import org.apache.commons.bcel6.generic.SimpleElementValueGen;
+import org.apache.commons.bcel6.generic.Type;
+import org.apache.commons.bcel6.util.SyntheticRepository;
+
+/**
+ * The program that some of the tests generate looks like this:
+ *
+ * <pre>
+ * public class HelloWorld
+ * {
+ *  public static void main(String[] argv)
+ *  {
+ *      BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
+ *      String name = null;
+ *
+ *      try
+ *      {
+ *          name = &quot;Andy&quot;;
+ *      }
+ *      catch (IOException e)
+ *      {
+ *          return;
+ *      }
+ *      System.out.println(&quot;Hello, &quot; + name);
+ *  }
+ * }
+ * </pre>
+ */
+public class GeneratingAnnotatedClassesTestCase extends AbstractTestCase
+{
+    /**
+     * Steps in the test:
+     * <ol>
+     * <li>Programmatically construct the HelloWorld program</li>
+     * <li>Add two simple annotations at the class level</li>
+     * <li>Save the class to disk</li>
+     * <li>Reload the class using the 'static' variant of the BCEL classes</li>
+     * <li>Check the attributes are OK</li>
+     * </ol>
+     */
+    public void testGenerateClassLevelAnnotations()
+            throws ClassNotFoundException
+    {
+        // Create HelloWorld
+        ClassGen cg = createClassGen("HelloWorld");
+        cg.setMajor(49);
+        cg.setMinor(0);
+        ConstantPoolGen cp = cg.getConstantPool();
+        InstructionList il = new InstructionList();
+        cg.addAnnotationEntry(createSimpleVisibleAnnotation(cp));
+        cg.addAnnotationEntry(createSimpleInvisibleAnnotation(cp));
+        buildClassContents(cg, cp, il);
+        //System.out.println(cg.getJavaClass().toString());
+        dumpClass(cg, "HelloWorld.class");
+        JavaClass jc = getClassFrom(".", "HelloWorld");
+        AnnotationEntry[] as = jc.getAnnotationEntries();
+        assertTrue("Should be two AnnotationEntries but found " + as.length,
+                as.length == 2);
+        // TODO L??;
+        assertTrue(
+                "Name of annotation 1 should be LSimpleAnnotation; but it is "
+                        + as[0].getAnnotationType(), as[0].getAnnotationType()
+                        .equals("LSimpleAnnotation;"));
+        assertTrue(
+                "Name of annotation 2 should be LSimpleAnnotation; but it is "
+                        + as[1].getAnnotationType(), as[1].getAnnotationType()
+                        .equals("LSimpleAnnotation;"));
+        ElementValuePair[] vals = as[0].getElementValuePairs();
+        ElementValuePair nvp = vals[0];
+        assertTrue(
+                "Name of element in SimpleAnnotation should be 'id' but it is "
+                        + nvp.getNameString(), nvp.getNameString().equals("id"));
+        ElementValue ev = nvp.getValue();
+        assertTrue("Type of element value should be int but it is "
+                + ev.getElementValueType(),
+                ev.getElementValueType() == ElementValue.PRIMITIVE_INT);
+        assertTrue("Value of element should be 4 but it is "
+                + ev.stringifyValue(), ev.stringifyValue().equals("4"));
+        assertTrue(createTestdataFile("HelloWorld.class").delete());
+    }
+
+    /**
+     * Just check that we can dump a class that has a method annotation on it
+     * and it is still there when we read it back in
+     */
+    public void testGenerateMethodLevelAnnotations1()
+            throws ClassNotFoundException
+    {
+        // Create HelloWorld
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        InstructionList il = new InstructionList();
+        buildClassContentsWithAnnotatedMethods(cg, cp, il);
+        // Check annotation is OK
+        int i = cg.getMethods()[0].getAnnotationEntries().length;
+        assertTrue(
+                "Prior to dumping, main method should have 1 annotation but has "
+                        + i, i == 1);
+        dumpClass(cg, "temp1" + File.separator + "HelloWorld.class");
+        JavaClass jc2 = getClassFrom("temp1", "HelloWorld");
+        // Check annotation is OK
+        i = jc2.getMethods()[0].getAnnotationEntries().length;
+        assertTrue("JavaClass should say 1 annotation on main method but says "
+                + i, i == 1);
+        ClassGen cg2 = new ClassGen(jc2);
+        // Check it now it is a ClassGen
+        Method[] m = cg2.getMethods();
+        i = m[0].getAnnotationEntries().length;
+        assertTrue("The main 'Method' should have one annotation but has " + i,
+                i == 1);
+        MethodGen mg = new MethodGen(m[0], cg2.getClassName(), cg2
+                .getConstantPool());
+        // Check it finally when the Method is changed to a MethodGen
+        i = mg.getAnnotationEntries().length;
+        assertTrue("The main 'MethodGen' should have one annotation but has "
+                + i, i == 1);
+        assertTrue(wipe("temp1" + File.separator + "HelloWorld.class"));
+    }
+
+    /**
+     * Going further than the last test - when we reload the method back in,
+     * let's change it (adding a new annotation) and then store that, read it
+     * back in and verify both annotations are there !
+     */
+    public void testGenerateMethodLevelAnnotations2()
+            throws ClassNotFoundException
+    {
+        // Create HelloWorld
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        InstructionList il = new InstructionList();
+        buildClassContentsWithAnnotatedMethods(cg, cp, il);
+        dumpClass(cg, "temp2", "HelloWorld.class");
+        JavaClass jc2 = getClassFrom("temp2", "HelloWorld");
+        ClassGen cg2 = new ClassGen(jc2);
+        // Main method after reading the class back in
+        Method mainMethod1 = jc2.getMethods()[0];
+        assertTrue("The 'Method' should have one annotations but has "
+                + mainMethod1.getAnnotationEntries().length, mainMethod1
+                .getAnnotationEntries().length == 1);
+        MethodGen mainMethod2 = new MethodGen(mainMethod1, cg2.getClassName(),
+                cg2.getConstantPool());
+        assertTrue("The 'MethodGen' should have one annotations but has "
+                + mainMethod2.getAnnotationEntries().length, mainMethod2
+                .getAnnotationEntries().length == 1);
+        mainMethod2.addAnnotationEntry(createFruitAnnotation(cg2
+                .getConstantPool(), "Pear"));
+        cg2.removeMethod(mainMethod1);
+        cg2.addMethod(mainMethod2.getMethod());
+        dumpClass(cg2, "temp3", "HelloWorld.class");
+        JavaClass jc3 = getClassFrom("temp3", "HelloWorld");
+        ClassGen cg3 = new ClassGen(jc3);
+        Method mainMethod3 = cg3.getMethods()[1];
+        int i = mainMethod3.getAnnotationEntries().length;
+        assertTrue("The 'Method' should now have two annotations but has " + i,
+                i == 2);
+        assertTrue(wipe("temp2", "HelloWorld.class"));
+        assertTrue(wipe("temp3", "HelloWorld.class"));
+    }
+
+    // J5TODO: Need to add deleteFile calls to many of these tests
+    /**
+     * Transform simple class from an immutable to a mutable object.
+     */
+    public void testTransformClassToClassGen_SimpleTypes()
+            throws ClassNotFoundException
+    {
+        JavaClass jc = getTestClass("org.apache.commons.bcel6.data.SimpleAnnotatedClass");
+        ClassGen cgen = new ClassGen(jc);
+        // Check annotations are correctly preserved
+        AnnotationEntryGen[] annotations = cgen.getAnnotationEntries();
+        assertTrue("Expected one annotation but found " + annotations.length,
+                annotations.length == 1);
+    }
+
+    /**
+     * Transform simple class from an immutable to a mutable object. The class
+     * is annotated with an annotation that uses an enum.
+     */
+    public void testTransformClassToClassGen_EnumType()
+            throws ClassNotFoundException
+    {
+        JavaClass jc = getTestClass("org.apache.commons.bcel6.data.AnnotatedWithEnumClass");
+        ClassGen cgen = new ClassGen(jc);
+        // Check annotations are correctly preserved
+        AnnotationEntryGen[] annotations = cgen.getAnnotationEntries();
+        assertTrue("Expected one annotation but found " + annotations.length,
+                annotations.length == 1);
+    }
+
+    /**
+     * Transform simple class from an immutable to a mutable object. The class
+     * is annotated with an annotation that uses an array of SimpleAnnotations.
+     */
+    public void testTransformClassToClassGen_ArrayAndAnnotationTypes()
+            throws ClassNotFoundException
+    {
+        JavaClass jc = getTestClass("org.apache.commons.bcel6.data.AnnotatedWithCombinedAnnotation");
+        ClassGen cgen = new ClassGen(jc);
+        // Check annotations are correctly preserved
+        AnnotationEntryGen[] annotations = cgen.getAnnotationEntries();
+        assertTrue("Expected one annotation but found " + annotations.length,
+                annotations.length == 1);
+        AnnotationEntryGen a = annotations[0];
+        assertTrue("That annotation should only have one value but has "
+                + a.getValues().size(), a.getValues().size() == 1);
+        ElementValuePairGen nvp = a.getValues().get(0);
+        ElementValueGen value = nvp.getValue();
+        assertTrue("Value should be ArrayElementValueGen but is " + value,
+                value instanceof ArrayElementValueGen);
+        ArrayElementValueGen arrayValue = (ArrayElementValueGen) value;
+        assertTrue("Array value should be size one but is "
+                + arrayValue.getElementValuesSize(), arrayValue
+                .getElementValuesSize() == 1);
+        ElementValueGen innerValue = arrayValue.getElementValues().get(0);
+        assertTrue(
+                "Value in the array should be AnnotationElementValueGen but is "
+                        + innerValue,
+                innerValue instanceof AnnotationElementValueGen);
+        AnnotationElementValueGen innerAnnotationValue = (AnnotationElementValueGen) innerValue;
+        assertTrue("Should be called Lorg/apache/commons/bcel6/data/SimpleAnnotation; but is called: "
+                + innerAnnotationValue.getAnnotation().getTypeName(),
+                innerAnnotationValue.getAnnotation().getTypeSignature().equals(
+                        "Lorg/apache/commons/bcel6/data/SimpleAnnotation;"));
+
+        // check the three methods
+        Method[] methods = cgen.getMethods();
+        assertEquals(3, methods.length);
+        for(Method method : methods)
+        {
+            String methodName= method.getName();
+            if(methodName.equals("<init>"))
+            {
+                assertMethodAnnotations(method, 0, 1);
+                assertParameterAnnotations(method, 0, 1);
+            }
+            else if(methodName.equals("methodWithArrayOfZeroAnnotations"))
+            {
+                assertMethodAnnotations(method, 1, 0);
+            }
+            else if(methodName.equals("methodWithArrayOfTwoAnnotations"))
+            {
+                assertMethodAnnotations(method, 1, 2);
+            }
+            else
+            {
+                fail("unexpected method "+method.getName());
+            }
+        }
+    }
+
+    private void assertMethodAnnotations(Method method, int expectedNumberAnnotations, int nExpectedArrayValues)
+    {
+        String methodName= method.getName();
+        AnnotationEntry[] annos= method.getAnnotationEntries();
+        assertEquals("For "+methodName, expectedNumberAnnotations, annos.length);
+        if(expectedNumberAnnotations!=0)
+        {
+            assertArrayElementValue(nExpectedArrayValues, annos[0]);
+        }
+    }
+
+    private void assertArrayElementValue(int nExpectedArrayValues, AnnotationEntry anno)
+    {
+        ElementValuePair elementValuePair = anno.getElementValuePairs()[0];
+        assertEquals("value", elementValuePair.getNameString());
+        ArrayElementValue ev = (ArrayElementValue) elementValuePair.getValue();
+        ElementValue[] eva = ev.getElementValuesArray();
+        assertEquals(nExpectedArrayValues, eva.length);
+    }
+
+    private void assertParameterAnnotations(Method method, int... expectedNumberOfParmeterAnnotations)
+    {
+        String methodName= "For "+method.getName();
+        ParameterAnnotationEntry[] parameterAnnotations= method.getParameterAnnotationEntries();
+        assertEquals(methodName, expectedNumberOfParmeterAnnotations.length, parameterAnnotations.length);
+
+        int i= 0;
+        for(ParameterAnnotationEntry parameterAnnotation : parameterAnnotations)
+        {
+            AnnotationEntry[] annos= parameterAnnotation.getAnnotationEntries();
+            int expectedLength = expectedNumberOfParmeterAnnotations[i++];
+            assertEquals(methodName+" parameter "+i, expectedLength, annos.length);
+            if(expectedLength!=0)
+            {
+                assertSimpleElementValue(annos[0]);
+            }
+        }
+    }
+
+    private void assertSimpleElementValue(AnnotationEntry anno)
+    {
+        ElementValuePair elementValuePair = anno.getElementValuePairs()[0];
+        assertEquals("id", elementValuePair.getNameString());
+        SimpleElementValue ev = (SimpleElementValue)elementValuePair.getValue();
+        assertEquals(42, ev.getValueInt());
+    }
+
+    /**
+     * Transform complex class from an immutable to a mutable object.
+     */
+    public void testTransformComplexClassToClassGen()
+            throws ClassNotFoundException
+    {
+        JavaClass jc = getTestClass("org.apache.commons.bcel6.data.ComplexAnnotatedClass");
+        ClassGen cgen = new ClassGen(jc);
+        // Check annotations are correctly preserved
+        AnnotationEntryGen[] annotations = cgen.getAnnotationEntries();
+        assertTrue("Expected one annotation but found " + annotations.length,
+                annotations.length == 1);
+        List<?> l = annotations[0].getValues();
+        boolean found = false;
+        for (Object name : l) {
+            ElementValuePairGen element = (ElementValuePairGen) name;
+            if (element.getNameString().equals("dval"))
+            {
+                if (((SimpleElementValueGen) element.getValue())
+                        .stringifyValue().equals("33.4")) {
+                    found = true;
+                }
+            }
+        }
+        assertTrue("Did not find double annotation value with value 33.4",
+                found);
+    }
+
+    /**
+     * Load a class in and modify it with a new attribute - A SimpleAnnotation
+     * annotation
+     */
+    public void testModifyingClasses1() throws ClassNotFoundException
+    {
+        JavaClass jc = getTestClass("org.apache.commons.bcel6.data.SimpleAnnotatedClass");
+        ClassGen cgen = new ClassGen(jc);
+        ConstantPoolGen cp = cgen.getConstantPool();
+        cgen.addAnnotationEntry(createFruitAnnotation(cp, "Pineapple"));
+        assertTrue("Should now have two annotations but has "
+                + cgen.getAnnotationEntries().length, cgen
+                .getAnnotationEntries().length == 2);
+        dumpClass(cgen, "SimpleAnnotatedClass.class");
+        assertTrue(wipe("SimpleAnnotatedClass.class"));
+    }
+
+    /**
+     * Load a class in and modify it with a new attribute - A ComplexAnnotation
+     * annotation
+     */
+    public void testModifyingClasses2() throws ClassNotFoundException
+    {
+        JavaClass jc = getTestClass("org.apache.commons.bcel6.data.SimpleAnnotatedClass");
+        ClassGen cgen = new ClassGen(jc);
+        ConstantPoolGen cp = cgen.getConstantPool();
+        cgen.addAnnotationEntry(createCombinedAnnotation(cp));
+        assertTrue("Should now have two annotations but has "
+                + cgen.getAnnotationEntries().length, cgen
+                .getAnnotationEntries().length == 2);
+        dumpClass(cgen, "SimpleAnnotatedClass.class");
+        JavaClass jc2 = getClassFrom(".", "SimpleAnnotatedClass");
+        jc2.getAnnotationEntries();
+        assertTrue(wipe("SimpleAnnotatedClass.class"));
+        // System.err.println(jc2.toString());
+    }
+
+    private void dumpClass(ClassGen cg, String fname)
+    {
+        try
+        {
+            File f = createTestdataFile(fname);
+            cg.getJavaClass().dump(f);
+        }
+        catch (java.io.IOException e)
+        {
+            System.err.println(e);
+        }
+    }
+
+    private void dumpClass(ClassGen cg, String dir, String fname)
+    {
+        dumpClass(cg, dir + File.separator + fname);
+    }
+
+    private void buildClassContentsWithAnnotatedMethods(ClassGen cg,
+            ConstantPoolGen cp, InstructionList il)
+    {
+        // Create method 'public static void main(String[]argv)'
+        MethodGen mg = createMethodGen("main", il, cp);
+        InstructionFactory factory = new InstructionFactory(cg);
+        mg.addAnnotationEntry(createSimpleVisibleAnnotation(mg
+                .getConstantPool()));
+        // We now define some often used types:
+        ObjectType i_stream = new ObjectType("java.io.InputStream");
+        ObjectType p_stream = new ObjectType("java.io.PrintStream");
+        // Create variables in and name : We call the constructors, i.e.,
+        // execute BufferedReader(InputStreamReader(System.in)) . The reference
+        // to the BufferedReader object stays on top of the stack and is stored
+        // in the newly allocated in variable.
+        il.append(factory.createNew("java.io.BufferedReader"));
+        il.append(InstructionConstants.DUP); // Use predefined constant
+        il.append(factory.createNew("java.io.InputStreamReader"));
+        il.append(InstructionConstants.DUP);
+        il.append(factory.createFieldAccess("java.lang.System", "in", i_stream,
+                Constants.GETSTATIC));
+        il.append(factory.createInvoke("java.io.InputStreamReader", "<init>",
+                Type.VOID, new Type[] { i_stream }, Constants.INVOKESPECIAL));
+        il.append(factory.createInvoke("java.io.BufferedReader", "<init>",
+                Type.VOID, new Type[] { new ObjectType("java.io.Reader") },
+                Constants.INVOKESPECIAL));
+        LocalVariableGen lg = mg.addLocalVariable("in", new ObjectType(
+                "java.io.BufferedReader"), null, null);
+        int in = lg.getIndex();
+        lg.setStart(il.append(new ASTORE(in))); // "in" valid from here
+        // Create local variable name and initialize it to null
+        lg = mg.addLocalVariable("name", Type.STRING, null, null);
+        int name = lg.getIndex();
+        il.append(InstructionConstants.ACONST_NULL);
+        lg.setStart(il.append(new ASTORE(name))); // "name" valid from here
+        // Create try-catch block: We remember the start of the block, read a
+        // line from the standard input and store it into the variable name .
+        // InstructionHandle try_start = il.append(factory.createFieldAccess(
+        // "java.lang.System", "out", p_stream, Constants.GETSTATIC));
+        // il.append(new PUSH(cp, "Please enter your name> "));
+        // il.append(factory.createInvoke("java.io.PrintStream", "print",
+        // Type.VOID, new Type[] { Type.STRING },
+        // Constants.INVOKEVIRTUAL));
+        // il.append(new ALOAD(in));
+        // il.append(factory.createInvoke("java.io.BufferedReader", "readLine",
+        // Type.STRING, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
+        InstructionHandle try_start = il.append(new PUSH(cp, "Andy"));
+        il.append(new ASTORE(name));
+        // Upon normal execution we jump behind exception handler, the target
+        // address is not known yet.
+        GOTO g = new GOTO(null);
+        InstructionHandle try_end = il.append(g);
+        // We add the exception handler which simply returns from the method.
+        LocalVariableGen var_ex = mg.addLocalVariable("ex", Type
+                .getType("Ljava.io.IOException;"), null, null);
+        int var_ex_slot = var_ex.getIndex();
+        InstructionHandle handler = il.append(new ASTORE(var_ex_slot));
+        var_ex.setStart(handler);
+        var_ex.setEnd(il.append(InstructionConstants.RETURN));
+        mg.addExceptionHandler(try_start, try_end, handler, new ObjectType(
+                "java.io.IOException"));
+        // "Normal" code continues, now we can set the branch target of the GOTO
+        // .
+        InstructionHandle ih = il.append(factory.createFieldAccess(
+                "java.lang.System", "out", p_stream, Constants.GETSTATIC));
+        g.setTarget(ih);
+        // Printing "Hello": String concatenation compiles to StringBuffer
+        // operations.
+        il.append(factory.createNew(Type.STRINGBUFFER));
+        il.append(InstructionConstants.DUP);
+        il.append(new PUSH(cp, "Hello, "));
+        il
+                .append(factory.createInvoke("java.lang.StringBuffer",
+                        "<init>", Type.VOID, new Type[] { Type.STRING },
+                        Constants.INVOKESPECIAL));
+        il.append(new ALOAD(name));
+        il.append(factory.createInvoke("java.lang.StringBuffer", "append",
+                Type.STRINGBUFFER, new Type[] { Type.STRING },
+                Constants.INVOKEVIRTUAL));
+        il.append(factory.createInvoke("java.lang.StringBuffer", "toString",
+                Type.STRING, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
+        il
+                .append(factory.createInvoke("java.io.PrintStream", "println",
+                        Type.VOID, new Type[] { Type.STRING },
+                        Constants.INVOKEVIRTUAL));
+        il.append(InstructionConstants.RETURN);
+        // Finalization: Finally, we have to set the stack size, which normally
+        // would have to be computed on the fly and add a default constructor
+        // method to the class, which is empty in this case.
+        mg.setMaxStack();
+        mg.setMaxLocals();
+        cg.addMethod(mg.getMethod());
+        il.dispose(); // Allow instruction handles to be reused
+        cg.addEmptyConstructor(Constants.ACC_PUBLIC);
+    }
+
+    private void buildClassContents(ClassGen cg, ConstantPoolGen cp,
+            InstructionList il)
+    {
+        // Create method 'public static void main(String[]argv)'
+        MethodGen mg = createMethodGen("main", il, cp);
+        InstructionFactory factory = new InstructionFactory(cg);
+        // We now define some often used types:
+        ObjectType i_stream = new ObjectType("java.io.InputStream");
+        ObjectType p_stream = new ObjectType("java.io.PrintStream");
+        // Create variables in and name : We call the constructors, i.e.,
+        // execute BufferedReader(InputStreamReader(System.in)) . The reference
+        // to the BufferedReader object stays on top of the stack and is stored
+        // in the newly allocated in variable.
+        il.append(factory.createNew("java.io.BufferedReader"));
+        il.append(InstructionConstants.DUP); // Use predefined constant
+        il.append(factory.createNew("java.io.InputStreamReader"));
+        il.append(InstructionConstants.DUP);
+        il.append(factory.createFieldAccess("java.lang.System", "in", i_stream,
+                Constants.GETSTATIC));
+        il.append(factory.createInvoke("java.io.InputStreamReader", "<init>",
+                Type.VOID, new Type[] { i_stream }, Constants.INVOKESPECIAL));
+        il.append(factory.createInvoke("java.io.BufferedReader", "<init>",
+                Type.VOID, new Type[] { new ObjectType("java.io.Reader") },
+                Constants.INVOKESPECIAL));
+        LocalVariableGen lg = mg.addLocalVariable("in", new ObjectType(
+                "java.io.BufferedReader"), null, null);
+        int in = lg.getIndex();
+        lg.setStart(il.append(new ASTORE(in))); // "in" valid from here
+        // Create local variable name and initialize it to null
+        lg = mg.addLocalVariable("name", Type.STRING, null, null);
+        int name = lg.getIndex();
+        il.append(InstructionConstants.ACONST_NULL);
+        lg.setStart(il.append(new ASTORE(name))); // "name" valid from here
+        // Create try-catch block: We remember the start of the block, read a
+        // line from the standard input and store it into the variable name .
+        // InstructionHandle try_start = il.append(factory.createFieldAccess(
+        // "java.lang.System", "out", p_stream, Constants.GETSTATIC));
+        // il.append(new PUSH(cp, "Please enter your name> "));
+        // il.append(factory.createInvoke("java.io.PrintStream", "print",
+        // Type.VOID, new Type[] { Type.STRING },
+        // Constants.INVOKEVIRTUAL));
+        // il.append(new ALOAD(in));
+        // il.append(factory.createInvoke("java.io.BufferedReader", "readLine",
+        // Type.STRING, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
+        InstructionHandle try_start = il.append(new PUSH(cp, "Andy"));
+        il.append(new ASTORE(name));
+        // Upon normal execution we jump behind exception handler, the target
+        // address is not known yet.
+        GOTO g = new GOTO(null);
+        InstructionHandle try_end = il.append(g);
+        // We add the exception handler which simply returns from the method.
+        LocalVariableGen var_ex = mg.addLocalVariable("ex", Type
+                .getType("Ljava.io.IOException;"), null, null);
+        int var_ex_slot = var_ex.getIndex();
+        InstructionHandle handler = il.append(new ASTORE(var_ex_slot));
+        var_ex.setStart(handler);
+        var_ex.setEnd(il.append(InstructionConstants.RETURN));
+        mg.addExceptionHandler(try_start, try_end, handler, new ObjectType(
+                "java.io.IOException"));
+        // "Normal" code continues, now we can set the branch target of the GOTO
+        // .
+        InstructionHandle ih = il.append(factory.createFieldAccess(
+                "java.lang.System", "out", p_stream, Constants.GETSTATIC));
+        g.setTarget(ih);
+        // Printing "Hello": String concatenation compiles to StringBuffer
+        // operations.
+        il.append(factory.createNew(Type.STRINGBUFFER));
+        il.append(InstructionConstants.DUP);
+        il.append(new PUSH(cp, "Hello, "));
+        il
+                .append(factory.createInvoke("java.lang.StringBuffer",
+                        "<init>", Type.VOID, new Type[] { Type.STRING },
+                        Constants.INVOKESPECIAL));
+        il.append(new ALOAD(name));
+        il.append(factory.createInvoke("java.lang.StringBuffer", "append",
+                Type.STRINGBUFFER, new Type[] { Type.STRING },
+                Constants.INVOKEVIRTUAL));
+        il.append(factory.createInvoke("java.lang.StringBuffer", "toString",
+                Type.STRING, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
+        il
+                .append(factory.createInvoke("java.io.PrintStream", "println",
+                        Type.VOID, new Type[] { Type.STRING },
+                        Constants.INVOKEVIRTUAL));
+        il.append(InstructionConstants.RETURN);
+        // Finalization: Finally, we have to set the stack size, which normally
+        // would have to be computed on the fly and add a default constructor
+        // method to the class, which is empty in this case.
+        mg.setMaxStack();
+        mg.setMaxLocals();
+        cg.addMethod(mg.getMethod());
+        il.dispose(); // Allow instruction handles to be reused
+        cg.addEmptyConstructor(Constants.ACC_PUBLIC);
+    }
+
+    private JavaClass getClassFrom(String where, String clazzname)
+            throws ClassNotFoundException
+    {
+        // System.out.println(where);
+        SyntheticRepository repos = createRepos(where);
+        return repos.loadClass(clazzname);
+    }
+
+    // helper methods
+    private ClassGen createClassGen(String classname)
+    {
+        return new ClassGen(classname, "java.lang.Object", "<generated>",
+                Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
+    }
+
+    private MethodGen createMethodGen(String methodname, InstructionList il,
+            ConstantPoolGen cp)
+    {
+        return new MethodGen(Constants.ACC_STATIC | Constants.ACC_PUBLIC, // access
+                // flags
+                Type.VOID, // return type
+                new Type[] { new ArrayType(Type.STRING, 1) }, // argument
+                // types
+                new String[] { "argv" }, // arg names
+                methodname, "HelloWorld", // method, class
+                il, cp);
+    }
+
+    public AnnotationEntryGen createSimpleVisibleAnnotation(ConstantPoolGen cp)
+    {
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_INT, cp, 4);
+        ElementValuePairGen nvGen = new ElementValuePairGen("id", evg, cp);
+        ObjectType t = new ObjectType("SimpleAnnotation");
+        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
+        elements.add(nvGen);
+        AnnotationEntryGen a = new AnnotationEntryGen(t, elements, true, cp);
+        return a;
+    }
+
+    public AnnotationEntryGen createFruitAnnotation(ConstantPoolGen cp,
+            String aFruit)
+    {
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.STRING, cp, aFruit);
+        ElementValuePairGen nvGen = new ElementValuePairGen("fruit", evg, cp);
+        ObjectType t = new ObjectType("SimpleStringAnnotation");
+        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
+        elements.add(nvGen);
+        return new AnnotationEntryGen(t, elements, true, cp);
+    }
+
+    public AnnotationEntryGen createCombinedAnnotation(ConstantPoolGen cp)
+    {
+        // Create an annotation instance
+        AnnotationEntryGen a = createSimpleVisibleAnnotation(cp);
+        ArrayElementValueGen array = new ArrayElementValueGen(cp);
+        array.addElement(new AnnotationElementValueGen(a, cp));
+        ElementValuePairGen nvp = new ElementValuePairGen("value", array, cp);
+        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
+        elements.add(nvp);
+        return new AnnotationEntryGen(new ObjectType("CombinedAnnotation"),
+                elements, true, cp);
+    }
+
+    public AnnotationEntryGen createSimpleInvisibleAnnotation(ConstantPoolGen cp)
+    {
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_INT, cp, 4);
+        ElementValuePairGen nvGen = new ElementValuePairGen("id", evg, cp);
+        ObjectType t = new ObjectType("SimpleAnnotation");
+        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
+        elements.add(nvGen);
+        AnnotationEntryGen a = new AnnotationEntryGen(t, elements, false, cp);
+        return a;
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/InstructionFinderTestCase.java b/src/test/java/org/apache/commons/bcel6/InstructionFinderTestCase.java
new file mode 100644
index 0000000..a5a3563
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/InstructionFinderTestCase.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+package org.apache.commons.bcel6;
+
+import java.util.Iterator;
+
+import org.apache.commons.bcel6.AbstractTestCase;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.util.InstructionFinder;
+
+public class InstructionFinderTestCase extends AbstractTestCase
+{
+    public void testSearchAll() throws Exception
+    {
+        JavaClass clazz = getTestClass("org.apache.commons.bcel6.util.InstructionFinder");
+        Method[] methods = clazz.getMethods();
+        Method searchM = null;
+        for (Method m : methods)
+        {
+            if (m.getName().equals("search") && (m.getArgumentTypes().length == 3))
+            {
+                searchM = m;
+                break;
+            }
+        }
+
+        if (searchM == null) {
+            throw new Exception("search method not found");
+        }
+
+        byte[] bytes = searchM.getCode().getCode();
+        InstructionList il = new InstructionList(bytes);
+        InstructionFinder finder = new InstructionFinder(il);
+        Iterator<?> it = finder.search(".*", il.getStart(), null);
+
+        InstructionHandle[] ihs = (InstructionHandle[])it.next();
+        int size = 0;
+        for (InstructionHandle ih : ihs)
+        {
+            size += ih.getInstruction().getLength();
+        }
+        assertEquals(bytes.length, size);
+
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/NanoTimer.java b/src/test/java/org/apache/commons/bcel6/NanoTimer.java
new file mode 100644
index 0000000..72faa7a
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/NanoTimer.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+public class NanoTimer {
+
+    private long time = 0;
+
+    public NanoTimer start() {
+        time -= System.nanoTime();
+        return this;
+    }
+
+    public void stop() {
+        time += System.nanoTime();
+    }
+
+    public void subtract(NanoTimer o) {
+        time -= o.time;
+    }
+
+    public void reset() {
+        time = 0;
+    }
+
+    /**
+     * May ony be called after stop has been called as many times as start.
+     */
+    @Override
+    public String toString() {
+        return ((double) (time) / 1000000000) + " s";
+    }
+
+
+
+}
diff --git a/src/test/java/org/apache/commons/bcel6/PerformanceTest.java b/src/test/java/org/apache/commons/bcel6/PerformanceTest.java
new file mode 100644
index 0000000..d4289b7
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/PerformanceTest.java
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.junit.Assert;
+
+import junit.framework.TestCase;
+
+public final class PerformanceTest extends TestCase {
+
+    private static byte[] read(final InputStream is) throws IOException {
+        if (is == null) {
+            throw new IOException("Class not found");
+        }
+        byte[] b = new byte[is.available()];
+        int len = 0;
+        while (true) {
+            int n = is.read(b, len, b.length - len);
+            if (n == -1) {
+                if (len < b.length) {
+                    byte[] c = new byte[len];
+                    System.arraycopy(b, 0, c, 0, len);
+                    b = c;
+                }
+                return b;
+            }
+            len += n;
+            if (len == b.length) {
+                byte[] c = new byte[b.length + 1000];
+                System.arraycopy(b, 0, c, 0, len);
+                b = c;
+            }
+        }
+    }
+
+    private static void test(File lib) throws IOException {
+        NanoTimer total = new NanoTimer();
+        NanoTimer parseTime = new NanoTimer();
+        NanoTimer cgenTime = new NanoTimer();
+        NanoTimer mgenTime = new NanoTimer();
+        NanoTimer mserTime = new NanoTimer();
+        NanoTimer serTime = new NanoTimer();
+
+        System.out.println("parsing " + lib);
+
+        total.start();
+        JarFile jar = new JarFile(lib);
+        Enumeration<?> en = jar.entries();
+
+        while (en.hasMoreElements()) {
+            JarEntry e = (JarEntry) en.nextElement();
+            if (e.getName().endsWith(".class")) {
+                InputStream in = jar.getInputStream(e);
+                byte[] bytes = read(in);
+
+                parseTime.start();
+                JavaClass clazz = new ClassParser(new ByteArrayInputStream(bytes), e.getName())
+                        .parse();
+                parseTime.stop();
+
+                cgenTime.start();
+                ClassGen cg = new ClassGen(clazz);
+                cgenTime.stop();
+
+                Method[] methods = cg.getMethods();
+                for (Method m : methods) {
+                    mgenTime.start();
+                    MethodGen mg = new MethodGen(m, cg.getClassName(), cg.getConstantPool());
+                    InstructionList il = mg.getInstructionList();
+                    mgenTime.stop();
+
+                    mserTime.start();
+                    if (il != null) {
+                        mg.getInstructionList().setPositions();
+                        mg.setMaxLocals();
+                        mg.setMaxStack();
+                    }
+                    cg.replaceMethod(m, mg.getMethod());
+                    mserTime.stop();
+                }
+
+                serTime.start();
+                cg.getJavaClass().getBytes();
+                serTime.stop();
+            }
+        }
+
+        jar.close();
+        total.stop();
+        System.out.println("ClassParser.parse: " + parseTime);
+        System.out.println("ClassGen.init: " + cgenTime);
+        System.out.println("MethodGen.init: " + mgenTime);
+        System.out.println("MethodGen.getMethod: " + mserTime);
+        System.out.println("ClassGen.getJavaClass.getBytes: " + serTime);
+        System.out.println("Total: " + total);
+        System.out.println();
+    }
+
+    public void testPerformance() throws IOException {
+        File javaLib = new File(System.getProperty("java.home") + "/lib");
+        javaLib.listFiles(new FileFilter() {
+
+            public boolean accept(File file) {
+                if(file.getName().endsWith(".jar")) {
+                    try {
+                        test(file);
+                    } catch (IOException e) {
+                        Assert.fail(e.getMessage());
+                    }
+                }
+                return false;
+            }
+        });
+    }
+
+}
diff --git a/src/test/java/org/apache/commons/bcel6/classfile/UtilityTestCase.java b/src/test/java/org/apache/commons/bcel6/classfile/UtilityTestCase.java
new file mode 100644
index 0000000..979a4e4
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/classfile/UtilityTestCase.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.bcel6.classfile;
+
+import org.apache.commons.bcel6.classfile.Utility;
+
+import junit.framework.TestCase;
+
+public class UtilityTestCase extends TestCase {
+    
+    public void testSignatureToStringWithGenerics() throws Exception {
+        assertEquals("generic signature", "java.util.Map<X, java.util.List<Y>>", Utility.signatureToString("Ljava/util/Map<TX;Ljava/util/List<TY;>;>;"));
+        assertEquals("generic signature", "java.util.Set<? extends java.nio.file.OpenOption>", Utility.signatureToString("Ljava/util/Set<+Ljava/nio/file/OpenOption;>;"));
+        assertEquals("generic signature", "java.nio.file.attribute.FileAttribute<?>...[]", Utility.signatureToString("[Ljava/nio/file/attribute/FileAttribute<*>;"));
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/AnnotatedFields.java b/src/test/java/org/apache/commons/bcel6/data/AnnotatedFields.java
new file mode 100644
index 0000000..d8391a0
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/AnnotatedFields.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+public class AnnotatedFields {
+  @SimpleAnnotation(id=1) int i;
+
+  @SimpleAnnotation(id=2) String s;
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithCombinedAnnotation.java b/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithCombinedAnnotation.java
new file mode 100644
index 0000000..d2e2d88
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithCombinedAnnotation.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.commons.bcel6.data;
+
+@CombinedAnnotation( { @SimpleAnnotation(id = 4) })
+public class AnnotatedWithCombinedAnnotation
+{
+    public AnnotatedWithCombinedAnnotation(int param1, @SimpleAnnotation(id=42) int param2) {
+    }
+
+    @CombinedAnnotation( {})
+    public void methodWithArrayOfZeroAnnotations() {
+    }
+
+    @CombinedAnnotation( { @SimpleAnnotation(id=1, fruit="apples"), @SimpleAnnotation(id= 2, fruit="oranges")})
+    public void methodWithArrayOfTwoAnnotations() {
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithEnumClass.java b/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithEnumClass.java
new file mode 100644
index 0000000..8aad494
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/AnnotatedWithEnumClass.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+@AnnotationEnumElement(enumval = SimpleEnum.Red)
+public class AnnotatedWithEnumClass
+{
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/AnnotationEnumElement.java b/src/test/java/org/apache/commons/bcel6/data/AnnotationEnumElement.java
new file mode 100644
index 0000000..c599259
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/AnnotationEnumElement.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AnnotationEnumElement
+{
+    SimpleEnum enumval();
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/data/AnonymousClassTest.java b/src/test/java/org/apache/commons/bcel6/data/AnonymousClassTest.java
new file mode 100644
index 0000000..09df5da
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/AnonymousClassTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+public class AnonymousClassTest
+{
+    public void foo()
+    {
+        new Runnable()
+        {
+            public void run()
+            {
+            }
+        }.run();
+    }
+
+    class X
+    {
+    }
+
+    static class Y
+    {
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM01.java b/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM01.java
new file mode 100644
index 0000000..3b38fe2
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM01.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+public class AttributeTestClassEM01
+{
+    public static void main(String[] argv)
+    {
+        class S
+        {
+            public void sayhello()
+            {
+                System.err.println("hello");
+            }
+        }
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM02.java b/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM02.java
new file mode 100644
index 0000000..7ade064
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/AttributeTestClassEM02.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+public class AttributeTestClassEM02
+{
+    Runnable r = new Runnable()
+    {
+        public void run()
+        {
+            System.err.println("hello");
+        }
+    };
+
+    public static void main(String[] argv)
+    {
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/CombinedAnnotation.java b/src/test/java/org/apache/commons/bcel6/data/CombinedAnnotation.java
new file mode 100644
index 0000000..b636378
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/CombinedAnnotation.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CombinedAnnotation
+{
+    public SimpleAnnotation[] value();
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/data/ComplexAnnotatedClass.java b/src/test/java/org/apache/commons/bcel6/data/ComplexAnnotatedClass.java
new file mode 100644
index 0000000..51748c5
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/ComplexAnnotatedClass.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+@ComplexAnnotation(ival = 4, bval = 2, cval = '5', fval = 3.0f, dval = 33.4, zval = false, jval = 56, sval = 99)
+public class ComplexAnnotatedClass
+{
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/ComplexAnnotation.java b/src/test/java/org/apache/commons/bcel6/data/ComplexAnnotation.java
new file mode 100644
index 0000000..870e69f
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/ComplexAnnotation.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ComplexAnnotation
+{
+    int ival();
+
+    byte bval();
+
+    char cval();
+
+    long jval();
+
+    double dval();
+
+    boolean zval();
+
+    short sval();
+
+    float fval();
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/data/MarkedType.java b/src/test/java/org/apache/commons/bcel6/data/MarkedType.java
new file mode 100644
index 0000000..56f97df
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/MarkedType.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+@MarkerAnnotationInvisible
+@MarkerAnnotation
+public class MarkedType
+{
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/MarkerAnnotation.java b/src/test/java/org/apache/commons/bcel6/data/MarkerAnnotation.java
new file mode 100644
index 0000000..5a0a26b
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/MarkerAnnotation.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MarkerAnnotation
+{
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/MarkerAnnotationInvisible.java b/src/test/java/org/apache/commons/bcel6/data/MarkerAnnotationInvisible.java
new file mode 100644
index 0000000..0a3c604
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/MarkerAnnotationInvisible.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.CLASS)
+public @interface MarkerAnnotationInvisible { }
diff --git a/src/test/java/org/apache/commons/bcel6/data/SimpleAnnotatedClass.java b/src/test/java/org/apache/commons/bcel6/data/SimpleAnnotatedClass.java
new file mode 100644
index 0000000..37831da
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/SimpleAnnotatedClass.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+@SimpleAnnotation(id = 4)
+public class SimpleAnnotatedClass
+{
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/SimpleAnnotation.java b/src/test/java/org/apache/commons/bcel6/data/SimpleAnnotation.java
new file mode 100644
index 0000000..a4cc94a
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/SimpleAnnotation.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SimpleAnnotation
+{
+    int id();
+
+    String fruit() default "bananas";
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/SimpleClass.java b/src/test/java/org/apache/commons/bcel6/data/SimpleClass.java
new file mode 100644
index 0000000..e720166
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/SimpleClass.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+public class SimpleClass
+{
+    public static void main(String[] argv)
+    {
+        // Nothing unusual in this class
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/data/SimpleEnum.java b/src/test/java/org/apache/commons/bcel6/data/SimpleEnum.java
new file mode 100644
index 0000000..743de36
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/data/SimpleEnum.java
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.data;
+
+public enum SimpleEnum { Red,Orange,Yellow,Green,Blue,Indigo,Violet }
diff --git a/src/test/java/org/apache/commons/bcel6/generic/AnnotationGenTestCase.java b/src/test/java/org/apache/commons/bcel6/generic/AnnotationGenTestCase.java
new file mode 100644
index 0000000..d01fe1b
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/generic/AnnotationGenTestCase.java
@@ -0,0 +1,173 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.bcel6.generic;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.bcel6.AbstractTestCase;
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.classfile.Annotations;
+import org.apache.commons.bcel6.classfile.Attribute;
+import org.apache.commons.bcel6.classfile.RuntimeInvisibleAnnotations;
+import org.apache.commons.bcel6.classfile.RuntimeVisibleAnnotations;
+import org.apache.commons.bcel6.generic.AnnotationEntryGen;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.ElementValueGen;
+import org.apache.commons.bcel6.generic.ElementValuePairGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.SimpleElementValueGen;
+
+public class AnnotationGenTestCase extends AbstractTestCase
+{
+    private ClassGen createClassGen(String classname)
+    {
+        return new ClassGen(classname, "java.lang.Object", "<generated>",
+                Constants.ACC_PUBLIC | Constants.ACC_SUPER, null);
+    }
+
+    /**
+     * Programmatically construct an mutable annotation (AnnotationGen) object.
+     */
+    public void testConstructMutableAnnotation()
+    {
+        // Create the containing class
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        // Create the simple primitive value '4' of type 'int'
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_INT, cp, 4);
+        // Give it a name, call it 'id'
+        ElementValuePairGen nvGen = new ElementValuePairGen("id", evg,
+                cp);
+        // Check it looks right
+        assertTrue(
+                "Should include string 'id=4' but says: " + nvGen.toString(),
+                nvGen.toString().contains("id=4"));
+        ObjectType t = new ObjectType("SimpleAnnotation");
+        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
+        elements.add(nvGen);
+        // Build an annotation of type 'SimpleAnnotation' with 'id=4' as the
+        // only value :)
+        AnnotationEntryGen a = new AnnotationEntryGen(t, elements, true, cp);
+        // Check we can save and load it ok
+        checkSerialize(a, cp);
+    }
+
+    public void testVisibleInvisibleAnnotationGen()
+    {
+        // Create the containing class
+        ClassGen cg = createClassGen("HelloWorld");
+        ConstantPoolGen cp = cg.getConstantPool();
+        // Create the simple primitive value '4' of type 'int'
+        SimpleElementValueGen evg = new SimpleElementValueGen(
+                ElementValueGen.PRIMITIVE_INT, cp, 4);
+        // Give it a name, call it 'id'
+        ElementValuePairGen nvGen = new ElementValuePairGen("id", evg,
+                cp);
+        // Check it looks right
+        assertTrue(
+                "Should include string 'id=4' but says: " + nvGen.toString(),
+                nvGen.toString().contains("id=4"));
+        ObjectType t = new ObjectType("SimpleAnnotation");
+        List<ElementValuePairGen> elements = new ArrayList<ElementValuePairGen>();
+        elements.add(nvGen);
+        // Build a RV annotation of type 'SimpleAnnotation' with 'id=4' as the
+        // only value :)
+        AnnotationEntryGen a = new AnnotationEntryGen(t, elements, true, cp);
+        List<AnnotationEntryGen> v = new ArrayList<AnnotationEntryGen>();
+        v.add(a);
+        Attribute[] attributes = AnnotationEntryGen.getAnnotationAttributes(cp, v);
+        boolean foundRV = false;
+        for (Attribute attribute : attributes) {
+            if (attribute instanceof RuntimeVisibleAnnotations)
+            {
+                assertTrue(((Annotations) attribute).isRuntimeVisible());
+                foundRV = true;
+            }
+        }
+        assertTrue("Should have seen a RuntimeVisibleAnnotation", foundRV);
+        // Build a RIV annotation of type 'SimpleAnnotation' with 'id=4' as the
+        // only value :)
+        AnnotationEntryGen a2 = new AnnotationEntryGen(t, elements, false, cp);
+        List<AnnotationEntryGen> v2 = new ArrayList<AnnotationEntryGen>();
+        v2.add(a2);
+        Attribute[] attributes2 = AnnotationEntryGen.getAnnotationAttributes(cp, v2);
+        boolean foundRIV = false;
+        for (Attribute attribute : attributes2) {
+            if (attribute instanceof RuntimeInvisibleAnnotations)
+            {
+                assertFalse(((Annotations) attribute).isRuntimeVisible());
+                foundRIV = true;
+            }
+        }
+        assertTrue("Should have seen a RuntimeInvisibleAnnotation", foundRIV);
+    }
+
+    private void checkSerialize(AnnotationEntryGen a, ConstantPoolGen cpg)
+    {
+        try
+        {
+            String beforeName = a.getTypeName();
+            ByteArrayOutputStream baos = new ByteArrayOutputStream();
+            DataOutputStream dos = new DataOutputStream(baos);
+            a.dump(dos);
+            dos.flush();
+            dos.close();
+            byte[] bs = baos.toByteArray();
+            ByteArrayInputStream bais = new ByteArrayInputStream(bs);
+            DataInputStream dis = new DataInputStream(bais);
+            AnnotationEntryGen annAfter = AnnotationEntryGen.read(dis, cpg, a
+                    .isRuntimeVisible());
+            dis.close();
+            String afterName = annAfter.getTypeName();
+            if (!beforeName.equals(afterName))
+            {
+                fail("Deserialization failed: before type='" + beforeName
+                        + "' after type='" + afterName + "'");
+            }
+            if (a.getValues().size() != annAfter.getValues().size())
+            {
+                fail("Different numbers of element name value pairs?? "
+                        + a.getValues().size() + "!="
+                        + annAfter.getValues().size());
+            }
+            for (int i = 0; i < a.getValues().size(); i++)
+            {
+                ElementValuePairGen beforeElement = a.getValues().get(i);
+                ElementValuePairGen afterElement = annAfter.getValues().get(i);
+                if (!beforeElement.getNameString().equals(
+                        afterElement.getNameString()))
+                {
+                    fail("Different names?? " + beforeElement.getNameString()
+                            + "!=" + afterElement.getNameString());
+                }
+            }
+        }
+        catch (IOException ioe)
+        {
+            fail("Unexpected exception whilst checking serialization: " + ioe);
+        }
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/generic/MethodGenTestCase.java b/src/test/java/org/apache/commons/bcel6/generic/MethodGenTestCase.java
new file mode 100644
index 0000000..13cc35b
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/generic/MethodGenTestCase.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.commons.bcel6.generic;
+
+import java.util.Arrays;
+
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.LocalVariableGen;
+import org.apache.commons.bcel6.generic.MethodGen;
+
+import junit.framework.TestCase;
+
+public class MethodGenTestCase extends TestCase {
+
+    public static class Foo {
+        public void bar() {
+            int a = 1;
+        }
+    }
+
+    private MethodGen getMethod(Class cls, String name) throws ClassNotFoundException {
+        JavaClass jc = Repository.lookupClass(cls);
+        ConstantPoolGen cp = new ConstantPoolGen(jc.getConstantPool());
+        for (Method method : jc.getMethods()) {
+            if (method.getName().equals(name)) {
+                return new MethodGen(method, jc.getClassName(), cp);
+            }
+        }
+
+        fail("Method " + name + " not found in class " + cls);
+        return null;
+    }
+
+    public void testRemoveLocalVariable() throws Exception {
+        MethodGen mg = getMethod(Foo.class, "bar");
+
+        LocalVariableGen lv = mg.getLocalVariables()[1];
+        assertEquals("variable name", "a", lv.getName());
+        InstructionHandle start = lv.getStart();
+        InstructionHandle end = lv.getEnd();
+        assertNotNull("scope start", start);
+        assertNotNull("scope end", end);
+        assertTrue("scope start not targeted by the local variable", Arrays.asList(start.getTargeters()).contains(lv));
+        assertTrue("scope end not targeted by the local variable", Arrays.asList(end.getTargeters()).contains(lv));
+
+        // now let's remove the local variable
+        mg.removeLocalVariable(lv);
+
+        assertFalse("scope start still targeted by the removed variable", Arrays.asList(start.getTargeters()).contains(lv));
+        assertFalse("scope end still targeted by the removed variable", Arrays.asList(end.getTargeters()).contains(lv));
+        assertNull("scope start", lv.getStart());
+        assertNull("scope end", lv.getEnd());
+    }
+
+    public void testRemoveLocalVariables() throws Exception {
+        MethodGen mg = getMethod(Foo.class, "bar");
+
+        LocalVariableGen lv = mg.getLocalVariables()[1];
+        assertEquals("variable name", "a", lv.getName());
+        InstructionHandle start = lv.getStart();
+        InstructionHandle end = lv.getEnd();
+        assertNotNull("scope start", start);
+        assertNotNull("scope end", end);
+        assertTrue("scope start not targeted by the local variable", Arrays.asList(start.getTargeters()).contains(lv));
+        assertTrue("scope end not targeted by the local variable", Arrays.asList(end.getTargeters()).contains(lv));
+
+        // now let's remove the local variables
+        mg.removeLocalVariables();
+
+        assertFalse("scope start still targeted by the removed variable", Arrays.asList(start.getTargeters()).contains(lv));
+        assertFalse("scope end still targeted by the removed variable", Arrays.asList(end.getTargeters()).contains(lv));
+        assertNull("scope start", lv.getStart());
+        assertNull("scope end", lv.getEnd());
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/util/Class2HTMLTestCase.java b/src/test/java/org/apache/commons/bcel6/util/Class2HTMLTestCase.java
new file mode 100644
index 0000000..c14c76a
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/util/Class2HTMLTestCase.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.bcel6.util;
+
+import java.io.File;
+import java.io.FileInputStream;
+
+import org.apache.commons.bcel6.classfile.ClassParser;
+import org.apache.commons.bcel6.util.Class2HTML;
+
+import junit.framework.TestCase;
+
+public class Class2HTMLTestCase extends TestCase {
+
+    public void testConvertJavaUtil() throws Exception {
+        File outputDir = new File("target/test-output/html");
+        outputDir.mkdirs();
+
+        FileInputStream file = new FileInputStream("target/test-classes/Java8Example.class");
+
+        ClassParser parser = new ClassParser(file, "Java8Example.class");
+
+        new Class2HTML(parser.parse(), outputDir.getAbsolutePath() + "/");
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/util/InstructionFinderTest.java b/src/test/java/org/apache/commons/bcel6/util/InstructionFinderTest.java
new file mode 100644
index 0000000..3e7c176
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/util/InstructionFinderTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.util;
+
+import java.util.Iterator;
+
+import org.apache.commons.bcel6.AbstractTestCase;
+import org.apache.commons.bcel6.generic.IADD;
+import org.apache.commons.bcel6.generic.ILOAD;
+import org.apache.commons.bcel6.generic.ISTORE;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.util.InstructionFinder;
+
+public class InstructionFinderTest extends AbstractTestCase {
+
+    public void testSearch() {
+        InstructionList il = new InstructionList();
+        il.append(new ILOAD(1));
+        il.append(new ILOAD(2));
+        il.append(new IADD());
+        il.append(new ISTORE(3));
+        InstructionFinder finder = new InstructionFinder(il);
+
+        Iterator<?> it = finder.search("ILOAD IADD", il.getInstructionHandles()[0], null );
+        InstructionHandle[] ihs = (InstructionHandle[])it.next();
+        assertEquals(2, ihs.length);
+        assertEquals(ihs[0].getInstruction(), new ILOAD(2));
+        assertEquals(ihs[1].getInstruction(), new IADD());
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/AbstractVerifierTestCase.java b/src/test/java/org/apache/commons/bcel6/verifier/AbstractVerifierTestCase.java
new file mode 100644
index 0000000..e6f0b50
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/AbstractVerifierTestCase.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.verifier;
+
+import org.apache.commons.bcel6.Repository;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.verifier.VerificationResult;
+import org.apache.commons.bcel6.verifier.Verifier;
+import org.apache.commons.bcel6.verifier.VerifierFactory;
+
+import junit.framework.TestCase;
+
+public abstract class AbstractVerifierTestCase extends TestCase {
+
+    public static final String TEST_PACKAGE = "org.apache.commons.bcel6.verifier.tests.";
+
+    /**
+     * Asserts that the verification of the given class is OK. If it isn't it throws an AssertionFailedError with the given message.
+     *
+     * @param classname simple classname of the class to verify
+     * @param message   message displayed if assertion fails
+     */
+    public void assertVerifyOK(String classname, String message) {
+        final String testClassname = TEST_PACKAGE + classname;
+        assertTrue(message, doAllPasses(testClassname));
+    }
+
+    /**
+     * Asserts that the verification of the given class is rejected. If it isn't it throws an AssertionFailedError with the given message.
+     *
+     * @param classname simple classname of the class to verify
+     * @param message   message displayed if assertion fails
+     */
+    public void assertVerifyRejected(String classname, String message) {
+        final String testClassname = TEST_PACKAGE + classname;
+        assertFalse(message, doAllPasses(testClassname));
+    }
+
+    /**
+     * Executes all the verification on the given class.
+     *
+     * @param classname name of the class to verify
+     * @return false if the verification fails, true otherwise
+     */
+    public boolean doAllPasses(String classname) {
+        int nbMethods = 0;
+
+        try {
+            JavaClass jc = Repository.lookupClass(classname);
+            nbMethods = jc.getMethods().length;
+        } catch (ClassNotFoundException e) {
+            fail(e.getMessage());
+            return false;
+        }
+
+        Verifier verifier = VerifierFactory.getVerifier(classname);
+        VerificationResult result = verifier.doPass1();
+        if (result.getStatus() != VerificationResult.VERIFIED_OK) {
+            return false;
+        }
+
+        result = verifier.doPass2();
+        if (result.getStatus() != VerificationResult.VERIFIED_OK) {
+            return false;
+        }
+
+        for (int i = nbMethods; --i >= 0; ) {
+            result = verifier.doPass3a(i);
+            if (result.getStatus() != VerificationResult.VERIFIED_OK) {
+                return false;
+            }
+            result = verifier.doPass3b(i);
+            if (result.getStatus() != VerificationResult.VERIFIED_OK) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/VerifierArrayAccessTestCase.java b/src/test/java/org/apache/commons/bcel6/verifier/VerifierArrayAccessTestCase.java
new file mode 100644
index 0000000..6afc3f3
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/VerifierArrayAccessTestCase.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.verifier;
+
+import java.io.IOException;
+
+import org.apache.commons.bcel6.verifier.tests.TestArrayAccess02Creator;
+import org.apache.commons.bcel6.verifier.tests.TestArrayAccess03Creator;
+import org.apache.commons.bcel6.verifier.tests.TestArrayAccess04Creator;
+
+public class VerifierArrayAccessTestCase extends AbstractVerifierTestCase {
+    
+    public void testInvalidArrayAccess() throws IOException {
+        new TestArrayAccess03Creator().create();
+        assertVerifyRejected("TestArrayAccess03", "Verification of an arraystore instruction on an object must fail.");
+        new TestArrayAccess04Creator().create();
+        assertVerifyRejected("TestArrayAccess04", "Verification of an arraystore instruction of an int on an array of references must fail.");
+    }
+
+    public void testValidArrayAccess() throws IOException {
+        assertVerifyOK("TestArrayAccess01", "Verification of an arraystore instruction on an array that is not compatible with the stored element must pass.");
+        new TestArrayAccess02Creator().create();
+        assertVerifyOK("TestArrayAccess02", "Verification of an arraystore instruction on an array that is not compatible with the stored element must pass.");
+    }
+    
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/VerifierInvokeTestCase.java b/src/test/java/org/apache/commons/bcel6/verifier/VerifierInvokeTestCase.java
new file mode 100644
index 0000000..6a01a90
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/VerifierInvokeTestCase.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.verifier;
+
+
+public class VerifierInvokeTestCase extends AbstractVerifierTestCase {
+
+    public void testLegalInvokeVirtual() {
+        assertVerifyOK("TestLegalInvokeVirtual01", "Verification of invokevirtual on method defined in superclass must pass.");
+        assertVerifyOK("TestLegalInvokeVirtual02", "Verification of invokevirtual on method defined in superinterface must pass.");
+    }
+    
+    public void testLegalInvokeStatic() {
+        assertVerifyOK("TestLegalInvokeStatic01", "Verification of invokestatic on method defined in superclass must pass.");
+    }
+    
+    public void testLegalInvokeInterface() {
+        assertVerifyOK("TestLegalInvokeInterface01", "Verification of invokeinterface on method defined in superinterface must pass.");
+    }
+    
+    public void testLegalInvokeSpecial() {
+        assertVerifyOK("TestLegalInvokeSpecial01", "Verification of invokespecial on method defined in superclass must pass.");
+        assertVerifyOK("TestLegalInvokeSpecial02", "Verification of invokespecial on method defined in superclass must pass.");
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/VerifierReturnTestCase.java b/src/test/java/org/apache/commons/bcel6/verifier/VerifierReturnTestCase.java
new file mode 100644
index 0000000..dd6554d
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/VerifierReturnTestCase.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.bcel6.verifier;
+
+import java.io.IOException;
+
+import org.apache.commons.bcel6.verifier.tests.TestReturn01Creator;
+import org.apache.commons.bcel6.verifier.tests.TestReturn03Creator;
+
+public class VerifierReturnTestCase extends AbstractVerifierTestCase {
+
+    public void testInvalidReturn() throws IOException {
+        new TestReturn01Creator().create();
+        assertVerifyRejected("TestReturn01", "Verification of a void method that returns an object must fail.");
+        new TestReturn03Creator().create();
+        assertVerifyRejected("TestReturn03", "Verification of an int method that returns null must fail.");
+    }
+
+    public void testValidReturn() {
+        assertVerifyOK("TestReturn02", "Verification of a method that returns a newly created object must pass.");
+        assertVerifyOK("TestArray01", "Verification of a method that returns an array must pass.");
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/VerifierTestCase.java b/src/test/java/org/apache/commons/bcel6/verifier/VerifierTestCase.java
new file mode 100644
index 0000000..17f8091
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/VerifierTestCase.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.verifier;
+
+import java.util.Collection;
+
+import org.apache.commons.bcel6.verifier.VerificationResult;
+import org.apache.commons.bcel6.verifier.Verifier;
+import org.apache.commons.bcel6.verifier.VerifierFactory;
+
+import junit.framework.TestCase;
+
+public class VerifierTestCase extends TestCase {
+
+    public void testDefaultMethodValidation() {
+        String classname = Collection.class.getName();
+
+        Verifier verifier = VerifierFactory.getVerifier(classname);
+        VerificationResult result = verifier.doPass1();
+
+        assertEquals("Pass 1 verification of " + classname + " failed: " + result.getMessage(), VerificationResult.VERIFIED_OK, result.getStatus());
+
+        result = verifier.doPass2();
+
+        assertEquals("Pass 2 verification of " + classname + " failed: " + result.getMessage(), VerificationResult.VERIFIED_OK, result.getStatus());
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArray01.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArray01.java
new file mode 100644
index 0000000..8ffc17f
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArray01.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.commons.bcel6.verifier.tests;
+
+import java.io.Serializable;
+
+public class TestArray01{
+
+    public static Object test1(){
+        String[] a = new String[4];
+        a[0] = "";
+        a.equals(null);
+        test2(a);
+        test3(a);
+        test4(a);
+        return a;
+    }
+
+    @SuppressWarnings("unused")
+    public static void test2(Object o){
+    }
+
+    @SuppressWarnings("unused")
+    public static void test3(Serializable o){
+    }
+
+    @SuppressWarnings("unused")
+    public static void test4(Cloneable o){
+    }
+
+    public static Serializable test5(){
+        return new Object[1];
+    }
+
+    public static Cloneable test6(){
+        return new Object[1];
+    }
+
+    public static Object foo(String s){
+        return s;
+    }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess01.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess01.java
new file mode 100644
index 0000000..7815c19
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess01.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+package org.apache.commons.bcel6.verifier.tests;
+
+
+public class TestArrayAccess01 extends XTestArray01{
+
+    public static void test(){
+        XTestArray01[] array = new TestArrayAccess01[1];
+        array[0] = new XTestArray01();
+    }
+   
+}
+
+class XTestArray01 {
+    
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java
new file mode 100644
index 0000000..2f16f90
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+package org.apache.commons.bcel6.verifier.tests;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionFactory;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.PUSH;
+import org.apache.commons.bcel6.generic.Type;
+
+public class TestArrayAccess02Creator extends TestCreator implements Constants {
+  private InstructionFactory _factory;
+  private ConstantPoolGen    _cp;
+  private ClassGen           _cg;
+
+  public TestArrayAccess02Creator() {
+    _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", "java.lang.Object", "TestArrayAccess02.java", ACC_PUBLIC | ACC_SUPER, new String[] {  });
+
+    _cp = _cg.getConstantPool();
+    _factory = new InstructionFactory(_cg, _cp);
+  }
+
+  public void create(OutputStream out) throws IOException {
+    createMethod_0();
+    createMethod_1();
+    _cg.getJavaClass().dump(out);
+  }
+
+  private void createMethod_0() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] {  }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", il, _cp);
+
+    InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+    il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
+    InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+
+  private void createMethod_1() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.VOID, Type.NO_ARGS, new String[] {  }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", il, _cp);
+
+    InstructionHandle ih_0 = il.append(new PUSH(_cp, 1));
+    il.append(_factory.createNewArray(new ObjectType("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02"), (short) 1));
+    il.append(_factory.createStore(Type.OBJECT, 0));
+    InstructionHandle ih_5 = il.append(new PUSH(_cp, 1));
+    il.append(_factory.createNewArray(Type.STRING, (short) 1));
+    il.append(_factory.createStore(Type.OBJECT, 1));
+    InstructionHandle ih_10 = il.append(_factory.createLoad(Type.OBJECT, 1));
+    il.append(new PUSH(_cp, 0));
+    il.append(_factory.createNew("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02"));
+    il.append(InstructionConstants.DUP);
+    il.append(_factory.createInvoke("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
+    il.append(InstructionConstants.AASTORE);
+    InstructionHandle ih_20 = il.append(_factory.createReturn(Type.VOID));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java
new file mode 100644
index 0000000..02b4caf
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+package org.apache.commons.bcel6.verifier.tests;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionFactory;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.ObjectType;
+import org.apache.commons.bcel6.generic.PUSH;
+import org.apache.commons.bcel6.generic.Type;
+
+public class TestArrayAccess03Creator extends TestCreator implements Constants {
+  private InstructionFactory _factory;
+  private ConstantPoolGen    _cp;
+  private ClassGen           _cg;
+
+  public TestArrayAccess03Creator() {
+    _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", "java.lang.Object", "TestArrayAccess03.java", ACC_PUBLIC | ACC_SUPER, new String[] {  });
+
+    _cp = _cg.getConstantPool();
+    _factory = new InstructionFactory(_cg, _cp);
+  }
+
+  public void create(OutputStream out) throws IOException {
+    createMethod_0();
+    createMethod_1();
+    _cg.getJavaClass().dump(out);
+  }
+
+  private void createMethod_0() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] {  }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", il, _cp);
+
+    InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+    il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
+    InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+
+  private void createMethod_1() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.VOID, new Type[] { Type.OBJECT }, new String[] { "arg0" }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", il, _cp);
+
+    InstructionHandle ih_0 = il.append(new PUSH(_cp, 1));
+    il.append(_factory.createNewArray(new ObjectType("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03"), (short) 1));
+    il.append(_factory.createStore(Type.OBJECT, 1));
+    InstructionHandle ih_5 = il.append(_factory.createLoad(Type.OBJECT, 0));
+    il.append(new PUSH(_cp, 0));
+    il.append(_factory.createNew("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03"));
+    il.append(InstructionConstants.DUP);
+    il.append(_factory.createInvoke("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
+    il.append(InstructionConstants.AASTORE);
+    InstructionHandle ih_15 = il.append(_factory.createReturn(Type.VOID));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java
new file mode 100644
index 0000000..3e89ab6
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */package org.apache.commons.bcel6.verifier.tests;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionFactory;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.PUSH;
+import org.apache.commons.bcel6.generic.Type;
+
+public class TestArrayAccess04Creator extends TestCreator implements Constants {
+  private InstructionFactory _factory;
+  private ConstantPoolGen    _cp;
+  private ClassGen           _cg;
+
+  public TestArrayAccess04Creator() {
+    _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", "java.lang.Object", "TestArrayAccess04.java", ACC_PUBLIC | ACC_SUPER, new String[] {  });
+
+    _cp = _cg.getConstantPool();
+    _factory = new InstructionFactory(_cg, _cp);
+  }
+
+  public void create(OutputStream out) throws IOException {
+    createMethod_0();
+    createMethod_1();
+    _cg.getJavaClass().dump(out);
+  }
+
+  private void createMethod_0() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] {  }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", il, _cp);
+
+    InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+    il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
+    InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+
+  private void createMethod_1() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.VOID, new Type[] { Type.OBJECT }, new String[] { "arg0" }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", il, _cp);
+
+    InstructionHandle ih_0 = il.append(new PUSH(_cp, 1));
+    il.append(_factory.createNewArray(Type.OBJECT, (short) 1));
+    il.append(_factory.createStore(Type.OBJECT, 1));
+    InstructionHandle ih_5 = il.append(new PUSH(_cp, 1));
+    il.append(_factory.createStore(Type.INT, 2));
+    InstructionHandle ih_7 = il.append(_factory.createLoad(Type.OBJECT, 1));
+    il.append(new PUSH(_cp, 0));
+    il.append(_factory.createLoad(Type.INT, 2));
+    il.append(InstructionConstants.AASTORE);
+    InstructionHandle ih_11 = il.append(_factory.createReturn(Type.VOID));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestCreator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestCreator.java
new file mode 100644
index 0000000..8dc1c92
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestCreator.java
@@ -0,0 +1,61 @@
+package org.apache.commons.bcel6.verifier.tests;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URISyntaxException;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+public abstract class TestCreator {
+
+    public void create() throws IOException {
+        File classFile = new File(getPackageFolder(), getClassName());
+        FileOutputStream out = new FileOutputStream(classFile);
+        try {
+            create(out);
+        }
+        finally {
+            out.close();
+        }
+    }
+    
+    private String getClassName() {
+        String name = getClass().getName();
+        return name.substring(name.lastIndexOf('.')+1).replace("Creator", ".class");
+    }
+
+    private File getPackageFolder() throws IOException {
+        return new File(getClassesFolder(), getPackageName());
+    }
+
+    protected String getPackageName() {
+        return getClass().getPackage().getName().replace('.', '/');
+    }
+
+    private File getClassesFolder() throws IOException {
+        try {
+            return new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI());
+        } catch (URISyntaxException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public abstract void create(OutputStream out) throws IOException;
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeInterface01.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeInterface01.java
new file mode 100755
index 0000000..131eac1
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeInterface01.java
@@ -0,0 +1,12 @@
+package org.apache.commons.bcel6.verifier.tests;
+
+public class TestLegalInvokeInterface01{
+
+    public static void test1(Interface01 t){
+        t.run();
+    }
+}
+
+interface Interface01 extends Runnable {
+    
+}
\ No newline at end of file
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial01.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial01.java
new file mode 100755
index 0000000..5938ed3
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial01.java
@@ -0,0 +1,9 @@
+package org.apache.commons.bcel6.verifier.tests;
+
+public class TestLegalInvokeSpecial01{
+
+    public static void test1(){
+       new TestLegalInvokeSpecial01().getClass();
+    }
+    
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial02.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial02.java
new file mode 100755
index 0000000..b8321ef
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeSpecial02.java
@@ -0,0 +1,11 @@
+package org.apache.commons.bcel6.verifier.tests;
+
+abstract public class TestLegalInvokeSpecial02 implements Runnable{
+
+    public static void test1(TestLegalInvokeSpecial02 t, int i){
+        if(i > 0){
+            t.run();
+        }
+    }
+    
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeStatic01.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeStatic01.java
new file mode 100755
index 0000000..312f021
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeStatic01.java
@@ -0,0 +1,9 @@
+package org.apache.commons.bcel6.verifier.tests;
+
+public class TestLegalInvokeStatic01 extends Thread{
+
+    public static void test1() throws InterruptedException{
+       Thread.sleep(0);
+    }
+    
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual01.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual01.java
new file mode 100755
index 0000000..1b1a822
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual01.java
@@ -0,0 +1,9 @@
+package org.apache.commons.bcel6.verifier.tests;
+
+public class TestLegalInvokeVirtual01 {
+
+    public static void test1(){
+        new TestLegalInvokeVirtual01().toString();
+    }
+    
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual02.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual02.java
new file mode 100755
index 0000000..fc663e1
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestLegalInvokeVirtual02.java
@@ -0,0 +1,11 @@
+package org.apache.commons.bcel6.verifier.tests;
+
+abstract public class TestLegalInvokeVirtual02 implements Runnable{
+
+    public static void test1(TestLegalInvokeVirtual02 t, int i){
+        if(i > 0){
+            t.run();
+        }
+    }
+    
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java
new file mode 100644
index 0000000..df5feb8
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+package org.apache.commons.bcel6.verifier.tests;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionFactory;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.Type;
+
+public class TestReturn01Creator extends TestCreator implements Constants {
+  private InstructionFactory _factory;
+  private ConstantPoolGen    _cp;
+  private ClassGen           _cg;
+
+  public TestReturn01Creator() {
+    _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestReturn01", "java.lang.Object", "TestReturn01.java", ACC_PUBLIC | ACC_SUPER, new String[] {  });
+
+    _cp = _cg.getConstantPool();
+    _factory = new InstructionFactory(_cg, _cp);
+  }
+
+  public void create(OutputStream out) throws IOException {
+    createMethod_0();
+    createMethod_1();
+    _cg.getJavaClass().dump(out);
+  }
+
+  private void createMethod_0() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] {  }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestReturn01", il, _cp);
+
+    InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+    il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
+    InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+
+  private void createMethod_1() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.VOID, Type.NO_ARGS, new String[] {  }, "foo", "org.apache.commons.bcel6.verifier.tests.TestReturn01", il, _cp);
+
+    InstructionHandle ih_0 = il.append(_factory.createNew("java.lang.Object"));
+    il.append(InstructionConstants.DUP);
+    il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
+    il.append(InstructionConstants.NOP);
+    InstructionHandle ih_8 = il.append(_factory.createReturn(Type.OBJECT));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn02.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn02.java
new file mode 100644
index 0000000..d6285b0
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn02.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+package org.apache.commons.bcel6.verifier.tests;
+
+public class TestReturn02 {
+
+    public static String test1(char[] data, int offset, int count) {
+        return new String(data, offset, count);
+    }
+    
+    public static Object test2(){
+        return new Object();
+    }
+    
+    public static boolean test3(){
+        return true;
+    }
+    
+    public static byte test4(){
+        return 1;
+    }
+    
+    public static short test5(){
+        return 1;
+    }
+    
+    public static char test6(){
+        return 'a';
+    }
+    
+    public static int test7(){
+        return 1;
+    }
+    
+    public static long test8(){
+        return 1l;
+    }
+    
+    public static float test9(){
+        return 1.0f;
+    }
+    
+    public static double test10(){
+        return 1.0;
+    }
+    
+    public static Object test11(){
+        return null;
+    }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java
new file mode 100644
index 0000000..f29fcd6
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+package org.apache.commons.bcel6.verifier.tests;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.commons.bcel6.Constants;
+import org.apache.commons.bcel6.generic.ClassGen;
+import org.apache.commons.bcel6.generic.ConstantPoolGen;
+import org.apache.commons.bcel6.generic.InstructionConstants;
+import org.apache.commons.bcel6.generic.InstructionFactory;
+import org.apache.commons.bcel6.generic.InstructionHandle;
+import org.apache.commons.bcel6.generic.InstructionList;
+import org.apache.commons.bcel6.generic.MethodGen;
+import org.apache.commons.bcel6.generic.Type;
+
+public class TestReturn03Creator extends TestCreator implements Constants {
+  private InstructionFactory _factory;
+  private ConstantPoolGen    _cp;
+  private ClassGen           _cg;
+
+  public TestReturn03Creator() {
+    _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestReturn03", "java.lang.Object", "TestReturn03.java", ACC_PUBLIC | ACC_SUPER, new String[] {  });
+
+    _cp = _cg.getConstantPool();
+    _factory = new InstructionFactory(_cg, _cp);
+  }
+
+  public void create(OutputStream out) throws IOException {
+    createMethod_0();
+    createMethod_1();
+    _cg.getJavaClass().dump(out);
+  }
+
+  private void createMethod_0() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] {  }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestReturn03", il, _cp);
+
+    InstructionHandle ih_0 = il.append(_factory.createLoad(Type.OBJECT, 0));
+    il.append(_factory.createInvoke("java.lang.Object", "<init>", Type.VOID, Type.NO_ARGS, Constants.INVOKESPECIAL));
+    InstructionHandle ih_4 = il.append(_factory.createReturn(Type.VOID));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+
+  private void createMethod_1() {
+    InstructionList il = new InstructionList();
+    MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.INT, Type.NO_ARGS, new String[] {  }, "test3", "org.apache.commons.bcel6.verifier.tests.TestReturn03", il, _cp);
+
+    InstructionHandle ih_0 = il.append(InstructionConstants.ACONST_NULL);
+    il.append(_factory.createReturn(Type.OBJECT));
+    method.setMaxStack();
+    method.setMaxLocals();
+    _cg.addMethod(method.getMethod());
+    il.dispose();
+  }
+}
diff --git a/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java b/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java
new file mode 100644
index 0000000..2f470bf
--- /dev/null
+++ b/src/test/java/org/apache/commons/bcel6/visitors/CounterVisitor.java
@@ -0,0 +1,366 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.commons.bcel6.visitors;
+
+import org.apache.commons.bcel6.classfile.AnnotationDefault;
+import org.apache.commons.bcel6.classfile.AnnotationEntry;
+import org.apache.commons.bcel6.classfile.Annotations;
+import org.apache.commons.bcel6.classfile.BootstrapMethods;
+import org.apache.commons.bcel6.classfile.Code;
+import org.apache.commons.bcel6.classfile.CodeException;
+import org.apache.commons.bcel6.classfile.ConstantClass;
+import org.apache.commons.bcel6.classfile.ConstantDouble;
+import org.apache.commons.bcel6.classfile.ConstantFieldref;
+import org.apache.commons.bcel6.classfile.ConstantFloat;
+import org.apache.commons.bcel6.classfile.ConstantInteger;
+import org.apache.commons.bcel6.classfile.ConstantInterfaceMethodref;
+import org.apache.commons.bcel6.classfile.ConstantInvokeDynamic;
+import org.apache.commons.bcel6.classfile.ConstantLong;
+import org.apache.commons.bcel6.classfile.ConstantMethodref;
+import org.apache.commons.bcel6.classfile.ConstantNameAndType;
+import org.apache.commons.bcel6.classfile.ConstantPool;
+import org.apache.commons.bcel6.classfile.ConstantString;
+import org.apache.commons.bcel6.classfile.ConstantUtf8;
+import org.apache.commons.bcel6.classfile.ConstantValue;
+import org.apache.commons.bcel6.classfile.Deprecated;
+import org.apache.commons.bcel6.classfile.EnclosingMethod;
+import org.apache.commons.bcel6.classfile.ExceptionTable;
+import org.apache.commons.bcel6.classfile.Field;
+import org.apache.commons.bcel6.classfile.InnerClass;
+import org.apache.commons.bcel6.classfile.InnerClasses;
+import org.apache.commons.bcel6.classfile.JavaClass;
+import org.apache.commons.bcel6.classfile.LineNumber;
+import org.apache.commons.bcel6.classfile.LineNumberTable;
+import org.apache.commons.bcel6.classfile.LocalVariable;
+import org.apache.commons.bcel6.classfile.LocalVariableTable;
+import org.apache.commons.bcel6.classfile.LocalVariableTypeTable;
+import org.apache.commons.bcel6.classfile.Method;
+import org.apache.commons.bcel6.classfile.MethodParameters;
+import org.apache.commons.bcel6.classfile.ParameterAnnotations;
+import org.apache.commons.bcel6.classfile.Signature;
+import org.apache.commons.bcel6.classfile.SourceFile;
+import org.apache.commons.bcel6.classfile.StackMap;
+import org.apache.commons.bcel6.classfile.StackMapEntry;
+import org.apache.commons.bcel6.classfile.StackMapTable;
+import org.apache.commons.bcel6.classfile.StackMapTableEntry;
+import org.apache.commons.bcel6.classfile.Synthetic;
+import org.apache.commons.bcel6.classfile.Unknown;
+import org.apache.commons.bcel6.classfile.Visitor;
+
+public class CounterVisitor implements Visitor
+{
+    public int unknownCount = 0;
+
+    public int syntheticCount = 0;
+
+    public int stackMapEntryCount = 0;
+
+    public int stackMapCount = 0;
+
+    public int sourceFileCount = 0;
+
+    public int signatureAnnotationCount = 0;
+
+    public int parameterAnnotationCount = 0;
+
+    public int methodCount = 0;
+
+    public int localVariableTypeTableCount = 0;
+
+    public int localVariableTableCount = 0;
+
+    public int localVariableCount = 0;
+
+    public int lineNumberTableCount = 0;
+
+    public int lineNumberCount = 0;
+
+    public int javaClassCount = 0;
+
+    public int innerClassesCount = 0;
+
+    public int innerClassCount = 0;
+
+    public int fieldCount = 0;
+
+    public int exceptionTableCount = 0;
+
+    public int enclosingMethodCount = 0;
+
+    public int deprecatedCount = 0;
+
+    public int constantValueCount = 0;
+
+    public int constantUtf8Count = 0;
+
+    public int constantStringCount = 0;
+
+    public int constantNameAndTypeCount = 0;
+
+    public int constantPoolCount = 0;
+
+    public int constantMethodrefCount = 0;
+
+    public int constantLongCount = 0;
+
+    public int constantIntegerCount = 0;
+
+    public int constantInterfaceMethodrefCount = 0;
+
+    public int constantFloatCount = 0;
+
+    public int constantFieldrefCount = 0;
+
+    public int constantClassCount = 0;
+
+    public int constantDoubleCount = 0;
+
+    public int codeExceptionCount = 0;
+
+    public int codeCount = 0;
+
+    public int annotationEntryCount = 0;
+
+    public int annotationDefaultCount = 0;
+
+    public int annotationCount = 0;
+
+    public int stackMapTableCount = 0;
+
+    public int stackMapTableEntryCount = 0;
+
+    public int bootstrapMethodsCount = 0;
+
+    public int methodParametersCount = 0;
+
+
+    public void visitAnnotation(Annotations obj)
+    {
+        annotationCount++;
+    }
+
+    public void visitAnnotationDefault(AnnotationDefault obj)
+    {
+        annotationDefaultCount++;
+    }
+
+    public void visitAnnotationEntry(AnnotationEntry obj)
+    {
+        annotationEntryCount++;
+    }
+
+    public void visitCode(Code obj)
+    {
+        codeCount++;
+    }
+
+    public void visitCodeException(CodeException obj)
+    {
+        codeExceptionCount++;
+    }
+
+    public void visitConstantClass(ConstantClass obj)
+    {
+        constantClassCount++;
+    }
+
+    public void visitConstantDouble(ConstantDouble obj)
+    {
+        constantDoubleCount++;
+    }
+
+    public void visitConstantFieldref(ConstantFieldref obj)
+    {
+        constantFieldrefCount++;
+    }
+
+    public void visitConstantFloat(ConstantFloat obj)
+    {
+        constantFloatCount++;
+    }
+
+    public void visitConstantInteger(ConstantInteger obj)
+    {
+        constantIntegerCount++;
+    }
+
+    public void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)
+    {
+        constantInterfaceMethodrefCount++;
+    }
+
+    public void visitConstantLong(ConstantLong obj)
+    {
+        constantLongCount++;
+    }
+
+    public void visitConstantMethodref(ConstantMethodref obj)
+    {
+        constantMethodrefCount++;
+    }
+
+    public void visitConstantNameAndType(ConstantNameAndType obj)
+    {
+        constantNameAndTypeCount++;
+    }
+
+    public void visitConstantPool(ConstantPool obj)
+    {
+        constantPoolCount++;
+    }
+
+    public void visitConstantString(ConstantString obj)
+    {
+        constantStringCount++;
+    }
+
+    public void visitConstantUtf8(ConstantUtf8 obj)
+    {
+        constantUtf8Count++;
+    }
+
+    public void visitConstantValue(ConstantValue obj)
+    {
+        constantValueCount++;
+    }
+
+    public void visitDeprecated(Deprecated obj)
+    {
+        deprecatedCount++;
+    }
+
+    public void visitEnclosingMethod(EnclosingMethod obj)
+    {
+        enclosingMethodCount++;
+    }
+
+    public void visitExceptionTable(ExceptionTable obj)
+    {
+        exceptionTableCount++;
+    }
+
+    public void visitField(Field obj)
+    {
+        fieldCount++;
+    }
+
+    public void visitInnerClass(InnerClass obj)
+    {
+        innerClassCount++;
+    }
+
+    public void visitInnerClasses(InnerClasses obj)
+    {
+        innerClassesCount++;
+    }
+
+    public void visitJavaClass(JavaClass obj)
+    {
+        javaClassCount++;
+    }
+
+    public void visitLineNumber(LineNumber obj)
+    {
+        lineNumberCount++;
+    }
+
+    public void visitLineNumberTable(LineNumberTable obj)
+    {
+        lineNumberTableCount++;
+    }
+
+    public void visitLocalVariable(LocalVariable obj)
+    {
+        localVariableCount++;
+    }
+
+    public void visitLocalVariableTable(LocalVariableTable obj)
+    {
+        localVariableTableCount++;
+    }
+
+    public void visitLocalVariableTypeTable(LocalVariableTypeTable obj)
+    {
+        localVariableTypeTableCount++;
+    }
+
+    public void visitMethod(Method obj)
+    {
+        methodCount++;
+    }
+
+    public void visitParameterAnnotation(ParameterAnnotations obj)
+    {
+        parameterAnnotationCount++;
+    }
+
+    public void visitSignature(Signature obj)
+    {
+        signatureAnnotationCount++;
+    }
+
+    public void visitSourceFile(SourceFile obj)
+    {
+        sourceFileCount++;
+    }
+
+    public void visitStackMap(StackMap obj)
+    {
+        stackMapCount++;
+    }
+
+    public void visitStackMapEntry(StackMapEntry obj)
+    {
+        stackMapEntryCount++;
+    }
+
+    public void visitSynthetic(Synthetic obj)
+    {
+        syntheticCount++;
+    }
+
+    public void visitUnknown(Unknown obj)
+    {
+        unknownCount++;
+    }
+
+    public void visitStackMapTable(StackMapTable obj)
+    {
+        stackMapTableCount++;
+    }
+
+    public void visitStackMapTableEntry(StackMapTableEntry obj)
+    {
+        stackMapTableEntryCount++;
+    }
+
+    public void visitBootstrapMethods(BootstrapMethods obj)
+    {
+        bootstrapMethodsCount++;
+    }
+
+    public void visitMethodParameters(MethodParameters obj)
+    {
+        methodParametersCount++;
+    }
+
+    public void visitConstantInvokeDynamic(ConstantInvokeDynamic obj)
+    {
+    }
+}
diff --git a/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess02.class b/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess02.class
deleted file mode 100644
index a6bc164..0000000
--- a/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess02.class
+++ /dev/null
Binary files differ
diff --git a/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess03.class b/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess03.class
deleted file mode 100644
index ddc2d1f..0000000
--- a/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess03.class
+++ /dev/null
Binary files differ
diff --git a/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess04.class b/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess04.class
deleted file mode 100644
index 1f119ad..0000000
--- a/src/test/resources/org/apache/bcel/verifier/tests/TestArrayAccess04.class
+++ /dev/null
Binary files differ
diff --git a/src/test/resources/org/apache/bcel/verifier/tests/TestReturn01.class b/src/test/resources/org/apache/bcel/verifier/tests/TestReturn01.class
deleted file mode 100644
index 33020b2..0000000
--- a/src/test/resources/org/apache/bcel/verifier/tests/TestReturn01.class
+++ /dev/null
Binary files differ
diff --git a/src/test/resources/org/apache/bcel/verifier/tests/TestReturn03.class b/src/test/resources/org/apache/bcel/verifier/tests/TestReturn03.class
deleted file mode 100644
index 1d1cb91..0000000
--- a/src/test/resources/org/apache/bcel/verifier/tests/TestReturn03.class
+++ /dev/null
Binary files differ