[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Declarative Services

Hi Santiago

Maybe you can create a proxy class which uses a static initializer for this purpose.


interface MyInterface {
	public String methodFromInterface(int x);

class ProxyClass implements MyInterface {
	private static final MyInterface x = null;
	static {
		impl = Native.loadLibrary(<SharedLibrary Name>, MyInterface.class);

	public String methodFromInterface(int x) {
		return x.methodFromInterface(x);


You could also do a lazy initialization of the c++ code in the constructor or when a method is called.


Am 04.11.2010 um 13:32 schrieb Santiago Hurtado Gutierrez:

> Hi Simon Thanks for your quick response, 
> I want to point out that my IImageSegmentation Object is an interface that is implemented by c++ component called with JNA with the following line 
> Native.loadLibrary(<SharedLibrary Name>,<InterfaceName>.class)
> However in the DS you call only java implementation as far as I now
> I now is not suppose to be used like this, but I will like to know if there is any possibility to have the JNA implementation called in the ds
> thanks again
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev