fn quote_type()

in serde-generate/src/java.rs [190:231]


    fn quote_type(&self, format: &Format) -> String {
        use Format::*;
        match format {
            TypeName(x) => self.quote_qualified_name(x),
            Unit => "com.novi.serde.Unit".into(),
            Bool => "Boolean".into(),
            I8 => "Byte".into(),
            I16 => "Short".into(),
            I32 => "Integer".into(),
            I64 => "Long".into(),
            I128 => "java.math.@com.novi.serde.Int128 BigInteger".into(),
            U8 => "@com.novi.serde.Unsigned Byte".into(),
            U16 => "@com.novi.serde.Unsigned Short".into(),
            U32 => "@com.novi.serde.Unsigned Integer".into(),
            U64 => "@com.novi.serde.Unsigned Long".into(),
            U128 => "java.math.@com.novi.serde.Unsigned @com.novi.serde.Int128 BigInteger".into(),
            F32 => "Float".into(),
            F64 => "Double".into(),
            Char => "Character".into(),
            Str => "String".into(),
            Bytes => "com.novi.serde.Bytes".into(),

            Option(format) => format!("java.util.Optional<{}>", self.quote_type(format)),
            Seq(format) => format!("java.util.List<{}>", self.quote_type(format)),
            Map { key, value } => format!(
                "java.util.Map<{}, {}>",
                self.quote_type(key),
                self.quote_type(value)
            ),
            Tuple(formats) => format!(
                "com.novi.serde.Tuple{}<{}>",
                formats.len(),
                self.quote_types(formats)
            ),
            TupleArray { content, size } => format!(
                "java.util.@com.novi.serde.ArrayLen(length={}) List<{}>",
                size,
                self.quote_type(content)
            ),
            Variable(_) => panic!("unexpected value"),
        }
    }