Class LoadOptions.OptionDescriptor
-
- All Implemented Interfaces:
public final class LoadOptions.OptionDescriptor<T extends Object>Descriptor for a single option field in LoadOptions.
Captures all metadata (field name, CLI names, type, arity, API visibility, description) plus typed get and set lambdas that use direct Kotlin property access — no reflection.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringfieldNameprivate final List<String>namesprivate final Class<T>typeprivate final BooleanisApiPublicprivate final BooleanisArity0Booleanprivate final Stringdescriptionprivate final Function1<LoadOptions, T>getprivate final Function2<LoadOptions, T, Unit>set
-
Constructor Summary
Constructors Constructor Description LoadOptions.OptionDescriptor(String fieldName, List<String> names, Class<T> type, Boolean isApiPublic, Boolean isArity0Boolean, String description, Function1<LoadOptions, T> get, Function2<LoadOptions, T, Unit> set)
-
Method Summary
Modifier and Type Method Description final StringgetFieldName()the Kotlin property name final List<String>getNames()all CLI long/short names (e.g. final Class<T>getType()the JVM type class final BooleanisApiPublic()whether the option is exposed via REST APIs final BooleanisArity0Boolean()true for boolean flags that take no value final StringgetDescription()the help text (from @Parameter. final Function1<LoadOptions, T>getGet()typed getter lambda final Function2<LoadOptions, T, Unit>getSet()typed setter lambda -
-
Method Detail
-
getFieldName
final String getFieldName()
the Kotlin property name
-
isApiPublic
final Boolean isApiPublic()
whether the option is exposed via REST APIs
-
isArity0Boolean
final Boolean isArity0Boolean()
true for boolean flags that take no value
-
getDescription
final String getDescription()
the help text (from @Parameter.description)
-
getGet
final Function1<LoadOptions, T> getGet()
typed getter lambda
-
getSet
final Function2<LoadOptions, T, Unit> getSet()
typed setter lambda
-
-
-
-