I have an interface (CssResource) that ‘instantiates’ itself by:
MyInterface singleton = GWT.create(MyInterface.class).
When i try to use it, let’s say in MyClass2, i just call it by:
MyInterface myClass = MyInterface.singleton;
Then if i do the same in MyClass3, am i calling the same instance as MyClass1 or just creating a new instance?
If the latter is the case, is there a way to call the same?
Declare your INSTANCE as static and final inside your ClientBundle interface in that way:
Access your instance like MyResources.INSTANCE, it would not be instantiated twice.
https://developers.google.com/web-toolkit/doc/latest/DevGuideClientBundle