< prev index next >

src/java.xml/share/classes/com/sun/org/apache/bcel/internal/classfile/BootstrapMethods.java

Print this page




 121      * @throws IOException
 122      */
 123     @Override
 124     public final void dump(final DataOutputStream file) throws IOException {
 125         super.dump(file);
 126 
 127         file.writeShort(bootstrap_methods.length);
 128         for (final BootstrapMethod bootstrap_method : bootstrap_methods) {
 129             bootstrap_method.dump(file);
 130         }
 131     }
 132 
 133     /**
 134      * @return String representation.
 135      */
 136     @Override
 137     public final String toString() {
 138         final StringBuilder buf = new StringBuilder();
 139         buf.append("BootstrapMethods(");
 140         buf.append(bootstrap_methods.length);
 141         buf.append("):\n");
 142         for (int i = 0; i < bootstrap_methods.length; i++) {


 143             buf.append("  ").append(i).append(": ");
 144             buf.append(bootstrap_methods[i].toString(super.getConstantPool())).append("\n");





 145         }
 146         return buf.toString();
 147     }
 148 }


 121      * @throws IOException
 122      */
 123     @Override
 124     public final void dump(final DataOutputStream file) throws IOException {
 125         super.dump(file);
 126 
 127         file.writeShort(bootstrap_methods.length);
 128         for (final BootstrapMethod bootstrap_method : bootstrap_methods) {
 129             bootstrap_method.dump(file);
 130         }
 131     }
 132 
 133     /**
 134      * @return String representation.
 135      */
 136     @Override
 137     public final String toString() {
 138         final StringBuilder buf = new StringBuilder();
 139         buf.append("BootstrapMethods(");
 140         buf.append(bootstrap_methods.length);
 141         buf.append("):");
 142         for (int i = 0; i < bootstrap_methods.length; i++) {
 143             buf.append("\n");
 144             final int start = buf.length();
 145             buf.append("  ").append(i).append(": ");
 146             final int indent_count = buf.length() - start;
 147             final String[] lines = (bootstrap_methods[i].toString(super.getConstantPool())).split("\\r?\\n");
 148             buf.append(lines[0]);
 149             for (int j = 1; j < lines.length; j++) {
 150                 buf.append("\n").append("          ".substring(0,indent_count)).append(lines[j]);
 151             }
 152         }
 153         return buf.toString();
 154     }
 155 }
< prev index next >