-
public class LoadOptions.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final LoadOptionsDEFAULTprivate final <ERROR CLASS>optionFieldsprivate final <ERROR CLASS>optionFieldsMapprivate final <ERROR CLASS>defaultParamsprivate final Map<String, String>defaultArgsMapprivate final <ERROR CLASS>arity0BooleanParamsprivate final <ERROR CLASS>arity1BooleanParamsprivate final <ERROR CLASS>optionNamesprivate final <ERROR CLASS>apiPublicOptionNamesprivate final List<List<String>>helpListpublic final static LoadOptions.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitsetFieldByAnnotation(LoadOptions options, String annotationName, Object value)Set the field value who has an annotation annotationName. final List<String>getOptionNames(String fieldName)Get all the available option names for field fieldName. final <ERROR CLASS>create(VolatileConfig conf)Create an empty LoadOptions. final <ERROR CLASS>normalize(String args)Normalize args, all option names in a normalized argument string match the field name in LoadOptions. final <ERROR CLASS>parse(String args, VolatileConfig conf)Parse the args. final <ERROR CLASS>parse(String args, LoadOptions options)Parse the args. final <ERROR CLASS>merge(LoadOptions o1, LoadOptions o2)Create a new LoadOptions with o1 and o2's items, o2 overrides o1. final <ERROR CLASS>merge(LoadOptions o1, String args)Create a new LoadOptions with o1 and args, args overrides o1. final <ERROR CLASS>merge(String args, String args2, VolatileConfig conf)Create a new LoadOptions with args and args2, args2 overrides args. final StringeraseOptions(String args, String fieldNames)Erase the specified option, the option name has to match the field name in LoadOptions. final LoadOptionsgetDEFAULT()The default option. final <ERROR CLASS>getOptionFields()A list of all option fields. final <ERROR CLASS>getOptionFieldsMap()A map of all option fields. final <ERROR CLASS>getDefaultParams()A map of all default options. final Map<String, String>getDefaultArgsMap()A map of all default options. final <ERROR CLASS>getArity0BooleanParams()A list of the options who's arity is 0. final <ERROR CLASS>getArity1BooleanParams()A list of the options who's arity is 1. final <ERROR CLASS>getOptionNames()A list of all the option names. final <ERROR CLASS>getApiPublicOptionNames()A list of all the names of options who are allowed with REST APIs. final List<List<String>>getHelpList()-
-
Method Detail
-
setFieldByAnnotation
final Unit setFieldByAnnotation(LoadOptions options, String annotationName, Object value)
Set the field value who has an annotation annotationName.
-
getOptionNames
final List<String> getOptionNames(String fieldName)
Get all the available option names for field fieldName.
-
create
final <ERROR CLASS> create(VolatileConfig conf)
Create an empty LoadOptions.
-
normalize
final <ERROR CLASS> normalize(String args)
Normalize args, all option names in a normalized argument string match the field name in LoadOptions.
-
parse
final <ERROR CLASS> parse(String args, LoadOptions options)
Parse the args.
-
merge
final <ERROR CLASS> merge(LoadOptions o1, LoadOptions o2)
-
merge
final <ERROR CLASS> merge(LoadOptions o1, String args)
-
eraseOptions
final String eraseOptions(String args, String fieldNames)
Erase the specified option, the option name has to match the field name in LoadOptions.
-
getDEFAULT
final LoadOptions getDEFAULT()
The default option.
-
getOptionFields
final <ERROR CLASS> getOptionFields()
A list of all option fields.
-
getOptionFieldsMap
final <ERROR CLASS> getOptionFieldsMap()
A map of all option fields.
-
getDefaultParams
final <ERROR CLASS> getDefaultParams()
A map of all default options.
-
getDefaultArgsMap
final Map<String, String> getDefaultArgsMap()
A map of all default options.
-
getArity0BooleanParams
final <ERROR CLASS> getArity0BooleanParams()
A list of the options who's arity is 0.
-
getArity1BooleanParams
final <ERROR CLASS> getArity1BooleanParams()
A list of the options who's arity is 1.
-
getOptionNames
final <ERROR CLASS> getOptionNames()
A list of all the option names.
-
getApiPublicOptionNames
final <ERROR CLASS> getApiPublicOptionNames()
A list of all the names of options who are allowed with REST APIs.
-
getHelpList
final List<List<String>> getHelpList()
-
-
-
-