mirror of
https://github.com/revanced/smali.git
synced 2025-05-28 11:50:12 +02:00
Rename Section to SectionAnnotator
This commit is contained in:
parent
85fa15193d
commit
df443569f2
@ -257,13 +257,13 @@ public abstract class DexBackedDexFile extends BaseDexBuffer implements DexFile
|
||||
|
||||
public void dumpTo(Writer out, int width) throws IOException {
|
||||
AnnotatedBytes annotatedBytes = new AnnotatedBytes(width);
|
||||
HeaderItem.getSection().annotateSection(annotatedBytes, this, 1);
|
||||
HeaderItem.getAnnotator().annotateSection(annotatedBytes, this, 1);
|
||||
|
||||
annotatedBytes.annotate(0, " ");
|
||||
StringIdItem.getSection().annotateSection(annotatedBytes, this, stringCount);
|
||||
StringIdItem.getAnnotator().annotateSection(annotatedBytes, this, stringCount);
|
||||
|
||||
annotatedBytes.annotate(0, " ");
|
||||
TypeIdItem.getSection().annotateSection(annotatedBytes, this, typeCount);
|
||||
TypeIdItem.getAnnotator().annotateSection(annotatedBytes, this, typeCount);
|
||||
|
||||
annotatedBytes.writeAnnotations(out, buf);
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ public class HeaderItem {
|
||||
public static final int CHECKSUM_OFFSET = 8;
|
||||
|
||||
public static final int SIGNATURE_OFFSET = 12;
|
||||
public static final int SIGNATURE_SIZE = 20;
|
||||
|
||||
public static final int ENDIAN_TAG_OFFSET = 40;
|
||||
|
||||
public static final int MAP_OFFSET = 52;
|
||||
@ -72,10 +74,8 @@ public class HeaderItem {
|
||||
public static final int CLASS_COUNT_OFFSET = 96;
|
||||
public static final int CLASS_START_OFFSET = 100;
|
||||
|
||||
public static final int SIGNATURE_SIZE = 20;
|
||||
|
||||
public static Section getSection() {
|
||||
return new Section() {
|
||||
public static SectionAnnotator getAnnotator() {
|
||||
return new SectionAnnotator() {
|
||||
@Override
|
||||
public void annotateSection(@Nonnull AnnotatedBytes out, @Nonnull DexBackedDexFile dexFile, int length) {
|
||||
int startOffset = out.getCursor();
|
||||
|
@ -36,7 +36,7 @@ import org.jf.dexlib2.util.AnnotatedBytes;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public interface Section {
|
||||
public interface SectionAnnotator {
|
||||
|
||||
/**
|
||||
* Write out annotations for this section
|
@ -40,8 +40,8 @@ import javax.annotation.Nonnull;
|
||||
public class StringIdItem {
|
||||
public static final int ITEM_SIZE = 4;
|
||||
|
||||
public static Section getSection() {
|
||||
return new Section() {
|
||||
public static SectionAnnotator getAnnotator() {
|
||||
return new SectionAnnotator() {
|
||||
@Override
|
||||
public void annotateSection(@Nonnull AnnotatedBytes out, @Nonnull DexBackedDexFile dexFile, int length) {
|
||||
int startOffset = out.getCursor();
|
||||
|
@ -40,8 +40,8 @@ import javax.annotation.Nonnull;
|
||||
public class TypeIdItem {
|
||||
public static final int ITEM_SIZE = 4;
|
||||
|
||||
public static Section getSection() {
|
||||
return new Section() {
|
||||
public static SectionAnnotator getAnnotator() {
|
||||
return new SectionAnnotator() {
|
||||
@Override
|
||||
public void annotateSection(@Nonnull AnnotatedBytes out, @Nonnull DexBackedDexFile dexFile, int length) {
|
||||
int startOffset = out.getCursor();
|
||||
|
Loading…
x
Reference in New Issue
Block a user