gradle
8.6

# AttributesSchema

interface AttributesSchema(source)

An attributes schema stores information about attributes and how they can be matched together.

## Functions

attribute
Link copied to clipboard
abstract fun <T> attribute(attribute: Attribute<T>): AttributeMatchingStrategy<T>
Declares a new attribute in the schema and configures it with the default strategy.
abstract fun <T> attribute(attribute: Attribute<T>, configureAction: Action<out Any>): AttributeMatchingStrategy<T>
Configures the matching strategy for an attribute.
attributeDisambiguationPrecedence
Link copied to clipboard
@Incubating
abstract fun attributeDisambiguationPrecedence(attributes: Array<Attribute<out Any>>)
Adds attributes to the precedence order.
getAttributeDisambiguationPrecedence
Link copied to clipboard
@Incubating
abstract fun getAttributeDisambiguationPrecedence(): List<Attribute<out Any>>
Returns the order that attributes should be considered when resolving ambiguity.
getAttributes
Link copied to clipboard
abstract fun getAttributes(): Set<Attribute<out Any>>
Returns the set of attributes known to this schema.
getMatchingStrategy
Link copied to clipboard
abstract fun <T> getMatchingStrategy(attribute: Attribute<T>): AttributeMatchingStrategy<T>
Returns the matching strategy for a given attribute.
hasAttribute
Link copied to clipboard
abstract fun hasAttribute(key: Attribute<out Any>): Boolean
Returns true when this schema contains the given attribute.
setAttributeDisambiguationPrecedence
Link copied to clipboard
@Incubating
abstract fun setAttributeDisambiguationPrecedence(attributes: List<Attribute<out Any>>)
Sets the order of precedence of attributes when resolving ambiguity.