Home
last modified time | relevance | path

Searched refs:typeLiteral (Results 1 – 24 of 24) sorted by relevance

/external/guice/core/src/com/google/inject/
DKey.java54 private final TypeLiteral<T> typeLiteral; field in Key
74 this.typeLiteral = in Key()
94 this.typeLiteral = in Key()
113 this.typeLiteral = in Key()
123 this.typeLiteral = MoreTypes.canonicalizeForKey((TypeLiteral<T>) TypeLiteral.get(type)); in Key()
128 private Key(TypeLiteral<T> typeLiteral, AnnotationStrategy annotationStrategy) { in Key() argument
130 this.typeLiteral = MoreTypes.canonicalizeForKey(typeLiteral); in Key()
136 return typeLiteral.hashCode() * 31 + annotationStrategy.hashCode(); in computeHashCode()
141 return typeLiteral; in getTypeLiteral()
169 return typeLiteral.getRawType(); in getRawType()
[all …]
DBinder.java216 <T> AnnotatedBindingBuilder<T> bind(TypeLiteral<T> typeLiteral); in bind() argument
316 <T> MembersInjector<T> getMembersInjector(TypeLiteral<T> typeLiteral); in getMembersInjector() argument
DAbstractModule.java87 protected <T> AnnotatedBindingBuilder<T> bind(TypeLiteral<T> typeLiteral) { in bind() argument
88 return binder().bind(typeLiteral); in bind()
DPrivateModule.java155 protected final <T> AnnotatedBindingBuilder<T> bind(TypeLiteral<T> typeLiteral) { in bind() argument
156 return binder().bind(typeLiteral); in bind()
DInjector.java80 <T> MembersInjector<T> getMembersInjector(TypeLiteral<T> typeLiteral); in getMembersInjector() argument
/external/guice/core/src/com/google/inject/internal/
DMembersInjectorImpl.java34 private final TypeLiteral<T> typeLiteral; field in MembersInjectorImpl
46 TypeLiteral<T> typeLiteral, in MembersInjectorImpl() argument
50 this.typeLiteral = typeLiteral; in MembersInjectorImpl()
69 TypeLiteral<T> localTypeLiteral = typeLiteral; in injectMembers()
134 injectionListener, typeLiteral, e); in notifyListeners()
163 userMembersInjector, typeLiteral, e); in injectMembers()
172 return "MembersInjector<" + typeLiteral + ">"; in toString()
DProviderMethodsModule.java51 private final TypeLiteral<?> typeLiteral; field in ProviderMethodsModule
58 this.typeLiteral = TypeLiteral.get(this.delegate.getClass()); in ProviderMethodsModule()
140 methodsBySignature.put(new Signature(typeLiteral, method), method); in getProviderMethods()
151 methodsBySignature.get(new Signature(typeLiteral, method))) { in getProviderMethods()
207 Signature(TypeLiteral<?> typeLiteral, Method method) { in Signature() argument
214 List<TypeLiteral<?>> resolvedParameterTypes = typeLiteral.getParameterTypes(method); in Signature()
258 InjectionPoint point = InjectionPoint.forMethod(method, typeLiteral); in createProviderMethod()
260 TypeLiteral<T> returnType = (TypeLiteral<T>) typeLiteral.getReturnType(method); in createProviderMethod()
DIndexer.java64 final TypeLiteral<?> typeLiteral; field in Indexer.IndexedBinding
73 this.typeLiteral = binding.getKey().getTypeLiteral(); in IndexedBinding()
87 && typeLiteral.equals(o.typeLiteral) in equals()
96 type, scope, typeLiteral, annotationType, annotationName, extraEquality); in hashCode()
DTypeConverterBindingProcessor.java92 public boolean matches(TypeLiteral<?> typeLiteral) { in prepareBuiltInConverters()
93 return typeLiteral.getRawType() == Class.class; in prepareBuiltInConverters()
162 public boolean matches(TypeLiteral<?> typeLiteral) { in convertToClasses()
163 Type type = typeLiteral.getType(); in convertToClasses()
DMoreTypes.java91 public static <T> TypeLiteral<T> canonicalizeForKey(TypeLiteral<T> typeLiteral) { in canonicalizeForKey() argument
92 Type type = typeLiteral.getType(); in canonicalizeForKey()
94 Errors errors = new Errors().keyNotFullySpecified(typeLiteral); in canonicalizeForKey()
98 if (typeLiteral.getRawType() == javax.inject.Provider.class) { in canonicalizeForKey()
111 TypeLiteral<T> wrappedPrimitives = (TypeLiteral<T>) PRIMITIVE_TO_WRAPPER.get(typeLiteral); in canonicalizeForKey()
117 if (typeLiteral.getClass() == TypeLiteral.class) { in canonicalizeForKey()
118 return typeLiteral; in canonicalizeForKey()
124 TypeLiteral<T> recreated = (TypeLiteral<T>) TypeLiteral.get(typeLiteral.getType()); in canonicalizeForKey()
DEncounterImpl.java141 public <T> MembersInjector<T> getMembersInjector(TypeLiteral<T> typeLiteral) { in getMembersInjector() argument
143 return lookups.getMembersInjector(typeLiteral); in getMembersInjector()
DRealOptionalBinder.java277 TypeLiteral<?> typeLiteral = key.getTypeLiteral(); in bindJava8Optional() local
281 .bind(key.ofType(javaOptionalOfProvider(typeLiteral))) in bindJava8Optional()
286 .bind(key.ofType(javaOptionalOfJavaxProvider(typeLiteral))) in bindJava8Optional()
288 Key<?> javaOptionalKey = key.ofType(javaOptionalOf(typeLiteral)); in bindJava8Optional()
DErrors.java492 public Errors keyNotFullySpecified(TypeLiteral<?> typeLiteral) { in keyNotFullySpecified() argument
493 return addMessage("%s cannot be used as a key; It is not fully specified.", typeLiteral); in keyNotFullySpecified()
DInjectorImpl.java1018 public <T> MembersInjector<T> getMembersInjector(TypeLiteral<T> typeLiteral) {
1019 Errors errors = new Errors(typeLiteral);
1021 return membersInjectorStore.get(typeLiteral, errors);
DInternalInjectorCreator.java322 public <T> MembersInjector<T> getMembersInjector(TypeLiteral<T> typeLiteral) { in getMembersInjector() argument
/external/guice/core/test/com/google/inject/spi/
DInjectionPointTest.java60 TypeLiteral<?> typeLiteral = TypeLiteral.get(getClass()); in testFieldInjectionPoint() local
63 InjectionPoint injectionPoint = new InjectionPoint(typeLiteral, fooField, false); in testFieldInjectionPoint()
67 assertEqualsBothWays(injectionPoint, new InjectionPoint(typeLiteral, fooField, false)); in testFieldInjectionPoint()
85 getOnlyElement(new InjectionPoint(typeLiteral, fooField, false).getDependencies())); in testFieldInjectionPoint()
89 TypeLiteral<?> typeLiteral = TypeLiteral.get(getClass()); in testMethodInjectionPoint() local
92 InjectionPoint injectionPoint = new InjectionPoint(typeLiteral, barMethod, false); in testMethodInjectionPoint()
96 assertEqualsBothWays(injectionPoint, new InjectionPoint(typeLiteral, barMethod, false)); in testMethodInjectionPoint()
114 getOnlyElement(new InjectionPoint(typeLiteral, barMethod, false).getDependencies())); in testMethodInjectionPoint()
119 TypeLiteral<?> typeLiteral = TypeLiteral.get(Constructable.class); in testConstructorInjectionPoint() local
122 InjectionPoint injectionPoint = new InjectionPoint(typeLiteral, constructor); in testConstructorInjectionPoint()
[all …]
/external/guice/extensions/throwingproviders/src/com/google/inject/throwingproviders/
DCheckedProviderMethodsModule.java50 private final TypeLiteral<?> typeLiteral; field in CheckedProviderMethodsModule
54 this.typeLiteral = TypeLiteral.get(this.delegate.getClass()); in CheckedProviderMethodsModule()
97 List<TypeLiteral<?>> parameterTypes = typeLiteral.getParameterTypes(method); in createProviderMethod()
114 TypeLiteral<T> returnType = (TypeLiteral<T>) typeLiteral.getReturnType(method); in createProviderMethod()
115 List<TypeLiteral<?>> exceptionTypes = typeLiteral.getExceptionTypes(method); in createProviderMethod()
DThrowingProviderBinder.java131 Class<P> interfaceType, TypeLiteral<T> typeLiteral) { in bind() argument
132 return new SecondaryBinder<P, T>(interfaceType, typeLiteral.getType()); in bind()
412 TypeLiteral<P> typeLiteral;
417 typeLiteral = (TypeLiteral<P>) TypeLiteral.get(type);
419 typeLiteral = TypeLiteral.get(interfaceType);
423 return Key.get(typeLiteral, annotation);
426 return Key.get(typeLiteral, annotationType);
429 return Key.get(typeLiteral);
DCheckedProvideUtils.java42 TypeLiteral<? extends T> typeLiteral, Binder binder) { in findThrowingConstructor() argument
44 Class<?> rawType = typeLiteral.getRawType(); in findThrowingConstructor()
/external/guice/extensions/grapher/src/com/google/inject/grapher/
DShortNameFactory.java71 TypeLiteral<?> typeLiteral = key.getTypeLiteral(); in getClassName() local
72 return stripPackages(typeLiteral.toString()); in getClassName()
/external/guice/core/src/com/google/inject/spi/
DElements.java250 public <T> MembersInjector<T> getMembersInjector(final TypeLiteral<T> typeLiteral) { in getMembersInjector() argument
253 getElementSource(), MoreTypes.canonicalizeForKey(typeLiteral)); in getMembersInjector()
390 public <T> AnnotatedBindingBuilder<T> bind(TypeLiteral<T> typeLiteral) { in bind() argument
391 return bind(Key.get(typeLiteral)); in bind()
DTypeEncounter.java77 <T> MembersInjector<T> getMembersInjector(TypeLiteral<T> typeLiteral); in getMembersInjector() argument
/external/guice/core/test/com/google/inject/
DKeyTest.java220 TypeLiteral<Integer> typeLiteral = KeyTest.createTypeLiteral(); in testCannotGetKeyWithUnspecifiedTypeVariables() local
222 Key.get(typeLiteral); in testCannotGetKeyWithUnspecifiedTypeVariables()
/external/guice/extensions/assistedinject/src/com/google/inject/assistedinject/
DFactoryProvider2.java484 private boolean isTypeNotSpecified(TypeLiteral<?> typeLiteral, ConfigurationException ce) { in isTypeNotSpecified() argument
488 Iterables.getOnlyElement(new Errors().keyNotFullySpecified(typeLiteral).getMessages()); in isTypeNotSpecified()