Package space.arim.dazzleconf.backend
Class KebabCaseKeyMapper
java.lang.Object
space.arim.dazzleconf.backend.KebabCaseKeyMapper
- All Implemented Interfaces:
KeyMapper
A key mapper which converts lower camel case patterns to kebab case.
This is intended for use with YAML and TOML and other formats that use kebab case. For example, a method named "myConfOption" will become "my-conf-option" using this key mapper.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull CharSequencelabelToKey(@NonNull CharSequence label) Turns the argument into a key.
-
Constructor Details
-
KebabCaseKeyMapper
public KebabCaseKeyMapper()Creates
-
-
Method Details
-
labelToKey
Description copied from interface:KeyMapperTurns the argument into a key.The argument is usually a method name, and as such, it should follow lowerCamelCase convention.
- Specified by:
labelToKeyin interfaceKeyMapper- Parameters:
label- the method name- Returns:
- the key part
-