Gets a key for the given type, member and annotations.
(
TypeLiteral<?> type, Member member, Annotation[] annotations, Errors errors)
| 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( |
no test coverage detected