The Slice-to-Java compiler, slice2java
, offers the command-line options described below in addition to the standard options. Note that some of these options are only applicable for the Java Compat mapping, meaning they must be used together with the --compat
option.
--compat
Generate code for the Java Compat mapping. When this option is specified, the macro__SLICE2JAVA_COMPAT__
is defined during the compilation. If this option is not specified, the default behavior is to generate code for the Java mapping.
--tie
Generate tie classes. (Java Compat only)
--impl
Generate sample implementation files. This option will not overwrite an existing file.
--impl-tie
Generate sample implementation files using tie classes. This option will not overwrite an existing file. (Java Compat only)
--checksum CLASS
Generate checksums for Slice definitions into the classCLASS
. The given class name may optionally contain a package specifier. The generated class contains checksums for all of the Slice files being translated by this invocation of the compiler. For example, the command below causesslice2java
to generate the fileChecksums.java
containing the checksums for the Slice definitions inFile1.ice
andFile2.ice
:slice2java --checksum Checksums File1.ice File2.ice
--meta META
Define the global metadata directiveMETA
. Using this option is equivalent to defining the global metadataMETA
in each named Slice file, as well as in any file included by a named Slice file. Global metadata specified with--meta
overrides any corresponding global metadata directive in the files being compiled.
--list-generated
Emit a list of generated files in XML format.