use of com.navercorp.pinpoint.profiler.plugin.JarPlugin in project pinpoint by naver.
the class PlainClassLoaderHandlerTest method newPluginConfig.
// @Test
// public void injectClass() {
// PluginConfig pluginConfig = newPluginConfig();
//
// PlainClassLoaderHandler plainClassLoaderHandler = new PlainClassLoaderHandler(pluginConfig);
// plainClassLoaderHandler.injectClass(this.getClass().getClassLoader(), "java.lang.String");
//
// }
private PluginConfig newPluginConfig() {
JarPlugin plugin = mock(JarPlugin.class);
JarFile jarFile = mock(JarFile.class);
when(plugin.getJarFile()).thenReturn(jarFile);
ClassNameFilter filter = new ClassNameFilter() {
@Override
public boolean accept(String className) {
return ClassNameFilter.ACCEPT;
}
};
PluginConfig pluginConfig = new PluginConfig(plugin, filter);
return pluginConfig;
}
use of com.navercorp.pinpoint.profiler.plugin.JarPlugin in project pinpoint by naver.
the class JarProfilerPluginClassInjectorTest method getMockPlugin.
private Plugin<?> getMockPlugin(Class<?> clazz) throws Exception {
final URL location = CodeSourceUtils.getCodeLocation(clazz);
logger.debug("url:{}", location);
PluginJar pluginJar = PluginJar.fromFilePath(location.getFile());
return new JarPlugin<>(pluginJar, Collections.emptyList(), Collections.<String>emptyList());
}
Aggregations