javassist中的CtClass对象的toClass做了什么?

public class MyClassLoader extends WebappClassLoader{
    public MyClassLoader(){
        System.out.println("无参构造");
    }
    
    public MyClassLoader(ClassLoader parent){
        super(parent);
        System.out.println();
        System.out.println("当前现成的加载器"+Thread.currentThread().getContextClassLoader());
        System.out.println(getParent());
        
    }
    @Override
    public Class<?> loadClass(String name) throws ClassNotFoundException {
    
        Class<?> clazz=null;
        clazz=findLoadedClass(name);
        if(clazz==null){
            if(name.contains("com.yyd")){
                clazz=loadbyme(name);
            }else{
                clazz=super.loadClass(name);
            }
        }
        return clazz;

    }

    private Class<?> loadbyme(String name) throws ClassNotFoundException{
        ClassPool pool=ClassPool.getDefault();
        CtClass ctclass=null;
        Class<?> clazz=null;
        
        //这个clazz2就是用来实验的,没用
        CtClass ctclass2=null;
        Class<?> clazz2=null;
        
        try {
            pool.insertClassPath("E:\\***\\WEB-INF\\classes");
            ctclass = pool.get(name);
            ctclass2 = pool.get(name);
        //下面这个try-catch块按理说没起什么作用,但是去掉就不报错,加上就报错    
            try {
                clazz2=ctclass2.toClass();
                System.out.println(name+"------------->"+clazz2);
                
            } catch (CannotCompileException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

        } catch (NotFoundException e) {
            System.err.println("********NotFoundException---------》"+name);
            clazz=super.loadClass(name);
        }
        
        clazz=super.loadClass(name);

        return clazz;    
    }
}




代码中写有注释的那个try-catch块,ctclass2.toClass()的底层是做了什么操作?

.