Object result = finalResources.get(className); if (result == null) { try { Class cgClass = Class.forName(className, true, Thread.currentThread().getContextClassLoader()); result = cgClass.newInstance(); finalResources.put(className, result); } catch (Exception ex) { log.fatal(null, ex); }
Object result = null; try { Class cgClass = Class.forName(className, true, Thread .currentThread().getContextClassLoader()); result = cgClass.newInstance(); finalResources.put(className, result); } catch (Exception ex) { log.fatal(null, ex);
    public static Object makeCG(String className) {        Object result = finalResources.get(className);        if (result == null) {            try {                Class cgClass = Class.forName(className, true, Thread.currentThread().getContextClassLoader());                result = cgClass.newInstance();                finalResources.put(className, result);            } catch (Exception ex) {                log.fatal(null, ex);            }        }        return result;    }