Skip to main content

java_primitive

Function java_primitive 

Source
pub const fn java_primitive(kind: PrimitiveKind) -> Primitive
Expand description

The Java primitive an IDL primitive becomes.

Exhaustive, so a primitive added to the model without a Java spelling is a compile error and not a member that silently takes another’s.

long double is not routed here: it takes org.zerodds.wire.Float128, which is a real binary128. The Float128 arm below exists so the match is total and answers for a caller that wants the nearest built-in; type_at matches it before it reaches this function. A caller that does not is the defect the three-column gate found in the C column: double is eight bytes where the member is sixteen.

char and wchar are both a Java char, as §1.5.2 has them. A Java char is an unsigned 16-bit code unit, so it holds an IDL char’s 0..255 and a wchar’s BMP code point alike; Writer.writeChar refuses a code point above 255 rather than truncating it.