Summary: | DOM/AST: need a way to access the IMethodBinding of a ClassInstanceCreation | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dirk Baeumer <dirk_baeumer> |
Component: | Core | Assignee: | Jim des Rivieres <jeem> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | eclipse, Olivier_Thomann |
Version: | 2.0 | ||
Target Milestone: | 2.0 M4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Dirk Baeumer
2002-02-28 12:02:58 EST
Agreed. There is no way to get a binding for the constructor being invoked. Presumably the same concern applies to ConstructorInvocation and SuperConstructorInvocation as well. I suggest calling the method resolveConstructorBinding() -> IMethodBinding to make it clear what it is for. For a ClassInstanceCreation expression that declares an anonymous class, which constructor binding is expected: (a) the 'anonymous constructor' (JLS 15.9.5.1) of the anonymous class, or (b) the constructor on the direct superclass. IMO the method should return the binding of the anonymous constructor Are you aware that this binding can contain synthetic arguments? Is this ok for you? Can you give me an example I was wrong. The synthetic arguments are not in the binding. I tried several examples that use this$0 or other type of synthetic argument and I don't get them in the binding parameter types. So it is fine. I released changes that should return the proper method binding. *** Bug 10674 has been marked as a duplicate of this bug. *** Fixed and released in HEAD. |