61 import com.sun.org.apache.bcel.internal.Constants;
62 import com.sun.org.apache.bcel.internal.util.SyntheticRepository;
63 import com.sun.org.apache.bcel.internal.util.ClassVector;
64 import com.sun.org.apache.bcel.internal.util.ClassQueue;
65 import com.sun.org.apache.bcel.internal.generic.Type;
66 import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
67
68 import java.io.*;
69 import java.util.StringTokenizer;
70
71 /**
72 * Represents a Java class, i.e., the data structures, constant pool,
73 * fields, methods and commands contained in a Java .class file.
74 * See <a href="ftp://java.sun.com/docs/specs/">JVM
75 * specification</a> for details.
76
77 * The intent of this class is to represent a parsed or otherwise existing
78 * class file. Those interested in programatically generating classes
79 * should see the <a href="../generic/ClassGen.html">ClassGen</a> class.
80
81 * @version $Id: JavaClass.java,v 1.4 2007-07-19 04:34:42 ofung Exp $
82 * @see com.sun.org.apache.bcel.internal.generic.ClassGen
83 * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
84 */
85 public class JavaClass extends AccessFlags implements Cloneable, Node {
86 private String file_name;
87 private String package_name;
88 private String source_file_name = "<Unknown>";
89 private int class_name_index;
90 private int superclass_name_index;
91 private String class_name;
92 private String superclass_name;
93 private int major, minor; // Compiler version
94 private ConstantPool constant_pool; // Constant pool
95 private int[] interfaces; // implemented interfaces
96 private String[] interface_names;
97 private Field[] fields; // Fields, i.e., variables of class
98 private Method[] methods; // methods defined in the class
99 private Attribute[] attributes; // attributes defined in the class
100 private byte source = HEAP; // Generated in memory
101
|
61 import com.sun.org.apache.bcel.internal.Constants;
62 import com.sun.org.apache.bcel.internal.util.SyntheticRepository;
63 import com.sun.org.apache.bcel.internal.util.ClassVector;
64 import com.sun.org.apache.bcel.internal.util.ClassQueue;
65 import com.sun.org.apache.bcel.internal.generic.Type;
66 import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
67
68 import java.io.*;
69 import java.util.StringTokenizer;
70
71 /**
72 * Represents a Java class, i.e., the data structures, constant pool,
73 * fields, methods and commands contained in a Java .class file.
74 * See <a href="ftp://java.sun.com/docs/specs/">JVM
75 * specification</a> for details.
76
77 * The intent of this class is to represent a parsed or otherwise existing
78 * class file. Those interested in programatically generating classes
79 * should see the <a href="../generic/ClassGen.html">ClassGen</a> class.
80
81 * @see com.sun.org.apache.bcel.internal.generic.ClassGen
82 * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
83 */
84 public class JavaClass extends AccessFlags implements Cloneable, Node {
85 private String file_name;
86 private String package_name;
87 private String source_file_name = "<Unknown>";
88 private int class_name_index;
89 private int superclass_name_index;
90 private String class_name;
91 private String superclass_name;
92 private int major, minor; // Compiler version
93 private ConstantPool constant_pool; // Constant pool
94 private int[] interfaces; // implemented interfaces
95 private String[] interface_names;
96 private Field[] fields; // Fields, i.e., variables of class
97 private Method[] methods; // methods defined in the class
98 private Attribute[] attributes; // attributes defined in the class
99 private byte source = HEAP; // Generated in memory
100
|