src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java
changeset 50735 2f2af62dfac7
parent 48826 c4d9d1b08e2e
equal deleted inserted replaced
50734:0828a0f6676b 50735:2f2af62dfac7
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   527             out.writeShort(entry.signature_index);
   527             out.writeShort(entry.signature_index);
   528             out.writeShort(entry.index);
   528             out.writeShort(entry.index);
   529         }
   529         }
   530 
   530 
   531         @Override
   531         @Override
       
   532         public Void visitNestHost(NestHost_attribute attr, ClassOutputStream out) {
       
   533             out.writeShort(attr.top_index);
       
   534             return null;
       
   535         }
       
   536 
       
   537         @Override
   532         public Void visitMethodParameters(MethodParameters_attribute attr, ClassOutputStream out) {
   538         public Void visitMethodParameters(MethodParameters_attribute attr, ClassOutputStream out) {
   533             out.writeByte(attr.method_parameter_table.length);
   539             out.writeByte(attr.method_parameter_table.length);
   534             for (MethodParameters_attribute.Entry e : attr.method_parameter_table) {
   540             for (MethodParameters_attribute.Entry e : attr.method_parameter_table) {
   535                 out.writeShort(e.name_index);
   541                 out.writeShort(e.name_index);
   536                 out.writeShort(e.flags);
   542                 out.writeShort(e.flags);
   621         }
   627         }
   622 
   628 
   623         @Override
   629         @Override
   624         public Void visitModuleTarget(ModuleTarget_attribute attr, ClassOutputStream out) {
   630         public Void visitModuleTarget(ModuleTarget_attribute attr, ClassOutputStream out) {
   625             out.writeShort(attr.target_platform_index);
   631             out.writeShort(attr.target_platform_index);
       
   632             return null;
       
   633         }
       
   634 
       
   635         @Override
       
   636         public Void visitNestMembers(NestMembers_attribute attr, ClassOutputStream out) {
       
   637             out.writeShort(attr.members_indexes.length);
       
   638             for (int i : attr.members_indexes) {
       
   639                 out.writeShort(i);
       
   640             }
   626             return null;
   641             return null;
   627         }
   642         }
   628 
   643 
   629         @Override
   644         @Override
   630         public Void visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, ClassOutputStream out) {
   645         public Void visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, ClassOutputStream out) {