Search in sources :

Example 1 with ClassPath

use of javassist.ClassPath in project pinpoint by naver.

the class HierarchyMultipleClassPool method createClassPool.

private NamedClassPool createClassPool(ClassLoader classLoader, NamedClassPool parentClassPool) {
    String classLoaderName = classLoader.getClass().getName();
    NamedClassPool newClassPool = new NamedClassPool(parentClassPool, classLoaderName + "-" + ID.getAndIncrement());
    newClassPool.childFirstLookup = true;
    final ClassPath classPath = new LoaderClassPath(classLoader);
    newClassPool.appendClassPath(classPath);
    return newClassPool;
}
Also used : LoaderClassPath(javassist.LoaderClassPath) ClassPath(javassist.ClassPath) LoaderClassPath(javassist.LoaderClassPath)

Example 2 with ClassPath

use of javassist.ClassPath in project pinpoint by naver.

the class SingleClassPool method getClassPool.

@Override
public NamedClassPool getClassPool(ClassLoader classLoader) {
    synchronized (classPool) {
        final Object hit = this.checker.get(classLoader);
        if (hit != null) {
            return classPool;
        }
        this.checker.put(classLoader, EXIST);
        final ClassPath classPath = new LoaderClassPath(classLoader);
        this.classPool.appendClassPath(classPath);
        return classPool;
    }
}
Also used : LoaderClassPath(javassist.LoaderClassPath) ClassPath(javassist.ClassPath) LoaderClassPath(javassist.LoaderClassPath)

Example 3 with ClassPath

use of javassist.ClassPath in project pinpoint by naver.

the class IsolateMultipleClassPool method createClassPool.

private NamedClassPool createClassPool(ClassLoader classLoader) {
    String classLoaderName = classLoader.toString();
    NamedClassPool newClassPool = new NamedClassPool(rootClassPool, classLoaderName + "-" + getNextId());
    if (childFirstLookup) {
        newClassPool.childFirstLookup = true;
    }
    final ClassPath classPath = new LoaderClassPath(classLoader);
    newClassPool.appendClassPath(classPath);
    return newClassPool;
}
Also used : LoaderClassPath(javassist.LoaderClassPath) ClassPath(javassist.ClassPath) LoaderClassPath(javassist.LoaderClassPath)

Aggregations

ClassPath (javassist.ClassPath)3 LoaderClassPath (javassist.LoaderClassPath)3