Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » working with JavaRefFactory
working with JavaRefFactory [message #617227] Wed, 25 June 2008 20:40
Andrew Mak is currently offline Andrew MakFriend
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.
Previous Topic:Generate BeanInfo Automatically
Next Topic:BeanDecorator not found
Goto Forum:
  


Current Time: Thu Apr 25 20:54:36 GMT 2024

Powered by FUDForum. Page generated in 0.02487 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top