Generic Types

Edit pageLast modified: 02 February 2025

Each type can take arguments containing other type declarations. Validation of arguments and their number lies on the implementing side; the parser does not limit their number or nesting and does not check their semantic correctness in any way.

Each argument is enclosed in triangle brackets < and > and separated by a comma (,).

tip

Reference to an existing class, interface or enum with template arguments.

Path\To\ExampleClass<T, U>

tip

Reference to builtin type with template arguments containing other generics.

iterable<int<0, max>, Collection<User>>

tip

Trailing comma is allowed.

HashMap<Request, User,>