Skip to main content

java_units

Function java_units 

Source
pub fn java_units(text: &str) -> Vec<JavaUnit>
Expand description

The generated Java text of source or declarations as the compilation units Java takes.

The generator writes ZdTypes (the data), ZdServices (the RPC binding of DDS-RPC 1.0 §7.11.2, when the model has an interface) and ZdCodec (the codec, for source) as top-level classes of one text, and JLS §7.6 allows one public top-level class per file, named as the file. This cuts the text where each class begins — a Javadoc block directly above a class goes with it — and returns one unit per class, in the order they stand. Whatever precedes the first class (a header comment, imports) stays with the first unit.