A search-path for obtaining a class file
by getResourceAsStream() in java.lang.Class .
Try adding a ClassClassPath when a program is running
with a user-defined class loader and any class files are not found with
the default ClassPool . For example,
ClassPool cp = ClassPool.getDefault();
cp.insertClassPath(new ClassClassPath(this.getClass()));
This code snippet permanently adds a ClassClassPath
to the default ClassPool . Note that the default
ClassPool is a singleton. The added
ClassClassPath uses a class object representing
the class including the code snippet above.
See Also: ClassPool.insertClassPath(ClassPath) See Also: ClassPool.appendClassPath(ClassPath) See Also: LoaderClassPath |