Class ImmutableStandardArgumentExtractor

java.lang.Object
org.incendo.cloud.annotations.extractor.StandardArgumentExtractor
org.incendo.cloud.annotations.extractor.ImmutableStandardArgumentExtractor
All Implemented Interfaces:
ArgumentExtractor

@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().

  • Method Details

    • annotationParser

      public @NonNull AnnotationParser<?> annotationParser()
      Returns the annotation parser.
      Specified by:
      annotationParser in class StandardArgumentExtractor
      Returns:
      the annotation parser
    • parameterNameExtractor

      public @NonNull ParameterNameExtractor parameterNameExtractor()
      Returns the ParameterNameExtractor which is responsible for mapping parameters to syntax fragments in the case that a named @Argument annotation is not present.
      Overrides:
      parameterNameExtractor in class StandardArgumentExtractor
      Returns:
      the parameter name extractor
    • descriptionMapper

      public @NonNull DescriptionMapper descriptionMapper()
      Returns the description mapper.
      Overrides:
      descriptionMapper in class StandardArgumentExtractor
      Returns:
      the description mapper
    • withAnnotationParser

      public final ImmutableStandardArgumentExtractor withAnnotationParser(@NonNull AnnotationParser<?> value)
      Copy the current immutable object by setting a value for the annotationParser attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for annotationParser
      Returns:
      A modified copy of the this object
    • withParameterNameExtractor

      public final ImmutableStandardArgumentExtractor withParameterNameExtractor(@NonNull ParameterNameExtractor value)
      Copy the current immutable object by setting a value for the parameterNameExtractor attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for parameterNameExtractor
      Returns:
      A modified copy of the this object
    • withDescriptionMapper

      public final ImmutableStandardArgumentExtractor withDescriptionMapper(@NonNull DescriptionMapper value)
      Copy the current immutable object by setting a value for the descriptionMapper attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for descriptionMapper
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableStandardArgumentExtractor that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: annotationParser, parameterNameExtractor, descriptionMapper.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value StandardArgumentExtractor with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ImmutableStandardArgumentExtractor of(@NonNull AnnotationParser<?> annotationParser, @NonNull ParameterNameExtractor parameterNameExtractor, @NonNull DescriptionMapper descriptionMapper)
      Construct a new immutable StandardArgumentExtractor instance.
      Parameters:
      annotationParser - The value for the annotationParser attribute
      parameterNameExtractor - The value for the parameterNameExtractor attribute
      descriptionMapper - The value for the descriptionMapper attribute
      Returns:
      An immutable StandardArgumentExtractor instance
    • copyOf

      Creates an immutable copy of a StandardArgumentExtractor value. 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 for ImmutableStandardArgumentExtractor.
       ImmutableStandardArgumentExtractor.builder()
          .annotationParser(org.incendo.cloud.annotations.@org.checkerframework.checker.nullness.qual.NonNull AnnotationParser&lt;?&gt;) // required annotationParser
          .parameterNameExtractor(org.incendo.cloud.annotations.extractor.@org.checkerframework.checker.nullness.qual.NonNull ParameterNameExtractor) // optional parameterNameExtractor
          .descriptionMapper(org.incendo.cloud.annotations.@org.checkerframework.checker.nullness.qual.NonNull DescriptionMapper) // optional descriptionMapper
          .build();
       
      Returns:
      A new ImmutableStandardArgumentExtractor builder