Search in sources :

Example 1 with DefaultTransformerRegistry

use of com.navercorp.pinpoint.profiler.instrument.transformer.DefaultTransformerRegistry in project pinpoint by naver.

the class DefaultClassFileTransformerDispatcher method createTransformerRegistry.

private TransformerRegistry createTransformerRegistry(PluginContextLoadResult pluginContexts) {
    DefaultTransformerRegistry registry = new DefaultTransformerRegistry();
    for (ClassFileTransformer transformer : pluginContexts.getClassFileTransformer()) {
        if (transformer instanceof MatchableClassFileTransformer) {
            MatchableClassFileTransformer t = (MatchableClassFileTransformer) transformer;
            logger.info("Registering class file transformer {} for {} ", t, t.getMatcher());
            registry.addTransformer(t.getMatcher(), t);
        } else {
            logger.warn("Ignore class file transformer {}", transformer);
        }
    }
    return registry;
}
Also used : MatchableClassFileTransformer(com.navercorp.pinpoint.profiler.plugin.MatchableClassFileTransformer) ClassFileTransformer(java.lang.instrument.ClassFileTransformer) MatchableClassFileTransformer(com.navercorp.pinpoint.profiler.plugin.MatchableClassFileTransformer) DefaultTransformerRegistry(com.navercorp.pinpoint.profiler.instrument.transformer.DefaultTransformerRegistry)

Aggregations

DefaultTransformerRegistry (com.navercorp.pinpoint.profiler.instrument.transformer.DefaultTransformerRegistry)1 MatchableClassFileTransformer (com.navercorp.pinpoint.profiler.plugin.MatchableClassFileTransformer)1 ClassFileTransformer (java.lang.instrument.ClassFileTransformer)1