< prev index next >

src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java

Print this page

 457             out.writeShort(attr.method_index);
 458             return null;
 459         }
 460 
 461         @Override
 462         public Void visitExceptions(Exceptions_attribute attr, ClassOutputStream out) {
 463             out.writeShort(attr.exception_index_table.length);
 464             for (int i: attr.exception_index_table)
 465                 out.writeShort(i);
 466             return null;
 467         }
 468 
 469         @Override
 470         public Void visitInnerClasses(InnerClasses_attribute attr, ClassOutputStream out) {
 471             out.writeShort(attr.classes.length);
 472             for (InnerClasses_attribute.Info info: attr.classes)
 473                 writeInnerClassesInfo(info, out);
 474             return null;
 475         }
 476 






 477         protected void writeInnerClassesInfo(InnerClasses_attribute.Info info, ClassOutputStream out) {
 478             out.writeShort(info.inner_class_info_index);
 479             out.writeShort(info.outer_class_info_index);
 480             out.writeShort(info.inner_name_index);
 481             writeAccessFlags(info.inner_class_access_flags, out);
 482         }
 483 
 484         @Override
 485         public Void visitLineNumberTable(LineNumberTable_attribute attr, ClassOutputStream out) {
 486             out.writeShort(attr.line_number_table.length);
 487             for (LineNumberTable_attribute.Entry e: attr.line_number_table)
 488                 writeLineNumberTableEntry(e, out);
 489             return null;
 490         }
 491 
 492         protected void writeLineNumberTableEntry(LineNumberTable_attribute.Entry entry, ClassOutputStream out) {
 493             out.writeShort(entry.start_pc);
 494             out.writeShort(entry.line_number);
 495         }
 496 

 457             out.writeShort(attr.method_index);
 458             return null;
 459         }
 460 
 461         @Override
 462         public Void visitExceptions(Exceptions_attribute attr, ClassOutputStream out) {
 463             out.writeShort(attr.exception_index_table.length);
 464             for (int i: attr.exception_index_table)
 465                 out.writeShort(i);
 466             return null;
 467         }
 468 
 469         @Override
 470         public Void visitInnerClasses(InnerClasses_attribute attr, ClassOutputStream out) {
 471             out.writeShort(attr.classes.length);
 472             for (InnerClasses_attribute.Info info: attr.classes)
 473                 writeInnerClassesInfo(info, out);
 474             return null;
 475         }
 476 
 477         @Override
 478         public Void visitJavaFlags(JavaFlags_attribute attr, ClassOutputStream out) {
 479             out.writeShort(attr.extendedFlags);
 480             return null;
 481         }
 482 
 483         protected void writeInnerClassesInfo(InnerClasses_attribute.Info info, ClassOutputStream out) {
 484             out.writeShort(info.inner_class_info_index);
 485             out.writeShort(info.outer_class_info_index);
 486             out.writeShort(info.inner_name_index);
 487             writeAccessFlags(info.inner_class_access_flags, out);
 488         }
 489 
 490         @Override
 491         public Void visitLineNumberTable(LineNumberTable_attribute attr, ClassOutputStream out) {
 492             out.writeShort(attr.line_number_table.length);
 493             for (LineNumberTable_attribute.Entry e: attr.line_number_table)
 494                 writeLineNumberTableEntry(e, out);
 495             return null;
 496         }
 497 
 498         protected void writeLineNumberTableEntry(LineNumberTable_attribute.Entry entry, ClassOutputStream out) {
 499             out.writeShort(entry.start_pc);
 500             out.writeShort(entry.line_number);
 501         }
 502 
< prev index next >