@SuppressWarnings("unchecked") @Override protected void configure() { TypeToken<?> concreteType = BaseHttpApiMetadata.contextToken(typeToken(httpApiMetadata.getApi())); // bind explicit type bind(TypeLiteral.get(concreteType.getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); // bind potentially wildcard type if (!concreteType.equals(httpApiMetadata.getContext())) { bind(TypeLiteral.get(httpApiMetadata.getContext().getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } // bind w/o types bind(TypeLiteral.get(ApiContext.class)).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } }
@SuppressWarnings("unchecked") @Override protected void configure() { TypeToken<?> concreteType = BaseHttpApiMetadata.contextToken(typeToken(httpApiMetadata.getApi())); // bind explicit type bind(TypeLiteral.get(concreteType.getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); // bind potentially wildcard type if (!concreteType.equals(httpApiMetadata.getContext())) { bind(TypeLiteral.get(httpApiMetadata.getContext().getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } // bind w/o types bind(TypeLiteral.get(ApiContext.class)).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } }
@SuppressWarnings("unchecked") @Override protected void configure() { TypeToken<?> concreteType = BaseHttpApiMetadata.contextToken(typeToken(httpApiMetadata.getApi())); // bind explicit type bind(TypeLiteral.get(concreteType.getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); // bind potentially wildcard type if (!concreteType.equals(httpApiMetadata.getContext())) { bind(TypeLiteral.get(httpApiMetadata.getContext().getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } // bind w/o types bind(TypeLiteral.get(ApiContext.class)).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } }
@SuppressWarnings("unchecked") @Override protected void configure() { TypeToken<?> concreteType = BaseHttpApiMetadata.contextToken(typeToken(httpApiMetadata.getApi())); // bind explicit type bind(TypeLiteral.get(concreteType.getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); // bind potentially wildcard type if (!concreteType.equals(httpApiMetadata.getContext())) { bind(TypeLiteral.get(httpApiMetadata.getContext().getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } // bind w/o types bind(TypeLiteral.get(ApiContext.class)).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } }
@SuppressWarnings("unchecked") @Override protected void configure() { TypeToken<?> concreteType = BaseHttpApiMetadata.contextToken(typeToken(httpApiMetadata.getApi())); // bind explicit type bind(TypeLiteral.get(concreteType.getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); // bind potentially wildcard type if (!concreteType.equals(httpApiMetadata.getContext())) { bind(TypeLiteral.get(httpApiMetadata.getContext().getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } // bind w/o types bind(TypeLiteral.get(ApiContext.class)).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } }
@SuppressWarnings("unchecked") @Override protected void configure() { TypeToken<?> concreteType = BaseHttpApiMetadata.contextToken(typeToken(httpApiMetadata.getApi())); // bind explicit type bind(TypeLiteral.get(concreteType.getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); // bind potentially wildcard type if (!concreteType.equals(httpApiMetadata.getContext())) { bind(TypeLiteral.get(httpApiMetadata.getContext().getType())).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } // bind w/o types bind(TypeLiteral.get(ApiContext.class)).to( TypeLiteral.class.cast(TypeLiteral.get(Types.newParameterizedType(ApiContextImpl.class, httpApiMetadata.getApi())))); } }