Package space.arim.dazzleconf.backend
Interface KeyMapper
- All Known Implementing Classes:
DefaultKeyMapper,KebabCaseKeyMapper,LowerSnakeCaseKeyMapper
public interface KeyMapper
Simple interface for mapping method names into backend configuration keys, and vice versa.
For example, some formats (JSON) use lowerCamelCase for option names, whereas others use snake-case (YAML).
Fortunately, the key mapper is configured automatically when using Configuration.configureWith(Backend).
-
Method Summary
Modifier and TypeMethodDescription@NonNull CharSequencelabelToKey(@NonNull CharSequence label) Turns the argument into a key.
-
Method Details
-
labelToKey
Turns the argument into a key.The argument is usually a method name, and as such, it should follow lowerCamelCase convention.
- Parameters:
label- the method name- Returns:
- the key part
-