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

Enum NullAnnotationStrategy

core/src/com/google/inject/Key.java:388–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386 }
387
388 static enum NullAnnotationStrategy implements AnnotationStrategy {
389 INSTANCE;
390
391 @Override
392 public boolean hasAttributes() {
393 return false;
394 }
395
396 @Override
397 public AnnotationStrategy withoutAttributes() {
398 throw new UnsupportedOperationException("Key already has no attributes.");
399 }
400
401 @Override
402 public Annotation getAnnotation() {
403 return null;
404 }
405
406 @Override
407 public Class<? extends Annotation> getAnnotationType() {
408 return null;
409 }
410
411 @Override
412 public String toString() {
413 return "[none]";
414 }
415 }
416
417 // this class not test-covered
418 static class AnnotationInstanceStrategy implements AnnotationStrategy {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected