1 50 51 package org.openlaszlo.iv.flash.cache; 52 53 import org.openlaszlo.iv.flash.api.*; 54 import java.util.*; 55 56 public final class CommandCache { 57 58 private static Hashtable cache = new Hashtable(); 59 60 public static synchronized Class getCommandClass( String className ) { 61 Class clazz = (Class ) cache.get(className); 62 if( clazz != null && clazz != Class .class ) return clazz; 63 if( clazz == null ) { 64 try { 65 clazz = Class.forName(className); 66 cache.put(className, clazz); 67 } catch( Exception e ) { 68 cache.put(className, Class .class); 69 } 70 return clazz; 71 } else { 72 return null; 73 } 74 } 75 76 } 77 | Popular Tags |