equal
deleted
inserted
replaced
173 } |
173 } |
174 |
174 |
175 |
175 |
176 /* print field attribute information. */ |
176 /* print field attribute information. */ |
177 public void printFieldAttributes(FieldData field){ |
177 public void printFieldAttributes(FieldData field){ |
178 Vector fieldattrs = field.getAttributes(); |
178 Vector<?> fieldattrs = field.getAttributes(); |
179 for(int j = 0; j < fieldattrs.size(); j++){ |
179 for(int j = 0; j < fieldattrs.size(); j++){ |
180 String fieldattrname = ((AttrData)fieldattrs.elementAt(j)).getAttrName(); |
180 String fieldattrname = ((AttrData)fieldattrs.elementAt(j)).getAttrName(); |
181 if(fieldattrname.equals("ConstantValue")){ |
181 if(fieldattrname.equals("ConstantValue")){ |
182 printConstantValue(field); |
182 printConstantValue(field); |
183 }else if (fieldattrname.equals("Deprecated")){ |
183 }else if (fieldattrname.equals("Deprecated")){ |
254 |
254 |
255 /** |
255 /** |
256 * print method attribute information. |
256 * print method attribute information. |
257 */ |
257 */ |
258 public void printMethodAttributes(MethodData method){ |
258 public void printMethodAttributes(MethodData method){ |
259 Vector methodattrs = method.getAttributes(); |
259 Vector<?> methodattrs = method.getAttributes(); |
260 Vector codeattrs = method.getCodeAttributes(); |
260 Vector<?> codeattrs = method.getCodeAttributes(); |
261 for(int k = 0; k < methodattrs.size(); k++){ |
261 for(int k = 0; k < methodattrs.size(); k++){ |
262 String methodattrname = ((AttrData)methodattrs.elementAt(k)).getAttrName(); |
262 String methodattrname = ((AttrData)methodattrs.elementAt(k)).getAttrName(); |
263 if(methodattrname.equals("Code")){ |
263 if(methodattrname.equals("Code")){ |
264 printcodeSequence(method); |
264 printcodeSequence(method); |
265 printExceptionTable(method); |
265 printExceptionTable(method); |
517 |
517 |
518 /** |
518 /** |
519 * Print the exception table for this method code |
519 * Print the exception table for this method code |
520 */ |
520 */ |
521 void printExceptionTable(MethodData method){//throws IOException |
521 void printExceptionTable(MethodData method){//throws IOException |
522 Vector exception_table = method.getexception_table(); |
522 Vector<?> exception_table = method.getexception_table(); |
523 if (exception_table.size() > 0) { |
523 if (exception_table.size() > 0) { |
524 out.println(" Exception table:"); |
524 out.println(" Exception table:"); |
525 out.println(" from to target type"); |
525 out.println(" from to target type"); |
526 for (int idx = 0; idx < exception_table.size(); ++idx) { |
526 for (int idx = 0; idx < exception_table.size(); ++idx) { |
527 TrapData handler = (TrapData)exception_table.elementAt(idx); |
527 TrapData handler = (TrapData)exception_table.elementAt(idx); |
544 /** |
544 /** |
545 * Print LineNumberTable attribute information. |
545 * Print LineNumberTable attribute information. |
546 */ |
546 */ |
547 public void printLineNumTable(MethodData method) { |
547 public void printLineNumTable(MethodData method) { |
548 int numlines = method.getnumlines(); |
548 int numlines = method.getnumlines(); |
549 Vector lin_num_tb = method.getlin_num_tb(); |
549 Vector<?> lin_num_tb = method.getlin_num_tb(); |
550 if( lin_num_tb.size() > 0){ |
550 if( lin_num_tb.size() > 0){ |
551 out.println(" LineNumberTable: "); |
551 out.println(" LineNumberTable: "); |
552 for (int i=0; i<numlines; i++) { |
552 for (int i=0; i<numlines; i++) { |
553 LineNumData linnumtb_entry=(LineNumData)lin_num_tb.elementAt(i); |
553 LineNumData linnumtb_entry=(LineNumData)lin_num_tb.elementAt(i); |
554 out.println(" line " + linnumtb_entry.line_number + ": " |
554 out.println(" line " + linnumtb_entry.line_number + ": " |
566 if(siz > 0){ |
566 if(siz > 0){ |
567 out.println(" LocalVariableTable: "); |
567 out.println(" LocalVariableTable: "); |
568 out.print(" "); |
568 out.print(" "); |
569 out.println("Start Length Slot Name Signature"); |
569 out.println("Start Length Slot Name Signature"); |
570 } |
570 } |
571 Vector loc_var_tb = method.getloc_var_tb(); |
571 Vector<?> loc_var_tb = method.getloc_var_tb(); |
572 |
572 |
573 for (int i=0; i<siz; i++) { |
573 for (int i=0; i<siz; i++) { |
574 LocVarData entry=(LocVarData)loc_var_tb.elementAt(i); |
574 LocVarData entry=(LocVarData)loc_var_tb.elementAt(i); |
575 |
575 |
576 out.println(" "+entry.start_pc+" "+entry.length+" "+ |
576 out.println(" "+entry.start_pc+" "+entry.length+" "+ |