More unused code removal.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 6 Dec 2009 00:19:52 +0000 (00:19 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 6 Dec 2009 00:19:52 +0000 (00:19 +0000)
Still not complete.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@887613 13f79535-47bb-0310-9956-ffa450edef68

108 files changed:
java/org/apache/tomcat/util/bcel/Constants.java
java/org/apache/tomcat/util/bcel/Repository.java [deleted file]
java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
java/org/apache/tomcat/util/bcel/classfile/Annotations.java
java/org/apache/tomcat/util/bcel/classfile/Attribute.java
java/org/apache/tomcat/util/bcel/classfile/Code.java
java/org/apache/tomcat/util/bcel/classfile/CodeException.java
java/org/apache/tomcat/util/bcel/classfile/Constant.java
java/org/apache/tomcat/util/bcel/classfile/ConstantClass.java
java/org/apache/tomcat/util/bcel/classfile/ConstantDouble.java
java/org/apache/tomcat/util/bcel/classfile/ConstantFieldref.java
java/org/apache/tomcat/util/bcel/classfile/ConstantFloat.java
java/org/apache/tomcat/util/bcel/classfile/ConstantInteger.java
java/org/apache/tomcat/util/bcel/classfile/ConstantInterfaceMethodref.java
java/org/apache/tomcat/util/bcel/classfile/ConstantLong.java
java/org/apache/tomcat/util/bcel/classfile/ConstantMethodref.java
java/org/apache/tomcat/util/bcel/classfile/ConstantNameAndType.java
java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
java/org/apache/tomcat/util/bcel/classfile/ConstantString.java
java/org/apache/tomcat/util/bcel/classfile/ConstantUtf8.java
java/org/apache/tomcat/util/bcel/classfile/ConstantValue.java
java/org/apache/tomcat/util/bcel/classfile/Deprecated.java
java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
java/org/apache/tomcat/util/bcel/classfile/ExceptionTable.java
java/org/apache/tomcat/util/bcel/classfile/FieldOrMethod.java
java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
java/org/apache/tomcat/util/bcel/classfile/InnerClasses.java
java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
java/org/apache/tomcat/util/bcel/classfile/LineNumber.java
java/org/apache/tomcat/util/bcel/classfile/LineNumberTable.java
java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
java/org/apache/tomcat/util/bcel/classfile/Node.java [deleted file]
java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java
java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java
java/org/apache/tomcat/util/bcel/classfile/Signature.java
java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
java/org/apache/tomcat/util/bcel/classfile/StackMap.java
java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
java/org/apache/tomcat/util/bcel/classfile/StackMapTable.java
java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
java/org/apache/tomcat/util/bcel/classfile/Synthetic.java
java/org/apache/tomcat/util/bcel/classfile/Unknown.java
java/org/apache/tomcat/util/bcel/classfile/Utility.java
java/org/apache/tomcat/util/bcel/classfile/Visitor.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/ALOAD.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/ANEWARRAY.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/ASTORE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/BIPUSH.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/BREAKPOINT.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/BranchHandle.java
java/org/apache/tomcat/util/bcel/generic/BranchInstruction.java
java/org/apache/tomcat/util/bcel/generic/CHECKCAST.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/CPInstruction.java
java/org/apache/tomcat/util/bcel/generic/ClassGen.java
java/org/apache/tomcat/util/bcel/generic/CodeExceptionGen.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/ConstantPoolGen.java
java/org/apache/tomcat/util/bcel/generic/DLOAD.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/DSTORE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/FLOAD.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/FSTORE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/FieldGen.java
java/org/apache/tomcat/util/bcel/generic/FieldGenOrMethodGen.java
java/org/apache/tomcat/util/bcel/generic/FieldOrMethod.java
java/org/apache/tomcat/util/bcel/generic/GETFIELD.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/GETSTATIC.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/GOTO.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/GOTO_W.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IINC.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/ILOAD.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IMPDEP1.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/IMPDEP2.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/INSTANCEOF.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/INVOKEINTERFACE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/INVOKESPECIAL.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/INVOKESTATIC.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/INVOKEVIRTUAL.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/ISTORE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/Instruction.java
java/org/apache/tomcat/util/bcel/generic/InstructionConstants.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/InstructionHandle.java
java/org/apache/tomcat/util/bcel/generic/InstructionList.java
java/org/apache/tomcat/util/bcel/generic/JSR.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/JSR_W.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/JsrInstruction.java
java/org/apache/tomcat/util/bcel/generic/LDC2_W.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/LDC_W.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/LLOAD.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/LOOKUPSWITCH.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/LSTORE.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/LineNumberGen.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/LocalVariableGen.java
java/org/apache/tomcat/util/bcel/generic/MULTIANEWARRAY.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/MethodGen.java
java/org/apache/tomcat/util/bcel/generic/NEW.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/NamedAndTyped.java
java/org/apache/tomcat/util/bcel/generic/ObjectType.java
java/org/apache/tomcat/util/bcel/generic/PUTFIELD.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/PUTSTATIC.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/RET.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/ReturnaddressType.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/SIPUSH.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/Select.java
java/org/apache/tomcat/util/bcel/generic/TABLESWITCH.java [deleted file]
java/org/apache/tomcat/util/bcel/generic/Type.java

index 6a94ee3..6bc5051 100644 (file)
@@ -24,40 +24,6 @@ package org.apache.tomcat.util.bcel;
  */
 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;
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
   /** Maximum value for an unsigned short.
    */
   public final static int MAX_SHORT = 65535; // 2^16 - 1
@@ -66,39 +32,11 @@ public interface Constants {
    */
   public final static int MAX_BYTE  = 255; // 2^8 - 1
 
-  
-
-  
-
-  
-
-  /** 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_NATIVE       = 0x0100;
-  
   /** One of the access flags for fields, methods, or classes.
    *  @see #ACC_PUBLIC
    */
@@ -109,12 +47,6 @@ public interface Constants {
    */
   public final static short ACC_ABSTRACT     = 0x0400;
 
-  
-  
-  
-
-  
-
   /** One of the access flags for fields, methods, or classes.
    *  @see #ACC_PUBLIC
    */
@@ -178,41 +110,7 @@ public interface Constants {
     "CONSTANT_Class", "CONSTANT_String", "CONSTANT_Fieldref",
     "CONSTANT_Methodref", "CONSTANT_InterfaceMethodref",
     "CONSTANT_NameAndType" };
-
-  
-
-  
-
-  
-
-  
-
   
-
-  
-
-  
-
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short BIPUSH           = 16;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short SIPUSH           = 17;
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short LDC              = 18;
@@ -240,87 +138,27 @@ public interface Constants {
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short ILOAD_0          = 26;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ILOAD_1          = 27;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ILOAD_2          = 28;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ILOAD_3          = 29;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short LLOAD_0          = 30;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LLOAD_1          = 31;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LLOAD_2          = 32;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LLOAD_3          = 33;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short FLOAD_0          = 34;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FLOAD_1          = 35;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FLOAD_2          = 36;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FLOAD_3          = 37;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short DLOAD_0          = 38;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DLOAD_1          = 39;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DLOAD_2          = 40;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DLOAD_3          = 41;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short ALOAD_0          = 42;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ALOAD_1          = 43;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ALOAD_2          = 44;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short ALOAD_3          = 45;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IALOAD           = 46;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LALOAD           = 47;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FALOAD           = 48;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DALOAD           = 49;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short AALOAD           = 50;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short BALOAD           = 51;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short CALOAD           = 52;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short SALOAD           = 53;
+
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short ISTORE           = 54;
@@ -339,259 +177,30 @@ public interface Constants {
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short ISTORE_0         = 59;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISTORE_1         = 60;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISTORE_2         = 61;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISTORE_3         = 62;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short LSTORE_0         = 63;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSTORE_1         = 64;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSTORE_2         = 65;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSTORE_3         = 66;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short FSTORE_0         = 67;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSTORE_1         = 68;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSTORE_2         = 69;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSTORE_3         = 70;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short DSTORE_0         = 71;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSTORE_1         = 72;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSTORE_2         = 73;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSTORE_3         = 74;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short ASTORE_0         = 75;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ASTORE_1         = 76;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ASTORE_2         = 77;
+  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short ASTORE_3         = 78;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IASTORE          = 79;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LASTORE          = 80;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FASTORE          = 81;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DASTORE          = 82;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short AASTORE          = 83;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short BASTORE          = 84;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short CASTORE          = 85;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short SASTORE          = 86;
-  
   
-  
-  
-  
-  
-  
-  
-  
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IADD             = 96;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LADD             = 97;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FADD             = 98;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DADD             = 99;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISUB             = 100;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSUB             = 101;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FSUB             = 102;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DSUB             = 103;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IMUL             = 104;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LMUL             = 105;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FMUL             = 106;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DMUL             = 107;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IDIV             = 108;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LDIV             = 109;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FDIV             = 110;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DDIV             = 111;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IREM             = 112;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LREM             = 113;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FREM             = 114;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DREM             = 115;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short INEG             = 116;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LNEG             = 117;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FNEG             = 118;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DNEG             = 119;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISHL             = 120;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSHL             = 121;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ISHR             = 122;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LSHR             = 123;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IUSHR            = 124;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LUSHR            = 125;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IAND             = 126;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LAND             = 127;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IOR              = 128;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LOR              = 129;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IXOR             = 130;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LXOR             = 131;
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short IINC             = 132;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2L              = 133;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2F              = 134;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2D              = 135;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short L2I              = 136;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short L2F              = 137;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short L2D              = 138;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short F2I              = 139;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short F2L              = 140;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short F2D              = 141;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short D2I              = 142;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short D2L              = 143;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short D2F              = 144;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2B              = 145;
-  
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2C              = 146;
-  
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short I2S              = 147;
-  
-  
-  
-  
-  
   
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
@@ -652,24 +261,6 @@ public interface Constants {
   public static final short LOOKUPSWITCH     = 171;
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short IRETURN          = 172;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short LRETURN          = 173;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short FRETURN          = 174;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short DRETURN          = 175;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short ARETURN          = 176;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
-  public static final short RETURN           = 177;
-  /** Java VM opcode.
-   * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short GETSTATIC        = 178;
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
@@ -704,7 +295,6 @@ public interface Constants {
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short ANEWARRAY        = 189;
   
-  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short CHECKCAST        = 192;
@@ -712,7 +302,6 @@ public interface Constants {
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short INSTANCEOF       = 193;
   
-  
   /** Java VM opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc.html">Opcode definitions in The Java Virtual Machine Specification</a> */
   public static final short WIDE             = 196;
@@ -736,30 +325,6 @@ public interface Constants {
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions.doc.html#60105">Reserved opcodes in the Java Virtual Machine Specification</a> */
   public static final short BREAKPOINT                = 202;
   
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
   /** JVM internal opcode.
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions.doc.html#60105">Reserved opcodes in the Java Virtual Machine Specification</a> */
   public static final short IMPDEP1                   = 254;
@@ -767,9 +332,6 @@ public interface Constants {
    * @see <a href="http://java.sun.com/docs/books/jvms/second_edition/html/Instructions.doc.html#60105">Reserved opcodes in the Java Virtual Machine Specification</a> */
   public static final short IMPDEP2                   = 255;
 
-  
-  
-
   /** Illegal opcode. */
   public static final short  UNDEFINED      = -1;
   /** Illegal opcode. */
@@ -820,8 +382,6 @@ public interface Constants {
     "void", "array", "object", "unknown", "address"
   };
 
-  
-
   /** The signature characters corresponding to primitive types,
    * e.g., SHORT_TYPE_NAMES[T_INT] = "I"
    */
@@ -1170,12 +730,6 @@ public interface Constants {
   /** Constants used in the StackMap attribute.
    */
   public static final byte ITEM_Bogus      = 0;
-  
-  
-  
-  
-  
-  
   public static final byte ITEM_Object     = 7;
   public static final byte ITEM_NewObject  = 8;
 
diff --git a/java/org/apache/tomcat/util/bcel/Repository.java b/java/org/apache/tomcat/util/bcel/Repository.java
deleted file mode 100644 (file)
index ce809c2..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel;
-
-import org.apache.tomcat.util.bcel.classfile.JavaClass;
-import org.apache.tomcat.util.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.tomcat.util.bcel.util.Repository
- * @see org.apache.tomcat.util.bcel.util.SyntheticRepository
- *
- * @version $Id$
- * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public abstract class Repository {
-
-    private static org.apache.tomcat.util.bcel.util.Repository _repository = SyntheticRepository.getInstance();
-
-
-    
-
-
-    
-
-
-    /** 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);
-    }
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    /**
-     * 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 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);
-    }
-
-
-    
-
-
-    
-
-
-    
-}
index 2020e18..a6b1b4b 100644 (file)
@@ -73,19 +73,6 @@ public class AnnotationDefault extends Attribute
        }
 
        /**
-        * 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.visitAnnotationDefault(this);
-       }
-
-       /**
         * @param defaultValue
         *            the default value of this methodinfo's annotation
         */
index 870526b..fc97b00 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.tomcat.util.bcel.Constants;
  * @author  <A HREF="mailto:dbrosius@mebigfatguy.com">D. Brosius</A>
  * @since 5.3
  */
-public class AnnotationEntry implements Node, Constants, Serializable {
+public class AnnotationEntry implements Constants, Serializable {
 
     private int type_index;
     private int num_element_value_pairs;
index cf3609a..a9947a0 100644 (file)
@@ -31,7 +31,6 @@ public abstract class Annotations extends Attribute {
 
     private int annotation_table_length;
     private AnnotationEntry[] annotation_table; // Table of annotations
-    private boolean isRuntimeVisible;
 
 
     /**
@@ -63,19 +62,6 @@ public abstract class Annotations extends Attribute {
             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
-     */
-    public void accept( Visitor v ) {
-        v.visitAnnotation(this);
     }
 
 
index 85523ac..0c281b5 100644 (file)
@@ -47,7 +47,7 @@ import org.apache.tomcat.util.bcel.classfile.ConstantUtf8;
  * @see Deprecated
  * @see Signature
  */
-public abstract class Attribute implements Cloneable, Node, Serializable
+public abstract class Attribute implements Cloneable, Serializable
 {
        protected int name_index; // Points to attribute name in constant pool
 
@@ -67,16 +67,6 @@ public abstract class Attribute implements Cloneable, Node, Serializable
        }
 
        /**
-        * 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
index d05babc..ae9bfe6 100644 (file)
@@ -115,18 +115,6 @@ public final class Code extends Attribute {
 
 
     /**
-     * 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.visitCode(this);
-    }
-
-
-    /**
      * Dump code attribute to file stream in binary format.
      *
      * @param file Output file stream
index 9d07285..b8110ad 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.tomcat.util.bcel.Constants;
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @see     Code
  */
-public final class CodeException implements Cloneable, Constants, Node, Serializable {
+public final class CodeException implements Cloneable, Constants, Serializable {
 
     private int start_pc; // Range in the code the exception handler is
     private int end_pc; // active. start_pc is inclusive, end_pc exclusive
index 81d9b75..83025d1 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.tomcat.util.bcel.util.BCELComparator;
  * @version $Id$
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public abstract class Constant implements Cloneable, Node, Serializable {
+public abstract class Constant implements Cloneable, Serializable {
 
     private static BCELComparator _cmp = new BCELComparator() {
 
@@ -63,16 +63,6 @@ public abstract class Constant implements Cloneable, Node, Serializable {
     }
 
 
-    /**
-     * 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;
 
 
index 94d945a..d1aad29 100644 (file)
@@ -60,18 +60,6 @@ public final class ConstantClass extends Constant implements ConstantObject {
     }
 
 
-    /**
-     * 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.visitConstantClass(this);
-    }
-
-
     /** 
      * Dump constant class to file stream in binary format.
      *
index 7a8b86b..56553a0 100644 (file)
@@ -60,18 +60,6 @@ public final class ConstantDouble extends Constant implements ConstantObject {
 
 
     /**
-     * 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.visitConstantDouble(this);
-    }
-
-
-    /**
      * Dump constant double to file stream in binary format.
      *
      * @param file Output file stream
index 14807e0..37c5293 100644 (file)
@@ -42,23 +42,5 @@ public final class ConstantFieldref extends ConstantCP {
     }
 
 
-    /**
-     * @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
-     */
-    public void accept( Visitor v ) {
-        v.visitConstantFieldref(this);
-    }
+    
 }
index 53b8cf4..c8c5bb1 100644 (file)
@@ -58,19 +58,7 @@ public final class ConstantFloat extends Constant implements ConstantObject {
         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
-     */
-    public void accept( Visitor v ) {
-        v.visitConstantFloat(this);
-    }
-
-
+    
     /**
      * Dump constant float to file stream in binary format.
      *
index 30bf1aa..47cc68b 100644 (file)
@@ -60,18 +60,6 @@ public final class ConstantInteger extends Constant implements ConstantObject {
 
 
     /**
-     * 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.visitConstantInteger(this);
-    }
-
-
-    /**
      * Dump constant integer to file stream in binary format.
      *
      * @param file Output file stream
index 611b019..4aee89f 100644 (file)
@@ -42,23 +42,5 @@ public final class ConstantInterfaceMethodref extends ConstantCP {
     }
 
 
-    /**
-     * @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
-     */
-    public void accept( Visitor v ) {
-        v.visitConstantInterfaceMethodref(this);
-    }
+    
 }
index b648f32..6f91752 100644 (file)
@@ -60,18 +60,6 @@ public final class ConstantLong extends Constant implements ConstantObject {
 
 
     /**
-     * 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.visitConstantLong(this);
-    }
-
-
-    /**
      * Dump constant long to file stream in binary format.
      *
      * @param file Output file stream
index a75ee00..7b82f17 100644 (file)
@@ -42,23 +42,5 @@ public final class ConstantMethodref extends ConstantCP {
     }
 
 
-    /**
-     * @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
-     */
-    public void accept( Visitor v ) {
-        v.visitConstantMethodref(this);
-    }
+    
 }
index 98b8e26..9522542 100644 (file)
@@ -64,18 +64,6 @@ public final class ConstantNameAndType extends Constant {
 
 
     /**
-     * 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.visitConstantNameAndType(this);
-    }
-
-
-    /**
      * Dump name and signature index to file stream in binary format.
      *
      * @param file Output file stream
index 6f00889..42173bf 100644 (file)
@@ -34,7 +34,7 @@ import org.apache.tomcat.util.bcel.Constants;
  * @see     org.apache.tomcat.util.bcel.generic.ConstantPoolGen
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public class ConstantPool implements Cloneable, Node, Serializable {
+public class ConstantPool implements Cloneable, Serializable {
 
     private int constant_pool_count;
     private Constant[] constant_pool;
index d1ca00e..6630052 100644 (file)
@@ -60,18 +60,6 @@ public final class ConstantString extends Constant implements ConstantObject {
 
 
     /**
-     * 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.visitConstantString(this);
-    }
-
-
-    /**
      * Dump constant field reference to file stream in binary format.
      *
      * @param file Output file stream
index 6b81d29..a1e1f99 100644 (file)
@@ -64,18 +64,6 @@ public final class ConstantUtf8 extends Constant {
 
 
     /**
-     * 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.visitConstantUtf8(this);
-    }
-
-
-    /**
      * Dump String in Utf8 format to file stream.
      *
      * @param file Output file stream
index 9e1e8f2..0eefac2 100644 (file)
@@ -67,18 +67,6 @@ public final class ConstantValue extends Attribute {
 
 
     /**
-     * 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.visitConstantValue(this);
-    }
-
-
-    /**
      * Dump constant value attribute to file stream on binary format.
      *
      * @param file Output file stream
index 87c573a..c69bb26 100644 (file)
@@ -70,18 +70,6 @@ public final class Deprecated extends Attribute {
 
 
     /**
-     * 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.visitDeprecated(this);
-    }
-
-
-    /**
      * Dump source file attribute to file stream in binary format.
      *
      * @param file Output file stream
index acbc4d1..5ee135a 100755 (executable)
@@ -49,10 +49,6 @@ public class EnclosingMethod extends Attribute {
            methodIndex = methodIdx;
        }
 
-       public void accept(Visitor v) {
-         v.visitEnclosingMethod(this);
-       }
-
        public Attribute copy(ConstantPool constant_pool) {
                throw new RuntimeException("Not implemented yet!");
                // is this next line sufficient?
index 8cef8ba..2c3475f 100644 (file)
@@ -75,18 +75,6 @@ public final class ExceptionTable extends Attribute {
 
 
     /**
-     * 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.visitExceptionTable(this);
-    }
-
-
-    /**
      * Dump exceptions attribute to file stream in binary format.
      *
      * @param file Output file stream
index 32d48e9..ac01a60 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.tomcat.util.bcel.classfile.Attribute;
  * @version $Id$
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public abstract class FieldOrMethod extends AccessFlags implements Cloneable, Node {
+public abstract class FieldOrMethod extends AccessFlags implements Cloneable {
 
     protected int name_index; // Points to field name in constant pool 
     protected int signature_index; // Points to encoded signature
@@ -36,20 +36,10 @@ public abstract class FieldOrMethod extends AccessFlags implements Cloneable, No
     
     protected ConstantPool constant_pool;
 
-    private String signatureAttributeString = null;
-    private boolean searchedForSignatureAttribute = false;
-    
-
-    // Annotations are collected from certain attributes, don't do it more than necessary!
-    private boolean annotationsOutOfDate = true;
-
     FieldOrMethod() {
     }
 
 
-    
-
-
     /**
      * Construct object from file stream.
      * @param file Input stream
@@ -85,12 +75,6 @@ public abstract class FieldOrMethod extends AccessFlags implements Cloneable, No
     }
 
 
-    
-
-
-    
-
-
     /**
      * @param attributes Collection of object attributes.
      */
@@ -99,25 +83,7 @@ public abstract class FieldOrMethod extends AccessFlags implements Cloneable, No
         attributes_count = (attributes == null) ? 0 : attributes.length;
     }
 
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
     
-
-
     /**
      * @return Name of object, i.e., method name or field name
      */
@@ -136,13 +102,4 @@ public abstract class FieldOrMethod extends AccessFlags implements Cloneable, No
         c = (ConstantUtf8) constant_pool.getConstant(signature_index, Constants.CONSTANT_Utf8);
         return c.getBytes();
     }
-
-
-    
-
-       
-
-       
-
-       
 }
index 82c2542..516fbad 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.tomcat.util.bcel.Constants;
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @see InnerClasses
  */
-public final class InnerClass implements Cloneable, Node, Serializable {
+public final class InnerClass implements Cloneable, Serializable {
 
     private int inner_class_index;
     private int outer_class_index;
index e41854a..6e71d02 100644 (file)
@@ -74,18 +74,6 @@ public final class InnerClasses extends Attribute {
 
 
     /**
-     * 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.visitInnerClasses(this);
-    }
-
-
-    /**
      * Dump source file attribute to file stream in binary format.
      *
      * @param file Output file stream
index 6a5d196..f5a24da 100644 (file)
@@ -38,13 +38,10 @@ import org.apache.tomcat.util.bcel.util.SyntheticRepository;
  * @see org.apache.tomcat.util.bcel.generic.ClassGen
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public class JavaClass extends AccessFlags implements Cloneable, Node, Comparable {
+public class JavaClass extends AccessFlags implements Cloneable, Comparable {
 
     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
@@ -55,11 +52,7 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl
     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;
     
@@ -124,8 +117,6 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl
         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;
@@ -136,7 +127,6 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl
         this.methods = methods;
         this.attributes = attributes;
         annotationsOutOfDate = true;
-        this.source = source;
         // Get source file name if available
         for (int i = 0; i < attributes.length; i++) {
             if (attributes[i] instanceof SourceFile) {
@@ -150,12 +140,6 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl
          */
         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,
@@ -366,27 +350,7 @@ public class JavaClass extends AccessFlags implements Cloneable, Node, Comparabl
     }
 
 
-    /** 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 (int i = 0; i < super_classes.length; i++) {
-            if (super_classes[i].equals(super_class)) {
-                return true;
-            }
-        }
-        if (super_class.isInterface()) {
-            return implementationOf(super_class);
-        }
-        return false;
-    }
+    
 
 
     /**
index 8ac6b98..0df78a5 100644 (file)
@@ -30,7 +30,7 @@ import java.io.Serializable;
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @see     LineNumberTable
  */
-public final class LineNumber implements Cloneable, Node, Serializable {
+public final class LineNumber implements Cloneable, Serializable {
 
     private int start_pc; // Program Counter (PC) corresponds to line
     private int line_number; // number in source file
index f1b145e..e241879 100644 (file)
@@ -73,18 +73,6 @@ public final class LineNumberTable extends Attribute {
 
 
     /**
-     * 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.visitLineNumberTable(this);
-    }
-
-
-    /**
      * Dump line number table attribute to file stream in binary format.
      *
      * @param file Output file stream
index 13c78a3..5c6734c 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.tomcat.util.bcel.Constants;
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @see     LocalVariableTable
  */
-public final class LocalVariable implements Constants, Cloneable, Node, Serializable {
+public final class LocalVariable implements Constants, Cloneable, Serializable {
 
     private int start_pc; // Range in which the variable is valid
     private int length;
index e13ca92..9a6e9e0 100644 (file)
@@ -72,18 +72,6 @@ public class LocalVariableTable extends Attribute {
 
 
     /**
-     * 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.visitLocalVariableTable(this);
-    }
-
-
-    /**
      * Dump local variable table attribute to file stream in binary format.
      *
      * @param file Output file stream
index 7d97d2c..ea17d80 100755 (executable)
@@ -68,10 +68,6 @@ public class LocalVariableTypeTable extends Attribute {
       local_variable_type_table[i] = new LocalVariable(dis, cpool);
   }
 
-  public void accept(Visitor v) {
-    v.visitLocalVariableTypeTable(this);
-  }
-
   public final void dump(DataOutputStream file) throws IOException
   {
     super.dump(file);
diff --git a/java/org/apache/tomcat/util/bcel/classfile/Node.java b/java/org/apache/tomcat/util/bcel/classfile/Node.java
deleted file mode 100644 (file)
index f5f67e0..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    
-}
index 0b0ac6f..5ebc066 100644 (file)
@@ -68,18 +68,6 @@ public final class PMGClass extends Attribute {
 
 
     /**
-     * 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 ) {
-        System.err.println("Visiting non-standard PMGClass object");
-    }
-
-
-    /**
      * Dump source file attribute to file stream in binary format.
      *
      * @param file Output file stream
index a1c5a37..ea50ac0 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.tomcat.util.bcel.Constants;
  * @author  <A HREF="mailto:dbrosius@qis.net">D. Brosius</A>
  * @since 5.3
  */
-public class ParameterAnnotationEntry implements Node, Constants {
+public class ParameterAnnotationEntry implements Constants {
 
     private int annotation_table_length;
     private AnnotationEntry[] annotation_table;
index 5c5ec9d..10ee72e 100644 (file)
@@ -66,18 +66,6 @@ public abstract class ParameterAnnotations extends Attribute {
 
 
     /**
-     * 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.visitParameterAnnotation(this);
-    }
-
-
-    /**
      * @param parameter_annotation_table the entries to set in this parameter annotation
      */
     public final void setParameterAnnotationTable(
index 7532ae5..0157a18 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.ByteArrayInputStream;
 import java.io.DataInput;
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -66,19 +65,6 @@ public final class Signature extends Attribute {
 
 
     /**
-     * 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 ) {
-        //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
@@ -106,17 +92,6 @@ public final class Signature extends Attribute {
     }
 
     /**
-     * Extends ByteArrayInputStream to make 'unreading' chars possible.
-     */
-    private static final class MyByteArrayInputStream extends ByteArrayInputStream {
-
-        MyByteArrayInputStream(String data) {
-            super(data.getBytes());
-        }
-    }
-
-
-    /**
      * @return String representation
      */
     public final String toString() {
index 2be484d..cfa1b20 100644 (file)
@@ -74,18 +74,6 @@ public final class SourceFile extends Attribute {
 
 
     /**
-     * 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.visitSourceFile(this);
-    }
-
-
-    /**
      * Dump source file attribute to file stream in binary format.
      *
      * @param file Output file stream
index 407e150..80be400 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.tomcat.util.bcel.Constants;
  * @see     StackMapEntry
  * @see     StackMapType
  */
-public final class StackMap extends Attribute implements Node {
+public final class StackMap extends Attribute {
 
     private int map_length;
     private StackMapEntry[] map; // Table of stack map entries
@@ -128,19 +128,4 @@ public final class StackMap extends Attribute implements Node {
         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
-     */
-    public void accept( Visitor v ) {
-        v.visitStackMap(this);
-    }
-
-
-    
 }
index d933d8a..a5ce2b4 100644 (file)
@@ -37,7 +37,6 @@ public final class StackMapEntry implements Cloneable {
     private StackMapType[] types_of_locals;
     private int number_of_stack_items;
     private StackMapType[] types_of_stack_items;
-    private ConstantPool constant_pool;
 
 
     /**
@@ -67,7 +66,6 @@ public final class StackMapEntry implements Cloneable {
         this.types_of_locals = types_of_locals;
         this.number_of_stack_items = number_of_stack_items;
         this.types_of_stack_items = types_of_stack_items;
-        this.constant_pool = constant_pool;
     }
 
 
index cd437d9..37fdec3 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.tomcat.util.bcel.Constants;
  * @see     StackMapEntry
  * @see     StackMapType
  */
-public final class StackMapTable extends Attribute implements Node {
+public final class StackMapTable extends Attribute {
 
     private int map_length;
     private StackMapTableEntry[] map; // Table of stack map entries
@@ -128,19 +128,4 @@ public final class StackMapTable extends Attribute implements Node {
         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
-     */
-    public void accept( Visitor v ) {
-        v.visitStackMapTable(this);
-    }
-
-
-    
 }
index 5a3cbf2..76d79bc 100644 (file)
@@ -40,7 +40,6 @@ public final class StackMapTableEntry implements Cloneable {
     private StackMapType[] types_of_locals;
     private int number_of_stack_items;
     private StackMapType[] types_of_stack_items;
-    private ConstantPool constant_pool;
 
 
     /**
@@ -102,7 +101,6 @@ public final class StackMapTableEntry implements Cloneable {
         this.types_of_locals = types_of_locals;
         this.number_of_stack_items = number_of_stack_items;
         this.types_of_stack_items = types_of_stack_items;
-        this.constant_pool = constant_pool;
     }
 
 
index 6805700..d89bb50 100644 (file)
@@ -76,18 +76,6 @@ public final class Synthetic extends Attribute {
 
 
     /**
-     * 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.visitSynthetic(this);
-    }
-
-
-    /**
      * Dump source file attribute to file stream in binary format.
      *
      * @param file Output file stream
index 76fc601..7a8c313 100644 (file)
@@ -88,18 +88,6 @@ public final class Unknown extends Attribute {
 
 
     /**
-     * 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.visitUnknown(this);
-    }
-
-
-    /**
      * Dump unknown bytes to file stream.
      *
      * @param file Output file stream
index 12ef5bf..3ec73ed 100644 (file)
  */
 package org.apache.tomcat.util.bcel.classfile;
 
-import java.io.FilterReader;
-import java.io.FilterWriter;
 import java.io.IOException;
-import java.io.Reader;
-import java.io.Writer;
 import org.apache.tomcat.util.bcel.Constants;
 import org.apache.tomcat.util.bcel.util.ByteSequence;
 
@@ -855,7 +851,6 @@ public abstract class Utility {
     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++) {
@@ -875,93 +870,6 @@ public abstract class Utility {
         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);
-        }
-
-
-        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];
-        }
-
-
-        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);
-        }
-
-
-        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]);
-                    }
-                }
-            }
-        }
-
-
-        public void write( char[] cbuf, int off, int len ) throws IOException {
-            for (int i = 0; i < len; i++) {
-                write(cbuf[off + i]);
-            }
-        }
-
-
-        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.
      */
diff --git a/java/org/apache/tomcat/util/bcel/classfile/Visitor.java b/java/org/apache/tomcat/util/bcel/classfile/Visitor.java
deleted file mode 100644 (file)
index 5849b13..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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
-{
-       public void visitCode(Code 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 visitConstantLong(ConstantLong obj);
-
-       public void visitConstantMethodref(ConstantMethodref obj);
-
-       public void visitConstantNameAndType(ConstantNameAndType 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 visitInnerClasses(InnerClasses obj);
-
-       
-
-       
-
-       public void visitLineNumberTable(LineNumberTable obj);
-
-       
-
-       public void visitLocalVariableTable(LocalVariableTable 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 visitStackMapTable(StackMapTable obj);
-
-       
-
-       public void visitAnnotation(Annotations obj);
-
-       
-
-       
-
-       
-
-       public void visitLocalVariableTypeTable(LocalVariableTypeTable obj);
-
-       public void visitEnclosingMethod(EnclosingMethod obj);
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/ALOAD.java b/java/org/apache/tomcat/util/bcel/generic/ALOAD.java
deleted file mode 100644 (file)
index 0bdba03..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ALOAD() {
-        super(org.apache.tomcat.util.bcel.Constants.ALOAD, org.apache.tomcat.util.bcel.Constants.ALOAD_0);
-    }
-
-
-    /** Load reference from local variable
-     * @param n index of local variable
-     */
-    public ALOAD(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.ALOAD, org.apache.tomcat.util.bcel.Constants.ALOAD_0, n);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/ANEWARRAY.java b/java/org/apache/tomcat/util/bcel/generic/ANEWARRAY.java
deleted file mode 100644 (file)
index 355f1db..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ANEWARRAY() {
-    }
-
-
-    
-
-
-    
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/ASTORE.java b/java/org/apache/tomcat/util/bcel/generic/ASTORE.java
deleted file mode 100644 (file)
index 5b6ec5b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ASTORE() {
-        super(org.apache.tomcat.util.bcel.Constants.ASTORE, org.apache.tomcat.util.bcel.Constants.ASTORE_0);
-    }
-
-
-    /** Store reference into local variable
-     * @param n index of local variable
-     */
-    public ASTORE(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.ASTORE, org.apache.tomcat.util.bcel.Constants.ASTORE_0, n);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/BIPUSH.java b/java/org/apache/tomcat/util/bcel/generic/BIPUSH.java
deleted file mode 100644 (file)
index 125010a..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.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 byte b;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    BIPUSH() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        super.dump(out);
-        out.writeByte(b);
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + b;
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        length = 2;
-        b = bytes.readByte();
-    }
-
-
-    public Number getValue() {
-        return new Integer(b);
-    }
-
-
-    /** @return Type.BYTE
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.BYTE;
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/BREAKPOINT.java b/java/org/apache/tomcat/util/bcel/generic/BREAKPOINT.java
deleted file mode 100644 (file)
index 5dcaed8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    public BREAKPOINT() {
-        super(org.apache.tomcat.util.bcel.Constants.BREAKPOINT, (short) 1);
-    }
-}
index f800bb4..cfc7d42 100644 (file)
@@ -43,15 +43,7 @@ public final class BranchHandle extends InstructionHandle {
     private static BranchHandle bh_list = null; // List of reusable handles
 
 
-    static final 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.
index 3f2c2e7..b36b882 100644 (file)
@@ -158,12 +158,7 @@ public abstract class BranchInstruction extends Instruction implements Instructi
     }
 
 
-    /**
-     * @return target offset in byte code
-     */
-    public final int getIndex() {
-        return index;
-    }
+    
 
 
     /**
diff --git a/java/org/apache/tomcat/util/bcel/generic/CHECKCAST.java b/java/org/apache/tomcat/util/bcel/generic/CHECKCAST.java
deleted file mode 100644 (file)
index b27395f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    CHECKCAST() {
-    }
-
-
-    
-
-
-    
-
-
-    
-}
index eaf3e16..7043e2d 100644 (file)
@@ -48,13 +48,7 @@ public abstract class CPInstruction extends Instruction implements TypedInstruct
     }
 
 
-    /**
-     * @param index to constant pool
-     */
-    protected CPInstruction(short opcode, int index) {
-        super(opcode, (short) 3);
-        setIndex(index);
-    }
+    
 
 
     /**
index 130870a..ab29692 100644 (file)
  */
 package org.apache.tomcat.util.bcel.generic;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tomcat.util.bcel.Constants;
 import org.apache.tomcat.util.bcel.classfile.AccessFlags;
 import org.apache.tomcat.util.bcel.classfile.JavaClass;
 import org.apache.tomcat.util.bcel.util.BCELComparator;
@@ -36,16 +32,7 @@ public class ClassGen extends AccessFlags implements Cloneable {
 
     /* Corresponds to the fields found in a JavaClass object.
      */
-    private String class_name, super_class_name, 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 List field_vec = new ArrayList();
-    private List method_vec = new ArrayList();
-    private List attribute_vec = new ArrayList();
-    private List interface_vec = new ArrayList();
-    private List annotation_vec = new ArrayList();
+    private String class_name;
        
     private static BCELComparator _cmp = new BCELComparator() {
 
@@ -61,88 +48,13 @@ public class ClassGen extends AccessFlags implements Cloneable {
             return THIS.getClassName().hashCode();
         }
     };
-
-
-    
-
-
-    
-
-
     
     
     public String getClassName() {
         return class_name;
     }
 
-
     
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-    
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-    private ArrayList observers;
-
-
-    
-
-
-    
-
-
-    
-
-
     public Object clone() {
         try {
             return super.clone();
@@ -152,13 +64,7 @@ public class ClassGen extends AccessFlags implements Cloneable {
         }
     }
 
-
     
-
-
-    
-
-
     /**
      * Return value as defined by given BCELComparator strategy.
      * By default two ClassGen objects are said to be equal when
diff --git a/java/org/apache/tomcat/util/bcel/generic/CodeExceptionGen.java b/java/org/apache/tomcat/util/bcel/generic/CodeExceptionGen.java
deleted file mode 100644 (file)
index e5fd00a..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import org.apache.tomcat.util.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 InstructionHandle start_pc;
-    private InstructionHandle end_pc;
-    private InstructionHandle handler_pc;
-
-
-    /**
-     * 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);
-    }
-
-
-    
-
-
-    /* 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;
-    }
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    public String toString() {
-        return "CodeExceptionGen(" + start_pc + ", " + end_pc + ", " + handler_pc + ")";
-    }
-
-
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            System.err.println(e);
-            return null;
-        }
-    }
-}
index ca9a17a..b7a3d4f 100644 (file)
@@ -19,17 +19,11 @@ package org.apache.tomcat.util.bcel.generic;
 import java.util.HashMap;
 import java.util.Map;
 import org.apache.tomcat.util.bcel.classfile.Constant;
-import org.apache.tomcat.util.bcel.classfile.ConstantClass;
 import org.apache.tomcat.util.bcel.classfile.ConstantDouble;
-import org.apache.tomcat.util.bcel.classfile.ConstantFieldref;
 import org.apache.tomcat.util.bcel.classfile.ConstantFloat;
 import org.apache.tomcat.util.bcel.classfile.ConstantInteger;
-import org.apache.tomcat.util.bcel.classfile.ConstantInterfaceMethodref;
 import org.apache.tomcat.util.bcel.classfile.ConstantLong;
-import org.apache.tomcat.util.bcel.classfile.ConstantMethodref;
-import org.apache.tomcat.util.bcel.classfile.ConstantNameAndType;
 import org.apache.tomcat.util.bcel.classfile.ConstantPool;
-import org.apache.tomcat.util.bcel.classfile.ConstantString;
 import org.apache.tomcat.util.bcel.classfile.ConstantUtf8;
 
 /** 
@@ -51,9 +45,6 @@ public class ConstantPoolGen implements java.io.Serializable {
     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 {
@@ -93,43 +84,6 @@ public class ConstantPoolGen implements java.io.Serializable {
         }
     }
 
-    private Map string_table = new HashMap();
-
-
-    /** 
-     * 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 = (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 Map class_table = new HashMap();
 
 
@@ -145,47 +99,6 @@ public class ConstantPoolGen implements java.io.Serializable {
     }
 
 
-    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());
-    }
-
-
-    
-
-
     /** 
      * Look for ConstantInteger in ConstantPool.
      *
@@ -387,175 +300,7 @@ public class ConstantPoolGen implements java.io.Serializable {
         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 Map cp_table = new HashMap();
-
-
-    /** 
-     * 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 = (Index) cp_table.get(class_name + METHODREF_DELIM + method_name
-                + METHODREF_DELIM + signature);
-        return (index != null) ? index.index : -1;
-    }
-
-
-    
-
-
-    /**
-     * 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;
-    }
-
-
-    
-
-
-    /** 
-     * 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 = (Index) cp_table.get(class_name + IMETHODREF_DELIM + method_name
-                + IMETHODREF_DELIM + signature);
-        return (index != null) ? index.index : -1;
-    }
-
-
-    
-
-
-    /**
-     * 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;
-    }
-
-
     
-
-
-    /** 
-     * 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 = (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
@@ -565,9 +310,6 @@ public class ConstantPoolGen implements java.io.Serializable {
     }
 
 
-    
-
-
     /**
      * @return intermediate constant pool
      */
diff --git a/java/org/apache/tomcat/util/bcel/generic/DLOAD.java b/java/org/apache/tomcat/util/bcel/generic/DLOAD.java
deleted file mode 100644 (file)
index 21c3d3a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    DLOAD() {
-        super(org.apache.tomcat.util.bcel.Constants.DLOAD, org.apache.tomcat.util.bcel.Constants.DLOAD_0);
-    }
-
-
-    /** Load double from local variable
-     * @param n index of local variable
-     */
-    public DLOAD(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.DLOAD, org.apache.tomcat.util.bcel.Constants.DLOAD_0, n);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/DSTORE.java b/java/org/apache/tomcat/util/bcel/generic/DSTORE.java
deleted file mode 100644 (file)
index acf573a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    DSTORE() {
-        super(org.apache.tomcat.util.bcel.Constants.DSTORE, org.apache.tomcat.util.bcel.Constants.DSTORE_0);
-    }
-
-
-    /** Store double into local variable
-     * @param n index of local variable
-     */
-    public DSTORE(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.DSTORE, org.apache.tomcat.util.bcel.Constants.DSTORE_0, n);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/FLOAD.java b/java/org/apache/tomcat/util/bcel/generic/FLOAD.java
deleted file mode 100644 (file)
index 298dcf7..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    FLOAD() {
-        super(org.apache.tomcat.util.bcel.Constants.FLOAD, org.apache.tomcat.util.bcel.Constants.FLOAD_0);
-    }
-
-
-    /** Load float from local variable
-     * @param n index of local variable
-     */
-    public FLOAD(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.FLOAD, org.apache.tomcat.util.bcel.Constants.FLOAD_0, n);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/FSTORE.java b/java/org/apache/tomcat/util/bcel/generic/FSTORE.java
deleted file mode 100644 (file)
index 869c4a6..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    FSTORE() {
-        super(org.apache.tomcat.util.bcel.Constants.FSTORE, org.apache.tomcat.util.bcel.Constants.FSTORE_0);
-    }
-
-
-    /** Store float into local variable
-     * @param n index of local variable
-     */
-    public FSTORE(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.FSTORE, org.apache.tomcat.util.bcel.Constants.FSTORE_0, n);
-    }
-}
index 79491c5..53907e1 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.apache.tomcat.util.bcel.generic;
 
-import java.util.List;
 import org.apache.tomcat.util.bcel.classfile.Field;
 import org.apache.tomcat.util.bcel.classfile.Utility;
 import org.apache.tomcat.util.bcel.util.BCELComparator;
@@ -60,18 +59,6 @@ public class FieldGen extends FieldGenOrMethodGen {
         return type.getSignature();
     }
 
-    private List observers;
-
-
-    
-
-
-    
-
-
-    
-
-
     public String getInitValue() {
         if (value != null) {
             return value.toString();
index edf89e9..c32c18e 100644 (file)
@@ -18,7 +18,6 @@ package org.apache.tomcat.util.bcel.generic;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.tomcat.util.bcel.Constants;
 import org.apache.tomcat.util.bcel.classfile.AccessFlags;
 import org.apache.tomcat.util.bcel.classfile.Attribute;
 
@@ -35,19 +34,14 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
     protected Type type;
     protected ConstantPoolGen cp;
     private List attribute_vec = new ArrayList();
-    protected ArrayList       annotation_vec= new ArrayList();
+    
 
 
     protected FieldGenOrMethodGen() {
     }
 
 
-    public void setType( Type type ) {
-        if (type.getType() == Constants.T_ADDRESS) {
-            throw new IllegalArgumentException("Type can not be " + type);
-        }
-        this.type = type;
-    }
+    
 
 
     
@@ -60,30 +54,16 @@ public abstract class FieldGenOrMethodGen extends AccessFlags implements NamedAn
     }
 
 
-    public void setName( String name ) {
-        this.name = name;
-    }
+    
 
 
     
 
 
-    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);
-    }
+    
     
     
 
index 8322e03..56a6721 100644 (file)
@@ -54,26 +54,7 @@ public abstract class FieldOrMethod extends CPInstruction implements LoadClass {
     
 
 
-    /** @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.
-     */
-    public String getClassName( ConstantPoolGen cpg ) {
-        ConstantPool cp = cpg.getConstantPool();
-        ConstantCP cmr = (ConstantCP) cp.getConstant(index);
-        String className = cp.getConstantString(cmr.getClassIndex(),
-                org.apache.tomcat.util.bcel.Constants.CONSTANT_Class);
-        if (className.startsWith("[")) {
-            // Turn array classes into java.lang.Object.
-            return "java.lang.Object";
-        }
-        return className.replace('/', '.');
-    }
+    
 
 
     
diff --git a/java/org/apache/tomcat/util/bcel/generic/GETFIELD.java b/java/org/apache/tomcat/util/bcel/generic/GETFIELD.java
deleted file mode 100644 (file)
index 1e69c39..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GETFIELD() {
-    }
-
-
-    
-
-
-    public int produceStack( ConstantPoolGen cpg ) {
-        return getFieldSize(cpg);
-    }
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/GETSTATIC.java b/java/org/apache/tomcat/util/bcel/generic/GETSTATIC.java
deleted file mode 100644 (file)
index 3730797..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GETSTATIC() {
-    }
-
-
-    
-
-
-    public int produceStack( ConstantPoolGen cpg ) {
-        return getFieldSize(cpg);
-    }
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/GOTO.java b/java/org/apache/tomcat/util/bcel/generic/GOTO.java
deleted file mode 100644 (file)
index 082265f..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GOTO() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        index = getTargetOffset();
-        if (opcode == org.apache.tomcat.util.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.
-     */
-    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.tomcat.util.bcel.Constants.GOTO_W;
-            length = 5;
-            return 2; // 5 - 3
-        }
-        return 0;
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/GOTO_W.java b/java/org/apache/tomcat/util/bcel/generic/GOTO_W.java
deleted file mode 100644 (file)
index c678f32..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    GOTO_W() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        index = getTargetOffset();
-        out.writeByte(opcode);
-        out.writeInt(index);
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        index = bytes.readInt();
-        length = 5;
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IINC.java b/java/org/apache/tomcat/util/bcel/generic/IINC.java
deleted file mode 100644 (file)
index b152d50..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.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 boolean wide;
-    private int c;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    IINC() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        if (wide) {
-            out.writeByte(org.apache.tomcat.util.bcel.Constants.WIDE);
-        }
-        out.writeByte(opcode);
-        if (wide) {
-            out.writeShort(n);
-            out.writeShort(c);
-        } else {
-            out.writeByte(n);
-            out.writeByte(c);
-        }
-    }
-
-
-    private final void setWide() {
-        wide = (n > org.apache.tomcat.util.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.
-     */
-    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
-     */
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + c;
-    }
-
-
-    /**
-     * Set index of local variable.
-     */
-    public final void setIndex( int n ) {
-        if (n < 0) {
-            throw new ClassGenException("Negative index value: " + n);
-        }
-        this.n = n;
-        setWide();
-    }
-
-
-    
-
-
-    
-
-
-    /** @return int type
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return Type.INT;
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/ILOAD.java b/java/org/apache/tomcat/util/bcel/generic/ILOAD.java
deleted file mode 100644 (file)
index 33bbe64..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ILOAD() {
-        super(org.apache.tomcat.util.bcel.Constants.ILOAD, org.apache.tomcat.util.bcel.Constants.ILOAD_0);
-    }
-
-
-    /** Load int from local variable
-     * @param n index of local variable
-     */
-    public ILOAD(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.ILOAD, org.apache.tomcat.util.bcel.Constants.ILOAD_0, n);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IMPDEP1.java b/java/org/apache/tomcat/util/bcel/generic/IMPDEP1.java
deleted file mode 100644 (file)
index 557c7cb..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/**
- * IMPDEP1 - Implementation dependent
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IMPDEP1 extends Instruction {
-
-    public IMPDEP1() {
-        super(org.apache.tomcat.util.bcel.Constants.IMPDEP1, (short) 1);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/IMPDEP2.java b/java/org/apache/tomcat/util/bcel/generic/IMPDEP2.java
deleted file mode 100644 (file)
index 5469b06..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/**
- * IMPDEP2 - Implementation dependent
- *
- * @version $Id$
- * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
- */
-public class IMPDEP2 extends Instruction {
-
-    public IMPDEP2() {
-        super(org.apache.tomcat.util.bcel.Constants.IMPDEP2, (short) 1);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/INSTANCEOF.java b/java/org/apache/tomcat/util/bcel/generic/INSTANCEOF.java
deleted file mode 100644 (file)
index d09f06e..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INSTANCEOF() {
-    }
-
-
-    
-
-
-    
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/INVOKEINTERFACE.java b/java/org/apache/tomcat/util/bcel/generic/INVOKEINTERFACE.java
deleted file mode 100644 (file)
index 703496b..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.bcel.classfile.ConstantPool;
-import org.apache.tomcat.util.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 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() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        out.writeByte(opcode);
-        out.writeShort(index);
-        out.writeByte(nargs);
-        out.writeByte(0);
-    }
-
-
-    
-
-
-    /**
-     * Read needed data (i.e., index) from file.
-     */
-    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
-     */
-    public String toString( ConstantPool cp ) {
-        return super.toString(cp) + " " + nargs;
-    }
-
-
-    public int consumeStack( ConstantPoolGen cpg ) { // nargs is given in byte-code
-        return nargs; // nargs includes this reference
-    }
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/INVOKESPECIAL.java b/java/org/apache/tomcat/util/bcel/generic/INVOKESPECIAL.java
deleted file mode 100644 (file)
index 9e17157..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INVOKESPECIAL() {
-    }
-
-
-    
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/INVOKESTATIC.java b/java/org/apache/tomcat/util/bcel/generic/INVOKESTATIC.java
deleted file mode 100644 (file)
index 09d130d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INVOKESTATIC() {
-    }
-
-
-    
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/INVOKEVIRTUAL.java b/java/org/apache/tomcat/util/bcel/generic/INVOKEVIRTUAL.java
deleted file mode 100644 (file)
index 37e6fc1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    INVOKEVIRTUAL() {
-    }
-
-
-    
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/ISTORE.java b/java/org/apache/tomcat/util/bcel/generic/ISTORE.java
deleted file mode 100644 (file)
index 9b8d279..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    ISTORE() {
-        super(org.apache.tomcat.util.bcel.Constants.ISTORE, org.apache.tomcat.util.bcel.Constants.ISTORE_0);
-    }
-
-
-    /** Store int into local variable
-     * @param n index of local variable
-     */
-    public ISTORE(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.ISTORE, org.apache.tomcat.util.bcel.Constants.ISTORE_0, n);
-    }
-}
index a46d0bc..3cd4f68 100644 (file)
@@ -113,327 +113,7 @@ public abstract class Instruction implements Cloneable, Serializable {
     }
 
 
-    /**
-     * 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 final 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.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
@@ -475,14 +155,6 @@ public abstract class Instruction implements Cloneable, Serializable {
     }
 
 
-    /**
-     * 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() {
diff --git a/java/org/apache/tomcat/util/bcel/generic/InstructionConstants.java b/java/org/apache/tomcat/util/bcel/generic/InstructionConstants.java
deleted file mode 100644 (file)
index ba5c7be..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    /** Get object via its opcode, for immutable instructions like
-     * branch instructions entries are set to null.
-     */
-    public static final Instruction[] INSTRUCTIONS = new Instruction[256];
-    
-
-    
-}
index 29501cc..5c1be76 100644 (file)
@@ -17,7 +17,6 @@
 package org.apache.tomcat.util.bcel.generic;
 
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 import org.apache.tomcat.util.bcel.classfile.Utility;
 
@@ -45,7 +44,6 @@ public class InstructionHandle implements java.io.Serializable {
     Instruction instruction;
     protected int i_position = -1; // byte code offset of instruction
     private Set targeters;
-    private Map attributes;
 
 
     public final InstructionHandle getNext() {
@@ -91,18 +89,7 @@ public class InstructionHandle implements java.io.Serializable {
     private static InstructionHandle ih_list = null; // List of reusable handles
 
 
-    /** Factory method.
-     */
-    static final 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;
-        }
-    }
+    
 
 
     /**
index 58be38c..94dd0ca 100644 (file)
@@ -17,8 +17,6 @@
 package org.apache.tomcat.util.bcel.generic;
 
 import java.io.Serializable;
-import java.util.List;
-import org.apache.tomcat.util.bcel.Constants;
 
 /** 
  * This class is a container for a list of <a
@@ -42,9 +40,6 @@ import org.apache.tomcat.util.bcel.Constants;
 public class InstructionList implements Serializable {
 
     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.
@@ -52,195 +47,7 @@ public class InstructionList implements Serializable {
     public InstructionList() {
     }
 
-
-    
-
-
-    
-
-
-    
-
-
-    /**
-     * 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;
-    }
-
-
-    
-
-
-    
-
-
-    /**
-     * 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 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;
-    }
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
     
 
 
@@ -265,102 +72,6 @@ public class InstructionList implements Serializable {
     }
 
 
-    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 (int j = 0; j < targets.length; j++) {
-                            inst = targets[j].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);
-    }
-
-
-    
-
-
     
 
 
@@ -382,30 +93,6 @@ public class InstructionList implements Serializable {
     }
 
 
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    private void clear() {
-        start = end = null;
-        length = 0;
-    }
-
-
-    
-
-
     /**
      * @return start of list
      */
@@ -420,30 +107,4 @@ public class InstructionList implements Serializable {
     public InstructionHandle getEnd() {
         return end;
     }
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-    private List observers;
-
-
-    
-
-
-    
-
-
-    
 }
diff --git a/java/org/apache/tomcat/util/bcel/generic/JSR.java b/java/org/apache/tomcat/util/bcel/generic/JSR.java
deleted file mode 100644 (file)
index cb84ee6..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    JSR() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        index = getTargetOffset();
-        if (opcode == org.apache.tomcat.util.bcel.Constants.JSR) {
-            super.dump(out);
-        } else { // JSR_W
-            index = getTargetOffset();
-            out.writeByte(opcode);
-            out.writeInt(index);
-        }
-    }
-
-
-    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.tomcat.util.bcel.Constants.JSR_W;
-            length = 5;
-            return 2; // 5 - 3
-        }
-        return 0;
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/JSR_W.java b/java/org/apache/tomcat/util/bcel/generic/JSR_W.java
deleted file mode 100644 (file)
index b5faadd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    JSR_W() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        index = getTargetOffset();
-        out.writeByte(opcode);
-        out.writeInt(index);
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        index = bytes.readInt();
-        length = 5;
-    }
-}
index 241cf2a..667e5d9 100644 (file)
@@ -36,42 +36,8 @@ public abstract class JsrInstruction extends BranchInstruction implements Uncond
     }
 
 
-    /** @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/java/org/apache/tomcat/util/bcel/generic/LDC2_W.java b/java/org/apache/tomcat/util/bcel/generic/LDC2_W.java
deleted file mode 100644 (file)
index 3872cd3..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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, TypedInstruction {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LDC2_W() {
-    }
-
-
-    
-
-
-    public Type getType( ConstantPoolGen cpg ) {
-        switch (cpg.getConstantPool().getConstant(index).getTag()) {
-            case org.apache.tomcat.util.bcel.Constants.CONSTANT_Long:
-                return Type.LONG;
-            case org.apache.tomcat.util.bcel.Constants.CONSTANT_Double:
-                return Type.DOUBLE;
-            default: // Never reached
-                throw new RuntimeException("Unknown constant type " + opcode);
-        }
-    }
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/LDC_W.java b/java/org/apache/tomcat/util/bcel/generic/LDC_W.java
deleted file mode 100644 (file)
index e48a2db..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.IOException;
-import org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LDC_W() {
-    }
-
-
-    
-
-
-    /**
-     * Read needed data (i.e., index) from file.
-     */
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        setIndex(bytes.readUnsignedShort());
-        // Override just in case it has been changed
-        opcode = org.apache.tomcat.util.bcel.Constants.LDC_W;
-        length = 3;
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/LLOAD.java b/java/org/apache/tomcat/util/bcel/generic/LLOAD.java
deleted file mode 100644 (file)
index b2ce867..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LLOAD() {
-        super(org.apache.tomcat.util.bcel.Constants.LLOAD, org.apache.tomcat.util.bcel.Constants.LLOAD_0);
-    }
-
-
-    public LLOAD(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.LLOAD, org.apache.tomcat.util.bcel.Constants.LLOAD_0, n);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/LOOKUPSWITCH.java b/java/org/apache/tomcat/util/bcel/generic/LOOKUPSWITCH.java
deleted file mode 100644 (file)
index 08ca015..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LOOKUPSWITCH() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    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.
-     */
-    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();
-        }
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/LSTORE.java b/java/org/apache/tomcat/util/bcel/generic/LSTORE.java
deleted file mode 100644 (file)
index 6e5ca8e..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    LSTORE() {
-        super(org.apache.tomcat.util.bcel.Constants.LSTORE, org.apache.tomcat.util.bcel.Constants.LSTORE_0);
-    }
-
-
-    public LSTORE(int n) {
-        super(org.apache.tomcat.util.bcel.Constants.LSTORE, org.apache.tomcat.util.bcel.Constants.LSTORE_0, n);
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/LineNumberGen.java b/java/org/apache/tomcat/util/bcel/generic/LineNumberGen.java
deleted file mode 100644 (file)
index eafb292..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import org.apache.tomcat.util.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 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);
-    }
-
-
-    
-
-
-    
-
-
-    /**
-     * 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 ) {
-        BranchInstruction.notifyTarget(this.ih, ih, this);
-        this.ih = ih;
-    }
-
-
-    public Object clone() {
-        try {
-            return super.clone();
-        } catch (CloneNotSupportedException e) {
-            System.err.println(e);
-            return null;
-        }
-    }
-
-
-    
-
-
-    public void setSourceLine( int src_line ) {
-        this.src_line = src_line;
-    }
-
-
-    
-}
index 1f478f7..97ebeb8 100644 (file)
@@ -76,9 +76,7 @@ public class LocalVariableGen implements InstructionTargeter, NamedAndTyped, Clo
     }
 
 
-    public void setName( String name ) {
-        this.name = name;
-    }
+    
 
 
     public String getName() {
@@ -86,9 +84,7 @@ public class LocalVariableGen implements InstructionTargeter, NamedAndTyped, Clo
     }
 
 
-    public void setType( Type type ) {
-        this.type = type;
-    }
+    
 
 
     
diff --git a/java/org/apache/tomcat/util/bcel/generic/MULTIANEWARRAY.java b/java/org/apache/tomcat/util/bcel/generic/MULTIANEWARRAY.java
deleted file mode 100644 (file)
index 64ba8a6..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.bcel.classfile.ConstantPool;
-import org.apache.tomcat.util.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 short dimensions;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    MULTIANEWARRAY() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    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.
-     */
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        super.initFromFile(bytes, wide);
-        dimensions = bytes.readByte();
-        length = 4;
-    }
-
-
-    
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + index + " " + dimensions;
-    }
-
-
-    /**
-     * @return mnemonic for instruction with symbolic references resolved
-     */
-    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
-     */
-    public int consumeStack( ConstantPoolGen cpg ) {
-        return dimensions;
-    }
-
-
-    
-
-
-    
-}
index 1cd16d0..d6f8599 100644 (file)
@@ -46,22 +46,10 @@ import org.apache.tomcat.util.bcel.util.BCELComparator;
  */
 public class MethodGen extends FieldGenOrMethodGen {
 
-    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 List variable_vec = new ArrayList();
-    private List line_number_vec = new ArrayList();
-    private List exception_vec = new ArrayList();
     private List throws_vec = new ArrayList();
-    private List code_attrs_vec = new ArrayList();
-    
-    private List[] param_annotations; // Array of lists containing AnnotationGen objects
-    private boolean hasParameterAnnotations = false;
-    private boolean haveUnpackedParameterAnnotations = false;
     
     private static BCELComparator _cmp = new BCELComparator() {
 
@@ -80,24 +68,6 @@ public class MethodGen extends FieldGenOrMethodGen {
     };
 
 
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
     /**
      * Sort local variables by index
      */
@@ -169,153 +139,11 @@ public class MethodGen extends FieldGenOrMethodGen {
     }
 
 
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-    
-    
-      
-      
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
-    
-
-
     public String getSignature() {
         return Type.getMethodSignature(type, arg_types);
     }
 
 
-    
-
-
-    
-
-
-    
-
-    
-
-    
-
-
-    
-
-    private List observers;
-
-
-    
-
-
-    
-
-
-    
-
-
     /**
      * Return string representation close to declaration format,
      * `public static void main(String[]) throws IOException', e.g.
diff --git a/java/org/apache/tomcat/util/bcel/generic/NEW.java b/java/org/apache/tomcat/util/bcel/generic/NEW.java
deleted file mode 100644 (file)
index 749a4f0..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    NEW() {
-    }
-
-
-    
-
-
-    
-
-
-    
-}
index 053a8cb..e8982c4 100644 (file)
@@ -31,8 +31,8 @@ public interface NamedAndTyped {
     
 
 
-    public void setName( String name );
+    
 
 
-    public void setType( Type type );
+    
 }
index 59908ac..e1a5065 100644 (file)
@@ -38,11 +38,7 @@ public class ObjectType extends ReferenceType {
     }
 
 
-    /** @return name of referenced class
-     */
-    public String getClassName() {
-        return class_name;
-    }
+    
 
 
     /** @return a hash code value for the object.
diff --git a/java/org/apache/tomcat/util/bcel/generic/PUTFIELD.java b/java/org/apache/tomcat/util/bcel/generic/PUTFIELD.java
deleted file mode 100644 (file)
index d7eeba8..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    PUTFIELD() {
-    }
-
-
-    
-
-
-    public int consumeStack( ConstantPoolGen cpg ) {
-        return getFieldSize(cpg) + 1;
-    }
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/PUTSTATIC.java b/java/org/apache/tomcat/util/bcel/generic/PUTSTATIC.java
deleted file mode 100644 (file)
index 251b2d1..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-/** 
- * 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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    PUTSTATIC() {
-    }
-
-
-    
-
-
-    public int consumeStack( ConstantPoolGen cpg ) {
-        return getFieldSize(cpg);
-    }
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/RET.java b/java/org/apache/tomcat/util/bcel/generic/RET.java
deleted file mode 100644 (file)
index 573d311..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.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 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() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        if (wide) {
-            out.writeByte(org.apache.tomcat.util.bcel.Constants.WIDE);
-        }
-        out.writeByte(opcode);
-        if (wide) {
-            out.writeShort(index);
-        } else {
-            out.writeByte(index);
-        }
-    }
-
-
-    private final void setWide() {
-        wide = index > org.apache.tomcat.util.bcel.Constants.MAX_BYTE;
-        if (wide) {
-            length = 4; // Including the wide byte  
-        } else {
-            length = 2;
-        }
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    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
-     */
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + index;
-    }
-
-
-    /** @return return address type
-     */
-    public Type getType( ConstantPoolGen cp ) {
-        return ReturnaddressType.NO_TARGET;
-    }
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/ReturnaddressType.java b/java/org/apache/tomcat/util/bcel/generic/ReturnaddressType.java
deleted file mode 100644 (file)
index 0801573..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import org.apache.tomcat.util.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 {
-
-    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.
-     */
-    public int hashCode() {
-        if (returnTarget == null) {
-            return 0;
-        }
-        return returnTarget.hashCode();
-    }
-
-
-    /**
-     * Returns if the two Returnaddresses refer to the same target.
-     */
-    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);
-    }
-
-
-    
-}
diff --git a/java/org/apache/tomcat/util/bcel/generic/SIPUSH.java b/java/org/apache/tomcat/util/bcel/generic/SIPUSH.java
deleted file mode 100644 (file)
index 9367739..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.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 short b;
-
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    SIPUSH() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as short code to stream out.
-     */
-    public void dump( DataOutputStream out ) throws IOException {
-        super.dump(out);
-        out.writeShort(b);
-    }
-
-
-    /**
-     * @return mnemonic for instruction
-     */
-    public String toString( boolean verbose ) {
-        return super.toString(verbose) + " " + b;
-    }
-
-
-    /**
-     * Read needed data (e.g. index) from file.
-     */
-    protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException {
-        length = 3;
-        b = bytes.readShort();
-    }
-
-
-    public Number getValue() {
-        return new Integer(b);
-    }
-
-
-    
-}
index c6c2446..d08d6a9 100644 (file)
@@ -195,12 +195,7 @@ public abstract class Select extends BranchInstruction implements VariableLength
     
 
 
-    /**
-     * @return array of match target offsets
-     */
-    public int[] getIndices() {
-        return indices;
-    }
+    
 
 
     /**
diff --git a/java/org/apache/tomcat/util/bcel/generic/TABLESWITCH.java b/java/org/apache/tomcat/util/bcel/generic/TABLESWITCH.java
deleted file mode 100644 (file)
index 35dc981..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright  2000-2009 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); 
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License. 
- *
- */
-package org.apache.tomcat.util.bcel.generic;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import org.apache.tomcat.util.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 {
-
-    /**
-     * Empty constructor needed for the Class.newInstance() statement in
-     * Instruction.readInstruction(). Not to be used otherwise.
-     */
-    TABLESWITCH() {
-    }
-
-
-    
-
-
-    /**
-     * Dump instruction as byte code to stream out.
-     * @param out Output stream
-     */
-    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.
-     */
-    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 = low; i <= high; i++) {
-            match[i - low] = i;
-        }
-        for (int i = 0; i < match_length; i++) {
-            indices[i] = bytes.readInt();
-        }
-    }
-}
index 1ede105..bc6b1d9 100644 (file)
@@ -235,7 +235,6 @@ public abstract class Type implements java.io.Serializable {
     static int getArgumentTypesSize( String signature ) {
         int res = 0;
         int index;
-        Type[] types;
         try { // Read all declarations between for `(' and `)'
             if (signature.charAt(0) != '(') {
                 throw new ClassFormatException("Invalid method signature: " + signature);