Class CamelToSnakeCaseRule.Builder
java.lang.Object
com.streamconverter.command.rule.impl.casing.CamelToSnakeCaseRule.Builder
- Enclosing class:
CamelToSnakeCaseRule
Builder class for CamelToSnakeCaseRule configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the CamelToSnakeCaseRule with current configuration.handleAcronyms
(boolean handle) Sets whether to handle acronyms specially (e.g., XMLHttpRequest → xml_http_request).preserveUnderscores
(boolean preserve) Sets whether to preserve existing underscores in the input.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
preserveUnderscores
Sets whether to preserve existing underscores in the input.- Parameters:
preserve
- true to preserve underscores, false to clean them up- Returns:
- this builder
-
handleAcronyms
Sets whether to handle acronyms specially (e.g., XMLHttpRequest → xml_http_request).- Parameters:
handle
- true to handle acronyms, false to treat them as regular uppercase- Returns:
- this builder
-
build
Builds the CamelToSnakeCaseRule with current configuration.- Returns:
- configured rule instance
-