/** * Retrieves the URI scheme for the specified {@code factory}. * * @param factory the factory * * @return the URI scheme * * @throws BindingException if no scheme is defined for this {@code type} */ @Nonnull public static String schemeOf(BackendFactory factory) { return UriFactory.createScheme(factory.name()); }
/** * Retrieves the name for the specified {@code type}. * <p> * The {@code type} <b>must</b> be annotated with {@link FactoryBinding}, or implements {@link BackendFactory}. * * @param type the type * * @return the name * * @throws BindingException if no name is defined for this {@code type} */ @Nonnull public static String nameOf(Class<?> type) { return findFactory(type).name(); }