/** * Helper for {@link #encodeOutput}, which writes out the given * size value, annotating it as well (if annotations are enabled). * * @param file {@code non-null;} file this instance is part of * @param out {@code non-null;} where to write to * @param label {@code non-null;} the label for the purposes of annotation * @param size {@code >= 0;} the size to write */ private static void encodeSize(DexFile file, AnnotatedOutput out, String label, int size) { if (out.annotates()) { out.annotate(String.format(" %-21s %08x", label + "_size:", size)); } out.writeUleb128(size); }
/** * Helper for {@link #encodeOutput}, which writes out the given * size value, annotating it as well (if annotations are enabled). * * @param file {@code non-null;} file this instance is part of * @param out {@code non-null;} where to write to * @param label {@code non-null;} the label for the purposes of annotation * @param size {@code >= 0;} the size to write */ private static void encodeSize(DexFile file, AnnotatedOutput out, String label, int size) { if (out.annotates()) { out.annotate(String.format(" %-21s %08x", label + "_size:", size)); } out.writeUleb128(size); }
/** * Helper for {@link #encodeOutput}, which writes out the given * size value, annotating it as well (if annotations are enabled). * * @param file {@code non-null;} file this instance is part of * @param out {@code non-null;} where to write to * @param label {@code non-null;} the label for the purposes of annotation * @param size {@code >= 0;} the size to write */ private static void encodeSize(DexFile file, AnnotatedOutput out, String label, int size) { if (out.annotates()) { out.annotate(String.format(" %-21s %08x", label + "_size:", size)); } out.writeUleb128(size); }
/** * Helper for {@link #encodeOutput}, which writes out the given * size value, annotating it as well (if annotations are enabled). * * @param file {@code non-null;} file this instance is part of * @param out {@code non-null;} where to write to * @param label {@code non-null;} the label for the purposes of annotation * @param size {@code >= 0;} the size to write */ private static void encodeSize(DexFile file, AnnotatedOutput out, String label, int size) { if (out.annotates()) { out.annotate(String.format(" %-21s %08x", label + "_size:", size)); } out.writeUleb128(size); }
/** * Helper for {@link #encodeOutput}, which writes out the given * size value, annotating it as well (if annotations are enabled). * * @param file {@code non-null;} file this instance is part of * @param out {@code non-null;} where to write to * @param label {@code non-null;} the label for the purposes of annotation * @param size {@code >= 0;} the size to write */ private static void encodeSize(DexFile file, AnnotatedOutput out, String label, int size) { if (out.annotates()) { out.annotate(String.format(" %-21s %08x", label + "_size:", size)); } out.writeUleb128(size); }
/** * Helper for {@link #encodeOutput}, which writes out the given * size value, annotating it as well (if annotations are enabled). * * @param file {@code non-null;} file this instance is part of * @param out {@code non-null;} where to write to * @param label {@code non-null;} the label for the purposes of annotation * @param size {@code >= 0;} the size to write */ private static void encodeSize(DexFile file, AnnotatedOutput out, String label, int size) { if (out.annotates()) { out.annotate(String.format(" %-21s %08x", label + "_size:", size)); } out.writeUleb128(size); }
/** * Helper for {@link #encodeOutput}, which writes out the given * size value, annotating it as well (if annotations are enabled). * * @param file {@code non-null;} file this instance is part of * @param out {@code non-null;} where to write to * @param label {@code non-null;} the label for the purposes of annotation * @param size {@code >= 0;} the size to write */ private static void encodeSize(DexFile file, AnnotatedOutput out, String label, int size) { if (out.annotates()) { out.annotate(String.format(" %-21s %08x", label + "_size:", size)); } out.writeUleb128(size); }
/** {@inheritDoc} */ @Override public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int fieldIdx = file.getFieldIds().indexOf(field); int diff = fieldIdx - lastIndex; int accessFlags = getAccessFlags(); if (out.annotates()) { out.annotate(0, String.format(" [%x] %s", dumpSeq, field.toHuman())); out.annotate(Leb128.unsignedLeb128Size(diff), " field_idx: " + Hex.u4(fieldIdx)); out.annotate(Leb128.unsignedLeb128Size(accessFlags), " access_flags: " + AccessFlags.fieldString(accessFlags)); } out.writeUleb128(diff); out.writeUleb128(accessFlags); return fieldIdx; } }
/** {@inheritDoc} */ @Override public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int fieldIdx = file.getFieldIds().indexOf(field); int diff = fieldIdx - lastIndex; int accessFlags = getAccessFlags(); if (out.annotates()) { out.annotate(0, String.format(" [%x] %s", dumpSeq, field.toHuman())); out.annotate(Leb128Utils.unsignedLeb128Size(diff), " field_idx: " + Hex.u4(fieldIdx)); out.annotate(Leb128Utils.unsignedLeb128Size(accessFlags), " access_flags: " + AccessFlags.fieldString(accessFlags)); } out.writeUleb128(diff); out.writeUleb128(accessFlags); return fieldIdx; } }
/** {@inheritDoc} */ @Override public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int fieldIdx = file.getFieldIds().indexOf(field); int diff = fieldIdx - lastIndex; int accessFlags = getAccessFlags(); if (out.annotates()) { out.annotate(0, String.format(" [%x] %s", dumpSeq, field.toHuman())); out.annotate(Leb128.unsignedLeb128Size(diff), " field_idx: " + Hex.u4(fieldIdx)); out.annotate(Leb128.unsignedLeb128Size(accessFlags), " access_flags: " + AccessFlags.fieldString(accessFlags)); } out.writeUleb128(diff); out.writeUleb128(accessFlags); return fieldIdx; } }
/** {@inheritDoc} */ @Override public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int fieldIdx = file.getFieldIds().indexOf(field); int diff = fieldIdx - lastIndex; int accessFlags = getAccessFlags(); if (out.annotates()) { out.annotate(0, String.format(" [%x] %s", dumpSeq, field.toHuman())); out.annotate(Leb128.unsignedLeb128Size(diff), " field_idx: " + Hex.u4(fieldIdx)); out.annotate(Leb128.unsignedLeb128Size(accessFlags), " access_flags: " + AccessFlags.fieldString(accessFlags)); } out.writeUleb128(diff); out.writeUleb128(accessFlags); return fieldIdx; } }
/** {@inheritDoc} */ @Override public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int fieldIdx = file.getFieldIds().indexOf(field); int diff = fieldIdx - lastIndex; int accessFlags = getAccessFlags(); if (out.annotates()) { out.annotate(0, String.format(" [%x] %s", dumpSeq, field.toHuman())); out.annotate(Leb128Utils.unsignedLeb128Size(diff), " field_idx: " + Hex.u4(fieldIdx)); out.annotate(Leb128Utils.unsignedLeb128Size(accessFlags), " access_flags: " + AccessFlags.fieldString(accessFlags)); } out.writeUleb128(diff); out.writeUleb128(accessFlags); return fieldIdx; } }
/** {@inheritDoc} */ @Override public int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq) { int fieldIdx = file.getFieldIds().indexOf(field); int diff = fieldIdx - lastIndex; int accessFlags = getAccessFlags(); if (out.annotates()) { out.annotate(0, String.format(" [%x] %s", dumpSeq, field.toHuman())); out.annotate(Leb128Utils.unsignedLeb128Size(diff), " field_idx: " + Hex.u4(fieldIdx)); out.annotate(Leb128Utils.unsignedLeb128Size(accessFlags), " access_flags: " + AccessFlags.fieldString(accessFlags)); } out.writeUleb128(diff); out.writeUleb128(accessFlags); return fieldIdx; } }
/** {@inheritDoc} */ @Override public void writeTo0(DexFile file, AnnotatedOutput out) { ByteArray bytes = value.getBytes(); int utf16Size = value.getUtf16Size(); if (out.annotates()) { out.annotate(Leb128.unsignedLeb128Size(utf16Size), "utf16_size: " + Hex.u4(utf16Size)); out.annotate(bytes.size() + 1, value.toQuoted()); } out.writeUleb128(utf16Size); out.write(bytes); out.writeByte(0); }
/** {@inheritDoc} */ @Override public void writeTo0(DexFile file, AnnotatedOutput out) { ByteArray bytes = value.getBytes(); int utf16Size = value.getUtf16Size(); if (out.annotates()) { out.annotate(Leb128.unsignedLeb128Size(utf16Size), "utf16_size: " + Hex.u4(utf16Size)); out.annotate(bytes.size() + 1, value.toQuoted()); } out.writeUleb128(utf16Size); out.write(bytes); out.writeByte(0); }
/** {@inheritDoc} */ @Override public void writeTo0(DexFile file, AnnotatedOutput out) { ByteArray bytes = value.getBytes(); int utf16Size = value.getUtf16Size(); if (out.annotates()) { out.annotate(Leb128.unsignedLeb128Size(utf16Size), "utf16_size: " + Hex.u4(utf16Size)); out.annotate(bytes.size() + 1, value.toQuoted()); } out.writeUleb128(utf16Size); out.write(bytes); out.writeByte(0); }
/** {@inheritDoc} */ @Override public void writeTo0(DexFile file, AnnotatedOutput out) { ByteArray bytes = value.getBytes(); int utf16Size = value.getUtf16Size(); if (out.annotates()) { out.annotate(Leb128Utils.unsignedLeb128Size(utf16Size), "utf16_size: " + Hex.u4(utf16Size)); out.annotate(bytes.size() + 1, value.toQuoted()); } out.writeUleb128(utf16Size); out.write(bytes); out.writeByte(0); }
/** {@inheritDoc} */ @Override public void writeTo0(DexFile file, AnnotatedOutput out) { ByteArray bytes = value.getBytes(); int utf16Size = value.getUtf16Size(); if (out.annotates()) { out.annotate(Leb128.unsignedLeb128Size(utf16Size), "utf16_size: " + Hex.u4(utf16Size)); out.annotate(bytes.size() + 1, value.toQuoted()); } out.writeUleb128(utf16Size); out.write(bytes); out.writeByte(0); }
/** {@inheritDoc} */ @Override public void writeTo0(DexFile file, AnnotatedOutput out) { ByteArray bytes = value.getBytes(); int utf16Size = value.getUtf16Size(); if (out.annotates()) { out.annotate(Leb128Utils.unsignedLeb128Size(utf16Size), "utf16_size: " + Hex.u4(utf16Size)); out.annotate(bytes.size() + 1, value.toQuoted()); } out.writeUleb128(utf16Size); out.write(bytes); out.writeByte(0); }
/** {@inheritDoc} */ @Override public void writeTo0(DexFile file, AnnotatedOutput out) { ByteArray bytes = value.getBytes(); int utf16Size = value.getUtf16Size(); if (out.annotates()) { out.annotate(Leb128Utils.unsignedLeb128Size(utf16Size), "utf16_size: " + Hex.u4(utf16Size)); out.annotate(bytes.size() + 1, value.toQuoted()); } out.writeUleb128(utf16Size); out.write(bytes); out.writeByte(0); }