Package ch.raffael.meldioc.model
Class ConfigRef.Builder<T>
java.lang.Object
ch.raffael.meldioc.model.ConfigRef.Builder<T>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newConfigRef.final ConfigRef.Builder<T>configMethodName(String configMethodName) Initializes the value for theconfigMethodNameattribute.final ConfigRef.Builder<T>Fill a builder with attribute values from the providedConfigRefinstance.final ConfigRef.Builder<T>targetTypeArgument(T targetTypeArgument) Initializes the value for thetargetTypeArgumentattribute.final ConfigRef.Builder<T>Initializes the value for thetypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedConfigRefinstance. 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:
thisbuilder for use in a chained invocation
-
type
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
configMethodName
Initializes the value for theconfigMethodNameattribute.- Parameters:
configMethodName- The value for configMethodName- Returns:
thisbuilder for use in a chained invocation
-
targetTypeArgument
Initializes the value for thetargetTypeArgumentattribute.If not set, this attribute will have a default value as returned by the initializer of
targetTypeArgument.- Parameters:
targetTypeArgument- The value for targetTypeArgument (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newConfigRef.- Returns:
- An immutable instance of ConfigRef
- Throws:
ch.raffael.meldioc.util.immutables.IllegalBuilderStateException- if any required attributes are missing
-