public class ProviderInfoCollectionImpl extends Object implements ProviderInfoCollection
ProviderInfoCollection
.Modifier and Type | Class and Description |
---|---|
static class |
ProviderInfoCollectionImpl.Builder |
Modifier | Constructor and Description |
---|---|
protected |
ProviderInfoCollectionImpl(com.google.common.collect.ImmutableMap<Provider.Key<?>,? extends ProviderInfo<?>> infoMap) |
Modifier and Type | Method and Description |
---|---|
static ProviderInfoCollectionImpl.Builder |
builder() |
static ProviderInfoCollectionImpl.Builder |
builderWithExpectedSize(int expectedSize) |
<T extends ProviderInfo<T>> |
contains(Provider<T> provider) |
boolean |
containsKey(Object key,
com.google.devtools.build.lib.events.Location loc,
com.google.devtools.build.lib.skylarkinterface.StarlarkContext context) |
<T extends ProviderInfo<T>> |
get(Provider<T> provider) |
DefaultInfo |
getDefaultInfo() |
Object |
getIndex(Object key,
com.google.devtools.build.lib.events.Location loc,
com.google.devtools.build.lib.skylarkinterface.StarlarkContext context) |
protected ProviderInfoCollectionImpl(com.google.common.collect.ImmutableMap<Provider.Key<?>,? extends ProviderInfo<?>> infoMap)
public Object getIndex(Object key, com.google.devtools.build.lib.events.Location loc, com.google.devtools.build.lib.skylarkinterface.StarlarkContext context) throws com.google.devtools.build.lib.syntax.EvalException
getIndex
in interface com.google.devtools.build.lib.syntax.SkylarkIndexable
com.google.devtools.build.lib.syntax.EvalException
public boolean containsKey(Object key, com.google.devtools.build.lib.events.Location loc, com.google.devtools.build.lib.skylarkinterface.StarlarkContext context) throws com.google.devtools.build.lib.syntax.EvalException
containsKey
in interface com.google.devtools.build.lib.syntax.SkylarkQueryable
com.google.devtools.build.lib.syntax.EvalException
public static ProviderInfoCollectionImpl.Builder builder()
public static ProviderInfoCollectionImpl.Builder builderWithExpectedSize(int expectedSize)
public <T extends ProviderInfo<T>> Optional<T> get(Provider<T> provider)
get
in interface ProviderInfoCollection
ProviderInfo
of the specific type given the Provider
public <T extends ProviderInfo<T>> boolean contains(Provider<T> provider)
contains
in interface ProviderInfoCollection
ProviderInfo
of the specific type given by the
Provider
public DefaultInfo getDefaultInfo()
getDefaultInfo
in interface ProviderInfoCollection
DefaultInfo
contained in this collection