Package ch.raffael.meldioc.model
Class SrcElement.Builder<S,T>
java.lang.Object
ch.raffael.meldioc.model.SrcElement.Builder<S,T>
- Enclosing class:
SrcElement<S,T>
-
Method Summary
Modifier and TypeMethodDescriptionfinal SrcElement.Builder<S,T> accessPolicy(AccessPolicy accessPolicy) Initializes the value for theaccessPolicyattribute.addAllConfigs(Iterable<ElementConfig<S>> element) addAllExceptions(Iterable<T> element) addAllParameters(Iterable<SrcElement<S, T>> element) addConfigs(ElementConfig<S> element) final SrcElement.Builder<S,T> addConfigs(ElementConfig<S>... elements) addExceptions(T element) final SrcElement.Builder<S,T> addExceptions(T... elements) addParameters(SrcElement<S, T> element) final SrcElement.Builder<S,T> addParameters(SrcElement<S, T>... elements) SrcElement<S,T> build()Builds a newSrcElement.configs(io.vavr.collection.Set<ElementConfig<S>> elements) exceptions(io.vavr.collection.Seq<T> elements) final SrcElement.Builder<S,T> from(SrcElement<S, T> instance) Fill a builder with attribute values from the providedSrcElementinstance.final SrcElement.Builder<S,T> isAbstract(boolean isAbstract) Initializes the value for theisAbstractattribute.final SrcElement.Builder<S,T> isFinal(boolean isFinal) Initializes the value for theisFinalattribute.final SrcElement.Builder<S,T> isSealed(boolean isSealed) Initializes the value for theisSealedattribute.final SrcElement.Builder<S,T> isStatic(boolean isStatic) Initializes the value for theisStaticattribute.final SrcElement.Builder<S,T> kind(SrcElement.Kind kind) Initializes the value for thekindattribute.final SrcElement.Builder<S,T> Initializes the value for thenameattribute.parameters(io.vavr.collection.Seq<SrcElement<S, T>> elements) parent(SrcElement<S, T> parent) parent(io.vavr.control.Option<SrcElement<S, T>> parent) parentOption(SrcElement<S, T> x) parentOption(io.vavr.control.Option<SrcElement<S, T>> opt) setIterableConfigs(Iterable<ElementConfig<S>> elements) setIterableExceptions(Iterable<T> elements) setIterableParameters(Iterable<SrcElement<S, T>> elements) final SrcElement.Builder<S,T> Initializes the value for thesourceattribute.final SrcElement.Builder<S,T> synthesized(boolean synthesized) Initializes the value for thesynthesizedattribute.synthetic(boolean synthetic) final SrcElement.Builder<S,T> Initializes the value for thetypeattribute.
-
Method Details
-
synthetic
-
parent
-
parent
-
from
Fill a builder with attribute values from the providedSrcElementinstance. 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
-
kind
Initializes the value for thekindattribute.- Parameters:
kind- The value for kind- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.- Parameters:
name- The value for name- 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
-
source
Initializes the value for thesourceattribute.- Parameters:
source- The value for source- Returns:
thisbuilder for use in a chained invocation
-
synthesized
Initializes the value for thesynthesizedattribute.If not set, this attribute will have a default value as returned by the initializer of
synthesized.- Parameters:
synthesized- The value for synthesized- Returns:
thisbuilder for use in a chained invocation
-
parentOption
-
parentOption
-
unsetParentOption
-
accessPolicy
Initializes the value for theaccessPolicyattribute.- Parameters:
accessPolicy- The value for accessPolicy- Returns:
thisbuilder for use in a chained invocation
-
isStatic
Initializes the value for theisStaticattribute.- Parameters:
isStatic- The value for isStatic- Returns:
thisbuilder for use in a chained invocation
-
isFinal
Initializes the value for theisFinalattribute.- Parameters:
isFinal- The value for isFinal- Returns:
thisbuilder for use in a chained invocation
-
isSealed
Initializes the value for theisSealedattribute.- Parameters:
isSealed- The value for isSealed- Returns:
thisbuilder for use in a chained invocation
-
isAbstract
Initializes the value for theisAbstractattribute.- Parameters:
isAbstract- The value for isAbstract- Returns:
thisbuilder for use in a chained invocation
-
addParameters
-
addParameters
-
addAllParameters
-
parameters
-
setIterableParameters
-
addExceptions
-
addExceptions
-
addAllExceptions
-
exceptions
-
setIterableExceptions
-
addConfigs
-
addConfigs
-
addAllConfigs
-
configs
-
setIterableConfigs
-
build
Builds a newSrcElement.- Returns:
- An immutable instance of SrcElement
- Throws:
ch.raffael.meldioc.util.immutables.IllegalBuilderStateException- if any required attributes are missing
-