equal
deleted
inserted
replaced
41 int access; |
41 int access; |
42 int name_index; |
42 int name_index; |
43 int descriptor_index; |
43 int descriptor_index; |
44 int attributes_count; |
44 int attributes_count; |
45 byte[] code; |
45 byte[] code; |
46 Vector exception_table = new Vector(0); |
46 Vector<TrapData> exception_table = new Vector<TrapData>(0); |
47 Vector lin_num_tb = new Vector(0); |
47 Vector<LineNumData> lin_num_tb = new Vector<LineNumData>(0); |
48 Vector loc_var_tb = new Vector(0); |
48 Vector<LocVarData> loc_var_tb = new Vector<LocVarData>(0); |
49 StackMapTableData[] stackMapTable; |
49 StackMapTableData[] stackMapTable; |
50 StackMapData[] stackMap; |
50 StackMapData[] stackMap; |
51 int[] exc_index_table=null; |
51 int[] exc_index_table=null; |
52 Vector attrs=new Vector(0); |
52 Vector<AttrData> attrs=new Vector<AttrData>(0); |
53 Vector code_attrs=new Vector(0); |
53 Vector<AttrData> code_attrs=new Vector<AttrData>(0); |
54 int max_stack, max_locals; |
54 int max_stack, max_locals; |
55 boolean isSynthetic=false; |
55 boolean isSynthetic=false; |
56 boolean isDeprecated=false; |
56 boolean isDeprecated=false; |
57 |
57 |
58 public MethodData(ClassData cls){ |
58 public MethodData(ClassData cls){ |
163 /** |
163 /** |
164 * Read exception table info. |
164 * Read exception table info. |
165 */ |
165 */ |
166 void readExceptionTable (DataInputStream in) throws IOException { |
166 void readExceptionTable (DataInputStream in) throws IOException { |
167 int exception_table_len=in.readUnsignedShort(); |
167 int exception_table_len=in.readUnsignedShort(); |
168 exception_table=new Vector(exception_table_len); |
168 exception_table=new Vector<TrapData>(exception_table_len); |
169 for (int l = 0; l < exception_table_len; l++) { |
169 for (int l = 0; l < exception_table_len; l++) { |
170 exception_table.addElement(new TrapData(in, l)); |
170 exception_table.addElement(new TrapData(in, l)); |
171 } |
171 } |
172 } |
172 } |
173 |
173 |
175 * Read LineNumberTable attribute info. |
175 * Read LineNumberTable attribute info. |
176 */ |
176 */ |
177 void readLineNumTable (DataInputStream in) throws IOException { |
177 void readLineNumTable (DataInputStream in) throws IOException { |
178 int attr_len = in.readInt(); // attr_length |
178 int attr_len = in.readInt(); // attr_length |
179 int lin_num_tb_len = in.readUnsignedShort(); |
179 int lin_num_tb_len = in.readUnsignedShort(); |
180 lin_num_tb=new Vector(lin_num_tb_len); |
180 lin_num_tb=new Vector<LineNumData>(lin_num_tb_len); |
181 for (int l = 0; l < lin_num_tb_len; l++) { |
181 for (int l = 0; l < lin_num_tb_len; l++) { |
182 lin_num_tb.addElement(new LineNumData(in)); |
182 lin_num_tb.addElement(new LineNumData(in)); |
183 } |
183 } |
184 } |
184 } |
185 |
185 |
187 * Read LocalVariableTable attribute info. |
187 * Read LocalVariableTable attribute info. |
188 */ |
188 */ |
189 void readLocVarTable (DataInputStream in) throws IOException { |
189 void readLocVarTable (DataInputStream in) throws IOException { |
190 int attr_len=in.readInt(); // attr_length |
190 int attr_len=in.readInt(); // attr_length |
191 int loc_var_tb_len = in.readUnsignedShort(); |
191 int loc_var_tb_len = in.readUnsignedShort(); |
192 loc_var_tb = new Vector(loc_var_tb_len); |
192 loc_var_tb = new Vector<LocVarData>(loc_var_tb_len); |
193 for (int l = 0; l < loc_var_tb_len; l++) { |
193 for (int l = 0; l < loc_var_tb_len; l++) { |
194 loc_var_tb.addElement(new LocVarData(in)); |
194 loc_var_tb.addElement(new LocVarData(in)); |
195 } |
195 } |
196 } |
196 } |
197 |
197 |
235 /** |
235 /** |
236 * Return access of the method. |
236 * Return access of the method. |
237 */ |
237 */ |
238 public String[] getAccess(){ |
238 public String[] getAccess(){ |
239 |
239 |
240 Vector v = new Vector(); |
240 Vector<String> v = new Vector<String>(); |
241 if ((access & ACC_PUBLIC) !=0) v.addElement("public"); |
241 if ((access & ACC_PUBLIC) !=0) v.addElement("public"); |
242 if ((access & ACC_PRIVATE) !=0) v.addElement("private"); |
242 if ((access & ACC_PRIVATE) !=0) v.addElement("private"); |
243 if ((access & ACC_PROTECTED) !=0) v.addElement("protected"); |
243 if ((access & ACC_PROTECTED) !=0) v.addElement("protected"); |
244 if ((access & ACC_STATIC) !=0) v.addElement("static"); |
244 if ((access & ACC_STATIC) !=0) v.addElement("static"); |
245 if ((access & ACC_FINAL) !=0) v.addElement("final"); |
245 if ((access & ACC_FINAL) !=0) v.addElement("final"); |