public void visitUnknownAttribute(Clazz clazz, UnknownAttribute unknownAttribute) { // Write the unknown information. dataOutput.write(unknownAttribute.info); }
public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant) { byte[] bytes = utf8Constant.getBytes(); dataOutput.writeShort(bytes.length); dataOutput.write(bytes); }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Write the stack size and local variable frame size. dataOutput.writeShort(codeAttribute.u2maxStack); dataOutput.writeShort(codeAttribute.u2maxLocals); // Write the byte code. dataOutput.writeInt(codeAttribute.u4codeLength); dataOutput.write(codeAttribute.code, 0, codeAttribute.u4codeLength); // Write the exceptions. dataOutput.writeShort(codeAttribute.u2exceptionTableLength); codeAttribute.exceptionsAccept(clazz, method, this); // Write the code attributes. dataOutput.writeShort(codeAttribute.u2attributesCount); codeAttribute.attributesAccept(clazz, method, ProgramClassWriter.this); }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Write the stack size and local variable frame size. dataOutput.writeUnsignedShort(codeAttribute.u2maxStack); dataOutput.writeUnsignedShort(codeAttribute.u2maxLocals); // Write the byte code. dataOutput.writeInt(codeAttribute.u4codeLength); dataOutput.write(codeAttribute.code, 0, codeAttribute.u4codeLength); // Write the exceptions. dataOutput.writeUnsignedShort(codeAttribute.u2exceptionTableLength); codeAttribute.exceptionsAccept(clazz, method, this); // Write the code attributes. dataOutput.writeUnsignedShort(codeAttribute.u2attributesCount); codeAttribute.attributesAccept(clazz, method, ProgramClassWriter.this); }
public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant) { byte[] bytes = utf8Constant.getBytes(); dataOutput.writeUnsignedShort(bytes.length); dataOutput.write(bytes); }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Write the stack size and local variable frame size. dataOutput.writeUnsignedShort(codeAttribute.u2maxStack); dataOutput.writeUnsignedShort(codeAttribute.u2maxLocals); // Write the byte code. dataOutput.writeInt(codeAttribute.u4codeLength); dataOutput.write(codeAttribute.code, 0, codeAttribute.u4codeLength); // Write the exceptions. dataOutput.writeUnsignedShort(codeAttribute.u2exceptionTableLength); codeAttribute.exceptionsAccept(clazz, method, this); // Write the code attributes. dataOutput.writeUnsignedShort(codeAttribute.u2attributesCount); codeAttribute.attributesAccept(clazz, method, ProgramClassWriter.this); }
public void visitAnyAttribute(Clazz clazz, Attribute attribute) { // Write the attribute name index. dataOutput.writeShort(attribute.u2attributeNameIndex); // We'll write the attribute body into an array first, so we can // automatically figure out its length. ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); // Temporarily replace the current data output. RuntimeDataOutput oldDataOutput = dataOutput; dataOutput = new RuntimeDataOutput(new DataOutputStream(byteArrayOutputStream)); // Write the attribute body into the array. Note that the // accept method with two dummy null arguments never throws // an UnsupportedOperationException. attribute.accept(clazz, null, null, attributeBodyWriter); // Restore the original data output. dataOutput = oldDataOutput; // Write the attribute length and body. byte[] info = byteArrayOutputStream.toByteArray(); dataOutput.writeInt(info.length); dataOutput.write(info); }
public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant) { byte[] bytes = utf8Constant.getBytes(); dataOutput.writeUnsignedShort(bytes.length); dataOutput.write(bytes); }
public void visitUnknownAttribute(Clazz clazz, UnknownAttribute unknownAttribute) { // Write the unknown information. dataOutput.write(unknownAttribute.info); }
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute) { // Write the stack size and local variable frame size. dataOutput.writeUnsignedShort(codeAttribute.u2maxStack); dataOutput.writeUnsignedShort(codeAttribute.u2maxLocals); // Write the byte code. dataOutput.writeInt(codeAttribute.u4codeLength); dataOutput.write(codeAttribute.code, 0, codeAttribute.u4codeLength); // Write the exceptions. dataOutput.writeUnsignedShort(codeAttribute.u2exceptionTableLength); codeAttribute.exceptionsAccept(clazz, method, this); // Write the code attributes. dataOutput.writeUnsignedShort(codeAttribute.u2attributesCount); codeAttribute.attributesAccept(clazz, method, ProgramClassWriter.this); }
public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant) { byte[] bytes = utf8Constant.getBytes(); dataOutput.writeUnsignedShort(bytes.length); dataOutput.write(bytes); }
public void visitUnknownAttribute(Clazz clazz, UnknownAttribute unknownAttribute) { // Write the unknown information. dataOutput.write(unknownAttribute.info); }
public void visitAnyAttribute(Clazz clazz, Attribute attribute) { // Write the attribute name index. dataOutput.writeUnsignedShort(attribute.u2attributeNameIndex); // We'll write the attribute body into an array first, so we can // automatically figure out its length. ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); // Temporarily replace the current data output. RuntimeDataOutput oldDataOutput = dataOutput; dataOutput = new RuntimeDataOutput(new DataOutputStream(byteArrayOutputStream)); // Write the attribute body into the array. Note that the // accept method with two dummy null arguments never throws // an UnsupportedOperationException. attribute.accept(clazz, null, null, attributeBodyWriter); // Restore the original data output. dataOutput = oldDataOutput; // Write the attribute length and body. byte[] info = byteArrayOutputStream.toByteArray(); dataOutput.writeInt(info.length); dataOutput.write(info); }
public void visitUnknownAttribute(Clazz clazz, UnknownAttribute unknownAttribute) { // Write the unknown information. dataOutput.write(unknownAttribute.info); }
public void visitAnyAttribute(Clazz clazz, Attribute attribute) { // Write the attribute name index. dataOutput.writeUnsignedShort(attribute.u2attributeNameIndex); // We'll write the attribute body into an array first, so we can // automatically figure out its length. ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); // Temporarily replace the current data output. RuntimeDataOutput oldDataOutput = dataOutput; dataOutput = new RuntimeDataOutput(new DataOutputStream(byteArrayOutputStream)); // Write the attribute body into the array. Note that the // accept method with two dummy null arguments never throws // an UnsupportedOperationException. attribute.accept(clazz, null, null, attributeBodyWriter); // Restore the original data output. dataOutput = oldDataOutput; // Write the attribute length and body. byte[] info = byteArrayOutputStream.toByteArray(); dataOutput.writeInt(info.length); dataOutput.write(info); }
public void visitAnyAttribute(Clazz clazz, Attribute attribute) { // Write the attribute name index. dataOutput.writeUnsignedShort(attribute.u2attributeNameIndex); // We'll write the attribute body into an array first, so we can // automatically figure out its length. ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); // Temporarily replace the current data output. RuntimeDataOutput oldDataOutput = dataOutput; dataOutput = new RuntimeDataOutput(new DataOutputStream(byteArrayOutputStream)); // Write the attribute body into the array. Note that the // accept method with two dummy null arguments never throws // an UnsupportedOperationException. attribute.accept(clazz, null, null, attributeBodyWriter); // Restore the original data output. dataOutput = oldDataOutput; // Write the attribute length and body. byte[] info = byteArrayOutputStream.toByteArray(); dataOutput.writeInt(info.length); dataOutput.write(info); }