Enum Class DslCompiler
- All Implemented Interfaces:
CompileParameter, ParameterParser, Serializable, Comparable<DslCompiler>, Constable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic classstatic classstatic classstatic classstatic enumstatic classNested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic voidcheckForLatestVersion(Context context, File path, File compilerPath, File compiler) compile(Context context, String target, List<String> settings, String namespace, String version, DatabaseInfo dbInfo, List<File> dsls, String library, String configuration) private static voiddownloadCompiler(Context context, File path, File compilerPath, File compiler, boolean failOnError) getAlias()private static DslCompiler.ByteStreamgetByteStream(Context context) getUsage()private static booleanhasWhitespace(String input) static FilelookupDefaultPath(Context context) migration(Context context, DatabaseInfo dbInfo, List<File> currentDsls) private static voidpreparePreviousDsl(Context context, DatabaseInfo dbInfo, List<String> arguments) private static booleanpromptUserMonoRetry(Context context) private static intreadInt(byte[] buf) voidprivate static Either<byte[]> runCompiler(Context context, List<String> arguments) private static Either<byte[]> runCompilerFile(Context context, File compiler, List<String> arguments) private static Either<byte[]> runCompilerSocket(Context context, Socket socket, List<String> arguments) static Either<DslCompiler.TokenParser> setupServer(Context context, File compiler) startServerMode(Context context, File compiler, int port) private static booleantestCompiler(Context context, File path) static DslCompilerReturns the enum constant of this class with the specified name.static DslCompiler[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Field Details
-
UTF_8
-
DSL_COMPILER_SOCKET
- See Also:
-
-
Constructor Details
-
DslCompiler
private DslCompiler()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getAlias
- Specified by:
getAliasin interfaceCompileParameter
-
getUsage
- Specified by:
getUsagein interfaceCompileParameter
-
compile
-
runCompiler
private static Either<byte[]> runCompiler(Context context, List<String> arguments) throws ExitException - Throws:
ExitException
-
readInt
private static int readInt(byte[] buf) -
setupServer
-
startServerMode
-
hasWhitespace
-
runCompilerSocket
private static Either<byte[]> runCompilerSocket(Context context, Socket socket, List<String> arguments) throws ExitException - Throws:
ExitException
-
getByteStream
-
runCompilerFile
private static Either<byte[]> runCompilerFile(Context context, File compiler, List<String> arguments) throws ExitException - Throws:
ExitException
-
migration
public static Either<String> migration(Context context, DatabaseInfo dbInfo, List<File> currentDsls) throws ExitException - Throws:
ExitException
-
preparePreviousDsl
private static void preparePreviousDsl(Context context, DatabaseInfo dbInfo, List<String> arguments) throws IOException - Throws:
IOException
-
parse
- Throws:
ExitException
-
lookupDefaultPath
- Throws:
ExitException
-
tryParse
-
check
- Specified by:
checkin interfaceCompileParameter- Throws:
ExitException
-
checkForLatestVersion
public static void checkForLatestVersion(Context context, File path, File compilerPath, File compiler) throws ExitException - Throws:
ExitException
-
downloadCompiler
private static void downloadCompiler(Context context, File path, File compilerPath, File compiler, boolean failOnError) throws ExitException - Throws:
ExitException
-
testCompiler
- Throws:
ExitException
-
run
- Specified by:
runin interfaceCompileParameter
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceCompileParameter
-
getDetailedDescription
- Specified by:
getDetailedDescriptionin interfaceCompileParameter
-
promptUserMonoRetry
-