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.
Add method ExpressionTree Type(DeclaredType type) to class TreeMaker. This would be useful when creating a TypeParameterTree: TreeMaker maker = ... DeclaredType extendsType = ... TypeParameterTree typeParamTree = maker.TypeParameter("T", Collections.singletonList(maker.Type(extendsType))); The currently existing method Tree Type(TypeMirror type) returns a Tree but TreeMaker.TypeParameter requires a list of ExpressionTrees as its second argument - so I must cast the resulting Tree object to ExpressionTree to make it compilable: TreeMaker maker = ... DeclaredType extendsType = ... TypeParameterTree typeParamTree = maker.TypeParameter("T", Collections.singletonList((ExpressionTree) maker.Type(extendsType)));
Overtake.