use of com.navercorp.pinpoint.common.util.DisplayArgumentMatcher in project pinpoint by naver.
the class DefaultAnnotationKeyMatcherService method build.
private AnnotationKeyMatcherRegistry build(TraceMetadataLoaderService typeLoaderService) {
AnnotationKeyMatcherRegistry.Builder builder = new AnnotationKeyMatcherRegistry.Builder();
StaticFieldLookUp<DisplayArgumentMatcher> staticFieldLookUp = new StaticFieldLookUp<>(DefaultDisplayArgument.class, DisplayArgumentMatcher.class);
List<DisplayArgumentMatcher> lookup = staticFieldLookUp.lookup();
for (DisplayArgumentMatcher displayArgumentMatcher : lookup) {
AnnotationKeyMatcher annotationKeyMatcher = displayArgumentMatcher.getAnnotationKeyMatcher();
if (annotationKeyMatcher == null) {
continue;
}
logger.debug("add DefaultAnnotationKeyMatcher ServiceType:{}, AnnotationKeyMatcher:{}", displayArgumentMatcher.getServiceType(), annotationKeyMatcher);
builder.addAnnotationMatcher(displayArgumentMatcher.getServiceType(), annotationKeyMatcher);
}
List<ServiceTypeInfo> types = typeLoaderService.getServiceTypeInfos();
for (ServiceTypeInfo type : types) {
if (type.getPrimaryAnnotationKeyMatcher() == null) {
continue;
}
logger.debug("add AnnotationKeyMatcher ServiceType:{}, AnnotationKeyMatcher:{}", type.getServiceType(), type.getPrimaryAnnotationKeyMatcher());
builder.addAnnotationMatcher(type.getServiceType(), type.getPrimaryAnnotationKeyMatcher());
}
return builder.build();
}
Aggregations