Annotation Interface Parameter


@Target(METHOD) @Retention(CLASS) @Documented public @interface Parameter

Used to retrieve a configuration parameter. Meld uses Typesafe Config for all configuration. All types supported by Typesafe Config may be used as return value, including Config to return a sub-configuration.

If the method is abstract, the parameter is required. If it has an implementation, it will be used to retrieve a default value.

If no parameter name is specified, the method name converted to kebab case will be used, e.g.:

  @Parameter
  abstract int myParameter();

is equivalent to

  @Parameter("my-parameter")
  abstract int myParameter();

The special parameter name '*' refers to the whole configuration tree.

If a prefix is specified on the feature class, the parameter name will be relative to that prefix, unless absolute=true is specified.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Specify a prefix for all parameters in this class.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Ignore the specified Parameter.Prefix
    The key in the configuration to use, defaults to the method name converted to kebab case.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Field Details

  • Element Details

    • value

      String value
      The key in the configuration to use, defaults to the method name converted to kebab case.
      Default:
      ""
    • absolute

      boolean absolute
      Ignore the specified Parameter.Prefix
      Default:
      false