1 21 22 package org.apache.derby.impl.services.reflect; 23 24 import org.apache.derby.iapi.util.ByteArray; 25 import org.apache.derby.iapi.sql.compile.CodeGeneration; 26 27 final class ReflectLoaderJava2 extends ClassLoader { 28 29 32 33 private final DatabaseClasses cf; 34 35 38 39 ReflectLoaderJava2(ClassLoader parent, DatabaseClasses cf) { 40 super(parent); 41 this.cf = cf; 42 } 43 44 protected Class findClass(String name) 45 throws ClassNotFoundException { 46 return cf.loadApplicationClass(name); 47 } 48 49 55 56 59 public LoadedGeneratedClass loadGeneratedClass(String name, ByteArray classData) { 60 61 Class jvmClass = defineClass(name, classData.getArray(), classData.getOffset(), classData.getLength()); 62 63 resolveClass(jvmClass); 64 65 80 Class factoryClass = null; 81 82 return new ReflectGeneratedClass(cf, jvmClass, factoryClass); 83 } 84 } 85 | Popular Tags |