Summary: | Surface compiler information about boxing/unboxing in the DOM AST (implicit conversion) | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dirk Baeumer <dirk_baeumer> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | eclipse |
Version: | 3.1 | ||
Target Milestone: | 3.1 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 68209 |
Description
Dirk Baeumer
2005-03-04 14:22:29 EST
any news here? I don't want to nag, but this might be API relevant... olivier - how doable is this ? Expression#isBoxed()/isUnboxed() ? I think this is doable if we consider that this is available only when bindings are requested. I could do it lazily by using the binding resolver. If the binding resolution is disabled, then both methods would always return false. Is this ok? I will do it the same way I handled the constant value. Jim, could you please put the corresponding method API and javadoc? Then reassign it to me and I will take care of the implementation. Added specs for 2 new API methods on o.e.jdt.core.dom.Expression: /** * Returns whether this expression node is the site of a boxing * conversion (JLS3 5.1.7). This information is available only * when bindings are requested when the AST is being built. * * @return <code>true</code> if this expression is the site of a * boxing conversion, or <code>false</code> if either no boxing conversion * is involved or if bindings were not requested when the AST was created * @since 3.1 */ public final boolean resolveBoxing(); /** * Returns whether this expression node is the site of an unboxing * conversion (JLS3 5.1.8). This information is available only * when bindings are requested when the AST is being built. * * @return <code>true</code> if this expression is the site of an * unboxing conversion, or <code>false</code> if either no unboxing * conversion is involved or if bindings were not requested when the * AST was created * @since 3.1 */ public final boolean resolveUnboxing(); Olivier, over to you Fixed and released in HEAD. Regression tests added in ASTConverter15Test.test0153/0154. Verified in 20050330-0500 |