Names

The named() element explicitly specifies the action parameter’s name.

Normally this is not necessary; so long the program must be compiled using javac's -parameters flag, the framework can use the parameter name in the compiled class file.

We recommend that you only use this element when the desired name cannot be used in Java source code. Examples of that include a name that would be a reserved Java keyword (eg "package"), or a name that has punctuation, eg apostrophes.

The name is HTML escaped.

For example:

public class Customer {
    public Order placeOrder(
            final Product product,
            @ParameterLayout(named="Package ?")
            final boolean packageUp) {
        Order order = Order.forCustomer(this)
                           .ofProduct(product)
                           .withPackage(packageUp);
        return repository.persistAndFlush(order);
    }
    ...
}

i18n

The framework also provides a separate, powerful mechanism for internationalization.