Syntax Cleanup

This commit is contained in:
Konloch 2024-09-29 09:56:05 -06:00
parent 78a41f5a85
commit 0e3894751b

AI 샘플 코드 생성 중입니다

Loading...
10 changed files with 56 additions and 23 deletions

View File

@ -25,5 +25,7 @@ package the.bytecode.club.bytecodeviewer.bootloader;
public enum BootState
{
START_UP, SETTINGS_LOADED, GUI_SHOWING,
START_UP,
SETTINGS_LOADED,
GUI_SHOWING;
}

View File

@ -27,13 +27,10 @@ package the.bytecode.club.bytecodeviewer.bootloader.resource.jar;
public enum JarType
{
/**
* Local file
**/
//Local file
FILE("file:"),
/**
* External URL
**/
//External URL
WEB("");
private final String prefix;

View File

@ -8,5 +8,5 @@ public enum CLIAction
{
STOP,
GUI,
CLI
CLI;
}

View File

@ -113,6 +113,10 @@ public class DecompilerViewComponent
public enum DecompilerComponentType
{
JAVA, JAVA_NON_EDITABLE, BYTECODE, BYTECODE_NON_EDITABLE, JAVA_AND_BYTECODE
JAVA,
JAVA_NON_EDITABLE,
BYTECODE,
BYTECODE_NON_EDITABLE,
JAVA_AND_BYTECODE;
}
}

View File

@ -24,5 +24,9 @@ package the.bytecode.club.bytecodeviewer.gui.contextmenu;
*/
public enum ContextMenuType
{
RESOURCE_LIST, RESOURCE, DIRECTORY, CONTAINER, SEARCH_BOX_RESULT,
RESOURCE_LIST,
RESOURCE,
DIRECTORY,
CONTAINER,
SEARCH_BOX_RESULT;
}

View File

@ -166,6 +166,8 @@ public class New extends ContextMenuItem
public enum FileType
{
CLASS, FILE, DIRECTORY,
CLASS,
FILE,
DIRECTORY;
}
}

View File

@ -27,12 +27,14 @@ public enum GoToBinaryPositionMode
* Count from start of the document.
*/
FROM_START,
/**
* Count from end of the document.
*/
FROM_END,
/**
* Count from current position of the cursor in the document.
*/
FROM_CURSOR
FROM_CURSOR;
}

View File

@ -757,7 +757,22 @@ public class ValuesPanel extends javax.swing.JPanel
public enum ValuesPanelField
{
BINARY0, BINARY1, BINARY2, BINARY3, BINARY4, BINARY5, BINARY6, BINARY7, BYTE, WORD, INTEGER, LONG, FLOAT, DOUBLE, CHARACTER, STRING
BINARY0,
BINARY1,
BINARY2,
BINARY3,
BINARY4,
BINARY5,
BINARY6,
BINARY7,
BYTE,
WORD,
INTEGER,
LONG,
FLOAT,
DOUBLE,
CHARACTER,
STRING
}
@ParametersAreNonnullByDefault

View File

@ -29,7 +29,10 @@ import the.bytecode.club.bytecodeviewer.resources.exporting.impl.ZipExport;
*/
public enum Export
{
RUNNABLE_JAR(new RunnableJarExporter()), ZIP(new ZipExport()), DEX(new DexExport()), APK(new APKExport());
RUNNABLE_JAR(new RunnableJarExporter()),
ZIP(new ZipExport()),
DEX(new DexExport()),
APK(new APKExport());
private final Exporter exporter;

View File

@ -26,12 +26,18 @@ import java.util.HashMap;
* @author Konloch
* @since 6/26/2021
*/
public enum Import
{
DIRECTORY(new DirectoryResourceImporter()), FILE(new FileResourceImporter()), //TODO ear needs to import the same as XAPK
//TODO war needs to add the /libs correctly similar to XAPK
ZIP(new ZipResourceImporter(), "zip", "jar", "war", "ear"), CLASS(new ClassResourceImporter(), "class"), XAPK(new XAPKResourceImporter(), "xapk"), APK(new APKResourceImporter(), "apk"), DEX(new DEXResourceImporter(), "dex"),
;
DIRECTORY(new DirectoryResourceImporter()),
FILE(new FileResourceImporter()),
//TODO ear needs to import the same as XAPK
//TODO war needs to add the /libs correctly similar to XAPK
ZIP(new ZipResourceImporter(), "zip", "jar", "war", "ear"),
CLASS(new ClassResourceImporter(), "class"),
XAPK(new XAPKResourceImporter(), "xapk"),
APK(new APKResourceImporter(), "apk"),
DEX(new DEXResourceImporter(), "dex");
public static final HashMap<String, Import> extensionMap = new HashMap<>();
@ -40,14 +46,12 @@ ZIP(new ZipResourceImporter(), "zip", "jar", "war", "ear"), CLASS(new ClassResou
static
{
for (Import i : values())
for (String s : i.extensions)
for(Import i : values())
for(String s : i.extensions)
extensionMap.put(s, i);
}
Import(Importer importer, String... extensions)
{
this.importer = importer;
Import(Importer importer, String... extensions) {this.importer = importer;
this.extensions = extensions;
}