Class Cli


  • public class Cli
    extends java.lang.Object
    • Constructor Detail

      • Cli

        public Cli​(java.lang.String[] orig,
                   Model model)
    • Method Detail

      • cleanParameter

        private static java.lang.String cleanParameter​(java.lang.String param)
      • shouldBeVerbose

        public boolean shouldBeVerbose()
      • isGui

        public boolean isGui()
      • prefilterArgs

        private java.util.List<java.lang.String> prefilterArgs​(java.lang.String[] originalArgs)
      • consumeCli

        public void consumeCli()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • overwrite

        private void overwrite()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • api

        private void api()
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • init

        private void init()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initClass

        public static void initClass​(VmInfo vmInfo,
                                     VmManager vmManager,
                                     java.lang.String fqn,
                                     java.io.PrintStream outputMessageStream)
      • compile

        private void compile​(Cli.CompileArguments args)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • guessName

        public static java.lang.String guessName​(byte[] fileContents)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • decompile

        private void decompile()
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • returnNonzero

        private void returnNonzero​(int failures,
                                   int total)
      • outOrSave

        private boolean outOrSave​(java.lang.String name,
                                  java.lang.String extension,
                                  java.lang.String s)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • outOrSave

        private boolean outOrSave​(java.lang.String name,
                                  java.lang.String extension,
                                  byte[] body,
                                  boolean forceBytes)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • findDecompiler

        private DecompilerWrapper findDecompiler​(java.lang.String decompilerName)
      • printBytes

        private void printBytes​(boolean justBytes)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • listClasses

        private void listClasses​(boolean details)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • obtainFilteredClasses

        private static java.util.List<ClassInfo> obtainFilteredClasses​(VmInfo vmInfo,
                                                                       VmManager vmManager,
                                                                       java.util.List<java.util.regex.Pattern> filter,
                                                                       boolean details)
                                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • listClassesFromVmInfo

        private void listClassesFromVmInfo​(VmInfo vmInfo,
                                           java.util.List<java.util.regex.Pattern> filter,
                                           boolean details)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • matchesAtLeastOne

        private static boolean matchesAtLeastOne​(ClassInfo clazz,
                                                 java.util.List<java.util.regex.Pattern> filter)
      • listPlugins

        private void listPlugins()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • listJvms

        private void listJvms()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • printVersion

        private void printVersion()
      • printHelp

        private void printHelp()
      • invalidityToString

        private static java.lang.String invalidityToString​(boolean invalidWrapper)
      • obtainClasses

        public static java.lang.String[] obtainClasses​(VmInfo vmInfo,
                                                       VmManager manager)
      • guessType

        private VmInfo.Type guessType​(java.lang.String input)
      • getVmInfo

        VmInfo getVmInfo​(java.lang.String param)