Uses of Class
com.google.inject.TypeLiteral
-
Packages that use TypeLiteral Package Description com.google.inject Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.com.google.inject.binder Interfaces which make upBinder's expression language.com.google.inject.multibindings Extension for binding multiple instances in a collection; this extension requiresguice-multibindings.jar.com.google.inject.spi Guice service provider interface -
-
Uses of TypeLiteral in com.google.inject
Methods in com.google.inject that return TypeLiteral Modifier and Type Method Description static <T> TypeLiteral<T>TypeLiteral. get(Class<T> type)Gets type literal for the givenClassinstance.static TypeLiteral<?>TypeLiteral. get(Type type)Gets type literal for the givenTypeinstance.TypeLiteral<?>TypeLiteral. getFieldType(Field field)Returns the resolved generic type offield.TypeLiteral<?>TypeLiteral. getReturnType(Method method)Returns the resolved generic return type ofmethod.TypeLiteral<?>TypeLiteral. getSupertype(Class<?> supertype)Returns the generic form ofsupertype.TypeLiteral<T>Key. getTypeLiteral()Gets the key type.Methods in com.google.inject that return types with arguments of type TypeLiteral Modifier and Type Method Description Map<TypeLiteral<?>,List<InjectionPoint>>Injector. getAllMembersInjectorInjectionPoints()Returns the injection points created for calls toInjector.getMembersInjector(com.google.inject.TypeLiteral<T>)(either directly or indirectly, e.g.List<TypeLiteral<?>>TypeLiteral. getExceptionTypes(Member methodOrConstructor)Returns the resolved generic exception types thrown byconstructor.List<TypeLiteral<?>>TypeLiteral. getParameterTypes(Member methodOrConstructor)Returns the resolved generic parameter types ofmethodOrConstructor.Methods in com.google.inject with parameters of type TypeLiteral Modifier and Type Method Description protected <T> AnnotatedBindingBuilder<T>AbstractModule. bind(TypeLiteral<T> typeLiteral)<T> AnnotatedBindingBuilder<T>Binder. bind(TypeLiteral<T> typeLiteral)See the EDSL examples atBinder.protected <T> AnnotatedBindingBuilder<T>PrivateModule. bind(TypeLiteral<T> typeLiteral)AnnotatedElementBuilderPrivateBinder. expose(TypeLiteral<?> type)Makes a binding fortypeavailable to the enclosing environment.protected AnnotatedElementBuilderPrivateModule. expose(TypeLiteral<?> type)Makes a binding fortypeavailable to other modules and the injector.<T> List<Binding<T>>Injector. findBindingsByType(TypeLiteral<T> type)Returns all explicit bindings fortype.static <T> Key<T>Key. get(TypeLiteral<T> typeLiteral)Gets a key for an injection type.static <T> Key<T>Key. get(TypeLiteral<T> typeLiteral, Annotation annotation)Gets a key for an injection type and an annotation.static <T> Key<T>Key. get(TypeLiteral<T> typeLiteral, Class<? extends Annotation> annotationType)Gets a key for an injection type and an annotation type.protected <T> MembersInjector<T>AbstractModule. getMembersInjector(TypeLiteral<T> type)<T> MembersInjector<T>Binder. getMembersInjector(TypeLiteral<T> typeLiteral)Returns the members injector used to inject dependencies into methods and fields on instances of the given typeT.<T> MembersInjector<T>Injector. getMembersInjector(TypeLiteral<T> typeLiteral)Returns the members injector used to inject dependencies into methods and fields on instances of the given typeT.protected <T> MembersInjector<T>PrivateModule. getMembersInjector(TypeLiteral<T> type)<U> Key<U>Key. ofType(TypeLiteral<U> type)Returns a new key of the specified type with the same annotation as this key.protected <T> voidAbstractModule. requestInjection(TypeLiteral<T> type, T instance)<T> voidBinder. requestInjection(TypeLiteral<T> type, T instance)Upon successful creation, theInjectorwill inject instance fields and methods of the given object.Method parameters in com.google.inject with type arguments of type TypeLiteral Modifier and Type Method Description protected voidAbstractModule. bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener)voidBinder. bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener)Registers a listener for injectable types.protected voidPrivateModule. bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener)protected voidAbstractModule. convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter)voidBinder. convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter)Binds a type converter.protected voidPrivateModule. convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter) -
Uses of TypeLiteral in com.google.inject.binder
Methods in com.google.inject.binder with parameters of type TypeLiteral Modifier and Type Method Description ScopedBindingBuilderLinkedBindingBuilder. to(TypeLiteral<? extends T> implementation)See the EDSL examples atBinder.<S extends T>
ScopedBindingBuilderLinkedBindingBuilder. toConstructor(Constructor<S> constructor, TypeLiteral<? extends S> type)See the EDSL examples atBinder.ScopedBindingBuilderLinkedBindingBuilder. toProvider(TypeLiteral<? extends javax.inject.Provider<? extends T>> providerType)See the EDSL examples atBinder. -
Uses of TypeLiteral in com.google.inject.multibindings
Methods in com.google.inject.multibindings that return TypeLiteral Modifier and Type Method Description TypeLiteral<?>MultibinderBinding. getElementTypeLiteral()Returns the TypeLiteral that describes the type of elements in the set.TypeLiteral<?>MapBinderBinding. getKeyTypeLiteral()Returns the TypeLiteral describing the keys of the map.TypeLiteral<?>MapBinderBinding. getValueTypeLiteral()Returns the TypeLiteral describing the values of the map.Methods in com.google.inject.multibindings with parameters of type TypeLiteral Modifier and Type Method Description static <K,V>
MapBinder<K,V>MapBinder. newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType)Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound with no binding annotation.static <K,V>
MapBinder<K,V>MapBinder. newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Annotation annotation)Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound withannotation.static <K,V>
MapBinder<K,V>MapBinder. newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Class<? extends Annotation> annotationType)Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound withannotationType.static <T> OptionalBinder<T>OptionalBinder. newOptionalBinder(Binder binder, TypeLiteral<T> type)static <T> Multibinder<T>Multibinder. newSetBinder(Binder binder, TypeLiteral<T> type)Returns a new multibinder that collects instances oftypein aSetthat is itself bound with no binding annotation.static <T> Multibinder<T>Multibinder. newSetBinder(Binder binder, TypeLiteral<T> type, Annotation annotation)Returns a new multibinder that collects instances oftypein aSetthat is itself bound withannotation.static <T> Multibinder<T>Multibinder. newSetBinder(Binder binder, TypeLiteral<T> type, Class<? extends Annotation> annotationType)Returns a new multibinder that collects instances oftypein aSetthat is itself bound withannotationType. -
Uses of TypeLiteral in com.google.inject.spi
Methods in com.google.inject.spi that return TypeLiteral Modifier and Type Method Description TypeLiteral<?>InjectionPoint. getDeclaringType()Returns the generic type that defines this injection point.TypeLiteral<T>InjectionRequest. getType()TypeLiteral<T>MembersInjectorLookup. getType()Gets the type containing the members to be injected.Methods in com.google.inject.spi that return types with arguments of type TypeLiteral Modifier and Type Method Description Matcher<? super TypeLiteral<?>>TypeConverterBinding. getTypeMatcher()Matcher<? super TypeLiteral<?>>TypeListenerBinding. getTypeMatcher()Returns the type matcher which chooses which types the listener should be notified of.Methods in com.google.inject.spi with parameters of type TypeLiteral Modifier and Type Method Description ObjectTypeConverter. convert(String value, TypeLiteral<?> toType)Converts a string value.static <T> InjectionPointInjectionPoint. forConstructor(Constructor<T> constructor, TypeLiteral<? extends T> type)Returns a new injection point for the specified constructor oftype.static InjectionPointInjectionPoint. forConstructorOf(TypeLiteral<?> type)Returns a new injection point for the injectable constructor oftype.static InjectionPointInjectionPoint. forConstructorOf(TypeLiteral<?> type, boolean atInjectRequired)Returns a new injection point for the injectable constructor oftype.static Set<InjectionPoint>InjectionPoint. forInstanceMethodsAndFields(TypeLiteral<?> type)Returns all instance method and field injection points ontype.static <T> InjectionPointInjectionPoint. forMethod(Method method, TypeLiteral<T> type)Returns a new injection point for the specified method oftype.static Set<InjectionPoint>InjectionPoint. forStaticMethodsAndFields(TypeLiteral<?> type)Returns all static method and field injection points ontype.<T> MembersInjector<T>TypeEncounter. getMembersInjector(TypeLiteral<T> typeLiteral)Returns the members injector used to inject dependencies into methods and fields on instances of the given typeT.<I> voidTypeListener. hear(TypeLiteral<I> type, TypeEncounter<I> encounter)Invoked when Guice encounters a new type eligible for constructor or members injection.Constructors in com.google.inject.spi with parameters of type TypeLiteral Constructor Description InjectionRequest(Object source, TypeLiteral<T> type, T instance)MembersInjectorLookup(Object source, TypeLiteral<T> type)Constructor parameters in com.google.inject.spi with type arguments of type TypeLiteral Constructor Description TypeConverterBinding(Object source, Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter typeConverter)
-