MCPcopy Index your code
hub / github.com/google/guice / testWithAnnotation

Method testWithAnnotation

core/test/com/google/inject/KeyTest.java:61–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 }
60
61 public void testWithAnnotation() {
62 Key<Object> k = Key.get(Object.class);
63 Key<Object> kf = k.withAnnotation(Foo.class);
64 assertNull(k.getAnnotationType());
65 assertEquals(Foo.class, kf.getAnnotationType());
66 }
67
68 public void testWithAnnotationInstance() throws NoSuchFieldException {
69 Foo annotation = getClass().getDeclaredField("baz").getAnnotation(Foo.class);

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
withAnnotationMethod · 0.80
getAnnotationTypeMethod · 0.65

Tested by

no test coverage detected