[openrtm-commit:00343] r539 - branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 8月 11日 (木) 18:04:05 JST
Author: fsi-katami
Date: 2011-08-11 18:04:04 +0900 (Thu, 11 Aug 2011)
New Revision: 539
Modified:
branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/FactoryGlobal.java
branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SdoServiceConsumerFactory.java
Log:
Implemented ComponentObserverConsumer. refs #2051
Modified: branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/FactoryGlobal.java
===================================================================
--- branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/FactoryGlobal.java 2011-08-11 07:10:02 UTC (rev 538)
+++ branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/FactoryGlobal.java 2011-08-11 09:04:04 UTC (rev 539)
@@ -1,5 +1,7 @@
package jp.go.aist.rtm.RTC;
+import java.lang.reflect.Constructor;
+
import java.util.Hashtable;
import java.util.HashMap;
import java.util.Iterator;
@@ -99,7 +101,11 @@
}
else {
try{
- Object obj2 = (Object)(Class.forName(clazz).newInstance());
+ Class cl = Class.forName(clazz);
+ Constructor cunstructor = cl.getDeclaredConstructor(null);
+ cunstructor.setAccessible(true);
+ Object obj2 = (Object)cunstructor.newInstance();
+ //Object obj2 = (Object)(Class.forName(clazz).newInstance());
factory_table.put(clazz,obj2);
return obj2;
}
Modified: branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SdoServiceConsumerFactory.java
===================================================================
--- branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SdoServiceConsumerFactory.java 2011-08-11 07:10:02 UTC (rev 538)
+++ branches/work/ForComponentObserverConsumer/jp.go.aist.rtm.RTC/src/jp/go/aist/rtm/RTC/SdoServiceConsumerFactory.java 2011-08-11 09:04:04 UTC (rev 539)
@@ -42,7 +42,7 @@
return factory_global;
*/
- return (SdoServiceConsumerFactory)instance("SdoServiceConsumerFactory");
+ return (SdoServiceConsumerFactory)instance("jp.go.aist.rtm.RTC.SdoServiceConsumerFactory");
}
/**
* <p> mutex </p>
openrtm-commit メーリングリストの案内