Class Apis


  • public class Apis
    extends Object
    The Apis class provides static methods for accessing apis.
    • Constructor Detail

      • Apis

        public Apis()
    • Method Detail

      • idFunction

        public static com.google.common.base.Function<ApiMetadata,​String> idFunction()
      • all

        public static Iterable<ApiMetadata> all()
        Returns all available apis.
        Returns:
        all available apis
      • 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
      • 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