Search in sources :

Example 1 with AttributeValue

use of org.gradle.api.internal.attributes.AttributeValue in project gradle by gradle.

the class MultipleCandidateMatcher method getCandidateValue.

private Object getCandidateValue(int c, int a) {
    if (a < requestedAttributes.size()) {
        return requestedAttributeValues[getValueIndex(c, a)];
    } else {
        Attribute<?> extraAttribute = getAttribute(a);
        AttributeValue attributeValue = candidateAttributeSets[c].findEntry(extraAttribute.getName());
        return attributeValue.isPresent() ? attributeValue.coerce(extraAttribute) : null;
    }
}
Also used : AttributeValue(org.gradle.api.internal.attributes.AttributeValue)

Aggregations

AttributeValue (org.gradle.api.internal.attributes.AttributeValue)1