Class BytecodeDecompilerView

java.lang.Object
org.jrd.frontend.frame.main.decompilerview.BytecodeDecompilerView

public class BytecodeDecompilerView extends Object
Class that creates GUI for attached VM.
  • Field Details

    • bytecodeDecompilerPanel

      private JPanel bytecodeDecompilerPanel
    • splitPane

      private JSplitPane splitPane
    • classes

      private JPanel classes
    • classesToolBar

      private JPanel classesToolBar
    • reloadClassesButton

      private JButton reloadClassesButton
    • searchInClassesButton

      private JButton searchInClassesButton
    • showInfoCheckBox

      private JCheckBox showInfoCheckBox
    • classCount

      private JTextField classCount
    • classesSortField

      private JTextField classesSortField
    • metadata

      private JCheckBox metadata
    • classesSortFieldColor

      private final Color classesSortFieldColor
    • classesPanel

      private JPanel classesPanel
    • classesScrollPane

      private JScrollPane classesScrollPane
    • filteredClassesJList

      private JList<ClassInfo> filteredClassesJList
    • filteredClassesRenderer

      private ClassListRenderer filteredClassesRenderer
    • buffersPanel

      private JPanel buffersPanel
    • buffersToolBar

      private JPanel buffersToolBar
    • diffButton

      private JButton diffButton
    • undoButton

      private JButton undoButton
    • redoButton

      private JButton redoButton
    • insertButton

      private JButton insertButton
    • bytecodeButton

      private JButton bytecodeButton
    • detachButton

      private JButton detachButton
    • initClassButton

      private JButton initClassButton
    • overwriteButton

      private JButton overwriteButton
    • compileButton

      private JButton compileButton
    • compileAndUploadButton

      private JButton compileAndUploadButton
    • pluginComboBox

      private JComboBox<DecompilerWrapper> pluginComboBox
    • buffers

      private final JTabbedPane buffers
    • bytecodeBuffer

      private TextWithControls bytecodeBuffer
    • binary

      private HexWithControls binary
    • additionalSrcBuffer

      private TextWithControls additionalSrcBuffer
    • additionalBytecodeBuffer

      private TextWithControls additionalBytecodeBuffer
    • additionalBinary

      private HexWithControls additionalBinary
    • bytesActionListener

      private ActionListener bytesActionListener
    • classesActionListener

      private ActionListener classesActionListener
    • searchClassesActionListener

      private ActionListener searchClassesActionListener
    • initActionListener

      private ActionListener initActionListener
    • addActionListener

      private ActionListener addActionListener
    • addJar

      private ActionListener addJar
    • compileAction

    • overwriteActionListener

      private BytecodeDecompilerView.OverwriteActionListener overwriteActionListener
    • dependenciesReader

      private DependenciesReader dependenciesReader
    • loadedClasses

      private ClassInfo[] loadedClasses
    • lastDecompiledClass

      private String lastDecompiledClass
    • lastFqn

      private String lastFqn
    • lastAddedFqn

      private String lastAddedFqn
    • lastAddedFile

      private File lastAddedFile
    • lastSearch

      private String lastSearch
    • splitPaneFirstResize

      private boolean splitPaneFirstResize
    • shouldAttach

      private boolean shouldAttach
    • mainFrame

      private final JFrame mainFrame
    • detachedBytecodeFrame

      private JFrame detachedBytecodeFrame
    • CLASS_LIST_REGISTERED_KEY_CODES

      private static final Set<Integer> CLASS_LIST_REGISTERED_KEY_CODES
    • PANEL_INSETS

      private static final Insets PANEL_INSETS
    • DETACH_BUTTON_TEXT

      private static final String DETACH_BUTTON_TEXT
      See Also:
    • ATTACH_BUTTON_TEXT

      private static final String ATTACH_BUTTON_TEXT
      See Also:
  • Constructor Details

    • BytecodeDecompilerView

      public BytecodeDecompilerView(JFrame mainFrameReference)
  • Method Details

    • getBytecodeDecompilerPanel

      public JPanel getBytecodeDecompilerPanel()
      Constructor creates the graphics and adds the action listeners.
      Returns:
      BytecodeDecompilerPanel
    • handleClassInfoSwitching

      private void handleClassInfoSwitching(boolean reload)
    • getDependenciesReader

      public DependenciesReader getDependenciesReader()
    • setDepsProvider

      public void setDepsProvider(DependenciesReader depsReader)
    • isDecompiledBytecodeBufferVisible

      private boolean isDecompiledBytecodeBufferVisible()
    • isBinaryBufferVisible

      private boolean isBinaryBufferVisible()
    • isAdditionalBinaryBufferVisible

      private boolean isAdditionalBinaryBufferVisible()
    • isAdditionalDecompiledBytecodeBufferVisible

      private boolean isAdditionalDecompiledBytecodeBufferVisible()
    • isAdditionalSrcBufferVisible

      private boolean isAdditionalSrcBufferVisible()
    • handleBuffersDetaching

      private void handleBuffersDetaching()
    • styleTooltip

      public static String styleTooltip()
    • updateClassList

      private void updateClassList()
    • matchesAny

      private boolean matchesAny(List<ClassInfo> filtered, Pattern p, ClassInfo clazz)
    • reloadClassList

      public void reloadClassList(ClassInfo[] classesToReload)
      Sets the unfiltered class list array and invokes an update.
      Parameters:
      classesToReload - String[] classesToReload.
    • reloadTextField

      public void reloadTextField(String name, String decompiledClass, byte[] source, String additionalDecompiledClass, byte[] additionalSource, String additionalSrcClass)
      Sets the decompiled code into JTextArea
      Parameters:
      decompiledClass - String of source code of decompiler class
    • setDecompiledClass

      private void setDecompiledClass(String name, String data, byte[] source, String additionalData, byte[] additionalSource, String additionalSrcData)
    • setSearchInActionListener

      public void setSearchInActionListener(ActionListener o)
    • setClassesActionListener

      public void setClassesActionListener(ActionListener listener)
    • setInitActionListener

      public void setInitActionListener(ActionListener listener)
    • setAddActionListener

      public void setAddActionListener(ActionListener listener)
    • setJarActionListener

      public void setJarActionListener(ActionListener listener)
    • setCompileListener

      public void setCompileListener(DecompilationController.QuickCompiler listener)
    • setBytesActionListener

      public void setBytesActionListener(ActionListener listener)
    • setPopup

      public void setPopup(DecompilationController.AgentApiGenerator ap)
    • setOverwriteActionListener

      public void setOverwriteActionListener(DecompilationController.ClassOverwriter worker)
    • refreshComboBox

      public void refreshComboBox(List<DecompilerWrapper> wrappers)
    • getSelectedDecompiler

      public DecompilerWrapper getSelectedDecompiler()
    • buttonSizeBasedOnTextField

      public static Dimension buttonSizeBasedOnTextField(JButton originalButton, JTextField referenceTextField)
    • classWorker

      private void classWorker()
    • bytesWorker

      private void bytesWorker(String name)
    • doShowClassInfo

      public boolean doShowClassInfo()
    • doSearchInClassInfo

      public boolean doSearchInClassInfo()
    • addJar

      private void addJar(boolean boot, String file, String name)
    • addClassGui

      private void addClassGui(String fqn, String file)
    • initGui

      private void initGui(String fqn)
    • addClassesGui

      private void addClassesGui(boolean boot, String[] fqnFilePairs) throws IOException
      Throws:
      IOException