Specifies that a method can be used to retrieve an identifier on a service.
This annotation must be used in conjunction with
ServiceDefinition.
The annotated method must follow the following rules:
- Id method only applies to methods of a service
- Id method does not apply to static methods
- Id method must have no-args
- Id method must return String
- Id method must be unique
- Id method must not throw checked exceptions
- Id pattern must be valid
-
Field Details
-
FLAT_CASE
- See Also:
-
UPPER_FLAT_CASE
- See Also:
-
CAMEL_CASE
- See Also:
-
PASCAL_CASE
- See Also:
-
SNAKE_CASE
- See Also:
-
SCREAMING_SNAKE_CASE
- See Also:
-
CAMEL_SNAKE_CASE
- See Also:
-
KEBAB_CASE
- See Also:
-
SCREAMING_KEBAB_CASE
- See Also:
-
TRAIN_CASE
- See Also:
-
-
Element Details
-
pattern
String patternSpecifies the regex pattern that the ID is expected to match.
If specified, this pattern will be added to the loader as a static final field.- Returns:
- a regex pattern if required, empty otherwise
- Default:
""
-