Search in sources :

Example 1 with TransformTemplate

use of com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformTemplate in project pinpoint by naver.

the class DefaultPluginSetup method preparePlugin.

private GuardInstrumentContext preparePlugin(ProfilerPlugin plugin, InstrumentContext instrumentContext) {
    final GuardInstrumentContext guardInstrumentContext = new GuardInstrumentContext(instrumentContext);
    if (plugin instanceof TransformTemplateAware) {
        if (logger.isDebugEnabled()) {
            logger.debug("{}.setTransformTemplate", plugin.getClass().getName());
        }
        final TransformTemplate transformTemplate = new TransformTemplate(guardInstrumentContext);
        ((TransformTemplateAware) plugin).setTransformTemplate(transformTemplate);
    }
    return guardInstrumentContext;
}
Also used : TransformTemplateAware(com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformTemplateAware) TransformTemplate(com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformTemplate) GuardInstrumentContext(com.navercorp.pinpoint.profiler.instrument.GuardInstrumentContext)

Example 2 with TransformTemplate

use of com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformTemplate in project pinpoint by naver.

the class MockPluginSetup method preparePlugin.

/**
     * TODO duplicated code : com/navercorp/pinpoint/profiler/plugin/ProfilerPluginLoader.java
     * @param plugin
     * @param context
     */
private void preparePlugin(ProfilerPlugin plugin, InstrumentContext context) {
    if (plugin instanceof TransformTemplateAware) {
        final TransformTemplate transformTemplate = new TransformTemplate(context);
        ((TransformTemplateAware) plugin).setTransformTemplate(transformTemplate);
    }
}
Also used : TransformTemplateAware(com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformTemplateAware) TransformTemplate(com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformTemplate)

Aggregations

TransformTemplate (com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformTemplate)2 TransformTemplateAware (com.navercorp.pinpoint.bootstrap.instrument.transformer.TransformTemplateAware)2 GuardInstrumentContext (com.navercorp.pinpoint.profiler.instrument.GuardInstrumentContext)1