[][src]Module genco::lang::java

Specialization for Java code generation.

String Quoting in Java

Since Java uses UTF-16 internally, string quoting for high unicode characters is done through surrogate pairs, as seen with the 😊 below.

use genco::prelude::*;

let toks: java::Tokens = quote!("start π 😊 \n \x7f end");
assert_eq!("\"start \\u03c0 \\ud83d\\ude0a \\n \\u007f end\"", toks.to_string()?);

Structs

BlockComment

Format a block comment, starting with /**, and ending in */.

Config

Configuration for Java.

Format

Formtat state for Java.

Import

The import of a Java type import java.util.Optional;

Java

Language specialization for Java.

Local

A local name with no specific qualification.

Enums

Any

Enum produced by AsAny::as_any() which can be used to identify and operate over a discrete language item type.

Traits

AsAny

Language-specific conversion trait implemented by all language items.

Functions

block_comment

Format a block comment, starting with /**, and ending in */.

import

Setup an imported element.

local

Setup a local type.

Type Definitions

Tokens

Tokens container specialized for Java.