Class ImmutableStandardArgumentExtractor
java.lang.Object
org.incendo.cloud.annotations.extractor.StandardArgumentExtractor
org.incendo.cloud.annotations.extractor.ImmutableStandardArgumentExtractor
- All Implemented Interfaces:
ArgumentExtractor
@Generated(from="StandardArgumentExtractor",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
@API(status=STABLE,
consumers="org.incendo.cloud.*")
public final class ImmutableStandardArgumentExtractor
extends StandardArgumentExtractor
Immutable implementation of
StandardArgumentExtractor.
Use the builder to create immutable instances:
ImmutableStandardArgumentExtractor.builder().
Use the static factory method to create immutable instances:
ImmutableStandardArgumentExtractor.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableStandardArgumentExtractor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the annotation parser.builder()Creates a builder forImmutableStandardArgumentExtractor.copyOf(StandardArgumentExtractor instance) Creates an immutable copy of aStandardArgumentExtractorvalue.Returns the description mapper.booleanThis instance is equal to all instances ofImmutableStandardArgumentExtractorthat have equal attribute values.inthashCode()Computes a hash code from attributes:annotationParser,parameterNameExtractor,descriptionMapper.of(@NonNull AnnotationParser<?> annotationParser, @NonNull ParameterNameExtractor parameterNameExtractor, @NonNull DescriptionMapper descriptionMapper) Construct a new immutableStandardArgumentExtractorinstance.Returns theParameterNameExtractorwhich is responsible for mapping parameters to syntax fragments in the case that a named @Argument annotation is not present.toString()Prints the immutable valueStandardArgumentExtractorwith attribute values.withAnnotationParser(@NonNull AnnotationParser<?> value) Copy the current immutable object by setting a value for theannotationParserattribute.Copy the current immutable object by setting a value for thedescriptionMapperattribute.Copy the current immutable object by setting a value for theparameterNameExtractorattribute.Methods inherited from class org.incendo.cloud.annotations.extractor.StandardArgumentExtractor
builder, builder, create, extractArguments
-
Method Details
-
annotationParser
Returns the annotation parser.- Specified by:
annotationParserin classStandardArgumentExtractor- Returns:
- the annotation parser
-
parameterNameExtractor
Returns theParameterNameExtractorwhich is responsible for mapping parameters to syntax fragments in the case that a named @Argument annotation is not present.- Overrides:
parameterNameExtractorin classStandardArgumentExtractor- Returns:
- the parameter name extractor
-
descriptionMapper
Returns the description mapper.- Overrides:
descriptionMapperin classStandardArgumentExtractor- Returns:
- the description mapper
-
withAnnotationParser
public final ImmutableStandardArgumentExtractor withAnnotationParser(@NonNull AnnotationParser<?> value) Copy the current immutable object by setting a value for theannotationParserattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for annotationParser- Returns:
- A modified copy or the
thisobject
-
withParameterNameExtractor
public final ImmutableStandardArgumentExtractor withParameterNameExtractor(@NonNull ParameterNameExtractor value) Copy the current immutable object by setting a value for theparameterNameExtractorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for parameterNameExtractor- Returns:
- A modified copy or the
thisobject
-
withDescriptionMapper
public final ImmutableStandardArgumentExtractor withDescriptionMapper(@NonNull DescriptionMapper value) Copy the current immutable object by setting a value for thedescriptionMapperattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for descriptionMapper- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableStandardArgumentExtractorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:annotationParser,parameterNameExtractor,descriptionMapper. -
toString
Prints the immutable valueStandardArgumentExtractorwith attribute values. -
of
public static ImmutableStandardArgumentExtractor of(@NonNull AnnotationParser<?> annotationParser, @NonNull ParameterNameExtractor parameterNameExtractor, @NonNull DescriptionMapper descriptionMapper) Construct a new immutableStandardArgumentExtractorinstance.- Parameters:
annotationParser- The value for theannotationParserattributeparameterNameExtractor- The value for theparameterNameExtractorattributedescriptionMapper- The value for thedescriptionMapperattribute- Returns:
- An immutable StandardArgumentExtractor instance
-
copyOf
Creates an immutable copy of aStandardArgumentExtractorvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable StandardArgumentExtractor instance
-
builder
Creates a builder forImmutableStandardArgumentExtractor.ImmutableStandardArgumentExtractor.builder() .annotationParser(org.incendo.cloud.annotations.AnnotationParser<?>) // requiredannotationParser.parameterNameExtractor(org.incendo.cloud.annotations.extractor.ParameterNameExtractor) // optionalparameterNameExtractor.descriptionMapper(org.incendo.cloud.annotations.DescriptionMapper) // optionaldescriptionMapper.build();- Returns:
- A new ImmutableStandardArgumentExtractor builder
-