From 3d4c8b74164bb34e0b48a4ffc70d6c3b735d8717 Mon Sep 17 00:00:00 2001 From: amosshi Date: Mon, 16 Aug 2021 18:43:07 -0700 Subject: [PATCH] #11 DEX format - rename items --- .../format/dex/AnnotationItem.java | 17 ------------- .../format/dex/AnnotationSetList.java | 17 ------------- .../format/dex/AnnotationSetRefList.java | 17 ------------- .../format/dex/AnnotationsDirectoryItem.java | 17 ------------- .../format/dex/ClassDataItem.java | 17 ------------- .../freeinternals/format/dex/CodeItem.java | 17 ------------- .../format/dex/DebugInfoItem.java | 17 ------------- .../org/freeinternals/format/dex/DexFile.java | 14 +++++------ .../format/dex/EncodedArrayItem.java | 17 ------------- .../org/freeinternals/format/dex/MapList.java | 17 ------------- .../format/dex/TreeNodeGenerator.java | 8 +++---- .../freeinternals/format/dex/TypeList.java | 17 ------------- .../format/dex/annotation_item.java | 24 +++++++++++++++++++ .../format/dex/annotation_set_item.java | 24 +++++++++++++++++++ .../format/dex/annotation_set_ref_list.java | 24 +++++++++++++++++++ .../dex/annotations_directory_item.java | 24 +++++++++++++++++++ .../format/dex/class_data_item.java | 24 +++++++++++++++++++ .../freeinternals/format/dex/code_item.java | 24 +++++++++++++++++++ .../format/dex/debug_info_item.java | 24 +++++++++++++++++++ .../format/dex/encoded_array_item.java | 24 +++++++++++++++++++ .../freeinternals/format/dex/map_list.java | 24 +++++++++++++++++++ ...ingDataItem.java => string_data_item.java} | 10 ++++---- .../freeinternals/format/dex/type_list.java | 24 +++++++++++++++++++ 23 files changed, 256 insertions(+), 186 deletions(-) delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationItem.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetList.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetRefList.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationsDirectoryItem.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/ClassDataItem.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/CodeItem.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/DebugInfoItem.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/EncodedArrayItem.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/MapList.java delete mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/TypeList.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_item.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_set_item.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_set_ref_list.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/annotations_directory_item.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/class_data_item.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/code_item.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/debug_info_item.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/encoded_array_item.java create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/map_list.java rename FormatDEX/src/main/java/org/freeinternals/format/dex/{StringDataItem.java => string_data_item.java} (85%) create mode 100644 FormatDEX/src/main/java/org/freeinternals/format/dex/type_list.java diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationItem.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationItem.java deleted file mode 100644 index 65a68e4..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationItem.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * AnnotationItem.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class AnnotationItem extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetList.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetList.java deleted file mode 100644 index 26a206f..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetList.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * AnnotationSetList.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class AnnotationSetList extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetRefList.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetRefList.java deleted file mode 100644 index 8754471..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationSetRefList.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * AnnotationSetRefList.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class AnnotationSetRefList extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationsDirectoryItem.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationsDirectoryItem.java deleted file mode 100644 index e007a17..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/AnnotationsDirectoryItem.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * AnnotationsDirectoryItem.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class AnnotationsDirectoryItem extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/ClassDataItem.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/ClassDataItem.java deleted file mode 100644 index 8511a87..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/ClassDataItem.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * ClassDataItem.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class ClassDataItem extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/CodeItem.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/CodeItem.java deleted file mode 100644 index 4b0e6a1..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/CodeItem.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * CodeItem.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class CodeItem extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/DebugInfoItem.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/DebugInfoItem.java deleted file mode 100644 index 5e8c5de..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/DebugInfoItem.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * DebugInfoItem.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class DebugInfoItem extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/DexFile.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/DexFile.java index 88014ec..36d6559 100644 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/DexFile.java +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/DexFile.java @@ -15,12 +15,12 @@ import java.util.SortedMap; import java.util.TreeMap; import javax.swing.tree.DefaultMutableTreeNode; +import org.freeinternals.commonlib.core.BytesTool; import org.freeinternals.commonlib.core.FileComponent; import org.freeinternals.commonlib.core.FileFormat; +import org.freeinternals.commonlib.core.FileFormatException; import org.freeinternals.commonlib.core.PosByteArrayInputStream; import org.freeinternals.commonlib.core.PosDataInputStream; -import org.freeinternals.commonlib.core.BytesTool; -import org.freeinternals.commonlib.core.FileFormatException; import org.freeinternals.format.dex.header_item.Endian; /** @@ -114,8 +114,8 @@ public String getString(int index) { } FileComponent fc = this.data.get(this.string_ids[index].string_data_off.value); - if (fc instanceof StringDataItem) { - return ((StringDataItem) fc).getString(); + if (fc instanceof string_data_item) { + return ((string_data_item) fc).getString(); } else { return null; } @@ -180,7 +180,7 @@ private void parse() throws IOException, FileFormatException { this.string_ids = new string_id_item[this.header.string_ids_size.intValue()]; for (int i = 0; i < this.string_ids.length; i++) { this.string_ids[i] = new string_id_item(stream); - todoData.put(this.string_ids[i].string_data_off.value, StringDataItem.class); + todoData.put(this.string_ids[i].string_data_off.value, string_data_item.class); } } @@ -241,9 +241,9 @@ private void parse() throws IOException, FileFormatException { // data for (Map.Entry> todoItem : todoData.entrySet()) { - if (todoItem.getValue() == StringDataItem.class) { + if (todoItem.getValue() == string_data_item.class) { stream.flyTo(todoItem.getKey().intValue()); - this.data.put(todoItem.getKey(), new StringDataItem(stream)); + this.data.put(todoItem.getKey(), new string_data_item(stream)); } } diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/EncodedArrayItem.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/EncodedArrayItem.java deleted file mode 100644 index f64d635..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/EncodedArrayItem.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * EncodedArrayItem.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class EncodedArrayItem extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/MapList.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/MapList.java deleted file mode 100644 index 259de70..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/MapList.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * MapList.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class MapList extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/TreeNodeGenerator.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/TreeNodeGenerator.java index a708474..a8a43f1 100644 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/TreeNodeGenerator.java +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/TreeNodeGenerator.java @@ -119,8 +119,8 @@ private void generateStringIds() { node.add(itemNode); FileComponent fc = this.dexFile.data.get(item.string_data_off.value); - if (fc instanceof StringDataItem) { - ((StringDataItem) fc).generateTreeNode(itemNode); + if (fc instanceof string_data_item) { + ((string_data_item) fc).generateTreeNode(itemNode); } else { itemNode.add(new DefaultMutableTreeNode(new JTreeNodeFileComponent( 0, @@ -325,8 +325,8 @@ private void generateData() { Type_uint.toString(startPos) + " - " + fc.getClass().getSimpleName())); node.add(itemNode); - if (fc instanceof StringDataItem) { - ((StringDataItem) fc).generateTreeNode(itemNode); + if (fc instanceof string_data_item) { + ((string_data_item) fc).generateTreeNode(itemNode); } } } diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/TypeList.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/TypeList.java deleted file mode 100644 index 7789586..0000000 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/TypeList.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * TypeList.java June 23, 2015, 06:20 - * - * Copyright 2015, FreeInternals.org. All rights reserved. - * Use is subject to license terms. - */ -package org.freeinternals.format.dex; - -import org.freeinternals.commonlib.core.FileComponent; - -/** - * - * @author Amos Shi - */ -public class TypeList extends FileComponent{ - -} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_item.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_item.java new file mode 100644 index 0000000..b617d8f --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_item.java @@ -0,0 +1,24 @@ +/* + * AnnotationItem.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class annotation_item extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_set_item.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_set_item.java new file mode 100644 index 0000000..70a14fd --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_set_item.java @@ -0,0 +1,24 @@ +/* + * AnnotationSetList.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class annotation_set_item extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_set_ref_list.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_set_ref_list.java new file mode 100644 index 0000000..fc42154 --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/annotation_set_ref_list.java @@ -0,0 +1,24 @@ +/* + * AnnotationSetRefList.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class annotation_set_ref_list extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/annotations_directory_item.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/annotations_directory_item.java new file mode 100644 index 0000000..3138035 --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/annotations_directory_item.java @@ -0,0 +1,24 @@ +/* + * AnnotationsDirectoryItem.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class annotations_directory_item extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/class_data_item.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/class_data_item.java new file mode 100644 index 0000000..7e3fe58 --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/class_data_item.java @@ -0,0 +1,24 @@ +/* + * ClassDataItem.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class class_data_item extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/code_item.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/code_item.java new file mode 100644 index 0000000..3fb810e --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/code_item.java @@ -0,0 +1,24 @@ +/* + * CodeItem.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class code_item extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/debug_info_item.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/debug_info_item.java new file mode 100644 index 0000000..dd38a91 --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/debug_info_item.java @@ -0,0 +1,24 @@ +/* + * DebugInfoItem.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class debug_info_item extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/encoded_array_item.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/encoded_array_item.java new file mode 100644 index 0000000..1a8511d --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/encoded_array_item.java @@ -0,0 +1,24 @@ +/* + * EncodedArrayItem.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class encoded_array_item extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/map_list.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/map_list.java new file mode 100644 index 0000000..1f75f13 --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/map_list.java @@ -0,0 +1,24 @@ +/* + * MapList.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class map_list extends FileComponent{ + +} diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/StringDataItem.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/string_data_item.java similarity index 85% rename from FormatDEX/src/main/java/org/freeinternals/format/dex/StringDataItem.java rename to FormatDEX/src/main/java/org/freeinternals/format/dex/string_data_item.java index 33aa5e6..a6fbeba 100644 --- a/FormatDEX/src/main/java/org/freeinternals/format/dex/StringDataItem.java +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/string_data_item.java @@ -13,7 +13,6 @@ import org.freeinternals.commonlib.core.FileFormatException; import org.freeinternals.commonlib.ui.GenerateTreeNode; import org.freeinternals.commonlib.ui.JTreeNodeFileComponent; -import org.freeinternals.commonlib.ui.UITool; import static org.freeinternals.format.dex.TreeNodeGenerator.addNode; /** @@ -21,12 +20,13 @@ * @author Amos Shi * *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from Dex Spec instead
  * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
  * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
  * 
*/ -@SuppressWarnings({"java:S116", "java:S1104"}) -public class StringDataItem extends FileComponent implements GenerateTreeNode { +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class string_data_item extends FileComponent implements GenerateTreeNode { /** * size of this string, in UTF-16 code units (which is the "string length" @@ -42,7 +42,7 @@ public class StringDataItem extends FileComponent implements GenerateTreeNode { */ public byte[] data; - StringDataItem(PosDataInputStreamDex stream) throws IOException, FileFormatException { + string_data_item(PosDataInputStreamDex stream) throws IOException, FileFormatException { super.startPos = stream.getPos(); this.utf16_size = stream.Dex_uleb128(); if (this.utf16_size.value > 0) { @@ -73,7 +73,7 @@ public void generateTreeNode(DefaultMutableTreeNode parentNode) { int floatPos = this.getStartPos(); int utf16Size = this.utf16_size.value; - nodeTemp = addNode(parentNode, floatPos, this.utf16_size.length, "utf16_size", utf16Size); // , UITool.getShortcutIcon() + nodeTemp = addNode(parentNode, floatPos, this.utf16_size.length, "utf16_size", utf16Size); floatPos = ((JTreeNodeFileComponent) nodeTemp.getUserObject()).getLastPosPlus1(); if (utf16Size > 0) { addNode(parentNode, floatPos, this.data.length, "data", this.getString()); diff --git a/FormatDEX/src/main/java/org/freeinternals/format/dex/type_list.java b/FormatDEX/src/main/java/org/freeinternals/format/dex/type_list.java new file mode 100644 index 0000000..8bb9cd1 --- /dev/null +++ b/FormatDEX/src/main/java/org/freeinternals/format/dex/type_list.java @@ -0,0 +1,24 @@ +/* + * TypeList.java June 23, 2015, 06:20 + * + * Copyright 2015, FreeInternals.org. All rights reserved. + * Use is subject to license terms. + */ +package org.freeinternals.format.dex; + +import org.freeinternals.commonlib.core.FileComponent; + +/** + * + * @author Amos Shi + * + *
+ * java:S101 - Class names should comply with a naming convention --- We respect the name from DEX Spec instead
+ * java:S116 - Field names should comply with a naming convention --- We respect the DEX spec name instead
+ * java:S1104 - Class variable fields should not have public accessibility --- No, we like the simplified final value manner
+ * 
+ */ +@SuppressWarnings({"java:S101", "java:S116", "java:S1104"}) +public class type_list extends FileComponent{ + +}