Skip to content

Commit 3d4c8b7

Browse files
committed
#11 DEX format - rename items
1 parent 196aa88 commit 3d4c8b7

23 files changed

+256
-186
lines changed

FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationItem.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetList.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetRefList.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationsDirectoryItem.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

FormatDEX/src/main/java/org/freeinternals/format/dex/ClassDataItem.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

FormatDEX/src/main/java/org/freeinternals/format/dex/CodeItem.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

FormatDEX/src/main/java/org/freeinternals/format/dex/DebugInfoItem.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

FormatDEX/src/main/java/org/freeinternals/format/dex/DexFile.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
import java.util.SortedMap;
1616
import java.util.TreeMap;
1717
import javax.swing.tree.DefaultMutableTreeNode;
18+
import org.freeinternals.commonlib.core.BytesTool;
1819
import org.freeinternals.commonlib.core.FileComponent;
1920
import org.freeinternals.commonlib.core.FileFormat;
21+
import org.freeinternals.commonlib.core.FileFormatException;
2022
import org.freeinternals.commonlib.core.PosByteArrayInputStream;
2123
import org.freeinternals.commonlib.core.PosDataInputStream;
22-
import org.freeinternals.commonlib.core.BytesTool;
23-
import org.freeinternals.commonlib.core.FileFormatException;
2424
import org.freeinternals.format.dex.header_item.Endian;
2525

2626
/**
@@ -114,8 +114,8 @@ public String getString(int index) {
114114
}
115115

116116
FileComponent fc = this.data.get(this.string_ids[index].string_data_off.value);
117-
if (fc instanceof StringDataItem) {
118-
return ((StringDataItem) fc).getString();
117+
if (fc instanceof string_data_item) {
118+
return ((string_data_item) fc).getString();
119119
} else {
120120
return null;
121121
}
@@ -180,7 +180,7 @@ private void parse() throws IOException, FileFormatException {
180180
this.string_ids = new string_id_item[this.header.string_ids_size.intValue()];
181181
for (int i = 0; i < this.string_ids.length; i++) {
182182
this.string_ids[i] = new string_id_item(stream);
183-
todoData.put(this.string_ids[i].string_data_off.value, StringDataItem.class);
183+
todoData.put(this.string_ids[i].string_data_off.value, string_data_item.class);
184184
}
185185
}
186186

@@ -241,9 +241,9 @@ private void parse() throws IOException, FileFormatException {
241241

242242
// data
243243
for (Map.Entry<Long, Class<?>> todoItem : todoData.entrySet()) {
244-
if (todoItem.getValue() == StringDataItem.class) {
244+
if (todoItem.getValue() == string_data_item.class) {
245245
stream.flyTo(todoItem.getKey().intValue());
246-
this.data.put(todoItem.getKey(), new StringDataItem(stream));
246+
this.data.put(todoItem.getKey(), new string_data_item(stream));
247247
}
248248

249249
}

FormatDEX/src/main/java/org/freeinternals/format/dex/EncodedArrayItem.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

FormatDEX/src/main/java/org/freeinternals/format/dex/MapList.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)