1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.bcel.util;
18
19 import java.util.ArrayList;
20 import java.util.List;
21 import org.apache.bcel.classfile.JavaClass;
22
23 /***
24 * Utility class implementing a (typesafe) collection of JavaClass
25 * objects. Contains the most important methods of a Vector.
26 *
27 * @version $Id: ClassVector.java 386056 2006-03-15 11:31:56Z tcurdt $
28 * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
29 *
30 * @deprecated as of 5.1.1 - 7/17/2005
31 */
32 public class ClassVector implements java.io.Serializable {
33
34 protected List vec = new ArrayList();
35
36
37 public void addElement( JavaClass clazz ) {
38 vec.add(clazz);
39 }
40
41
42 public JavaClass elementAt( int index ) {
43 return (JavaClass) vec.get(index);
44 }
45
46
47 public void removeElementAt( int index ) {
48 vec.remove(index);
49 }
50
51
52 public JavaClass[] toArray() {
53 JavaClass[] classes = new JavaClass[vec.size()];
54 vec.toArray(classes);
55 return classes;
56 }
57 }