Search in sources :

Example 1 with TransformCallbackProvider

use of com.navercorp.pinpoint.profiler.plugin.TransformCallbackProvider in project pinpoint by naver.

the class TestClassLoader method addTransformer.

public void addTransformer(final String targetClassName, final TransformCallback transformer) {
    if (logger.isLoggable(Level.FINE)) {
        logger.fine("addTransformer targetClassName:{}" + targetClassName + " callback:{}" + transformer);
    }
    final Matcher matcher = Matchers.newClassNameMatcher(targetClassName);
    final TransformCallbackProvider transformCallbackProvider = new InstanceTransformCallbackProvider(transformer);
    final MatchableClassFileTransformerDelegate guard = new MatchableClassFileTransformerDelegate(applicationContext.getProfilerConfig(), instrumentContext, matcher, transformCallbackProvider);
    this.instrumentTranslator.addTransformer(guard);
}
Also used : MatchableClassFileTransformerDelegate(com.navercorp.pinpoint.profiler.plugin.MatchableClassFileTransformerDelegate) Matcher(com.navercorp.pinpoint.bootstrap.instrument.matcher.Matcher) TransformCallbackProvider(com.navercorp.pinpoint.profiler.plugin.TransformCallbackProvider) InstanceTransformCallbackProvider(com.navercorp.pinpoint.profiler.plugin.InstanceTransformCallbackProvider) InstanceTransformCallbackProvider(com.navercorp.pinpoint.profiler.plugin.InstanceTransformCallbackProvider)

Aggregations

Matcher (com.navercorp.pinpoint.bootstrap.instrument.matcher.Matcher)1 InstanceTransformCallbackProvider (com.navercorp.pinpoint.profiler.plugin.InstanceTransformCallbackProvider)1 MatchableClassFileTransformerDelegate (com.navercorp.pinpoint.profiler.plugin.MatchableClassFileTransformerDelegate)1 TransformCallbackProvider (com.navercorp.pinpoint.profiler.plugin.TransformCallbackProvider)1