/** * Gets the strategy for an annotation type. */ static AnnotationStrategy strategyFor(Class<? extends Annotation> annotationType) { Objects.requireNonNull(annotationType, "annotation type"); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); return new AnnotationTypeStrategy(annotationType, null); }
/** * Gets the strategy for an annotation. */ static AnnotationStrategy strategyFor(Annotation annotation) { Objects.requireNonNull(annotation, "annotation"); Class<? extends Annotation> annotationType = annotation.annotationType(); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); if (annotationType.getMethods().length == 0) { return new AnnotationTypeStrategy(annotationType, annotation); } return new AnnotationInstanceStrategy(annotation); }
/** * Gets the strategy for an annotation type. */ static AnnotationStrategy strategyFor(Class<? extends Annotation> annotationType) { Objects.requireNonNull(annotationType, "annotation type"); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); return new AnnotationTypeStrategy(annotationType, null); }
/** * Gets the strategy for an annotation type. */ static AnnotationStrategy strategyFor(Class<? extends Annotation> annotationType) { Objects.requireNonNull(annotationType, "annotation type"); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); return new AnnotationTypeStrategy(annotationType, null); }
/** * Gets the strategy for an annotation type. */ static AnnotationStrategy strategyFor(Class<? extends Annotation> annotationType) { Objects.requireNonNull(annotationType, "annotation type"); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); return new AnnotationTypeStrategy(annotationType, null); }
/** * Gets the strategy for an annotation. */ static AnnotationStrategy strategyFor(Annotation annotation) { Objects.requireNonNull(annotation, "annotation"); Class<? extends Annotation> annotationType = annotation.annotationType(); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); if (annotationType.getMethods().length == 0) { return new AnnotationTypeStrategy(annotationType, annotation); } return new AnnotationInstanceStrategy(annotation); }
/** * Gets the strategy for an annotation. */ static AnnotationStrategy strategyFor(Annotation annotation) { Objects.requireNonNull(annotation, "annotation"); Class<? extends Annotation> annotationType = annotation.annotationType(); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); if (annotationType.getMethods().length == 0) { return new AnnotationTypeStrategy(annotationType, annotation); } return new AnnotationInstanceStrategy(annotation); }
/** * Gets the strategy for an annotation. */ static AnnotationStrategy strategyFor(Annotation annotation) { Objects.requireNonNull(annotation, "annotation"); Class<? extends Annotation> annotationType = annotation.annotationType(); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); if (annotationType.getMethods().length == 0) { return new AnnotationTypeStrategy(annotationType, annotation); } return new AnnotationInstanceStrategy(annotation); }
/** * Gets the strategy for an annotation. */ static AnnotationStrategy strategyFor(Annotation annotation) { checkNotNull(annotation, "annotation"); Class<? extends Annotation> annotationType = annotation.annotationType(); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); if (annotationType.getDeclaredMethods().length == 0) { return new AnnotationTypeStrategy(annotationType, annotation); } return new AnnotationInstanceStrategy(annotation); }
/** * Gets the strategy for an annotation type. */ static AnnotationStrategy strategyFor(Class<? extends Annotation> annotationType) { checkNotNull(annotationType, "annotation type"); ensureRetainedAtRuntime(annotationType); ensureIsBindingAnnotation(annotationType); return new AnnotationTypeStrategy(annotationType, null); }