/** * @deprecated will be removed in jclouds 1.7, as async interfaces are no * longer supported. */ @Deprecated @SuppressWarnings({ "unchecked", "serial" }) private static <T> void bindAnnotatedSyncToAsyncHttpApiProvider(Binder binder, Class<T> annotated) { TypeToken<AnnotatedSyncToAsyncHttpApiProvider<T>> token = new TypeToken<AnnotatedSyncToAsyncHttpApiProvider<T>>() { }.where(new TypeParameter<T>() { }, annotated); binder.bind(annotated).toProvider(TypeLiteral.class.cast(TypeLiteral.get(token.getType()))); }
@SuppressWarnings({ "unchecked", "serial" }) private static <K> void bindClass(Binder binder, Class<K> sync) { binder.bind(TypeLiteral.class.cast(TypeLiteral.get(new TypeToken<Class<K>>() { }.where(new TypeParameter<K>() { }, sync).getType()))).toInstance(sync); } }
@SuppressWarnings({ "unchecked", "serial" }) private static <K> void bindClass(Binder binder, Class<K> sync) { binder.bind(TypeLiteral.class.cast(TypeLiteral.get(new TypeToken<Class<K>>() { }.where(new TypeParameter<K>() { }, sync).getType()))).toInstance(sync); } }
/** * @deprecated will be removed in jclouds 1.7, as async interfaces are no * longer supported. */ @Deprecated @SuppressWarnings({ "unchecked", "serial" }) private static <T> void bindAnnotatedSyncToAsyncHttpApiProvider(Binder binder, Class<T> annotated) { TypeToken<AnnotatedSyncToAsyncHttpApiProvider<T>> token = new TypeToken<AnnotatedSyncToAsyncHttpApiProvider<T>>() { }.where(new TypeParameter<T>() { }, annotated); binder.bind(annotated).toProvider(TypeLiteral.class.cast(TypeLiteral.get(token.getType()))); }
@SuppressWarnings({ "unchecked", "serial" }) private static <K> void bindClass(Binder binder, Class<K> sync) { binder.bind(TypeLiteral.class.cast(TypeLiteral.get(new TypeToken<Class<K>>() { }.where(new TypeParameter<K>() { }, sync).getType()))).toInstance(sync); } }
/** * @deprecated will be removed in jclouds 1.7, as async interfaces are no * longer supported. */ @Deprecated @SuppressWarnings({ "unchecked", "serial" }) private static <T> void bindAnnotatedSyncToAsyncHttpApiProvider(Binder binder, Class<T> annotated) { TypeToken<AnnotatedSyncToAsyncHttpApiProvider<T>> token = new TypeToken<AnnotatedSyncToAsyncHttpApiProvider<T>>() { }.where(new TypeParameter<T>() { }, annotated); binder.bind(annotated).toProvider(TypeLiteral.class.cast(TypeLiteral.get(token.getType()))); }