public class Apis extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Apis.IdFunction |
Constructor and Description |
---|
Apis() |
Modifier and Type | Method and Description |
---|---|
static Iterable<ApiMetadata> |
all()
Returns all available apis.
|
static Iterable<ApiMetadata> |
contextAssignableFrom(com.google.common.reflect.TypeToken<?> type)
Returns all apis who's contexts are assignable from the parameter
|
static com.google.common.reflect.TypeToken<?> |
findView(ApiMetadata apiMetadata,
com.google.common.reflect.TypeToken<?> view)
Returns the type of context
|
static com.google.common.base.Function<ApiMetadata,String> |
idFunction() |
static Iterable<ApiMetadata> |
viewableAs(Class<? extends View> type) |
static Iterable<ApiMetadata> |
viewableAs(com.google.common.reflect.TypeToken<? extends View> type)
Returns all apis who's contexts are assignable from the parameter
|
static ApiMetadata |
withId(String id)
Returns the first api with the provided id
|
public static com.google.common.base.Function<ApiMetadata,String> idFunction()
public static Iterable<ApiMetadata> all()
public static ApiMetadata withId(String id) throws NoSuchElementException
id
- the id of the api to returnNoSuchElementException
- whenever there are no apis with the provided idpublic static Iterable<ApiMetadata> contextAssignableFrom(com.google.common.reflect.TypeToken<?> type)
type
- the type of the context to search forpublic static Iterable<ApiMetadata> viewableAs(com.google.common.reflect.TypeToken<? extends View> type)
type
- the type of the context to search forpublic static Iterable<ApiMetadata> viewableAs(Class<? extends View> type)
public static com.google.common.reflect.TypeToken<?> findView(ApiMetadata apiMetadata, com.google.common.reflect.TypeToken<?> view) throws NoSuchElementException
type
- the type of the context to search forNoSuchElementException
Copyright © 2009-2013 jclouds. All Rights Reserved.