use of com.navercorp.pinpoint.profiler.instrument.EngineComponent in project pinpoint by naver.
the class InstrumentEngineProvider method get.
public InstrumentEngine get() {
final String instrumentEngine = instrumentConfig.getProfileInstrumentEngine().toUpperCase();
if (InstrumentConfig.INSTRUMENT_ENGINE_ASM.equals(instrumentEngine)) {
logger.info("ASM InstrumentEngine");
// WARNING must be singleton
final InterceptorDefinitionFactory interceptorDefinitionFactory = new InterceptorDefinitionFactory();
// WARNING must be singleton
final ScopeFactory scopeFactory = new ScopeFactory();
EngineComponent engineComponent = new DefaultEngineComponent(objectBinderFactory, interceptorRegistryBinder, interceptorDefinitionFactory, apiMetaDataServiceProvider, scopeFactory);
return new ASMEngine(instrumentation, engineComponent);
} else {
logger.warn("Unknown InstrumentEngine:{}", instrumentEngine);
throw new IllegalArgumentException("Unknown InstrumentEngine:" + instrumentEngine);
}
}
use of com.navercorp.pinpoint.profiler.instrument.EngineComponent in project pinpoint by naver.
the class MethodInterfaceTest method isInterceptable.
@Test
public void isInterceptable() throws Exception {
ClassNode classNode = TestClassLoader.get("com.navercorp.test.pinpoint.jdk8.interfaces.MethodInterface");
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
EngineComponent engineComponent = mock(EngineComponent.class);
ASMClass clazz = new ASMClass(engineComponent, pluginContext, classLoader, null, classNode);
assertTrue(clazz.isInterceptable());
}
Aggregations