1 28 29 package ist.coach.itut_q816Components.FactoryFinderProviderComposition; 30 31 import intt.itu.itut_x780.ApplicationError; 32 import intt.itu.itut_q816.FactoryInfoType; 33 39 public class querySegImpl 40 extends ist.coach.itut_q816Components.FactoryFinderProviderComposition.querySeg 41 { 42 48 54 public querySegImpl() 55 { 56 } 57 58 64 67 public intt.itu.itut_x780.ManagedObjectFactory 68 find(String factoryClass) 69 throws intt.itu.itut_q816.FactoryNotFound, 70 71 intt.itu.itut_x780.ApplicationError 72 { 73 if (! FactoryFinderProviderImpl.factories.containsKey(factoryClass)) 77 throw new intt.itu.itut_q816.FactoryNotFound(factoryClass + 78 " has not been registered"); 79 80 FactoryInfoType f_info = 81 (FactoryInfoType) FactoryFinderProviderImpl.factories.get(factoryClass); 82 83 84 return f_info.factoryRef; 85 } 86 87 90 public intt.itu.itut_q816.FactoryInfoType[] 91 list() 92 throws intt.itu.itut_x780.ApplicationError 93 { 94 int f_size = FactoryFinderProviderImpl.factories.size(); 98 if (f_size <= 0) 99 return new FactoryInfoType[0]; 100 101 FactoryInfoType[] factories_list = 102 new FactoryInfoType[f_size]; 103 104 factories_list = 105 (FactoryInfoType[]) FactoryFinderProviderImpl.factories.values().toArray(factories_list); 106 107 return factories_list; 108 } 109 110 } 111 | Popular Tags |