Sha256: 0262e3c836f7389ad5657932f0e8fa2b9dd79d607bcaf41ea51a94fdc46ae38d
Contents?: true
Size: 920 Bytes
Versions: 14
Compression:
Stored size: 920 Bytes
Contents
package com.rho.rhoelements.activex; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import com.rho.rhoelements.Common; import com.rho.rhoelements.LogEntry; public class ActiveXFactory { private static Map<String, ActiveX> myObjects; static { myObjects = new HashMap<String, ActiveX>(); } public static ActiveX create(String name, String ID) { ActiveX temp = null; try { Class cls = Class.forName("com.rho.rhoelements.activex." + name); Method meth = cls.getMethod("getInstance"); temp = (ActiveX) meth.invoke(null, null); myObjects.put(ID, temp); } catch (Exception E) { Common.logger.add(new LogEntry(LogEntry.PB_LOG_ERROR, "error : " + E.getMessage())); } return temp; } public static ActiveX getObjectByID(String ID) { return myObjects.get(ID); } public static void deleteObjectByID(String ID) { myObjects.remove(ID); } }
Version data entries
14 entries across 14 versions & 1 rubygems