Search in sources :

Example 6 with NamedClassPool

use of com.navercorp.pinpoint.profiler.instrument.classpool.NamedClassPool in project pinpoint by naver.

the class HierarchyMultipleClassPoolTest method testGetClassPool.

@Test
public void testGetClassPool() throws Exception {
    NamedClassPool cp = new NamedClassPool("test");
    HierarchyMultipleClassPool multipleClassPool = new HierarchyMultipleClassPool(cp);
    ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
    NamedClassPool classPool = multipleClassPool.getClassPool(systemClassLoader);
    CtClass string = classPool.get("java.lang.String");
    logger.debug("{}", string);
}
Also used : CtClass(javassist.CtClass) NamedClassPool(com.navercorp.pinpoint.profiler.instrument.classpool.NamedClassPool) HierarchyMultipleClassPool(com.navercorp.pinpoint.profiler.instrument.classpool.HierarchyMultipleClassPool) URLClassLoader(java.net.URLClassLoader) Test(org.junit.Test)

Aggregations

NamedClassPool (com.navercorp.pinpoint.profiler.instrument.classpool.NamedClassPool)6 Test (org.junit.Test)5 IsolateMultipleClassPool (com.navercorp.pinpoint.profiler.instrument.classpool.IsolateMultipleClassPool)4 CtClass (javassist.CtClass)3 HierarchyMultipleClassPool (com.navercorp.pinpoint.profiler.instrument.classpool.HierarchyMultipleClassPool)2 URLClassLoader (java.net.URLClassLoader)2 MultipleClassPool (com.navercorp.pinpoint.profiler.instrument.classpool.MultipleClassPool)1 PluginConfig (com.navercorp.pinpoint.profiler.plugin.PluginConfig)1 PluginInstrumentContext (com.navercorp.pinpoint.profiler.plugin.PluginInstrumentContext)1