Class DecompilationController
- java.lang.Object
-
- org.jrd.frontend.frame.main.decompilerview.DecompilationController
-
- All Implemented Interfaces:
ClassesAndMethodsProvider
,ClasspathProvider
,LoadingDialogProvider
,ModelProvider
public class DecompilationController extends java.lang.Object implements ModelProvider, LoadingDialogProvider, ClassesAndMethodsProvider, ClasspathProvider
This class provides Action listeners and request handling for the GUI.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DecompilationController.AgentApiGenerator
class
DecompilationController.BytesActionListener
class
DecompilationController.LoadClassNames
-
Nested classes/interfaces inherited from interface org.jrd.backend.completion.ClassesAndMethodsProvider
ClassesAndMethodsProvider.SettingsClassesAndMethodsProvider
-
Nested classes/interfaces inherited from interface org.jrd.frontend.frame.main.decompilerview.dummycompiler.providers.ClasspathProvider
ClasspathProvider.SettingsClasspathProvider
-
-
Field Summary
Fields Modifier and Type Field Description private BytecodeDecompilerView
bytecodeDecompilerView
static java.lang.String
CLASSES_NOPE
private boolean
isVerbose
private LoadingDialog
loadingDialog
private MainFrameView
mainFrameView
private NewConnectionView
newConnectionDialog
private NewFsVmView
newFsVmDialog
private PluginConfigurationEditorController
pluginConfigurationEditorController
private PluginConfigurationEditorView
pluginConfigurationEditorView
private VmInfo
vmInfo
-
Constructor Summary
Constructors Constructor Description DecompilationController(MainFrameView mainFrameView, boolean isVerbose)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
abortClassLoading()
private void
addClass(java.lang.String fqnSpaceBody)
private void
addJar(java.lang.String fqnSpaceBody)
static java.lang.String
bytesToBase64(byte[] bytes)
private void
changeVm(java.awt.event.ActionEvent event)
private void
cleanup(boolean halt)
private void
clearOtherList(javax.swing.JList<VmInfo> vmList)
If selected list is remoteVmList clears localVmList and vice versa.
Effectively merging them into one.java.lang.String
cpTextInfo()
private void
createConfigurationEditor()
private java.lang.String
createFilter(java.lang.String text, int caretPosition)
private void
createNewConnectionDialog()
private void
createNewFsVMDialog()
private AgentRequestAction
createRequest(AgentRequestAction.RequestAction action, java.lang.String... commands)
static AgentRequestAction
createRequest(VmInfo vmInfo, AgentRequestAction.RequestAction action, java.lang.String... commands)
private boolean
exitOnEmpty(java.lang.String vmType, VmInfo selectedVm)
static java.lang.String
fileToBase64(java.lang.String path, boolean deHex)
static byte[]
fileToBytes(java.lang.String path)
static java.util.List<java.lang.String>
fileToLines(java.lang.String path)
java.lang.String[]
getClasses(CompletionSettings settings)
RuntimeCompilerConnector.JrdClassesProvider
getClassesProvider()
byte[]
getClassItself(CompletionSettings settings, java.lang.String fqn)
ClassesAndMethodsProvider
getClasspath()
private java.lang.String[]
getMethodsFromClassInRunningVm(CompletionSettings settings, java.lang.String fqn)
private java.lang.String[]
getMethodsFromClassInRunningVmCatched(CompletionSettings settings, java.lang.String fqn)
java.lang.String[]
getOverrides()
PluginManager
getPluginManager()
private java.util.Collection<io.github.mkoncek.classpathless.api.IdentifiedBytecode>
getSingleClassFromRunningVmCatched(java.lang.String fqn)
java.lang.String
getVm()
VmInfo
getVmInfo()
VmManager
getVmManager()
java.lang.String[]
getWhateverFromClass(CompletionSettings settings, java.lang.String fqn)
private void
haltAgent()
void
hideLoadingDialog()
private void
initClass(java.lang.String fqn)
boolean
isMissingVmInfo()
boolean
isVerbose()
private void
killAllSession()
private boolean
loadClassBytecode(ClassInfo name)
void
removeOverrides(java.lang.String pattern)
private void
removeVmDialog(java.awt.event.ActionEvent event)
private void
searchInClasses(java.lang.String substringAndRegex)
void
setVerbose(boolean verbose)
void
showLoadingDialog(java.awt.event.ActionListener listener, java.lang.String title)
private void
showLoadingDialog(java.lang.String title)
static java.lang.String
stdinToBase64(boolean deHex)
static byte[]
stdinToBytes()
static java.util.List<java.lang.String>
stdinToStrings()
static java.lang.String
stringToBase64(java.lang.String s)
(package private) java.lang.String
submitRequest(AgentRequestAction request)
static java.lang.String
submitRequest(VmManager vmManager, AgentRequestAction request)
private void
updateVmLists()
private boolean
warnOnOvveridesOfFsVm(VmInfo selectedVm)
static boolean
warnOnOvveridesOfFsVm(VmInfo vmInfo, javax.swing.JFrame parent)
-
-
-
Field Detail
-
mainFrameView
private final MainFrameView mainFrameView
-
bytecodeDecompilerView
private final BytecodeDecompilerView bytecodeDecompilerView
-
newConnectionDialog
private NewConnectionView newConnectionDialog
-
newFsVmDialog
private NewFsVmView newFsVmDialog
-
pluginConfigurationEditorView
private PluginConfigurationEditorView pluginConfigurationEditorView
-
pluginConfigurationEditorController
private PluginConfigurationEditorController pluginConfigurationEditorController
-
loadingDialog
private LoadingDialog loadingDialog
-
vmInfo
private VmInfo vmInfo
-
isVerbose
private boolean isVerbose
-
CLASSES_NOPE
public static final java.lang.String CLASSES_NOPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DecompilationController
public DecompilationController(MainFrameView mainFrameView, boolean isVerbose)
-
-
Method Detail
-
createConfigurationEditor
private void createConfigurationEditor()
-
createNewConnectionDialog
private void createNewConnectionDialog()
-
createNewFsVMDialog
private void createNewFsVMDialog()
-
removeVmDialog
private void removeVmDialog(java.awt.event.ActionEvent event)
-
exitOnEmpty
private boolean exitOnEmpty(java.lang.String vmType, VmInfo selectedVm)
-
warnOnOvveridesOfFsVm
private boolean warnOnOvveridesOfFsVm(VmInfo selectedVm)
-
warnOnOvveridesOfFsVm
public static boolean warnOnOvveridesOfFsVm(VmInfo vmInfo, javax.swing.JFrame parent)
-
updateVmLists
private void updateVmLists()
-
changeVm
private void changeVm(java.awt.event.ActionEvent event)
-
clearOtherList
private void clearOtherList(javax.swing.JList<VmInfo> vmList)
If selected list is remoteVmList clears localVmList and vice versa.
Effectively merging them into one.- Parameters:
vmList
- list that doesn't get cleared containing the VM that user wants to attach.
-
showLoadingDialog
private void showLoadingDialog(java.lang.String title)
-
showLoadingDialog
public void showLoadingDialog(java.awt.event.ActionListener listener, java.lang.String title)
- Specified by:
showLoadingDialog
in interfaceLoadingDialogProvider
-
hideLoadingDialog
public void hideLoadingDialog()
- Specified by:
hideLoadingDialog
in interfaceLoadingDialogProvider
-
cleanup
private void cleanup(boolean halt)
-
abortClassLoading
private void abortClassLoading()
-
initClass
private void initClass(java.lang.String fqn)
-
addClass
private void addClass(java.lang.String fqnSpaceBody)
-
addJar
private void addJar(java.lang.String fqnSpaceBody)
-
searchInClasses
private void searchInClasses(java.lang.String substringAndRegex)
-
loadClassBytecode
private boolean loadClassBytecode(ClassInfo name)
-
getVm
public java.lang.String getVm()
-
getOverrides
public java.lang.String[] getOverrides()
-
removeOverrides
public void removeOverrides(java.lang.String pattern)
-
getClasspath
public ClassesAndMethodsProvider getClasspath()
- Specified by:
getClasspath
in interfaceClasspathProvider
-
getVmInfo
public VmInfo getVmInfo()
- Specified by:
getVmInfo
in interfaceClasspathProvider
- Specified by:
getVmInfo
in interfaceModelProvider
-
getVmManager
public VmManager getVmManager()
- Specified by:
getVmManager
in interfaceClasspathProvider
- Specified by:
getVmManager
in interfaceModelProvider
-
getClassesProvider
public RuntimeCompilerConnector.JrdClassesProvider getClassesProvider()
- Specified by:
getClassesProvider
in interfaceModelProvider
-
getClasses
public java.lang.String[] getClasses(CompletionSettings settings)
- Specified by:
getClasses
in interfaceClassesAndMethodsProvider
-
getClassItself
public byte[] getClassItself(CompletionSettings settings, java.lang.String fqn)
- Specified by:
getClassItself
in interfaceClassesAndMethodsProvider
-
isMissingVmInfo
public boolean isMissingVmInfo()
- Specified by:
isMissingVmInfo
in interfaceClassesAndMethodsProvider
-
getSingleClassFromRunningVmCatched
private java.util.Collection<io.github.mkoncek.classpathless.api.IdentifiedBytecode> getSingleClassFromRunningVmCatched(java.lang.String fqn)
-
getWhateverFromClass
public java.lang.String[] getWhateverFromClass(CompletionSettings settings, java.lang.String fqn)
- Specified by:
getWhateverFromClass
in interfaceClassesAndMethodsProvider
-
getMethodsFromClassInRunningVmCatched
private java.lang.String[] getMethodsFromClassInRunningVmCatched(CompletionSettings settings, java.lang.String fqn)
-
getMethodsFromClassInRunningVm
private java.lang.String[] getMethodsFromClassInRunningVm(CompletionSettings settings, java.lang.String fqn)
-
getPluginManager
public PluginManager getPluginManager()
-
fileToBase64
public static java.lang.String fileToBase64(java.lang.String path, boolean deHex)
-
stdinToBase64
public static java.lang.String stdinToBase64(boolean deHex)
-
fileToBytes
public static byte[] fileToBytes(java.lang.String path) throws java.io.IOException
- Throws:
java.io.IOException
-
fileToLines
public static java.util.List<java.lang.String> fileToLines(java.lang.String path) throws java.io.IOException
- Throws:
java.io.IOException
-
stdinToBytes
public static byte[] stdinToBytes() throws java.io.IOException
- Throws:
java.io.IOException
-
stdinToStrings
public static java.util.List<java.lang.String> stdinToStrings() throws java.io.IOException
- Throws:
java.io.IOException
-
bytesToBase64
public static java.lang.String bytesToBase64(byte[] bytes)
-
stringToBase64
public static java.lang.String stringToBase64(java.lang.String s)
-
haltAgent
private void haltAgent()
-
killAllSession
private void killAllSession()
-
createRequest
private AgentRequestAction createRequest(AgentRequestAction.RequestAction action, java.lang.String... commands)
-
createRequest
public static AgentRequestAction createRequest(VmInfo vmInfo, AgentRequestAction.RequestAction action, java.lang.String... commands)
-
submitRequest
java.lang.String submitRequest(AgentRequestAction request)
-
submitRequest
public static java.lang.String submitRequest(VmManager vmManager, AgentRequestAction request)
-
isVerbose
public boolean isVerbose()
-
setVerbose
public void setVerbose(boolean verbose)
-
createFilter
private java.lang.String createFilter(java.lang.String text, int caretPosition)
-
cpTextInfo
public java.lang.String cpTextInfo()
- Specified by:
cpTextInfo
in interfaceClassesAndMethodsProvider
-
-