Package ai.platon.pulsar.common.options
Object LoadOptions.Companion
-
- All Implemented Interfaces:
public class LoadOptions.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final LoadOptionsDEFAULTprivate final Sequence<Field>optionFieldsprivate final Map<String, Field>optionFieldsMapprivate final Map<String, Object>defaultParamsprivate final Map<String, String>defaultArgsMapprivate final List<String>arity0BooleanParamsprivate final List<String>arity1BooleanParamsprivate final List<String>optionNamesprivate final List<String>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 LoadOptionscreate(VolatileConfig conf)Create an empty LoadOptions. final LoadOptionscreateUnsafe()Create an empty LoadOptions. final Stringnormalize(String args)Normalize args, all option names in a normalized argument string match the field name in LoadOptions. final LoadOptionsparse(String args, VolatileConfig conf)Parse the args with other conf. final LoadOptionsparse(String args, LoadOptions options)Parse the args with other options. final LoadOptionsmerge(LoadOptions o1, LoadOptions o2)Create a new LoadOptions with o1 and o2's items, o2 overrides o1. final LoadOptionsmerge(LoadOptions o1, String args)Create a new LoadOptions with o1 and args, args overrides o1. final LoadOptionsmerge(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 Sequence<Field>getOptionFields()A list of all option fields. final Map<String, Field>getOptionFieldsMap()A map of all option fields. final Map<String, Object>getDefaultParams()A map of all default options. final Map<String, String>getDefaultArgsMap()A map of all default options. final List<String>getArity0BooleanParams()A list of the options who's arity is 0. final List<String>getArity1BooleanParams()A list of the options who's arity is 1. final List<String>getOptionNames()A list of all the option names. final List<String>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 LoadOptions create(VolatileConfig conf)
Create an empty LoadOptions.
-
createUnsafe
final LoadOptions createUnsafe()
Create an empty LoadOptions.
-
normalize
final String normalize(String args)
Normalize args, all option names in a normalized argument string match the field name in LoadOptions.
-
parse
final LoadOptions parse(String args, VolatileConfig conf)
-
parse
final LoadOptions parse(String args, LoadOptions options)
-
merge
final LoadOptions merge(LoadOptions o1, LoadOptions o2)
-
merge
final LoadOptions merge(LoadOptions o1, String args)
-
merge
final LoadOptions merge(String args, String args2, VolatileConfig conf)
-
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 Sequence<Field> getOptionFields()
A list of all option fields.
-
getOptionFieldsMap
final Map<String, Field> getOptionFieldsMap()
A map of all option fields.
-
getDefaultParams
final Map<String, Object> getDefaultParams()
A map of all default options.
-
getDefaultArgsMap
final Map<String, String> getDefaultArgsMap()
A map of all default options.
-
getArity0BooleanParams
final List<String> getArity0BooleanParams()
A list of the options who's arity is 0.
-
getArity1BooleanParams
final List<String> getArity1BooleanParams()
A list of the options who's arity is 1.
-
getOptionNames
final List<String> getOptionNames()
A list of all the option names.
-
getApiPublicOptionNames
final List<String> getApiPublicOptionNames()
A list of all the names of options who are allowed with REST APIs.
-
getHelpList
final List<List<String>> getHelpList()
-
-
-
-