Package org.jrd.frontend.utility
Class CommonUtils
- java.lang.Object
-
- org.jrd.frontend.utility.CommonUtils
-
public final class CommonUtils extends java.lang.Object
Class with utility methods common for both CLI and GUI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CommonUtils.ClassVisitor
static interface
CommonUtils.StatusKeeper
-
Field Summary
Fields Modifier and Type Field Description static int
CUSTOM_NAME
static int
FULLY_QUALIFIED_NAME
static int
SRC_SUBDIRS_NAME
-
Constructor Summary
Constructors Modifier Constructor Description private
CommonUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
cheatName(java.lang.String base, int selectedIndex, java.lang.String suffix, java.lang.String fullyClassifiedName)
static java.lang.String
guessClass(java.lang.String src)
static boolean
saveByGui(java.lang.String fileNameBase, int naming, java.lang.String suffix, CommonUtils.StatusKeeper status, java.lang.String clazz, byte[] content)
static io.github.mkoncek.classpathless.api.IdentifiedSource[]
toIdentifiedSources(boolean recursive, java.lang.String... sources)
static io.github.mkoncek.classpathless.api.IdentifiedSource[]
toIdentifiedSources(boolean recursive, java.util.List<java.io.File> sources)
static boolean
uploadByGui(VmInfo vmInfo, VmManager vmManager, CommonUtils.StatusKeeper status, java.lang.String clazz, byte[] content)
static java.lang.String
uploadBytecode(java.lang.String clazz, VmManager vmManager, VmInfo vmInfo, byte[] bytes)
-
-
-
Field Detail
-
FULLY_QUALIFIED_NAME
public static final int FULLY_QUALIFIED_NAME
- See Also:
- Constant Field Values
-
SRC_SUBDIRS_NAME
public static final int SRC_SUBDIRS_NAME
- See Also:
- Constant Field Values
-
CUSTOM_NAME
public static final int CUSTOM_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
saveByGui
public static boolean saveByGui(java.lang.String fileNameBase, int naming, java.lang.String suffix, CommonUtils.StatusKeeper status, java.lang.String clazz, byte[] content)
-
uploadByGui
public static boolean uploadByGui(VmInfo vmInfo, VmManager vmManager, CommonUtils.StatusKeeper status, java.lang.String clazz, byte[] content)
-
cheatName
public static java.lang.String cheatName(java.lang.String base, int selectedIndex, java.lang.String suffix, java.lang.String fullyClassifiedName)
-
uploadBytecode
public static java.lang.String uploadBytecode(java.lang.String clazz, VmManager vmManager, VmInfo vmInfo, byte[] bytes)
-
guessClass
public static java.lang.String guessClass(java.lang.String src) throws java.io.IOException
- Throws:
java.io.IOException
-
toIdentifiedSources
public static io.github.mkoncek.classpathless.api.IdentifiedSource[] toIdentifiedSources(boolean recursive, java.util.List<java.io.File> sources) throws java.io.IOException
- Throws:
java.io.IOException
-
toIdentifiedSources
public static io.github.mkoncek.classpathless.api.IdentifiedSource[] toIdentifiedSources(boolean recursive, java.lang.String... sources) throws java.io.IOException
- Throws:
java.io.IOException
-
-