oracle.cloud.scanning.api.config.annotation

## Interface IAnnotationConfiguration

-     public interface IAnnotationConfiguration

  This represents the configuration that are defined against an annotation or annotation collection defined in its target.

       The caller follows the following sequence of invocations.

       For every Annotation
         call checkMissingAttributes(Annotation)
         call checkMissingSiblings(Annotation)
         for every available attribute in that Annotation model
            call checkAttribute(Annotation, String)
         Process every value returned by the map Annotation.getValues()
            call checkAttributeValue(AbstractValue)
            if (AbstractValue is an instance of Annotation)
                call IClassConfiguration.getClassAnnotationConfiguration(String)
                and recursively process the nested annotation.

  See Also:
    `IClassConfiguration.getClassAnnotationConfiguration(String)`

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Result` | `checkAttribute(Annotation ann, String attr)` Checks if an attribute of an annotation is valid.
    `Result` | `checkAttributeValue(AbstractValue value)` Checks the annotation attribute value.
    `List<MissingAnnotationAttributeResult>` | `checkMissingAttributes(Annotation e)` Returns the list of missing attributes
    `List<MissingAnnotationResult>` | `checkMissingSiblings(Annotation e)` Returns missing annotations that need to be either at the same level as e.

- - ### Method Detail

    - #### checkAttribute

          Result checkAttribute(Annotation ann,
                              String attr)

      Checks if an attribute of an annotation is valid.
      Parameters:
        `ann` - the annotation model that is built by parsing the entire annotation. It is the callers responsibility to build this model.
        `attr` - the attribute to be checked.
      Returns:
        the result object that tells if the attribute is allowed or not.

    - #### checkMissingAttributes

          List<MissingAnnotationAttributeResult> checkMissingAttributes(Annotation e)

      Returns the list of missing attributes
      Parameters:
        `e` - the annotation model that is built by parsing the entire annotation.
      Returns:
        list containing the missing annotation attributes.

    - #### checkAttributeValue

          Result checkAttributeValue(AbstractValue value)

      Checks the annotation attribute value. The value could be a simple value that could be represented as a string, or nested annotation or an array of them. The annotation model object should be gettable through `AbstractValue.getEnclosingValue()` The caller is expected to traverse through the annotation model and call this for every `AbstractValue` encountered in the model. The caller also should call `IClassConfiguration.getClassAnnotationConfiguration(String)` for every nested annotation and validate that annotation recursively.
      Parameters:
        `value` - the value to be check.
      Returns:
        the result object.
      See Also:
        `ArrayValue`, `SimpleValue`, `Annotation`

    - #### checkMissingSiblings

          List<MissingAnnotationResult> checkMissingSiblings(Annotation e)

      Returns missing annotations that need to be either at the same level as e.
      Parameters:
        `e` - the annotation that is examined
      Returns:
        list containing the missing annotations

Copyright © 2018 Oracle. All rights reserved.