Class ImmutableStandardArgumentExtractor.Builder
java.lang.Object
org.incendo.cloud.annotations.extractor.ImmutableStandardArgumentExtractor.Builder
- Enclosing class:
ImmutableStandardArgumentExtractor
Builds instances of type
ImmutableStandardArgumentExtractor.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionannotationParser(@NonNull AnnotationParser<?> annotationParser) Initializes the value for theannotationParserattribute.build()Builds a newImmutableStandardArgumentExtractor.descriptionMapper(@NonNull DescriptionMapper descriptionMapper) Initializes the value for thedescriptionMapperattribute.from(StandardArgumentExtractor instance) Fill a builder with attribute values from the providedStandardArgumentExtractorinstance.parameterNameExtractor(@NonNull ParameterNameExtractor parameterNameExtractor) Initializes the value for theparameterNameExtractorattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableStandardArgumentExtractor.Builder from(StandardArgumentExtractor instance) Fill a builder with attribute values from the providedStandardArgumentExtractorinstance. 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
-
annotationParser
@CanIgnoreReturnValue public final ImmutableStandardArgumentExtractor.Builder annotationParser(@NonNull AnnotationParser<?> annotationParser) Initializes the value for theannotationParserattribute.- Parameters:
annotationParser- The value for annotationParser- Returns:
thisbuilder for use in a chained invocation
-
parameterNameExtractor
@CanIgnoreReturnValue public final ImmutableStandardArgumentExtractor.Builder parameterNameExtractor(@NonNull ParameterNameExtractor parameterNameExtractor) Initializes the value for theparameterNameExtractorattribute.If not set, this attribute will have a default value as returned by the initializer of
parameterNameExtractor.- Parameters:
parameterNameExtractor- The value for parameterNameExtractor- Returns:
thisbuilder for use in a chained invocation
-
descriptionMapper
@CanIgnoreReturnValue public final ImmutableStandardArgumentExtractor.Builder descriptionMapper(@NonNull DescriptionMapper descriptionMapper) Initializes the value for thedescriptionMapperattribute.If not set, this attribute will have a default value as returned by the initializer of
descriptionMapper.- Parameters:
descriptionMapper- The value for descriptionMapper- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableStandardArgumentExtractor.- Returns:
- An immutable instance of StandardArgumentExtractor
- Throws:
IllegalStateException- if any required attributes are missing
-