org.gradle.api.attributes

## Interface AttributesSchema

-     @Incubating
      public interface AttributesSchema

  An attributes schema stores information about `attributes` and how they can be matched together.
  Since:
    3.3

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> AttributeMatchingStrategy<T>` | `attribute(Attribute<T> attribute)` Declares a new attribute in the schema and configures it with the default strategy.
    `<T> AttributeMatchingStrategy<T>` | `attribute(Attribute<T> attribute, Action<? super AttributeMatchingStrategy<T>> configureAction)` Configures the matching strategy for an attribute.
    `Set<Attribute<?>>` | `getAttributes()`
    `<T> AttributeMatchingStrategy<T>` | `getMatchingStrategy(Attribute<T> attribute)` Returns the matching strategy for a given attribute.
    `boolean` | `hasAttribute(Attribute<?> key)`

- - ### Method Detail

    - #### getMatchingStrategy

          <T> AttributeMatchingStrategy<T> getMatchingStrategy(Attribute<T> attribute)

      Returns the matching strategy for a given attribute.
      Type Parameters:
        `T` - the type of the attribute
      Parameters:
        `attribute` - the attribute
      Returns:
        the matching strategy for this attribute.

    - #### attribute

          <T> AttributeMatchingStrategy<T> attribute(Attribute<T> attribute)

      Declares a new attribute in the schema and configures it with the default strategy. If the attribute was already declared it will simply return the existing strategy.
      Type Parameters:
        `T` - the concrete type of the attribute
      Parameters:
        `attribute` - the attribute to declare in the schema
      Returns:
        the matching strategy for this attribute

    - #### attribute

          <T> AttributeMatchingStrategy<T> attribute(Attribute<T> attribute,
                                                   Action<? super AttributeMatchingStrategy<T>> configureAction)

      Configures the matching strategy for an attribute. The first call to this method for a specific attribute will create a new matching strategy, whereas subsequent calls will configure the existing one.
      Type Parameters:
        `T` - the concrete type of the attribute
      Parameters:
        `attribute` - the attribute for which to configure the matching strategy
        `configureAction` - the strategy configuration
      Returns:
        the configured strategy

    - #### getAttributes

          Set<Attribute<?>> getAttributes()

    - #### hasAttribute

          boolean hasAttribute(Attribute<?> key)