Interface AnnotationConfigurationRegistry

    • Constructor Detail

    • Method Detail

      • put

         abstract void put(@NonNull() AnnotationType annotationType, @Nullable() AnnotationConfiguration configuration)

        Registers annotation configuration for given annotation type. This replaces default configuration.

        Parameters:
        annotationType - Type of annotation for which to register the configuration.
        configuration - Configuration to register.
      • put

         abstract void put(@NonNull() AnnotationTool annotationTool, @Nullable() AnnotationConfiguration configuration)

        Registers configuration for given annotation tool. This replaces default configuration.

        Parameters:
        annotationTool - Annotation tool for which to register configuration.
        configuration - Configuration to register.
      • put

         abstract void put(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant, @Nullable() AnnotationConfiguration configuration)

        Registers configuration for given annotation tool. This replaces default configuration.

        Parameters:
        annotationTool - Annotation tool for which to register configuration.
        toolVariant - Annotation tool variant for which to set the configuration.
        configuration - Configuration to register.
      • get

        @Nullable() abstract AnnotationConfiguration get(@NonNull() AnnotationType annotationType)

        Retrieve configuration for given annotation type.

        Parameters:
        annotationType - Type of annotation for which to retrieve configuration.
        Returns:

        Annotation configuration or null if configuration does not exist.

      • get

        @Nullable() abstract AnnotationConfiguration get(@NonNull() AnnotationTool annotationTool)

        Retrieve configuration for given annotation tool. If no configuration is set for annotation tool, configuration for underlying annotation type (toAnnotationType is returned. The default tool variant is used in this method.

        Parameters:
        annotationTool - Annotation tool for which to retrieve the configuration.
        Returns:

        Annotation configuration or null if configuration does not exist.

      • get

        @Nullable() abstract AnnotationConfiguration get(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant)

        Retrieve configuration for given annotation tool and its tool variant. If no configuration is set for the requested variant, configuration for the default variant is returned. Finally, if no configuration is set for the default variant, configuration for the underlying annotation type (toAnnotationType is returned.

        Parameters:
        annotationTool - Annotation tool for which to retrieve configuration.
        toolVariant - Annotation tool variant for which to retrieve the configuration.
        Returns:

        Annotation configuration or null if configuration does not exist.

      • get

        @Nullable() abstract <T extends AnnotationConfiguration> T get(@NonNull() AnnotationType annotationType, @NonNull() Class<T> requiredClass)

        Retrieve configuration for given annotation type casted to required configuration type.

        Parameters:
        annotationType - Type of annotation for which to retrieve configuration.
        requiredClass - Required class of configuration.
        Returns:

        Annotation configuration casted to T or null if configuration does not exist or has other type than T.

      • get

        @Nullable() abstract <T extends AnnotationConfiguration> T get(@NonNull() AnnotationTool annotationTool, @NonNull() Class<T> requiredClass)

        Retrieve configuration for given annotation tool casted to required configuration type. If no configuration is set for annotation tool, configuration for underlying annotation type (toAnnotationType is returned.

        Parameters:
        annotationTool - Annotation tool for which to retrieve configuration.
        requiredClass - Required class of configuration.
        Returns:

        Annotation configuration casted to T or null if configuration does not exist or has other type than T.

      • get

        @Nullable() abstract <T extends AnnotationConfiguration> T get(@NonNull() AnnotationTool annotationTool, @NonNull() AnnotationToolVariant toolVariant, @NonNull() Class<T> requiredClass)

        Retrieve configuration for given annotation tool and its variant casted to required configuration type. If no configuration is set for the requested variant, configuration for the default variant is returned. Finally, if no configuration is set for the default variant, configuration for the underlying annotation type (toAnnotationType is returned.

        Parameters:
        annotationTool - Annotation tool for which to retrieve configuration.
        toolVariant - Variant of the specified tool for which to retrieve the configuration.
        requiredClass - Required class of configuration.
        Returns:

        Annotation configuration casted to T or null if configuration does not exist or has other type than T.