This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Please consider providing method similar to ElementHandle.asTyped in following example on line 4. <code> 1| public static ElementHandle<TypeElement> getTypeElementHandle() { 2| ElementHandle<? extends Element> elementHandle = getElementHandle(); 3| if (ElementKind.CLASS == elementHandle.getKind()) { 4| return elementHandle.asTyped(TypeElement.class); 5| } 6| return null; 7| } </code> It would be useful for API user to get parameterized TypeElement without unchecked cast, which is now only option. I have to use this unchecked cast on line 4: <code> return (ElementHandle<TypeElement>) elementHandle; </code>
Overtake.