Search in sources :

Example 1 with ClassNameFilter

use of com.navercorp.pinpoint.profiler.plugin.ClassNameFilter 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;
}
Also used : PluginConfig(com.navercorp.pinpoint.profiler.plugin.PluginConfig) JarPlugin(com.navercorp.pinpoint.profiler.plugin.JarPlugin) ClassNameFilter(com.navercorp.pinpoint.profiler.plugin.ClassNameFilter) JarFile(java.util.jar.JarFile)

Aggregations

ClassNameFilter (com.navercorp.pinpoint.profiler.plugin.ClassNameFilter)1 JarPlugin (com.navercorp.pinpoint.profiler.plugin.JarPlugin)1 PluginConfig (com.navercorp.pinpoint.profiler.plugin.PluginConfig)1 JarFile (java.util.jar.JarFile)1