public class Providers extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Providers.ApiMetadataFunction |
static class |
Providers.IdFunction |
Constructor and Description |
---|
Providers() |
Modifier and Type | Method and Description |
---|---|
static Iterable<ProviderMetadata> |
all()
Returns all available providers.
|
static Iterable<ProviderMetadata> |
apiMetadataAssignableFrom(com.google.common.reflect.TypeToken<? extends ApiMetadata> api)
Returns the providers that are of the provided api.
|
static com.google.common.base.Function<ProviderMetadata,ApiMetadata> |
apiMetadataFunction() |
static Iterable<ProviderMetadata> |
boundedByIso3166Code(String iso3166Code)
Returns the providers that are bound to the same location as the given ISO 3166 code
regardless of viewableAs.
|
static Iterable<ProviderMetadata> |
boundedByIso3166Code(String iso3166Code,
Class<? extends View> viewableAs) |
static Iterable<ProviderMetadata> |
boundedByIso3166Code(String iso3166Code,
com.google.common.reflect.TypeToken<? extends View> viewableAs)
Returns the providers that are bound to the same location as the given ISO 3166 code and of
the given viewableAs.
|
static Iterable<ProviderMetadata> |
collocatedWith(ProviderMetadata providerMetadata)
Returns the providers that have at least one common ISO 3166 code in common regardless of
viewableAs.
|
static Iterable<ProviderMetadata> |
collocatedWith(ProviderMetadata providerMetadata,
Class<? extends View> viewableAs) |
static Iterable<ProviderMetadata> |
collocatedWith(ProviderMetadata providerMetadata,
com.google.common.reflect.TypeToken<? extends View> viewableAs)
Returns the providers that have at least one common ISO 3166 code and are of the given
viewableAs.
|
static <C extends Context> |
contextAssignableFrom(com.google.common.reflect.TypeToken<? extends Context> context)
Returns the providers that are of the provided context.
|
static Iterable<ProviderMetadata> |
fromServiceLoader()
Returns the providers located on the classpath via
ServiceLoader . |
static com.google.common.base.Function<ProviderMetadata,String> |
idFunction() |
static Iterable<ProviderMetadata> |
viewableAs(Class<? extends View> viewableAs) |
static Iterable<ProviderMetadata> |
viewableAs(com.google.common.reflect.TypeToken<? extends View> viewableAs)
Returns the providers that are of the provided viewableAs.
|
static ProviderMetadata |
withId(String id)
Returns the first provider with the provided id
|
public static com.google.common.base.Function<ProviderMetadata,String> idFunction()
public static com.google.common.base.Function<ProviderMetadata,ApiMetadata> apiMetadataFunction()
public static Iterable<ProviderMetadata> fromServiceLoader()
ServiceLoader
.public static Iterable<ProviderMetadata> all()
public static ProviderMetadata withId(String id) throws NoSuchElementException
id
- the id of the provider to returnNoSuchElementException
- whenever there are no providers with the provided idpublic static Iterable<ProviderMetadata> viewableAs(com.google.common.reflect.TypeToken<? extends View> viewableAs)
viewableAs
- the viewableAs to providers to returnpublic static Iterable<ProviderMetadata> viewableAs(Class<? extends View> viewableAs)
public static Iterable<ProviderMetadata> apiMetadataAssignableFrom(com.google.common.reflect.TypeToken<? extends ApiMetadata> api)
api
- the api to providers to returnpublic static <C extends Context> Iterable<ProviderMetadata> contextAssignableFrom(com.google.common.reflect.TypeToken<? extends Context> context)
context
- the context to providers to returnpublic static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code)
isoCode
- the ISO 3166 code to filter providers bypublic static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code, com.google.common.reflect.TypeToken<? extends View> viewableAs)
iso3166Code
- the ISO 3166 code to filter providers byviewableAs
- the viewableAs to filter providers bypublic static Iterable<ProviderMetadata> boundedByIso3166Code(String iso3166Code, Class<? extends View> viewableAs)
public static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata)
providerMetadata
- the provider metadata to use to filter providers bypublic static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata, com.google.common.reflect.TypeToken<? extends View> viewableAs)
providerMetadata
- the provider metadata to use to filter providers byviewableAs
- the viewableAs to filter providers bypublic static Iterable<ProviderMetadata> collocatedWith(ProviderMetadata providerMetadata, Class<? extends View> viewableAs)
Copyright © 2009-2013 jclouds. All Rights Reserved.