working with JavaRefFactory [message #617227] |
Wed, 25 June 2008 20:40 |
Andrew Mak Messages: 41 Registered: July 2009 |
Member |
|
|
Hi,
I have some code that generates a Java class file which I subsequently try
to reflect using the JavaRefFactory, like so:
EMFNature nature = JemProjectUtilities.getJEM_EMF_Nature(myProject,
true);
JavaClass javaClass = (JavaClass) JavaRefFactory.eINSTANCE
.reflectType(myClassName, nature.getResourceSet());
I then try to get the list of methods from the javaClass:
List methods = javaClass.getMethods();
// do stuff with methods
The problem I'm running into is that very ocasionally, the list of methods
returned is empty even though the class has methods. It seems to happen
randomly.
Any ideas why that is? Could this be a timing issue? If so, is there some
way I can ensure the model is up-to-date before I reflect the class?
Thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.02487 seconds