1 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 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 } 58 | Popular Tags |