slice2java(1)

πŸ“¦
version 3.7.10 Β· 2 versions
, in arch rolling, debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute

πŸ’– slice2java β€” the Slice β†’ Java compiler, bestie edition πŸ’–

okay so you know how sometimes you just need your Slice files to become Java? yeah. that's this. it's a General Commands Manual page, she's slice2java(1), and she ate fr fr. let's get into it 🫢


✨ NAME ✨

slice2java β€” the Slice to Java compiler. that's it, that's the whole vibe. πŸ‘‘


✨ SYNOPSIS ✨

slice2java [options] [files]

literally just throw your options and your files at her and she'll do the thing πŸ’…


✨ DESCRIPTION ✨

so slice2java compiles Slice files to Java. no cap. and while she's doing that compilation, the macro __SLICE2JAVA__ gets defined. that's important, write it down. πŸ“

the full tea β€” like, the complete documentation for slice2java β€” lives online at:

https://doc.zeroc.com/ice/3.7/language-mappings/java-mapping/client-side-slice-to-java-mapping/slice2java-command-line-options

(yeah it's a long one, she's giving very detailed URL energy, we love that for her 🌸)


✨ OPTIONS ✨

every single one, in order, no skips, we don't do that here πŸ’–

  • -h, --help β€” shows you a help message. when in doubt, ask for help, it's not embarrassing it's iconic.
  • -v, --version β€” tells you which compiler version you're on. know your queen's era. πŸ‘‘
  • -DNAME β€” defines the preprocessor symbol NAME. just NAME. no value. bare.
  • -DNAME=DEF β€” defines the preprocessor symbol NAME and gives it the value DEF. now she has range. ✨
  • -UNAME β€” undefines the preprocessor symbol NAME. un-defining. closure. we support it. πŸ¦‹
  • -IDIR β€” adds the directory DIR to the search path for #include directives. so when your includes go looking, they know where to look. bestie behavior fr.
  • -E β€” prints the preprocessor output on stdout. raw, unfiltered, no code generation, just the preprocessed truth.
  • --output-dir DIR β€” drops all the generated files into directory DIR. tidy. organized. main character energy. πŸŽ€
  • -d, --debug β€” prints debug information showing what the Slice parser is doing, operation by operation. not me watching the parser think 😭
  • --depend β€” prints dependency information to standard output by default, or to the file given by --depend-file if you specified that. and listen: no code is generated when this option is on. zero. none. she's just here for the deps. πŸ’€
  • --depend-xml β€” same deal but the dependency info comes out in XML format, to standard output by default, or to the file from --depend-file. and again, no code is generated when this option is specified. periodt.
  • --depend-file FILE β€” sends your dependency information to the file FILE. what format you get depends on whether --depend or --depend-xml is also in the mix. they work together, it's a collab. 🀝
  • --validate β€” checks that the command-line options you provided are correct, and generates absolutely no code. just a vibe check on your flags. βœ…
  • --compat β€” generates code for the Java Compat mapping. when you use this one, the macro __SLICE2JAVA_COMPAT__ gets defined during compilation. if you don't use it, the default behavior is to generate code for the Java mapping. choose your fighter. βš”οΈ
  • --tie β€” generates tie classes. heads up: (Java Compat only) πŸŽ€
  • --impl β€” generates sample implementation files. important: this option will not overwrite an existing file. she's respectful like that. πŸ™ˆ
  • --impl-tie β€” generates sample implementation files using tie classes, and same deal, it will not overwrite an existing file. also (Java Compat only) πŸ¦‹
  • --checksum CLASS β€” generates checksums for Slice definitions and puts them into the class CLASS. the class name you give can optionally include a package specifier, so go off. the generated class holds checksums for all of the Slice files being translated by this invocation of the compiler. all of them. every single one. ✨
  • --meta META β€” defines the file metadata directive META. using this option is equivalent to defining the file metadata META in each named Slice file, and in any file included by a named Slice file. and here's the kicker: file metadata specified with --meta overrides any corresponding file metadata directive in the files being compiled. she said mine now. πŸ’…
  • --list-generated β€” emits a list of generated files, in XML format. cute little receipt of everything she made. 🧾
🌈 side note bestie: --depend and --depend-xml both mean no code gets generated, and --validate also generates nothing. don't be surprised when the output dir is empty, it's not a bug it's the design. πŸ’œ

✨ SEE ALSO ✨

her whole friend group, go say hi πŸ‘―β€β™€οΈ


that's the whole page, you understood it, I'm so proud of you πŸ₯ΉπŸ’– this was slice2java(1), straight out of the General Commands Manual, and that's the sign-off β€” slice2java(1), periodt. go compile something gorgeous. πŸŒΈπŸ¦‹βœ¨