Search in sources :

Example 1 with AnnotationKeyRegistry

use of com.navercorp.pinpoint.common.trace.AnnotationKeyRegistry in project pinpoint by naver.

the class DefaultAnnotationKeyRegistryService method buildAnnotationKeyRegistry.

private AnnotationKeyRegistry buildAnnotationKeyRegistry() {
    AnnotationKeyRegistry.Builder builder = new AnnotationKeyRegistry.Builder();
    StaticFieldLookUp<AnnotationKey> staticFieldLookUp = new StaticFieldLookUp<AnnotationKey>(AnnotationKey.class, AnnotationKey.class);
    List<AnnotationKey> lookup = staticFieldLookUp.lookup();
    for (AnnotationKey serviceType : lookup) {
        if (logger.isInfoEnabled()) {
            logger.info("add Default AnnotationKey:" + serviceType);
        }
        builder.addAnnotationKey(serviceType);
    }
    final List<AnnotationKey> types = typeLoaderService.getAnnotationKeys();
    for (AnnotationKey type : types) {
        if (logger.isInfoEnabled()) {
            logger.info("add Plugin AnnotationKey:" + type);
        }
        builder.addAnnotationKey(type);
    }
    return builder.build();
}
Also used : StaticFieldLookUp(com.navercorp.pinpoint.common.util.StaticFieldLookUp) AnnotationKey(com.navercorp.pinpoint.common.trace.AnnotationKey) AnnotationKeyRegistry(com.navercorp.pinpoint.common.trace.AnnotationKeyRegistry)

Aggregations

AnnotationKey (com.navercorp.pinpoint.common.trace.AnnotationKey)1 AnnotationKeyRegistry (com.navercorp.pinpoint.common.trace.AnnotationKeyRegistry)1 StaticFieldLookUp (com.navercorp.pinpoint.common.util.StaticFieldLookUp)1