-
- All Implemented Interfaces:
-
org.gradle.api.attributes.AttributeContainer
,org.gradle.api.attributes.HasAttributes
public final class HierarchyAttributeContainer implements AttributeContainer
An attribute container that delegates attributes lookup to the parent when the key matches filterParentAttributes and is missing in this container.
This container should never be passed to any Gradle API, as Gradle assumes all AttributeContainer instances to implement AttributeContainerInternal. TODO expose Kotlin-specific API to the users, convert the user attributes to Gradle attributes internally
-
-
Field Summary
Fields Modifier and Type Field Description private final AttributeContainer
parent
private final Function1<Attribute<?>, Boolean>
filterParentAttributes
-
Constructor Summary
Constructors Constructor Description HierarchyAttributeContainer(AttributeContainer parent, Function1<Attribute<?>, Boolean> filterParentAttributes)
-
Method Summary
Modifier and Type Method Description final AttributeContainer
getParent()
final Function1<Attribute<?>, Boolean>
getFilterParentAttributes()
Boolean
contains(Attribute<?> key)
<T extends Any> T
getAttribute(Attribute<T> key)
Boolean
isEmpty()
Set<Attribute<?>>
keySet()
<T extends Any> AttributeContainer
attribute(Attribute<T> key, T value)
AttributeContainer
getAttributes()
<T extends Any> AttributeContainer
attributeProvider(Attribute<T> key, Provider<out T> provider)
-
-
Constructor Detail
-
HierarchyAttributeContainer
HierarchyAttributeContainer(AttributeContainer parent, Function1<Attribute<?>, Boolean> filterParentAttributes)
-
-
Method Detail
-
getParent
final AttributeContainer getParent()
-
getFilterParentAttributes
final Function1<Attribute<?>, Boolean> getFilterParentAttributes()
-
getAttribute
<T extends Any> T getAttribute(Attribute<T> key)
-
getAttributes
AttributeContainer getAttributes()
-
attributeProvider
<T extends Any> AttributeContainer attributeProvider(Attribute<T> key, Provider<out T> provider)
-
-
-
-