Object LoadOptions.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit setFieldByAnnotation(LoadOptions options, String annotationName, Object value) Sets the value of a field based on its annotation name.
      final List<String> getOptionNames(String fieldName) Returns all option names for a given field.
      final <Error class: unknown class> create(VolatileConfig conf) Creates a new empty LoadOptions with the given configuration.
      final <Error class: unknown class> createUnsafe() Creates a new empty LoadOptions with an unsafe configuration.
      final <Error class: unknown class> normalize(String args) Normalizes arguments into a standard format.
      final <Error class: unknown class> parse(String args, VolatileConfig conf) Parses a string of arguments into a LoadOptions object.
      final <Error class: unknown class> parse(String args, LoadOptions options) Parses a string of arguments into a LoadOptions object based on another instance.
      final <Error class: unknown class> merge(LoadOptions o1, LoadOptions o2) Merges two LoadOptions objects, with o2 options taking precedence.
      final <Error class: unknown class> merge(LoadOptions o1, String args) Merges a LoadOptions object with additional arguments string.
      final <Error class: unknown class> merge(String args, String args2, VolatileConfig conf) Merges two argument strings into a single LoadOptions.
      final <Error class: unknown class> mergeArgs(String args, VolatileConfig conf) Merges multiple argument strings, with later arguments taking precedence.
      final String eraseOptions(String args, String fieldNames) Removes specified options from an arguments string.
      final LoadOptions getDEFAULT() Default LoadOptions instance with standard settings.
      final <Error class: unknown class> getOptionFields() List of all option fields in the LoadOptions class.
      final <Error class: unknown class> getOptionFieldsMap() Map of field names to their corresponding Field objects.
      final <Error class: unknown class> getDefaultParams() Map of field names to their default values from DEFAULT instance.
      final Map<String, String> getDefaultArgsMap() Map of default option names and values.
      final <Error class: unknown class> getArity0BooleanParams() List of zero-arity boolean parameter names.
      final <Error class: unknown class> getArity1BooleanParams() List of single-arity boolean parameter names.
      final <Error class: unknown class> getOptionNames() List of all option names from parameter annotations.
      final <Error class: unknown class> getApiPublicOptionNames() List of option names that are marked as API public.
      final List<List<String>> getHelpList()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setFieldByAnnotation

         final Unit setFieldByAnnotation(LoadOptions options, String annotationName, Object value)

        Sets the value of a field based on its annotation name.

        Parameters:
        options - the LoadOptions instance to modify
        annotationName - the annotation name to search for
        value - the value to set
      • getOptionNames

         final List<String> getOptionNames(String fieldName)

        Returns all option names for a given field.

        Parameters:
        fieldName - the field name to look up
        Returns:

        list of all option names for that field

      • create

         final <Error class: unknown class> create(VolatileConfig conf)

        Creates a new empty LoadOptions with the given configuration.

        Parameters:
        conf - the configuration to use
        Returns:

        a new LoadOptions instance

      • createUnsafe

         final <Error class: unknown class> createUnsafe()

        Creates a new empty LoadOptions with an unsafe configuration.

        Returns:

        a new LoadOptions instance

      • normalize

         final <Error class: unknown class> normalize(String args)

        Normalizes arguments into a standard format.

        Parameters:
        args - the arguments to normalize
        Returns:

        normalized arguments string

      • parse

         final <Error class: unknown class> parse(String args, VolatileConfig conf)

        Parses a string of arguments into a LoadOptions object.

        Parameters:
        args - the arguments string to parse
        conf - the configuration to use
        Returns:

        the parsed LoadOptions

      • parse

         final <Error class: unknown class> parse(String args, LoadOptions options)

        Parses a string of arguments into a LoadOptions object based on another instance.

        Parameters:
        args - the arguments string to parse
        options - the base options to use
        Returns:

        the parsed LoadOptions

      • merge

         final <Error class: unknown class> merge(LoadOptions o1, LoadOptions o2)

        Merges two LoadOptions objects, with o2 options taking precedence.

        Parameters:
        o1 - the base options
        o2 - the overriding options
        Returns:

        a new merged LoadOptions

      • merge

         final <Error class: unknown class> merge(LoadOptions o1, String args)

        Merges a LoadOptions object with additional arguments string.

        Parameters:
        o1 - the base options
        args - the overriding arguments
        Returns:

        a new merged LoadOptions

      • merge

         final <Error class: unknown class> merge(String args, String args2, VolatileConfig conf)

        Merges two argument strings into a single LoadOptions.

        Parameters:
        args - the base arguments
        args2 - the overriding arguments
        conf - the configuration to use
        Returns:

        a new merged LoadOptions

      • mergeArgs

         final <Error class: unknown class> mergeArgs(String args, VolatileConfig conf)

        Merges multiple argument strings, with later arguments taking precedence.

        Parameters:
        args - the argument strings to merge
        conf - the configuration to use
        Returns:

        the merged arguments string

      • eraseOptions

         final String eraseOptions(String args, String fieldNames)

        Removes specified options from an arguments string.

        Parameters:
        args - the original arguments string
        fieldNames - the field names to remove
        Returns:

        the modified arguments string

      • getDEFAULT

         final LoadOptions getDEFAULT()

        Default LoadOptions instance with standard settings. Used as a base for comparison and default values.

      • getOptionFields

         final <Error class: unknown class> getOptionFields()

        List of all option fields in the LoadOptions class. Contains fields with Parameter annotations for option parsing.

      • getOptionFieldsMap

         final <Error class: unknown class> getOptionFieldsMap()

        Map of field names to their corresponding Field objects.

      • getDefaultParams

         final <Error class: unknown class> getDefaultParams()

        Map of field names to their default values from DEFAULT instance.

      • getArity0BooleanParams

         final <Error class: unknown class> getArity0BooleanParams()

        List of zero-arity boolean parameter names. These are parameters that don't require a value (flag parameters).

      • getArity1BooleanParams

         final <Error class: unknown class> getArity1BooleanParams()

        List of single-arity boolean parameter names. These are boolean parameters that require a value.

      • getOptionNames

         final <Error class: unknown class> getOptionNames()

        List of all option names from parameter annotations.

      • getApiPublicOptionNames

         final <Error class: unknown class> getApiPublicOptionNames()

        List of option names that are marked as API public. These options are exposed through REST APIs.