Class ConfigRef<T>

java.lang.Object
ch.raffael.meldioc.model.ConfigRef<T>

public abstract class ConfigRef<T> extends Object
A reference to a configuration parameter.

TODO (2019-04-19) rename to ConfigParamRef

  • Method Details

    • builder

      public static <T> ConfigRef.Builder<T> builder()
    • of

      public static <T> ConfigRef<T> of(T type, String configMethodName)
    • type

      @Parameter public abstract T type()
    • configMethodName

      @Parameter public abstract String configMethodName()
    • targetTypeArgument

      @Default @Nullable public T targetTypeArgument()
    • withType

      ConfigRef<T> withType(T value)
      Copy the current immutable object by setting a value for the type attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy of the this object
    • withConfigMethodName

      ConfigRef<T> withConfigMethodName(String value)
      Copy the current immutable object by setting a value for the configMethodName attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for configMethodName
      Returns:
      A modified copy of the this object
    • withTargetTypeArgument

      ConfigRef<T> withTargetTypeArgument(@Nullable T value)
      Copy the current immutable object by setting a value for the targetTypeArgument attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for targetTypeArgument (can be null)
      Returns:
      A modified copy of the this object