saker.java.compiler Documentation TaskDoc JavaDoc Packages
public final class SakerJavaCompilerUtils
Utility class contains functions related to Java compilation and configuration.
Fields
public static final String
The default SDK name that the Java compiler task uses.
public static final String
The name of the output directory that contains the compiled class files.
public static final String
The name of the output directory that contains the generated native header files
public static final String
The name of the output directory that contains the processor generated resource files.
public static final String
The name of the output directory that contains the processor generated source files.
public static final String
Java SDK path identifier for the install location.
public static final String
Java SDK path identifier for the include directory that is present in a JDK.
public static final String
JAVASDK_PATH_INCLUDE_DARWIN = "include.darwin"
Java SDK path identifier for the darwin platform include directory in the JDK.
public static final String
JAVASDK_PATH_INCLUDE_LINUX = "include.linux"
Java SDK path identifier for the linux platform include directory in the JDK.
public static final String
JAVASDK_PATH_INCLUDE_PLATFORM = "include.platform"
Java SDK path identifier for the platform include directory if it can be determined.
public static final String
JAVASDK_PATH_INCLUDE_SOLARIS = "include.solaris"
Java SDK path identifier for the solaris platform include directory in the JDK.
public static final String
JAVASDK_PATH_INCLUDE_WIN32 = "include.win32"
Java SDK path identifier for the win32 platform include directory in the JDK.
public static final String
JAVASDK_PATH_INSTALL_LOCATION = "install.location"
Java SDK path identifier for the install location.
public static final String
Java SDK path identifier for the java executable.
public static final String
Java SDK property identifier for the major version of the associated JDK.
public static final String
Java SDK property identifier for the java.version system property.
public static final String
TASK_NAME_SAKER_JAVA_COMPILE = "saker.java.compile"
The name of the Java compiler task provided by this package.
Methods
public static TaskOutputChangeDetector
public static TaskOutputChangeDetector
Gets a TaskOutputChangeDetector that expects the compilation classpath of the task output to equal to the argument.
public static TaskOutputChangeDetector
public static TaskOutputChangeDetector
Gets a TaskOutputChangeDetector that expects the compilation modulepath of the task output to equal to the argument.
public static SDKDescription
Gets the SDKDescription that is used when no SDK is specified for Java compilation with the Java name.
public static Collection<String>
Converts the argument add-exports configuration to command line options.
public static String
Converts the argument add-reads configuration to command line option.
public static final String DEFAULT_SDK_NAME = "Java"
The default SDK name that the Java compiler task uses.

The associated SDK determines the JDK that will be used for the compilation.

public static final String DIR_CLASS_OUTPUT = "bin"
The name of the output directory that contains the compiled class files.
public static final String DIR_NATIVE_HEADER_OUTPUT = "nativeh"
The name of the output directory that contains the generated native header files
public static final String DIR_RESOURCE_OUTPUT = "res"
The name of the output directory that contains the processor generated resource files.
public static final String DIR_SOURCE_OUTPUT = "gen"
The name of the output directory that contains the processor generated source files.
public static final String JAVASDK_PATH_HOME = "home"
Java SDK path identifier for the install location.

Points to the install directory. E.g. c:\Program Files\Java\jdk1.8.0_221

Same as JAVASDK_PATH_INSTALL_LOCATION.

saker.java.compiler 0.8.7
public static final String JAVASDK_PATH_INCLUDE = "include"
Java SDK path identifier for the include directory that is present in a JDK.

Points to the root include directory. E.g. c:\Program Files\Java\jdk1.8.0_221\include

public static final String JAVASDK_PATH_INCLUDE_DARWIN = "include.darwin"
Java SDK path identifier for the darwin platform include directory in the JDK.
public static final String JAVASDK_PATH_INCLUDE_LINUX = "include.linux"
Java SDK path identifier for the linux platform include directory in the JDK.

E.g. /usr/lib/jvm/java-8-openjdk-amd64/jre/include/linux

public static final String JAVASDK_PATH_INCLUDE_PLATFORM = "include.platform"
Java SDK path identifier for the platform include directory if it can be determined.

This SDK path identifier points to the only platform include directory that is present in the root directory. Usually JDK installations have a single platform include directory. Using this identifier will automatically return the appropriate one. E.g. if the JDK is installed on Windows, it will return the value for JAVASDK_PATH_INCLUDE_WIN32.

Note that if the platform include directory cannot be determined in a non-ambiguous way, then the path for this identifier won't be returned.

public static final String JAVASDK_PATH_INCLUDE_SOLARIS = "include.solaris"
Java SDK path identifier for the solaris platform include directory in the JDK.
public static final String JAVASDK_PATH_INCLUDE_WIN32 = "include.win32"
Java SDK path identifier for the win32 platform include directory in the JDK.

E.g. c:\Program Files\Java\jdk1.8.0_221\include\win32

public static final String JAVASDK_PATH_INSTALL_LOCATION = "install.location"
Java SDK path identifier for the install location.

Points to the install directory. E.g. c:\Program Files\Java\jdk1.8.0_221

public static final String JAVASDK_PATH_JAVA_EXE = "exe.java"
Java SDK path identifier for the java executable.

E.g. c:\Program Files\Java\jdk1.8.0_221\bin\java.exe

public static final String JAVASDK_PROPERTY_JAVA_MAJOR = "java.major"
Java SDK property identifier for the major version of the associated JDK.
public static final String JAVASDK_PROPERTY_JAVA_VERSION = "java.version"
Java SDK property identifier for the java.version system property.
public static final String TASK_NAME_SAKER_JAVA_COMPILE = "saker.java.compile"
The name of the Java compiler task provided by this package.
Gets a TaskOutputChangeDetector that examines the JavaCompilerWorkerTaskOutput.getAbiVersionKey().

The returned change detector will detect a change if the ABI version key of the task output changes.

abiversionkeyThe expected ABI version key.
The task output change detector.
NullPointerExceptionIf the argument is null.
Gets a TaskOutputChangeDetector that expects the compilation classpath of the task output to equal to the argument.

The change detector will compare the JavaCompilerWorkerTaskOutput.getClassPath() for equality with the argument.

classpathThe expected classpath. May be null.
The task output change detector.
Gets a TaskOutputChangeDetector that examines the JavaCompilerWorkerTaskOutput.getImplementationVersionKey().

The returned change detector will detect a change if the implementation version key of the task output changes.

abiversionkeyThe expected implementation version key.
The task output change detector.
NullPointerExceptionIf the argument is null.
Gets a TaskOutputChangeDetector that expects the compilation modulepath of the task output to equal to the argument.

The change detector will compare the JavaCompilerWorkerTaskOutput.getModulePath() for equality with the argument.

modulepathThe expected modulepath. May be null.
The task output change detector.
Gets the SDKDescription that is used when no SDK is specified for Java compilation with the Java name.

The default SDK uses a JDK that has the same version as the JVM that runs the current build execution.

The default Java SDK.
Converts the argument add-exports configuration to command line options.

The argument configuration will be converted to module/package=target-module(,target-module)* format. If the argument configuration defines a setting that consists of multiple add-export command line options, then the resulting collection will have multiple entries.

The result strings are not prefixed by the --add-exports argument.

addexportsThe add exports configuration. (If null, the returned collection is empty.)
The command line strings that the argument configuration defines.
Converts the argument add-reads configuration to command line option.

The returned value can be passed as the argument of the --add-reads javac parameter.

addreadsThe add reads configuration.
The command line option. null if the argument is null.
saker.java.compiler 0.8.8