Exemple #1
0
 public void addClassConfig(AbstractClassConfig config) {
   String cname = config.getClassName();
   if (this.classMap.containsKey(cname) == false) {
     ClassInfo ci = new ClassInfo();
     ci.classConfig = config;
     ci.classInfo = null;
     this.classMap.put(cname, ci);
   }
 }
Exemple #2
0
 protected final Class<?> findClass(final String className) throws ClassNotFoundException {
   ClassInfo acc = this.classMap.get(className);
   if (acc != null) {
     if (acc.classInfo == null) {
       synchronized (localLocl.get()) {
         if (acc.classInfo == null) {
           byte[] bs = acc.classConfig.getBytes();
           acc.classInfo = this.defineClass(className, bs, 0, bs.length);
         }
       }
     }
     return acc.classInfo;
   }
   return super.findClass(className);
 }