Class ConfigRegister
java.lang.Object
org.nanonative.nano.helper.config.ConfigRegister
Utility class for registering and retrieving configuration descriptions.
This class is typically used for Service or custom functions to display
configuration keys and descriptions when the Java property -Dhelp=true is set.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringRetrieves the description of a registered configuration key.static StringregisterConfig(String key, String description) Registers a configuration key with its description.
-
Method Details
-
registerConfig
Registers a configuration key with its description.If the key is valid and non-null, it will be standardized and added to the configuration keys map with the provided description. If the description is null, an empty string will be used.
- Parameters:
key- the configuration key to registerdescription- the description of the configuration key- Returns:
- the standardized key if registration is successful, or
nullif the key is invalid
-
configDescriptionOf
Retrieves the description of a registered configuration key.If the key is valid and non-null, it will be standardized and its description will be retrieved from the configuration keys map.
- Parameters:
key- the configuration key whose description is to be retrieved- Returns:
- the description of the configuration key, or
nullif the key is invalid or not found
-