Value

UDA used for marking class members which should be value-injected.

A key must be supplied, which can be in any format depending on how a value injector reads it.

When the injector throws a ValueNotAvailableException, the value is not injected and will keep its original assignment.

struct Value {}

Members

Variables

key
string key;

The textual key used to find the value by injectors.

Examples

class MyClass {
    @Value("general.importantNumber")
    private int number = 8;
}

Meta