MCPcopy Create free account
hub / github.com/google/guice / getKey

Method getKey

core/src/com/google/inject/internal/Annotations.java:378–385  ·  view source on GitHub ↗

Gets a key for the given type, member and annotations.

(
      TypeLiteral<?> type, Member member, Annotation[] annotations, Errors errors)

Source from the content-addressed store, hash-verified

376
377 /** Gets a key for the given type, member and annotations. */
378 public static Key<?> getKey(
379 TypeLiteral<?> type, Member member, Annotation[] annotations, Errors errors)
380 throws ErrorsException {
381 int numErrorsBefore = errors.size();
382 Annotation found = findBindingAnnotation(errors, member, annotations);
383 errors.throwIfNewErrors(numErrorsBefore);
384 return found == null ? Key.get(type) : Key.get(type, found);
385 }
386
387 /** Returns the binding annotation on {@code member}, or null if there isn't one. */
388 public static Annotation findBindingAnnotation(

Callers 4

InjectionPointMethod · 0.95
forMemberMethod · 0.95
FactoryProvider2Method · 0.95

Calls 4

findBindingAnnotationMethod · 0.95
getMethod · 0.95
throwIfNewErrorsMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected