api / org.gradle.api.attributes / HasAttributes

HasAttributes

@Incubating interface HasAttributes

Represents something that carries attributes by utilizing an AttributeContainer

Since
3.3

Functions

getAttributes

abstract fun getAttributes(): AttributeContainer

Returns the attributes

Inheritors

ArtifactTypeDefinition

interface ArtifactTypeDefinition : HasAttributes, Named

Meta-data about a particular type of artifacts.

ArtifactView

interface ArtifactView : HasAttributes

A view over the artifacts resolved for this set of dependencies. By default, the view returns all files and artifacts, but this can be restricted by component identifier or by attributes.

AttributeContainer

interface AttributeContainer : HasAttributes

An attribute container is a container of Attribute, which are strongly typed named entities. Such a container is responsible for storing and getting attributes in a type safe way. In particular, attributes are strongly typed, meaning that when we get a value from the container, the returned value type is inferred from the type of the attribute. In a way, an attribute container is similar to a java.util.Map where the entry is a "typed String" and the value is of the string type. However the set of methods available to the container is much more limited. It is not allowed to have two attributes with the same name but different types in the container.

ComponentMetadata

interface ComponentMetadata : HasAttributes

Provides a read-only view of a resolved component's metadata, which typically originates from a component descriptor (Ivy file, Maven POM).

HasConfigurableAttributes

interface HasConfigurableAttributes<SELF : Any> : HasAttributes

Represents something that carries attributes by utilizing an AttributeContainer that is configurable.