|How to Load JavaModel (file.javaxmi) [message #982753]
||Tue, 13 November 2012 11:46
| Rafael Durelli
Registered: September 2012
Hello guys bonjour, I have read two or three topics closely related to this. However, I couldn't figured out yet how to load a file .javaxmi correctly. In the bellow chunk of source code I have been tried to load a .javaxmi file which was discovered by MoDiSCO, but I haven't succeeded yet. The problem is when I try to make some Cast Operation..For instance, see the bellow code...|
put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
ResourceSet resSet = new ResourceSetImpl();
Resource resource = resSet.getResource(URI.createURI("file:/path/TestModisco.javaxmi"), true);
ModelImpl model = (ModelImpl)resource.getContents().get(0);
//I always get an error during the Cast Operation...
JavaApplication javaVari = (JavaApplication)resource.getContents().get(0);
I always get a error during the Cast Operation. Thus, I would like to know how to obtain the "classes", "methods" and even "variable declaration" after loaded the javaxmi model? Please, I'll be so glad to see an example. Thanks in advance.
Powered by FUDForum
. Page generated in 0.02590 seconds