Class ConfigRef.Builder<T>

java.lang.Object
ch.raffael.meldioc.model.ConfigRef.Builder<T>
Enclosing class:
ConfigRef<T>

public static final class ConfigRef.Builder<T> extends Object
  • Method Details

    • from

      public final ConfigRef.Builder<T> from(ConfigRef<T> instance)
      Fill a builder with attribute values from the provided ConfigRef instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • type

      public final ConfigRef.Builder<T> type(T type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • configMethodName

      public final ConfigRef.Builder<T> configMethodName(String configMethodName)
      Initializes the value for the configMethodName attribute.
      Parameters:
      configMethodName - The value for configMethodName
      Returns:
      this builder for use in a chained invocation
    • targetTypeArgument

      public final ConfigRef.Builder<T> targetTypeArgument(@Nullable T targetTypeArgument)
      Initializes the value for the targetTypeArgument attribute.

      If not set, this attribute will have a default value as returned by the initializer of targetTypeArgument.

      Parameters:
      targetTypeArgument - The value for targetTypeArgument (can be null)
      Returns:
      this builder for use in a chained invocation
    • build

      public ConfigRef<T> build()
      Builds a new ConfigRef.
      Returns:
      An immutable instance of ConfigRef
      Throws:
      ch.raffael.meldioc.util.immutables.IllegalBuilderStateException - if any required attributes are missing