jakarta-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1149459 [1/2] - in /jakarta/bcel/trunk/src: examples/ examples/Mini/ main/java/org/apache/bcel/ main/java/org/apache/bcel/classfile/ main/java/org/apache/bcel/generic/ main/java/org/apache/bcel/util/ main/java/org/apache/bcel/verifier/ mai...
Date Fri, 22 Jul 2011 04:34:39 GMT
Author: dbrosius
Date: Fri Jul 22 04:34:27 2011
New Revision: 1149459

URL: http://svn.apache.org/viewvc?rev=1149459&view=rev
Log:
move code base to 1.5 - phase 1 - add generics

Modified:
    jakarta/bcel/trunk/src/examples/JasminVisitor.java
    jakarta/bcel/trunk/src/examples/Mini/ASTFunDecl.java
    jakarta/bcel/trunk/src/examples/Mini/JJTMiniParserState.java
    jakarta/bcel/trunk/src/examples/Package.java
    jakarta/bcel/trunk/src/examples/Peephole.java
    jakarta/bcel/trunk/src/examples/ProxyCreator.java
    jakarta/bcel/trunk/src/examples/listclass.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/ExceptionConstants.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/Repository.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Attribute.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ANEWARRAY.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ARRAYLENGTH.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ATHROW.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayInstruction.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/CHECKCAST.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ExceptionThrower.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGen.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IDIV.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INSTANCEOF.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IREM.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDC.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDIV.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LREM.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITORENTER.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITOREXIT.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MULTIANEWARRAY.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/NEW.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/NEWARRAY.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTFIELD.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTSTATIC.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ReturnInstruction.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/SWITCH.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/Type.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoader.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/ClassQueue.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/ClassSet.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/ClassStack.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/ClassVector.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/InstructionFinder.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/JavaWrapper.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/Repository.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/SyntheticRepository.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/PassVerifier.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/Verifier.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierFactory.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/VerifierFactoryListModel.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/IntList.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/LocalVariableInfo.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/statics/Pass2Verifier.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ControlFlowGraph.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/ExceptionHandlers.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/InstructionContext.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
    jakarta/bcel/trunk/src/test/java/org/apache/bcel/AnnotationGenTestCase.java

Modified: jakarta/bcel/trunk/src/examples/JasminVisitor.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/examples/JasminVisitor.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/examples/JasminVisitor.java (original)
+++ jakarta/bcel/trunk/src/examples/JasminVisitor.java Fri Jul 22 04:34:27 2011
@@ -153,7 +153,7 @@ public class JasminVisitor extends org.a
     printEndMethod(e);
   }
 
-  private Hashtable map;
+  private Hashtable<InstructionHandle, String> map;
 
   public void visitCode(Code code) {
     int label_counter = 0;
@@ -168,7 +168,7 @@ public class JasminVisitor extends org.a
     /* Pass 1: Give all referenced instruction handles a symbolic name, i.e. a
      * label.
      */
-    map = new Hashtable();
+    map = new Hashtable<InstructionHandle, String>();
 
     for(int i=0; i < ihs.length; i++) {
       if(ihs[i] instanceof BranchHandle) {
@@ -228,7 +228,7 @@ public class JasminVisitor extends org.a
     for(int i=0; i < ihs.length; i++) {
       InstructionHandle ih   = ihs[i];
       Instruction       inst = ih.getInstruction();
-      String            str  = (String)map.get(ih);
+      String            str  = map.get(ih);
       
       if(str != null) {
         out.println(str);
@@ -285,12 +285,12 @@ public class JasminVisitor extends org.a
   }
  
   private final String get(InstructionHandle ih) {
-    String str = new StringTokenizer((String)map.get(ih), "\n").nextToken();
+    String str = new StringTokenizer(map.get(ih), "\n").nextToken();
     return str.substring(0, str.length() - 1);
   }
 
   private final void put(InstructionHandle ih, String line) {
-    String str = (String)map.get(ih);
+    String str = map.get(ih);
 
     if(str == null) {
         map.put(ih, line);

Modified: jakarta/bcel/trunk/src/examples/Mini/ASTFunDecl.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/examples/Mini/ASTFunDecl.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/examples/Mini/ASTFunDecl.java (original)
+++ jakarta/bcel/trunk/src/examples/Mini/ASTFunDecl.java Fri Jul 22 04:34:27 2011
@@ -319,8 +319,8 @@ implements MiniParserTreeConstants, org.
     InstructionFinder f   = new InstructionFinder(il);
     String      pat = "IF_ICMP ICONST_1 GOTO ICONST_0 IFEQ Instruction";
 
-    for(Iterator it = f.search(pat, my_constraint); it.hasNext();) {
-      InstructionHandle[] match = (InstructionHandle[])it.next();
+    for(Iterator<InstructionHandle[]> it = f.search(pat, my_constraint); it.hasNext();) {
+      InstructionHandle[] match = it.next();
       // Everything ok, update code
       BranchInstruction ifeq    = (BranchInstruction)(match[4].getInstruction());
       BranchHandle      if_icmp = (BranchHandle)match[0];

Modified: jakarta/bcel/trunk/src/examples/Mini/JJTMiniParserState.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/examples/Mini/JJTMiniParserState.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/examples/Mini/JJTMiniParserState.java (original)
+++ jakarta/bcel/trunk/src/examples/Mini/JJTMiniParserState.java Fri Jul 22 04:34:27 2011
@@ -20,16 +20,16 @@
 package Mini;
 
 class JJTMiniParserState {
-  private java.util.Stack nodes;
-  private java.util.Stack marks;
+  private java.util.Stack<Node> nodes;
+  private java.util.Stack<Integer> marks;
 
   private int sp;                // number of nodes on stack
   private int mk;                // current mark
   private boolean node_created;
 
   JJTMiniParserState() {
-    nodes = new java.util.Stack();
-    marks = new java.util.Stack();
+    nodes = new java.util.Stack<Node>();
+    marks = new java.util.Stack<Integer>();
     sp = 0;
     mk = 0;
   }
@@ -53,7 +53,7 @@ class JJTMiniParserState {
   /* Returns the root node of the AST.  It only makes sense to call
      this after a successful parse. */
   Node rootNode() {
-    return (Node)nodes.elementAt(0);
+    return nodes.elementAt(0);
   }
 
   /* Pushes a node on to the stack. */
@@ -66,14 +66,14 @@ class JJTMiniParserState {
      stack.  */
   Node popNode() {
     if (--sp < mk) {
-      mk = ((Integer)marks.pop()).intValue();
+      mk = marks.pop().intValue();
     }
-    return (Node)nodes.pop();
+    return nodes.pop();
   }
 
   /* Returns the node currently on the top of the stack. */
   Node peekNode() {
-    return (Node)nodes.peek();
+    return nodes.peek();
   }
 
   /* Returns the number of children on the stack in the current node
@@ -87,7 +87,7 @@ class JJTMiniParserState {
     while (sp > mk) {
       popNode();
     }
-    mk = ((Integer)marks.pop()).intValue();
+    mk = marks.pop().intValue();
   }
 
 
@@ -103,7 +103,7 @@ class JJTMiniParserState {
      made the children of the definite node.  Then the definite node
      is pushed on to the stack. */
   void closeNodeScope(Node n, int num) {
-    mk = ((Integer)marks.pop()).intValue();
+    mk = marks.pop().intValue();
     while (num-- > 0) {
       Node c = popNode();
       c.jjtSetParent(n);
@@ -123,7 +123,7 @@ class JJTMiniParserState {
   void closeNodeScope(Node n, boolean condition) {
     if (condition) {
       int a = nodeArity();
-      mk = ((Integer)marks.pop()).intValue();
+      mk = marks.pop().intValue();
       while (a-- > 0) {
         Node c = popNode();
         c.jjtSetParent(n);
@@ -133,7 +133,7 @@ class JJTMiniParserState {
       pushNode(n);
       node_created = true;
     } else {
-      mk = ((Integer)marks.pop()).intValue();
+      mk = marks.pop().intValue();
       node_created = false;
     }
   }

Modified: jakarta/bcel/trunk/src/examples/Package.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/examples/Package.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/examples/Package.java (original)
+++ jakarta/bcel/trunk/src/examples/Package.java Fri Jul 22 04:34:27 2011
@@ -21,9 +21,12 @@ import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 import java.util.TreeMap;
 import java.util.jar.JarOutputStream;
 import java.util.zip.ZipEntry;
+
 import org.apache.bcel.Constants;
 import org.apache.bcel.classfile.ClassParser;
 import org.apache.bcel.classfile.Constant;
@@ -72,18 +75,18 @@ public class Package {
    * Store class name against the JavaClass. From the JavaClass
    * we get the bytes to create the jar.
    */
-  TreeMap allClasses = new TreeMap();
+  Map<String, JavaClass> allClasses = new TreeMap<String, JavaClass>();
   /**
    * We start at the root classes, put them in here, then go through 
    * this list, putting dependent classes in here and from there
    * into allClasses. Store class names against class names of their dependents
    */
-  TreeMap dependents = new TreeMap();
+  TreeMap<String, String> dependents = new TreeMap<String, String>();
   /** 
    * Collect all classes that could not be found in the classpath.
    * Store class names against class names of their dependents
    */
-  TreeMap notFound = new TreeMap();
+  TreeMap<String, String> notFound = new TreeMap<String, String>();
   /**
    * See wheather we print the classes that were not found (default = false)
    */
@@ -153,8 +156,8 @@ public class Package {
     // starting processing: Grab from the dependents list an add back to it
     // and the allClasses list. see addDependents
     while(!dependents.isEmpty() ){
-      String name = (String)dependents.firstKey();
-      String from = (String) dependents.remove(name);
+      String name = dependents.firstKey();
+      String from = dependents.remove(name);
       if(allClasses.get(name) == null){
     try{
       InputStream is = classPath.getInputStream(name);
@@ -172,11 +175,11 @@ public class Package {
     // create the jar
     JarOutputStream jarFile = new JarOutputStream(new FileOutputStream(defaultJar));
     jarFile.setLevel(5); // use compression
-    Iterator keys = allClasses.keySet().iterator();
+    Iterator<String> keys = allClasses.keySet().iterator();
     int written = 0 ;
     while(keys.hasNext()){ // add entries for every class
-      String name = (String)keys.next();
-      JavaClass claz = (JavaClass) allClasses.get(name);
+      String name = keys.next();
+      JavaClass claz = allClasses.get(name);
       ZipEntry zipEntry = new ZipEntry(name+".class");
       byte[] bytes = claz.getBytes() ;
       int length = bytes.length ;
@@ -191,7 +194,7 @@ public class Package {
       System.err.println( notFound.size() +" classes could not be found");
       if(showNotFound){ // if wanted show the actual classes that we not found
     while(!notFound.isEmpty()){
-      String name = (String)notFound.firstKey();
+      String name = notFound.firstKey();
       System.err.println( name+ " (" + notFound.remove(name)+")");
     }
       }else{
@@ -205,10 +208,10 @@ public class Package {
    * overview. Enabled by -s option 
    */
   void printAllClasses(){
-    ArrayList names = new ArrayList(allClasses.keySet());
+    List<String> names = new ArrayList<String>(allClasses.keySet());
     Collections.sort(names);
     for( int i = 0 ; i < names.size() ; i ++ ){
-      String cl = (String)names.get(i);
+      String cl = names.get(i);
       System.err.println(cl);
     }
   }

Modified: jakarta/bcel/trunk/src/examples/Peephole.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/examples/Peephole.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/examples/Peephole.java (original)
+++ jakarta/bcel/trunk/src/examples/Peephole.java Fri Jul 22 04:34:27 2011
@@ -68,8 +68,8 @@ public class Peephole {
     InstructionHandle next  = null;
     int               count = 0;
 
-    for(Iterator e = f.search(pat); e.hasNext(); ) {
-      InstructionHandle[] match = (InstructionHandle[])e.next();
+    for(Iterator<InstructionHandle[]> e = f.search(pat); e.hasNext(); ) {
+      InstructionHandle[] match = e.next();
       InstructionHandle   first = match[0];
       InstructionHandle   last  = match[match.length - 1];
       

Modified: jakarta/bcel/trunk/src/examples/ProxyCreator.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/examples/ProxyCreator.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/examples/ProxyCreator.java (original)
+++ jakarta/bcel/trunk/src/examples/ProxyCreator.java Fri Jul 22 04:34:27 2011
@@ -55,7 +55,7 @@ public class ProxyCreator {
    */
   public static Object createProxy(String pack, String class_name) {
     try {
-      Class cl = Class.forName(pack + "$$BCEL$$" + class_name);
+      Class<?> cl = Class.forName(pack + "$$BCEL$$" + class_name);
       return cl.newInstance();
     } catch(Exception e) {
       e.printStackTrace();

Modified: jakarta/bcel/trunk/src/examples/listclass.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/examples/listclass.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/examples/listclass.java (original)
+++ jakarta/bcel/trunk/src/examples/listclass.java Fri Jul 22 04:34:27 2011
@@ -18,6 +18,7 @@
 import java.io.IOException;
 import java.util.Hashtable;
 import java.util.Vector;
+
 import org.apache.bcel.Constants;
 import org.apache.bcel.Repository;
 import org.apache.bcel.classfile.ClassParser;
@@ -77,12 +78,12 @@ import org.apache.bcel.classfile.Method;
  */
 public class listclass {
   boolean   code, constants, verbose, classdep, nocontents, recurse;
-  Hashtable listedClasses;
-  Vector    exclude_name;
+  Hashtable<String, String> listedClasses;
+  Vector<String>    exclude_name;
 
   public static void main(String[] argv) {
-    Vector  file_name    = new Vector();
-    Vector  exclude_name = new Vector();
+    Vector<String>  file_name    = new Vector<String>();
+    Vector<String>  exclude_name = new Vector<String>();
     boolean code         = false, constants=false, verbose=true, classdep=false,
             nocontents=false, recurse=false, exclude=false;
     String  name         = null;
@@ -137,7 +138,7 @@ public class listclass {
                       nocontents, recurse, exclude_name);
 
       for(int i=0; i < file_name.size(); i++) {
-        name = (String) file_name.elementAt(i);
+        name = file_name.elementAt(i);
 
         listClass.list(name);
       }
@@ -145,7 +146,7 @@ public class listclass {
   }
 
   public listclass(boolean code, boolean constants, boolean verbose, boolean classdep,
-           boolean nocontents, boolean recurse, Vector exclude_name)
+           boolean nocontents, boolean recurse, Vector<String> exclude_name)
   {
     this.code = code;
     this.constants = constants;
@@ -153,7 +154,7 @@ public class listclass {
     this.classdep = classdep;
     this.nocontents = nocontents;
     this.recurse = recurse;
-    this.listedClasses = new Hashtable();
+    this.listedClasses = new Hashtable<String, String>();
     this.exclude_name = exclude_name;
   }
 
@@ -168,7 +169,7 @@ public class listclass {
     }
 
       for(int idx = 0; idx < exclude_name.size(); idx++) {
-        if(name.startsWith((String) exclude_name.elementAt(idx))) {
+        if(name.startsWith(exclude_name.elementAt(idx))) {
             return;
         }
     }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/ExceptionConstants.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/ExceptionConstants.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/ExceptionConstants.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/ExceptionConstants.java Fri Jul 22 04:34:27 2011
@@ -27,51 +27,51 @@ public interface ExceptionConstants {
 
     /** The mother of all exceptions
      */
-    public static final Class THROWABLE = Throwable.class;
+    public static final Class<Throwable> THROWABLE = Throwable.class;
     /** Super class of any run-time exception
      */
-    public static final Class RUNTIME_EXCEPTION = RuntimeException.class;
+    public static final Class<RuntimeException> RUNTIME_EXCEPTION = RuntimeException.class;
     /** Super class of any linking exception (aka Linkage Error)
      */
-    public static final Class LINKING_EXCEPTION = LinkageError.class;
+    public static final Class<LinkageError> LINKING_EXCEPTION = LinkageError.class;
     /** Linking Exceptions
      */
-    public static final Class CLASS_CIRCULARITY_ERROR = ClassCircularityError.class;
-    public static final Class CLASS_FORMAT_ERROR = ClassFormatError.class;
-    public static final Class EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError.class;
-    public static final Class INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError.class;
-    public static final Class ABSTRACT_METHOD_ERROR = AbstractMethodError.class;
-    public static final Class ILLEGAL_ACCESS_ERROR = IllegalAccessError.class;
-    public static final Class INSTANTIATION_ERROR = InstantiationError.class;
-    public static final Class NO_SUCH_FIELD_ERROR = NoSuchFieldError.class;
-    public static final Class NO_SUCH_METHOD_ERROR = NoSuchMethodError.class;
-    public static final Class NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class;
-    public static final Class UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class;
-    public static final Class VERIFY_ERROR = VerifyError.class;
+    public static final Class<ClassCircularityError> CLASS_CIRCULARITY_ERROR = ClassCircularityError.class;
+    public static final Class<ClassFormatError> CLASS_FORMAT_ERROR = ClassFormatError.class;
+    public static final Class<ExceptionInInitializerError> EXCEPTION_IN_INITIALIZER_ERROR = ExceptionInInitializerError.class;
+    public static final Class<IncompatibleClassChangeError> INCOMPATIBLE_CLASS_CHANGE_ERROR = IncompatibleClassChangeError.class;
+    public static final Class<AbstractMethodError> ABSTRACT_METHOD_ERROR = AbstractMethodError.class;
+    public static final Class<IllegalAccessError> ILLEGAL_ACCESS_ERROR = IllegalAccessError.class;
+    public static final Class<InstantiationError> INSTANTIATION_ERROR = InstantiationError.class;
+    public static final Class<NoSuchFieldError> NO_SUCH_FIELD_ERROR = NoSuchFieldError.class;
+    public static final Class<NoSuchMethodError> NO_SUCH_METHOD_ERROR = NoSuchMethodError.class;
+    public static final Class<NoClassDefFoundError> NO_CLASS_DEF_FOUND_ERROR = NoClassDefFoundError.class;
+    public static final Class<UnsatisfiedLinkError> UNSATISFIED_LINK_ERROR = UnsatisfiedLinkError.class;
+    public static final Class<VerifyError> VERIFY_ERROR = VerifyError.class;
     /* UnsupportedClassVersionError is new in JDK 1.2 */
     //public static final Class UnsupportedClassVersionError = UnsupportedClassVersionError.class;
     /** Run-Time Exceptions 
      */
-    public static final Class NULL_POINTER_EXCEPTION = NullPointerException.class;
-    public static final Class ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException.class;
-    public static final Class ARITHMETIC_EXCEPTION = ArithmeticException.class;
-    public static final Class NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException.class;
-    public static final Class CLASS_CAST_EXCEPTION = ClassCastException.class;
-    public static final Class ILLEGAL_MONITOR_STATE = IllegalMonitorStateException.class;
+    public static final Class<NullPointerException> NULL_POINTER_EXCEPTION = NullPointerException.class;
+    public static final Class<ArrayIndexOutOfBoundsException> ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION = ArrayIndexOutOfBoundsException.class;
+    public static final Class<ArithmeticException> ARITHMETIC_EXCEPTION = ArithmeticException.class;
+    public static final Class<NegativeArraySizeException> NEGATIVE_ARRAY_SIZE_EXCEPTION = NegativeArraySizeException.class;
+    public static final Class<ClassCastException> CLASS_CAST_EXCEPTION = ClassCastException.class;
+    public static final Class<IllegalMonitorStateException> ILLEGAL_MONITOR_STATE = IllegalMonitorStateException.class;
     /** Pre-defined exception arrays according to chapters 5.1-5.4 of the Java Virtual
      * Machine Specification 
      */
-    public static final Class[] EXCS_CLASS_AND_INTERFACE_RESOLUTION = {
+    public static final Class<?>[] EXCS_CLASS_AND_INTERFACE_RESOLUTION = {
             NO_CLASS_DEF_FOUND_ERROR, CLASS_FORMAT_ERROR, VERIFY_ERROR, ABSTRACT_METHOD_ERROR,
             EXCEPTION_IN_INITIALIZER_ERROR, ILLEGAL_ACCESS_ERROR
     }; // Chapter 5.1
-    public static final Class[] EXCS_FIELD_AND_METHOD_RESOLUTION = {
+    public static final Class<?>[] EXCS_FIELD_AND_METHOD_RESOLUTION = {
             NO_SUCH_FIELD_ERROR, ILLEGAL_ACCESS_ERROR, NO_SUCH_METHOD_ERROR
     }; // Chapter 5.2
-    public static final Class[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0]; // Chapter 5.3 (as below)
-    public static final Class[] EXCS_STRING_RESOLUTION = new Class[0];
+    public static final Class<?>[] EXCS_INTERFACE_METHOD_RESOLUTION = new Class[0]; // Chapter 5.3 (as below)
+    public static final Class<?>[] EXCS_STRING_RESOLUTION = new Class[0];
     // Chapter 5.4 (no errors but the ones that _always_ could happen! How stupid.)
-    public static final Class[] EXCS_ARRAY_EXCEPTION = {
+    public static final Class<?>[] EXCS_ARRAY_EXCEPTION = {
             NULL_POINTER_EXCEPTION, ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION
     };
 }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/Repository.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/Repository.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/Repository.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/Repository.java Fri Jul 22 04:34:27 2011
@@ -71,7 +71,7 @@ public abstract class Repository {
      * @throws ClassNotFoundException if the class could not be found or
      * parsed correctly
      */
-    public static JavaClass lookupClass( Class clazz ) throws ClassNotFoundException {
+    public static JavaClass lookupClass( Class<?> clazz ) throws ClassNotFoundException {
         return _repository.loadClass(clazz);
     }
 

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationEntry.java Fri Jul 22 04:34:27 2011
@@ -41,7 +41,7 @@ public class AnnotationEntry implements 
     private final ConstantPool constant_pool;
     private final boolean isRuntimeVisible;
 
-    private List element_value_pairs;
+    private List<ElementValuePair> element_value_pairs;
 
     /**
      * Factory method to create an AnnotionEntry from a DataInputStream
@@ -56,7 +56,7 @@ public class AnnotationEntry implements 
 
         final AnnotationEntry annotationEntry = new AnnotationEntry(file.readUnsignedShort(), constant_pool, isRuntimeVisible);
         final int num_element_value_pairs = (file.readUnsignedShort());
-        annotationEntry.element_value_pairs = new ArrayList();
+        annotationEntry.element_value_pairs = new ArrayList<ElementValuePair>();
         for (int i = 0; i < num_element_value_pairs; i++) {
             annotationEntry.element_value_pairs.add(new ElementValuePair(file.readUnsignedShort(), ElementValue.readElementValue(file, constant_pool),
                     constant_pool));
@@ -119,7 +119,7 @@ public class AnnotationEntry implements 
      */
     public ElementValuePair[] getElementValuePairs() {
         // TODO return List
-        return (ElementValuePair[]) element_value_pairs.toArray(new ElementValuePair[element_value_pairs.size()]);
+        return element_value_pairs.toArray(new ElementValuePair[element_value_pairs.size()]);
     }
 
     public void dump(DataOutputStream dos) throws IOException {
@@ -127,7 +127,7 @@ public class AnnotationEntry implements 
         dos.writeShort(element_value_pairs.size()); // u2 element_value pair
         // count
         for (int i = 0; i < element_value_pairs.size(); i++) {
-            final ElementValuePair envp = (ElementValuePair) element_value_pairs.get(i);
+            final ElementValuePair envp = element_value_pairs.get(i);
             envp.dump(dos);
         }
     }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Attribute.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Attribute.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Attribute.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Attribute.java Fri Jul 22 04:34:27 2011
@@ -92,7 +92,7 @@ public abstract class Attribute implemen
 		file.writeInt(length);
 	}
 
-	private static final Map readers = new HashMap();
+	private static final Map<String, AttributeReader> readers = new HashMap<String, AttributeReader>();
 
 	/**
 	 * Add an Attribute reader capable of parsing (user-defined) attributes
@@ -160,7 +160,7 @@ public abstract class Attribute implemen
 		switch (tag)
 		{
 		case Constants.ATTR_UNKNOWN:
-			AttributeReader r = (AttributeReader) readers.get(name);
+			AttributeReader r = readers.get(name);
 			if (r != null)
 			{
 				return r.createAttribute(name_index, length, file,

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/DescendingVisitor.java Fri Jul 22 04:34:27 2011
@@ -33,7 +33,7 @@ public class DescendingVisitor implement
 
 	private Visitor visitor;
 
-	private Stack stack = new Stack();
+	private Stack<Object> stack = new Stack<Object>();
 
 	/**
 	 * @return container of current entitity, i.e., predecessor during traversal

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java Fri Jul 22 04:34:27 2011
@@ -230,7 +230,7 @@ public abstract class FieldOrMethod exte
 		{
 			// Find attributes that contain annotation data
 			Attribute[] attrs = getAttributes();
-			List accumulatedAnnotations = new ArrayList();
+			List<AnnotationEntry> accumulatedAnnotations = new ArrayList<AnnotationEntry>();
 			for (int i = 0; i < attrs.length; i++)
 			{
 				Attribute attribute = attrs[i];
@@ -244,7 +244,7 @@ public abstract class FieldOrMethod exte
 					}
 				}
 			}
-			annotationEntries = (AnnotationEntry[]) accumulatedAnnotations
+			annotationEntries = accumulatedAnnotations
 					.toArray(new AnnotationEntry[accumulatedAnnotations.size()]);
 			annotationsOutOfDate = false;
 		}

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java Fri Jul 22 04:34:27 2011
@@ -46,7 +46,7 @@ import org.apache.bcel.util.SyntheticRep
  * @see org.apache.bcel.generic.ClassGen
  * @author  <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  */
-public class JavaClass extends AccessFlags implements Cloneable, Node, Comparable {
+public class JavaClass extends AccessFlags implements Cloneable, Node, Comparable<JavaClass> {
 
     private static final long serialVersionUID = 2179314813560563755L;
     private String file_name;
@@ -341,7 +341,7 @@ public class JavaClass extends AccessFla
       	if (annotationsOutOfDate) { 
       		// Find attributes that contain annotation data
       		Attribute[] attrs = getAttributes();
-      		List accumulatedAnnotations = new ArrayList();
+      		List<AnnotationEntry> accumulatedAnnotations = new ArrayList<AnnotationEntry>();
       		for (int i = 0; i < attrs.length; i++) {
     			Attribute attribute = attrs[i];
     			if (attribute instanceof Annotations) {				
@@ -350,7 +350,7 @@ public class JavaClass extends AccessFla
     					accumulatedAnnotations.add(runtimeAnnotations.getAnnotationEntries()[j]);
     			}
     		}
-      		annotations = (AnnotationEntry[])accumulatedAnnotations.toArray(new AnnotationEntry[accumulatedAnnotations.size()]);
+      		annotations = accumulatedAnnotations.toArray(new AnnotationEntry[accumulatedAnnotations.size()]);
       		annotationsOutOfDate = false;
       	}
       	return annotations;
@@ -687,8 +687,8 @@ public class JavaClass extends AccessFla
         try {
             c = (JavaClass) clone();
             c.constant_pool = constant_pool.copy();
-            c.interfaces = (int[]) interfaces.clone();
-            c.interface_names = (String[]) interface_names.clone();
+            c.interfaces = interfaces.clone();
+            c.interface_names = interface_names.clone();
             c.fields = new Field[fields.length];
             for (int i = 0; i < fields.length; i++) {
                 c.fields[i] = fields[i].copy(c.constant_pool);
@@ -843,11 +843,11 @@ public class JavaClass extends AccessFla
      */
     public JavaClass[] getSuperClasses() throws ClassNotFoundException {
         JavaClass clazz = this;
-        List allSuperClasses = new ArrayList();
+        List<JavaClass> allSuperClasses = new ArrayList<JavaClass>();
         for (clazz = clazz.getSuperClass(); clazz != null; clazz = clazz.getSuperClass()) {
             allSuperClasses.add(clazz);
         }
-        return (JavaClass[]) allSuperClasses.toArray(new JavaClass[allSuperClasses.size()]);
+        return allSuperClasses.toArray(new JavaClass[allSuperClasses.size()]);
     }
 
 
@@ -869,7 +869,7 @@ public class JavaClass extends AccessFla
      */
     public JavaClass[] getAllInterfaces() throws ClassNotFoundException {
         ClassQueue queue = new ClassQueue();
-        Set allInterfaces = new TreeSet();
+        Set<JavaClass> allInterfaces = new TreeSet<JavaClass>();
         queue.enqueue(this);
         while (!queue.empty()) {
             JavaClass clazz = queue.dequeue();
@@ -886,7 +886,7 @@ public class JavaClass extends AccessFla
                 queue.enqueue(_interfaces[i]);
             }
         }
-        return (JavaClass[]) allInterfaces.toArray(new JavaClass[allInterfaces.size()]);
+        return allInterfaces.toArray(new JavaClass[allInterfaces.size()]);
     }
 
 
@@ -922,8 +922,8 @@ public class JavaClass extends AccessFla
      * Return the natural ordering of two JavaClasses.
      * This ordering is based on the class name
      */
-    public int compareTo( Object obj ) {
-        return getClassName().compareTo(((JavaClass) obj).getClassName());
+    public int compareTo( JavaClass obj ) {
+        return getClassName().compareTo(obj.getClassName());
     }
 
 

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Unknown.java Fri Jul 22 04:34:27 2011
@@ -46,16 +46,16 @@ public final class Unknown extends Attri
     private static final long serialVersionUID = -4099655108069755015L;
     private byte[] bytes;
     private String name;
-    private static final Map unknown_attributes = new HashMap();
+    private static final Map<String, Unknown> unknown_attributes = new HashMap<String, Unknown>();
 
 
     /** @return array of unknown attributes, but just one for each kind.
      */
     static Unknown[] getUnknownAttributes() {
         Unknown[] unknowns = new Unknown[unknown_attributes.size()];
-        Iterator entries = unknown_attributes.values().iterator();
+        Iterator<Unknown> entries = unknown_attributes.values().iterator();
         for (int i = 0; entries.hasNext(); i++) {
-            unknowns[i] = (Unknown) entries.next();
+            unknowns[i] = entries.next();
         }
         unknown_attributes.clear();
         return unknowns;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java Fri Jul 22 04:34:27 2011
@@ -50,19 +50,19 @@ import org.apache.bcel.util.ByteSequence
  */
 public abstract class Utility {
 
-    private static int unwrap( ThreadLocal tl ) {
-        return ((Integer) tl.get()).intValue();
+    private static int unwrap( ThreadLocal<Integer> tl ) {
+        return tl.get().intValue();
     }
 
 
-    private static void wrap( ThreadLocal tl, int value ) {
+    private static void wrap( ThreadLocal<Integer> tl, int value ) {
         tl.set(new Integer(value));
     }
 
-    private static ThreadLocal consumed_chars = new ThreadLocal() {
+    private static ThreadLocal<Integer> consumed_chars = new ThreadLocal<Integer>() {
 
-        protected Object initialValue() {
-            return new Integer(0);
+        protected Integer initialValue() {
+            return Integer.valueOf(0);
         }
     };/* How many chars have been consumed
      * during parsing in signatureToString().
@@ -563,7 +563,7 @@ public abstract class Utility {
      */
     public static final String[] methodSignatureArgumentTypes( String signature, boolean chopit )
             throws ClassFormatException {
-        List vec = new ArrayList();
+        List<String> vec = new ArrayList<String>();
         int index;
         try { // Read all declarations between for `(' and `)'
             if (signature.charAt(0) != '(') {
@@ -578,7 +578,7 @@ public abstract class Utility {
         } catch (StringIndexOutOfBoundsException e) { // Should never occur
             throw new ClassFormatException("Invalid method signature: " + signature, e);
         }
-        return (String[]) vec.toArray(new String[vec.size()]);
+        return vec.toArray(new String[vec.size()]);
     }
 
 
@@ -1378,7 +1378,7 @@ public abstract class Utility {
      * @param cp The constant pool gen where we can create the necessary name refs
      * @param vec A list of AnnotationGen objects
      */
-    public static Attribute[] getAnnotationAttributes(ConstantPoolGen cp,List vec) {
+    public static Attribute[] getAnnotationAttributes(ConstantPoolGen cp,List<AnnotationEntryGen> vec) {
     	
     	if (vec.isEmpty()) return new Attribute[0];
     	
@@ -1388,7 +1388,7 @@ public abstract class Utility {
     	
     		//  put the annotations in the right output stream
     		for (int i=0; i<vec.size(); i++) {
-    			AnnotationEntryGen a = (AnnotationEntryGen)vec.get(i);
+    			AnnotationEntryGen a = vec.get(i);
     			if (a.isRuntimeVisible()) countVisible++;
     			else			   countInvisible++;
     		}
@@ -1403,7 +1403,7 @@ public abstract class Utility {
 
     		// put the annotations in the right output stream
     		for (int i=0; i<vec.size(); i++) {
-    			AnnotationEntryGen a = (AnnotationEntryGen)vec.get(i);
+    			AnnotationEntryGen a = vec.get(i);
     			if (a.isRuntimeVisible()) a.dump(rvaDos);
     			else			   a.dump(riaDos);
     		}
@@ -1420,7 +1420,7 @@ public abstract class Utility {
       if (rvaData.length>2) rvaIndex = cp.addUtf8("RuntimeVisibleAnnotations");
       if (riaData.length>2) riaIndex = cp.addUtf8("RuntimeInvisibleAnnotations");
 
-    	List newAttributes = new ArrayList();
+    	List<Attribute> newAttributes = new ArrayList<Attribute>();
     	if (rvaData.length>2) {
     		
     		newAttributes.add(
@@ -1431,7 +1431,7 @@ public abstract class Utility {
     		  new RuntimeInvisibleAnnotations(riaIndex,riaData.length,new DataInputStream(new ByteArrayInputStream(riaData)),cp.getConstantPool()));
     	}
 
-    	return (Attribute[])newAttributes.toArray(new Attribute[newAttributes.size()]);
+    	return newAttributes.toArray(new Attribute[newAttributes.size()]);
     	} catch (IOException e) {
     		System.err.println("IOException whilst processing annotations");
   		e.printStackTrace();
@@ -1447,7 +1447,7 @@ public abstract class Utility {
 	 */
 	public static Attribute[] getParameterAnnotationAttributes(
 			ConstantPoolGen cp,
-			List[] /*Array of lists, array size depends on #params */vec)
+			List<AnnotationEntryGen>[] /*Array of lists, array size depends on #params */vec)
 	{
 		int visCount[] = new int[vec.length];
 		int totalVisCount = 0;
@@ -1457,12 +1457,12 @@ public abstract class Utility {
 		{
 			for (int i = 0; i < vec.length; i++)
 			{
-				List l = vec[i];
+				List<AnnotationEntryGen> l = vec[i];
 				if (l != null)
 				{
-					for (Iterator iter = l.iterator(); iter.hasNext();)
+					for (Iterator<AnnotationEntryGen> iter = l.iterator(); iter.hasNext();)
 					{
-						AnnotationEntryGen element = (AnnotationEntryGen) iter.next();
+						AnnotationEntryGen element = iter.next();
 						if (element.isRuntimeVisible())
 						{
 							visCount[i]++;
@@ -1485,10 +1485,10 @@ public abstract class Utility {
 				rvaDos.writeShort(visCount[i]);
 				if (visCount[i] > 0)
 				{
-					List l = vec[i];
-					for (Iterator iter = l.iterator(); iter.hasNext();)
+					List<AnnotationEntryGen> l = vec[i];
+					for (Iterator<AnnotationEntryGen> iter = l.iterator(); iter.hasNext();)
 					{
-						AnnotationEntryGen element = (AnnotationEntryGen) iter.next();
+						AnnotationEntryGen element = iter.next();
 						if (element.isRuntimeVisible())
 							element.dump(rvaDos);
 					}
@@ -1504,10 +1504,10 @@ public abstract class Utility {
 				riaDos.writeShort(invisCount[i]);
 				if (invisCount[i] > 0)
 				{
-					List l = vec[i];
-					for (Iterator iter = l.iterator(); iter.hasNext();)
+					List<AnnotationEntryGen> l = vec[i];
+					for (Iterator<AnnotationEntryGen> iter = l.iterator(); iter.hasNext();)
 					{
-						AnnotationEntryGen element = (AnnotationEntryGen) iter.next();
+						AnnotationEntryGen element = iter.next();
 						if (!element.isRuntimeVisible())
 							element.dump(riaDos);
 					}
@@ -1522,7 +1522,7 @@ public abstract class Utility {
 				rvaIndex = cp.addUtf8("RuntimeVisibleParameterAnnotations");
 			if (totalInvisCount > 0)
 				riaIndex = cp.addUtf8("RuntimeInvisibleParameterAnnotations");
-			List newAttributes = new ArrayList();
+			List<Attribute> newAttributes = new ArrayList<Attribute>();
 			if (totalVisCount > 0)
 			{
 				newAttributes
@@ -1535,7 +1535,7 @@ public abstract class Utility {
 						.add(new RuntimeInvisibleParameterAnnotations(riaIndex,
 								riaData.length, new DataInputStream(new ByteArrayInputStream(riaData)), cp.getConstantPool()));
 			}
-			return (Attribute[]) newAttributes.toArray(new Attribute[newAttributes.size()]);
+			return newAttributes.toArray(new Attribute[newAttributes.size()]);
 		}
 		catch (IOException e)
 		{

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ANEWARRAY.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ANEWARRAY.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ANEWARRAY.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ANEWARRAY.java Fri Jul 22 04:34:27 2011
@@ -45,8 +45,8 @@ public class ANEWARRAY extends CPInstruc
     }
 
 
-    public Class[] getExceptions() {
-        Class[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ARRAYLENGTH.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ARRAYLENGTH.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ARRAYLENGTH.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ARRAYLENGTH.java Fri Jul 22 04:34:27 2011
@@ -38,7 +38,7 @@ public class ARRAYLENGTH extends Instruc
 
     /** @return exceptions this instruction may cause
      */
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return new Class[] {
             org.apache.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
         };

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ATHROW.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ATHROW.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ATHROW.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ATHROW.java Fri Jul 22 04:34:27 2011
@@ -39,7 +39,7 @@ public class ATHROW extends Instruction 
 
     /** @return exceptions this instruction may cause
      */
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return new Class[] {
             org.apache.bcel.ExceptionConstants.THROWABLE
         };

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java Fri Jul 22 04:34:27 2011
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+
 import org.apache.bcel.classfile.AnnotationEntry;
 import org.apache.bcel.classfile.ConstantUtf8;
 import org.apache.bcel.classfile.ElementValuePair;
@@ -32,7 +33,7 @@ public class AnnotationEntryGen
 {
 	private int typeIndex;
 
-	private List /* ElementNameValuePairGen */evs;
+	private List<ElementValuePairGen> evs;
 
 	private ConstantPoolGen cpool;
 
@@ -62,10 +63,10 @@ public class AnnotationEntryGen
 		evs = copyValues(a.getElementValuePairs(), cpool, copyPoolEntries);
 	}
 
-	private List copyValues(ElementValuePair[] in, ConstantPoolGen cpool,
+	private List<ElementValuePairGen> copyValues(ElementValuePair[] in, ConstantPoolGen cpool,
 			boolean copyPoolEntries)
 	{
-		List out = new ArrayList();
+		List<ElementValuePairGen> out = new ArrayList<ElementValuePairGen>();
 		int l = in.length;
 		for (int i = 0; i < l; i++)
 		{
@@ -87,17 +88,16 @@ public class AnnotationEntryGen
 	{
 		AnnotationEntry a = new AnnotationEntry(typeIndex, cpool.getConstantPool(),
 				isRuntimeVisible);
-		for (Iterator iter = evs.iterator(); iter.hasNext();)
+		for (Iterator<ElementValuePairGen> iter = evs.iterator(); iter.hasNext();)
 		{
-			ElementValuePairGen element = (ElementValuePairGen) iter
-					.next();
+			ElementValuePairGen element = iter.next();
 			a.addElementNameValuePair(element.getElementNameValuePair());
 		}
 		return a;
 	}
 
 	public AnnotationEntryGen(ObjectType type,
-			List /* ElementNameValuePairGen */elements, boolean vis,
+			List<ElementValuePairGen> elements, boolean vis,
 			ConstantPoolGen cpool)
 	{
 		this.cpool = cpool;
@@ -128,7 +128,7 @@ public class AnnotationEntryGen
 		dos.writeShort(evs.size()); // u2 element_value pair count
 		for (int i = 0; i < evs.size(); i++)
 		{
-			ElementValuePairGen envp = (ElementValuePairGen) evs.get(i);
+			ElementValuePairGen envp = evs.get(i);
 			envp.dump(dos);
 		}
 	}
@@ -136,7 +136,7 @@ public class AnnotationEntryGen
 	public void addElementNameValuePair(ElementValuePairGen evp)
 	{
 		if (evs == null)
-			evs = new ArrayList();
+			evs = new ArrayList<ElementValuePairGen>();
 		evs.add(evp);
 	}
 
@@ -162,7 +162,7 @@ public class AnnotationEntryGen
 	/**
 	 * Returns list of ElementNameValuePair objects
 	 */
-	public List getValues()
+	public List<ElementValuePairGen> getValues()
 	{
 		return evs;
 	}

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayInstruction.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayInstruction.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayInstruction.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayInstruction.java Fri Jul 22 04:34:27 2011
@@ -45,7 +45,7 @@ public abstract class ArrayInstruction e
     }
 
 
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return org.apache.bcel.ExceptionConstants.EXCS_ARRAY_EXCEPTION;
     }
 

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/CHECKCAST.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/CHECKCAST.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/CHECKCAST.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/CHECKCAST.java Fri Jul 22 04:34:27 2011
@@ -50,8 +50,8 @@ public class CHECKCAST extends CPInstruc
 
     /** @return exceptions this instruction may cause
      */
-    public Class[] getExceptions() {
-        Class[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length] = ExceptionConstants.CLASS_CAST_EXCEPTION;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ClassGen.java Fri Jul 22 04:34:27 2011
@@ -54,11 +54,11 @@ public class ClassGen extends AccessFlag
     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 List<Field> field_vec = new ArrayList<Field>();
+    private List<Method> method_vec = new ArrayList<Method>();
+    private List<Attribute> attribute_vec = new ArrayList<Attribute>();
+    private List<String> interface_vec = new ArrayList<String>();
+    private List<AnnotationEntryGen> annotation_vec = new ArrayList<AnnotationEntryGen>();
 	
     private static BCELComparator _cmp = new BCELComparator() {
 
@@ -166,7 +166,7 @@ public class ClassGen extends AccessFlag
 	 */
 	private AnnotationEntryGen[] unpackAnnotations(Attribute[] attrs)
 	{
-		List /* AnnotationGen */annotationGenObjs = new ArrayList();
+		List<AnnotationEntryGen> annotationGenObjs = new ArrayList<AnnotationEntryGen>();
 		for (int i = 0; i < attrs.length; i++)
 		{
 			Attribute attr = attrs[i];
@@ -194,8 +194,7 @@ public class ClassGen extends AccessFlag
 					}
 				}
 		}
-		return (AnnotationEntryGen[]) annotationGenObjs
-				.toArray(new AnnotationEntryGen[annotationGenObjs.size()]);
+		return annotationGenObjs.toArray(new AnnotationEntryGen[annotationGenObjs.size()]);
 	}
 
 
@@ -330,8 +329,8 @@ public class ClassGen extends AccessFlag
     /** @return field object with given name, or null
      */
     public Field containsField( String name ) {
-        for (Iterator e = field_vec.iterator(); e.hasNext();) {
-            Field f = (Field) e.next();
+        for (Iterator<Field> e = field_vec.iterator(); e.hasNext();) {
+            Field f = e.next();
             if (f.getName().equals(name)) {
                 return f;
             }
@@ -343,8 +342,8 @@ public class ClassGen extends AccessFlag
     /** @return method object with given name and signature, or null
      */
     public Method containsMethod( String name, String signature ) {
-        for (Iterator e = method_vec.iterator(); e.hasNext();) {
-            Method m = (Method) e.next();
+        for (Iterator<Method> e = method_vec.iterator(); e.hasNext();) {
+            Method m = e.next();
             if (m.getName().equals(name) && m.getSignature().equals(signature)) {
                 return m;
             }
@@ -440,7 +439,7 @@ public class ClassGen extends AccessFlag
 
 
     public Method[] getMethods() {
-        return (Method[]) method_vec.toArray(new Method[method_vec.size()]);
+        return method_vec.toArray(new Method[method_vec.size()]);
     }
 
 
@@ -458,7 +457,7 @@ public class ClassGen extends AccessFlag
 
 
     public Method getMethodAt( int pos ) {
-        return (Method) method_vec.get(pos);
+        return method_vec.get(pos);
     }
 
 
@@ -474,24 +473,24 @@ public class ClassGen extends AccessFlag
         int size = interface_vec.size();
         int[] interfaces = new int[size];
         for (int i = 0; i < size; i++) {
-            interfaces[i] = cp.addClass((String) interface_vec.get(i));
+            interfaces[i] = cp.addClass(interface_vec.get(i));
         }
         return interfaces;
     }
 
 
     public Field[] getFields() {
-        return (Field[]) field_vec.toArray(new Field[field_vec.size()]);
+        return field_vec.toArray(new Field[field_vec.size()]);
     }
 
 
     public Attribute[] getAttributes() {
-        return (Attribute[]) attribute_vec.toArray(new Attribute[attribute_vec.size()]);
+        return attribute_vec.toArray(new Attribute[attribute_vec.size()]);
     }
     
     //  J5TODO: Should we make calling unpackAnnotations() lazy and put it in here?
     public AnnotationEntryGen[] getAnnotationEntries() {
-    	return (AnnotationEntryGen[]) annotation_vec.toArray(new AnnotationEntryGen[annotation_vec.size()]);
+    	return annotation_vec.toArray(new AnnotationEntryGen[annotation_vec.size()]);
     }
 
 
@@ -528,14 +527,14 @@ public class ClassGen extends AccessFlag
         return class_name_index;
     }
 
-    private ArrayList observers;
+    private List<ClassObserver> observers;
 
 
     /** Add observer for this object.
      */
     public void addObserver( ClassObserver o ) {
         if (observers == null) {
-            observers = new ArrayList();
+            observers = new ArrayList<ClassObserver>();
         }
         observers.add(o);
     }
@@ -556,8 +555,8 @@ public class ClassGen extends AccessFlag
      */
     public void update() {
         if (observers != null) {
-            for (Iterator e = observers.iterator(); e.hasNext();) {
-                ((ClassObserver) e.next()).notify(this);
+            for (Iterator<ClassObserver> e = observers.iterator(); e.hasNext();) {
+                e.next().notify(this);
             }
         }
     }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ConstantPoolGen.java Fri Jul 22 04:34:27 2011
@@ -186,7 +186,7 @@ public class ConstantPoolGen implements 
         }
     }
 
-    private Map string_table = new HashMap();
+    private Map<String, Index> string_table = new HashMap<String, Index>();
 
 
     /** 
@@ -196,7 +196,7 @@ public class ConstantPoolGen implements 
      * @return index on success, -1 otherwise
      */
     public int lookupString( String str ) {
-        Index index = (Index) string_table.get(str);
+        Index index = string_table.get(str);
         return (index != null) ? index.index : -1;
     }
 
@@ -223,7 +223,7 @@ public class ConstantPoolGen implements 
         return ret;
     }
 
-    private Map class_table = new HashMap();
+    private Map<String, Index> class_table = new HashMap<String, Index>();
 
 
     /**
@@ -233,7 +233,7 @@ public class ConstantPoolGen implements 
      * @return index on success, -1 otherwise
      */
     public int lookupClass( String str ) {
-        Index index = (Index) class_table.get(str.replace('.', '/'));
+        Index index = class_table.get(str.replace('.', '/'));
         return (index != null) ? index.index : -1;
     }
 
@@ -362,7 +362,7 @@ public class ConstantPoolGen implements 
         return ret;
     }
 
-    private Map utf8_table = new HashMap();
+    private Map<String, Index> utf8_table = new HashMap<String, Index>();
 
 
     /** 
@@ -372,7 +372,7 @@ public class ConstantPoolGen implements 
      * @return index on success, -1 otherwise
      */
     public int lookupUtf8( String n ) {
-        Index index = (Index) utf8_table.get(n);
+        Index index = utf8_table.get(n);
         return (index != null) ? index.index : -1;
     }
 
@@ -474,7 +474,7 @@ public class ConstantPoolGen implements 
         return ret;
     }
 
-    private Map n_a_t_table = new HashMap();
+    private Map<String, Index> n_a_t_table = new HashMap<String, Index>();
 
 
     /** 
@@ -485,7 +485,7 @@ public class ConstantPoolGen implements 
      * @return index on success, -1 otherwise
      */
     public int lookupNameAndType( String name, String signature ) {
-        Index _index = (Index) n_a_t_table.get(name + NAT_DELIM + signature);
+        Index _index = n_a_t_table.get(name + NAT_DELIM + signature);
         return (_index != null) ? _index.index : -1;
     }
 
@@ -516,7 +516,7 @@ public class ConstantPoolGen implements 
         return ret;
     }
 
-    private Map cp_table = new HashMap();
+    private Map<String, Index> cp_table = new HashMap<String, Index>();
 
 
     /** 
@@ -528,7 +528,7 @@ public class ConstantPoolGen implements 
      * @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
+        Index index = cp_table.get(class_name + METHODREF_DELIM + method_name
                 + METHODREF_DELIM + signature);
         return (index != null) ? index.index : -1;
     }
@@ -580,7 +580,7 @@ public class ConstantPoolGen implements 
      * @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
+        Index index = cp_table.get(class_name + IMETHODREF_DELIM + method_name
                 + IMETHODREF_DELIM + signature);
         return (index != null) ? index.index : -1;
     }
@@ -633,7 +633,7 @@ public class ConstantPoolGen implements 
      * @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
+        Index index = cp_table.get(class_name + FIELDREF_DELIM + field_name
                 + FIELDREF_DELIM + signature);
         return (index != null) ? index.index : -1;
     }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ExceptionThrower.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ExceptionThrower.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ExceptionThrower.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/ExceptionThrower.java Fri Jul 22 04:34:27 2011
@@ -39,5 +39,5 @@ package org.apache.bcel.generic;
  */
 public interface ExceptionThrower {
 
-    public java.lang.Class[] getExceptions();
+    public java.lang.Class<?>[] getExceptions();
 }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGen.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGen.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGen.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGen.java Fri Jul 22 04:34:27 2011
@@ -261,14 +261,14 @@ public class FieldGen extends FieldGenOr
         return type.getSignature();
     }
 
-    private List observers;
+    private List<FieldObserver> observers;
 
 
     /** Add observer for this object.
      */
     public void addObserver( FieldObserver o ) {
         if (observers == null) {
-            observers = new ArrayList();
+            observers = new ArrayList<FieldObserver>();
         }
         observers.add(o);
     }
@@ -289,8 +289,8 @@ public class FieldGen extends FieldGenOr
      */
     public void update() {
         if (observers != null) {
-            for (Iterator e = observers.iterator(); e.hasNext();) {
-                ((FieldObserver) e.next()).notify(this);
+            for (Iterator<FieldObserver> e = observers.iterator(); e.hasNext();) {
+                e.next().notify(this);
             }
         }
     }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/FieldGenOrMethodGen.java Fri Jul 22 04:34:27 2011
@@ -36,8 +36,8 @@ public abstract class FieldGenOrMethodGe
     protected String name;
     protected Type type;
     protected ConstantPoolGen cp;
-    private List attribute_vec = new ArrayList();
-    protected ArrayList       annotation_vec= new ArrayList();
+    private List<Attribute> attribute_vec = new ArrayList<Attribute>();
+    protected List<AnnotationEntryGen>       annotation_vec= new ArrayList<AnnotationEntryGen>();
 
 
     protected FieldGenOrMethodGen() {

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java Fri Jul 22 04:34:27 2011
@@ -53,8 +53,8 @@ public class GETFIELD extends FieldInstr
     }
 
 
-    public Class[] getExceptions() {
-        Class[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 1] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java Fri Jul 22 04:34:27 2011
@@ -52,8 +52,8 @@ public class GETSTATIC extends FieldInst
     }
 
 
-    public Class[] getExceptions() {
-        Class[] cs = new Class[1 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[1 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IDIV.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IDIV.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IDIV.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IDIV.java Fri Jul 22 04:34:27 2011
@@ -38,7 +38,7 @@ public class IDIV extends ArithmeticInst
 
     /** @return exceptions this instruction may cause
      */
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return new Class[] {
             org.apache.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
         };

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INSTANCEOF.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INSTANCEOF.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INSTANCEOF.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INSTANCEOF.java Fri Jul 22 04:34:27 2011
@@ -43,7 +43,7 @@ public class INSTANCEOF extends CPInstru
     }
 
 
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return org.apache.bcel.ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION;
     }
 

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java Fri Jul 22 04:34:27 2011
@@ -100,8 +100,8 @@ public final class INVOKEINTERFACE exten
     }
 
 
-    public Class[] getExceptions() {
-        Class[] cs = new Class[4 + ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_INTERFACE_METHOD_RESOLUTION.length + 3] = ExceptionConstants.INCOMPATIBLE_CLASS_CHANGE_ERROR;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java Fri Jul 22 04:34:27 2011
@@ -47,8 +47,8 @@ public class INVOKESPECIAL extends Invok
     }
 
 
-    public Class[] getExceptions() {
-        Class[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 3] = ExceptionConstants.UNSATISFIED_LINK_ERROR;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java Fri Jul 22 04:34:27 2011
@@ -46,8 +46,8 @@ public class INVOKESTATIC extends Invoke
     }
 
 
-    public Class[] getExceptions() {
-        Class[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length] = ExceptionConstants.UNSATISFIED_LINK_ERROR;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java Fri Jul 22 04:34:27 2011
@@ -46,8 +46,8 @@ public class INVOKEVIRTUAL extends Invok
     }
 
 
-    public Class[] getExceptions() {
-        Class[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[4 + ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_FIELD_AND_METHOD_RESOLUTION.length + 3] = ExceptionConstants.UNSATISFIED_LINK_ERROR;

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IREM.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IREM.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IREM.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/IREM.java Fri Jul 22 04:34:27 2011
@@ -38,7 +38,7 @@ public class IREM extends ArithmeticInst
 
     /** @return exceptions this instruction may cause
      */
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return new Class[] {
             org.apache.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
         };

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java Fri Jul 22 04:34:27 2011
@@ -48,7 +48,7 @@ public class InstructionHandle implement
     InstructionHandle next, prev; // Will be set from the outside
     Instruction instruction;
     protected int i_position = -1; // byte code offset of instruction
-    private Set targeters;
+    private Set<InstructionTargeter> targeters;
     private Map attributes;
 
 

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java Fri Jul 22 04:34:27 2011
@@ -708,7 +708,7 @@ public class InstructionList implements 
         }
         first.prev = null; // Completely separated from rest of list
         last.next = null;
-        List target_vec = new ArrayList();
+        List<InstructionHandle> target_vec = new ArrayList<InstructionHandle>();
         for (InstructionHandle ih = first; ih != null; ih = ih.next) {
             ih.getInstruction().dispose(); // e.g. BranchInstructions release their targets
         }
@@ -964,7 +964,7 @@ public class InstructionList implements 
      */
     public Instruction[] getInstructions() {
         ByteSequence bytes = new ByteSequence(getByteCode());
-        List instructions = new ArrayList();
+        List<Instruction> instructions = new ArrayList<Instruction>();
         try {
             while (bytes.available() > 0) {
                 instructions.add(Instruction.readInstruction(bytes));
@@ -972,7 +972,7 @@ public class InstructionList implements 
         } catch (IOException e) {
             throw new ClassGenException(e.toString(), e);
         }
-        return (Instruction[]) instructions.toArray(new Instruction[instructions.size()]);
+        return instructions.toArray(new Instruction[instructions.size()]);
     }
 
 
@@ -997,13 +997,13 @@ public class InstructionList implements 
     /**
      * @return Enumeration that lists all instructions (handles)
      */
-    public Iterator iterator() {
-        return new Iterator() {
+    public Iterator<InstructionHandle> iterator() {
+        return new Iterator<InstructionHandle>() {
 
             private InstructionHandle ih = start;
 
 
-            public Object next() throws NoSuchElementException {
+            public InstructionHandle next() throws NoSuchElementException {
             	if (ih == null)
             		throw new NoSuchElementException();
                 InstructionHandle i = ih;
@@ -1054,7 +1054,7 @@ public class InstructionList implements 
      * @return complete, i.e., deep copy of this list
      */
     public InstructionList copy() {
-        Map map = new HashMap();
+        Map<InstructionHandle, InstructionHandle> map = new HashMap<InstructionHandle, InstructionHandle>();
         InstructionList il = new InstructionList();
         /* Pass 1: Make copies of all instructions, append them to the new list
          * and associate old instruction references with the new ones, i.e.,
@@ -1081,12 +1081,12 @@ public class InstructionList implements 
                 BranchInstruction bc = (BranchInstruction) c;
                 InstructionHandle itarget = bi.getTarget(); // old target
                 // New target is in hash map
-                bc.setTarget((InstructionHandle) map.get(itarget));
+                bc.setTarget(map.get(itarget));
                 if (bi instanceof Select) { // Either LOOKUPSWITCH or TABLESWITCH
                     InstructionHandle[] itargets = ((Select) bi).getTargets();
                     InstructionHandle[] ctargets = ((Select) bc).getTargets();
                     for (int j = 0; j < itargets.length; j++) { // Update all targets
-                        ctargets[j] = (InstructionHandle) map.get(itargets[j]);
+                        ctargets[j] = map.get(itargets[j]);
                     }
                 }
             }
@@ -1243,14 +1243,14 @@ public class InstructionList implements 
         }
     }
 
-    private List observers;
+    private List<InstructionListObserver> observers;
 
 
     /** Add observer for this object.
      */
     public void addObserver( InstructionListObserver o ) {
         if (observers == null) {
-            observers = new ArrayList();
+            observers = new ArrayList<InstructionListObserver>();
         }
         observers.add(o);
     }
@@ -1271,8 +1271,8 @@ public class InstructionList implements 
      */
     public void update() {
         if (observers != null) {
-            for (Iterator e = observers.iterator(); e.hasNext();) {
-                ((InstructionListObserver) e.next()).notify(this);
+            for (Iterator<InstructionListObserver> e = observers.iterator(); e.hasNext();) {
+                e.next().notify(this);
             }
         }
     }

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDC.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDC.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDC.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDC.java Fri Jul 22 04:34:27 2011
@@ -130,7 +130,7 @@ public class LDC extends CPInstruction i
     }
 
 
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return org.apache.bcel.ExceptionConstants.EXCS_STRING_RESOLUTION;
     }
 

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDIV.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDIV.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDIV.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LDIV.java Fri Jul 22 04:34:27 2011
@@ -35,7 +35,7 @@ public class LDIV extends ArithmeticInst
     }
 
 
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return new Class[] {
             org.apache.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
         };

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LREM.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LREM.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LREM.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/LREM.java Fri Jul 22 04:34:27 2011
@@ -34,7 +34,7 @@ public class LREM extends ArithmeticInst
     }
 
 
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return new Class[] {
             org.apache.bcel.ExceptionConstants.ARITHMETIC_EXCEPTION
         };

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITORENTER.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITORENTER.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITORENTER.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITORENTER.java Fri Jul 22 04:34:27 2011
@@ -34,7 +34,7 @@ public class MONITORENTER extends Instru
     }
 
 
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return new Class[] {
             org.apache.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
         };

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITOREXIT.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITOREXIT.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITOREXIT.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MONITOREXIT.java Fri Jul 22 04:34:27 2011
@@ -34,7 +34,7 @@ public class MONITOREXIT extends Instruc
     }
 
 
-    public Class[] getExceptions() {
+    public Class<?>[] getExceptions() {
         return new Class[] {
             org.apache.bcel.ExceptionConstants.NULL_POINTER_EXCEPTION
         };

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MULTIANEWARRAY.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MULTIANEWARRAY.java?rev=1149459&r1=1149458&r2=1149459&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MULTIANEWARRAY.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/generic/MULTIANEWARRAY.java Fri Jul 22 04:34:27 2011
@@ -110,8 +110,8 @@ public class MULTIANEWARRAY extends CPIn
     }
 
 
-    public Class[] getExceptions() {
-        Class[] cs = new Class[2 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
+    public Class<?>[] getExceptions() {
+        Class<?>[] cs = new Class[2 + ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length];
         System.arraycopy(ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION, 0, cs, 0,
                 ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length);
         cs[ExceptionConstants.EXCS_CLASS_AND_INTERFACE_RESOLUTION.length + 1] = ExceptionConstants.NEGATIVE_ARRAY_SIZE_EXCEPTION;



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org


Mime
View raw message