Enum DslCompiler

    • Enum Constant Detail

    • Field Detail

      • UTF_8

        private static final java.nio.charset.Charset UTF_8
      • DSL_COMPILER_SOCKET

        private static final java.lang.String DSL_COMPILER_SOCKET
        See Also:
        Constant Field Values
    • Constructor Detail

      • DslCompiler

        private DslCompiler()
    • Method Detail

      • values

        public static DslCompiler[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DslCompiler c : DslCompiler.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DslCompiler valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • compile

        public static java.util.Map<java.lang.String,​java.lang.String> compile​(Context context,
                                                                                     java.lang.String target,
                                                                                     java.util.List<java.lang.String> settings,
                                                                                     java.lang.String namespace,
                                                                                     java.lang.String version,
                                                                                     DatabaseInfo dbInfo,
                                                                                     java.util.List<java.io.File> dsls,
                                                                                     java.lang.String library,
                                                                                     java.lang.String configuration)
                                                                              throws ExitException
        Throws:
        ExitException
      • readInt

        private static int readInt​(byte[] buf)
      • startServerMode

        private static Either<java.lang.Process> startServerMode​(Context context,
                                                                 java.io.File compiler,
                                                                 int port)
      • hasWhitespace

        private static boolean hasWhitespace​(java.lang.String input)
      • runCompilerSocket

        private static Either<byte[]> runCompilerSocket​(Context context,
                                                        java.net.Socket socket,
                                                        java.util.List<java.lang.String> arguments)
                                                 throws ExitException
        Throws:
        ExitException
      • runCompilerFile

        private static Either<byte[]> runCompilerFile​(Context context,
                                                      java.io.File compiler,
                                                      java.util.List<java.lang.String> arguments)
                                               throws ExitException
        Throws:
        ExitException
      • preparePreviousDsl

        private static void preparePreviousDsl​(Context context,
                                               DatabaseInfo dbInfo,
                                               java.util.List<java.lang.String> arguments)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • checkForLatestVersion

        public static void checkForLatestVersion​(Context context,
                                                 java.io.File path,
                                                 java.io.File compilerPath,
                                                 java.io.File compiler)
                                          throws ExitException
        Throws:
        ExitException
      • downloadCompiler

        private static void downloadCompiler​(Context context,
                                             java.io.File path,
                                             java.io.File compilerPath,
                                             java.io.File compiler,
                                             boolean failOnError)
                                      throws ExitException
        Throws:
        ExitException
      • promptUserMonoRetry

        private static boolean promptUserMonoRetry​(Context context)