| 416 | |
| 417 | // this class not test-covered |
| 418 | static class AnnotationInstanceStrategy implements AnnotationStrategy { |
| 419 | |
| 420 | final Annotation annotation; |
| 421 | |
| 422 | AnnotationInstanceStrategy(Annotation annotation) { |
| 423 | this.annotation = checkNotNull(annotation, "annotation"); |
| 424 | } |
| 425 | |
| 426 | @Override |
| 427 | public boolean hasAttributes() { |
| 428 | return true; |
| 429 | } |
| 430 | |
| 431 | @Override |
| 432 | public AnnotationStrategy withoutAttributes() { |
| 433 | return new AnnotationTypeStrategy(getAnnotationType(), annotation); |
| 434 | } |
| 435 | |
| 436 | @Override |
| 437 | public Annotation getAnnotation() { |
| 438 | return annotation; |
| 439 | } |
| 440 | |
| 441 | @Override |
| 442 | public Class<? extends Annotation> getAnnotationType() { |
| 443 | return annotation.annotationType(); |
| 444 | } |
| 445 | |
| 446 | @Override |
| 447 | public boolean equals(Object o) { |
| 448 | if (!(o instanceof AnnotationInstanceStrategy)) { |
| 449 | return false; |
| 450 | } |
| 451 | |
| 452 | AnnotationInstanceStrategy other = (AnnotationInstanceStrategy) o; |
| 453 | return annotation.equals(other.annotation); |
| 454 | } |
| 455 | |
| 456 | @Override |
| 457 | public int hashCode() { |
| 458 | return annotation.hashCode(); |
| 459 | } |
| 460 | |
| 461 | @Override |
| 462 | public String toString() { |
| 463 | return annotation.toString(); |
| 464 | } |
| 465 | } |
| 466 | |
| 467 | static class AnnotationTypeStrategy implements AnnotationStrategy { |
| 468 |
nothing calls this directly
no outgoing calls
no test coverage detected