Interface OptionDescriptor

All Superinterfaces:
org.refcodes.mixin.DescriptionAccessor, org.refcodes.mixin.EnvironmentVariableNameAccessor, org.refcodes.mixin.SystemPropertyNameAccessor, org.refcodes.mixin.TypeAccessor
All Known Implementing Classes:
DiagnosticOptions.Configuration

public interface OptionDescriptor extends org.refcodes.mixin.SystemPropertyNameAccessor, org.refcodes.mixin.EnvironmentVariableNameAccessor, org.refcodes.mixin.TypeAccessor, org.refcodes.mixin.DescriptionAccessor
The OptionDescriptor interface describes enumerations representing well known configuration options for subclasses of the Options class.

It allows an option to declare additional metadata such as a description, an expected value type, or custom names for the corresponding JVM system property and environment variable.

Optional methods defined by this interface provide default implementations whose values are derived from the implementing enumeration's Enum.name(). Implementing types only need to override these methods when the default inference should be customized.

A subclass of the Options class typically defines an enumeration implementing this interface and passes that enumeration to the (super) Options(Options.Builder, Class) constructor. This enables type safe access to known options and enriches diagnostic output such as produced by the Options.toSchema() method.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.mixin.DescriptionAccessor

    org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B extends org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B>>, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator, org.refcodes.mixin.DescriptionAccessor.DescriptionProperty

    Nested classes/interfaces inherited from interface org.refcodes.mixin.EnvironmentVariableNameAccessor

    org.refcodes.mixin.EnvironmentVariableNameAccessor.EnvironmentVariableNameBuilder<B extends org.refcodes.mixin.EnvironmentVariableNameAccessor.EnvironmentVariableNameBuilder<B>>, org.refcodes.mixin.EnvironmentVariableNameAccessor.EnvironmentVariableNameMutator, org.refcodes.mixin.EnvironmentVariableNameAccessor.EnvironmentVariableNameProperty

    Nested classes/interfaces inherited from interface org.refcodes.mixin.SystemPropertyNameAccessor

    org.refcodes.mixin.SystemPropertyNameAccessor.SystemPropertyNameBuilder<B extends org.refcodes.mixin.SystemPropertyNameAccessor.SystemPropertyNameBuilder<B>>, org.refcodes.mixin.SystemPropertyNameAccessor.SystemPropertyNameMutator, org.refcodes.mixin.SystemPropertyNameAccessor.SystemPropertyNameProperty

    Nested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor

    org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T,B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T>, org.refcodes.mixin.TypeAccessor.TypeProperty<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    default String

    Methods inherited from interface org.refcodes.mixin.DescriptionAccessor

    getDescription

    Methods inherited from interface org.refcodes.mixin.TypeAccessor

    getType
  • Method Details

    • getEnvironmentVariableName

      default String getEnvironmentVariableName()

      Note: When returning null, the Options type will infer the name from the implementing enumeration's name as of EnvironmentVariable.toEnvironmentVariableName(String).

      Specified by:
      getEnvironmentVariableName in interface org.refcodes.mixin.EnvironmentVariableNameAccessor
    • getSystemPropertyName

      default String getSystemPropertyName()

      Note: When returning null, the Options type will infer the name from the implementing enumeration's name as of SystemProperty.toSystemPropertyName(String).

      Specified by:
      getSystemPropertyName in interface org.refcodes.mixin.SystemPropertyNameAccessor