Package org.jclouds.apis
Class Apis
java.lang.Object
org.jclouds.apis.Apis
The Apis class provides static methods for accessing apis.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 parameterstatic com.google.common.reflect.TypeToken
<?> findView
(ApiMetadata apiMetadata, com.google.common.reflect.TypeToken<?> view) Returns the type of contextstatic com.google.common.base.Function
<ApiMetadata, String> static Iterable
<ApiMetadata> viewableAs
(com.google.common.reflect.TypeToken<? extends View> type) Returns all apis who's contexts are assignable from the parameterstatic Iterable
<ApiMetadata> viewableAs
(Class<? extends View> type) static ApiMetadata
Returns the first api with the provided id
-
Constructor Details
-
Apis
public Apis()
-
-
Method Details
-
idFunction
-
all
Returns all available apis.- Returns:
- all available apis
-
withId
Returns the first api with the provided id- Parameters:
id
- the id of the api to return- Returns:
- the api with the given id
- Throws:
NoSuchElementException
- whenever there are no apis with the provided id
-
contextAssignableFrom
public static Iterable<ApiMetadata> contextAssignableFrom(com.google.common.reflect.TypeToken<?> type) Returns all apis who's contexts are assignable from the parameter- Parameters:
type
- the type of the context to search for- Returns:
- the apis with contexts assignable from given type
-
viewableAs
public static Iterable<ApiMetadata> viewableAs(com.google.common.reflect.TypeToken<? extends View> type) Returns all apis who's contexts are assignable from the parameter- Parameters:
type
- the type of the context to search for- Returns:
- the apis with contexts assignable from given type
-
viewableAs
-
findView
public static com.google.common.reflect.TypeToken<?> findView(ApiMetadata apiMetadata, com.google.common.reflect.TypeToken<?> view) throws NoSuchElementException Returns the type of context- Parameters:
type
- the type of the context to search for- Returns:
- the apis with contexts transformable to the given type
- Throws:
NoSuchElementException
-