Package io.deephaven.engine.context
Class QueryCompilerImpl
java.lang.Object
io.deephaven.engine.context.QueryCompilerImpl
- All Implemented Interfaces:
LogOutputAppendable
,QueryCompiler
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compile
(@NotNull QueryCompilerRequest[] requests, @NotNull CompletionStageFuture.Resolver<Class<?>>[] resolvers) Compiles all requests.static QueryCompilerImpl
create
(File cacheDirectory, ClassLoader classLoader) static String
createEscapedJoinedString
(String originalString) Transform a string into the corresponding Java source code that compiles into that string.static String
createEscapedJoinedString
(String originalString, int maxStringLength) static boolean
setLogEnabled
(boolean logEnabled) Enables or disables compilation logging.toString()
static void
writeClass
(File destinationDirectory, String className, byte[] data) static void
writeClass
(File destinationDirectory, String className, byte[] data, String message) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.context.QueryCompiler
compile, compile
-
Field Details
-
FORMULA_CLASS_PREFIX
- See Also:
-
DYNAMIC_CLASS_PREFIX
- See Also:
-
-
Method Details
-
create
-
append
- Specified by:
append
in interfaceLogOutputAppendable
-
toString
-
setLogEnabled
public static boolean setLogEnabled(boolean logEnabled) Enables or disables compilation logging.- Parameters:
logEnabled
- Whether logging should be enabled- Returns:
- The value of
logEnabled
before calling this method.
-
writeClass
public static void writeClass(File destinationDirectory, String className, byte[] data) throws IOException - Throws:
IOException
-
writeClass
public static void writeClass(File destinationDirectory, String className, byte[] data, String message) throws IOException - Throws:
IOException
-
compile
public void compile(@NotNull @NotNull QueryCompilerRequest[] requests, @NotNull @NotNull CompletionStageFuture.Resolver<Class<?>>[] resolvers) Description copied from interface:QueryCompiler
Compiles all requests.- Specified by:
compile
in interfaceQueryCompiler
- Parameters:
requests
- The compilation requests; these must be independent of each otherresolvers
- The resolvers to use for delivering compilation results
-
createEscapedJoinedString
Transform a string into the corresponding Java source code that compiles into that string. This involves escaping special characters, surrounding it with quotes, and (if the string is larger than the max string length for Java literals), splitting it into substrings and constructing a call to String.join() that combines those substrings. -
createEscapedJoinedString
-