Class ArgsPropertySource
java.lang.Object
org.apache.juneau.commons.settings.ArgsPropertySource
- All Implemented Interfaces:
PropertySource
Property source backed by
Args.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArgsPropertySourceCreates a source using the default command-line discovery.static ArgsDiscovers and parses the default command-line args without caching.Returns a property in this property source.static ArgsReturns the default command-line args, discovered and parsed once per JVM.
-
Constructor Details
-
ArgsPropertySource
Constructor.- Parameters:
argsSupplier- Supplier for args.
-
-
Method Details
-
createDefault
Creates a source using the default command-line discovery.- Returns:
- A new source.
-
getDefaultArgs
Returns the default command-line args, discovered and parsed once per JVM.- Returns:
- The cached default args.
-
createDefaultArgs
Discovers and parses the default command-line args without caching.- Returns:
- A new args object.
-
get
Description copied from interface:PropertySourceReturns a property in this property source.- Specified by:
getin interfacePropertySource- Parameters:
name- The property name.- Returns:
- The property lookup result:
PropertyLookupResult.missing()if this source does not define the key.PropertyLookupResult.present(Optional)withOptional.empty()if the key exists with a null value.PropertyLookupResult.present(Optional)with a value if the key exists with a non-null value.
-