use of cn.taketoday.core.annotation.MergedAnnotations in project today-infrastructure by TAKETODAY.
the class AnnotationDependencyResolvingStrategy method supportsInternal.
private boolean supportsInternal(AccessibleObject accessible) {
MergedAnnotations annotations = MergedAnnotations.from(accessible);
Class<? extends Annotation>[] supportedAnnotations = getSupportedAnnotations();
for (Class<? extends Annotation> supportedAnnotation : supportedAnnotations) {
if (annotations.isPresent(supportedAnnotation)) {
return true;
}
}
return false;
}
use of cn.taketoday.core.annotation.MergedAnnotations in project today-infrastructure by TAKETODAY.
the class DefinitionsParser method parseElement.
private void parseElement(AnnotatedElement element, Class<?> source) {
MergedAnnotations annotations = MergedAnnotations.from(element, SearchStrategy.SUPERCLASS);
annotations.stream(MockBean.class).map(MergedAnnotation::synthesize).forEach((annotation) -> parseMockBeanAnnotation(annotation, element, source));
annotations.stream(SpyBean.class).map(MergedAnnotation::synthesize).forEach((annotation) -> parseSpyBeanAnnotation(annotation, element, source));
}
use of cn.taketoday.core.annotation.MergedAnnotations in project today-framework by TAKETODAY.
the class AnnotationDependencyResolvingStrategy method supportsInternal.
private boolean supportsInternal(AccessibleObject accessible) {
MergedAnnotations annotations = MergedAnnotations.from(accessible);
Class<? extends Annotation>[] supportedAnnotations = getSupportedAnnotations();
for (Class<? extends Annotation> supportedAnnotation : supportedAnnotations) {
if (annotations.isPresent(supportedAnnotation)) {
return true;
}
}
return false;
}
use of cn.taketoday.core.annotation.MergedAnnotations in project today-framework by TAKETODAY.
the class SimpleMethodMetadataReadingVisitor method visitEnd.
@Override
public void visitEnd() {
MergedAnnotations annotations = MergedAnnotations.valueOf(this.annotations);
SimpleMethodMetadata metadata = new SimpleMethodMetadata(access, declaringClassName, getSource(), annotations, methodSignature, classLoader);
consumer.accept(metadata);
}
use of cn.taketoday.core.annotation.MergedAnnotations in project today-framework by TAKETODAY.
the class DefinitionsParser method parseElement.
private void parseElement(AnnotatedElement element, Class<?> source) {
MergedAnnotations annotations = MergedAnnotations.from(element, SearchStrategy.SUPERCLASS);
annotations.stream(MockBean.class).map(MergedAnnotation::synthesize).forEach((annotation) -> parseMockBeanAnnotation(annotation, element, source));
annotations.stream(SpyBean.class).map(MergedAnnotation::synthesize).forEach((annotation) -> parseSpyBeanAnnotation(annotation, element, source));
}
Aggregations