Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315090

Summary: [JavaTypes] Resolve types lazily
Product: [Modeling] TMF Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: moritz.eysholdt
Version: 1.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Sebastian Zarnekow CLA 2010-05-31 10:50:50 EDT
Assuming the following scenario:

class Foo {
  private UnknownType unusedField;
  private String usedField;
}

The class foo is contained in a referenced bundle while the UnknownType is not available. As the field is never read, there won't be any problems at runtime. However, the class-loader based implementation will call type.getDeclaredFields which in turn will throw an undocumented NoClassDefFoundError. As there is no way to query the declared fields individually, there won't be any information about any field of Foo available, if the NoClassDefFoundError were caught.

I'm currently not aware of a robust strategy that provides a lot information about the types and still does not crash on an incomplete class-path.