use of com.navercorp.pinpoint.profiler.instrument.classpool.HierarchyMultipleClassPool in project pinpoint by naver.
the class HierarchyMultipleClassPoolTest method testTestClass.
@Test
public void testTestClass() throws Exception {
NamedClassPool pool = new NamedClassPool("test");
pool.childFirstLookup = true;
HierarchyMultipleClassPool multipleClassPool = new HierarchyMultipleClassPool(pool);
ClassLoader classLoader = new URLClassLoader(new URL[0], ClassLoader.getSystemClassLoader());
multipleClassPool.getClassPool(classLoader);
logger.debug("size {}", multipleClassPool.size());
for (NamedClassPool classPool1 : multipleClassPool.values()) {
logger.debug("classPool:{} name:{}", classPool1, classPool1.getName());
}
Assert.assertEquals(2, multipleClassPool.size());
}
use of com.navercorp.pinpoint.profiler.instrument.classpool.HierarchyMultipleClassPool 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);
}
Aggregations