Community
Participate
Working Groups
I200411090800 Bug 77360 outlines the three possible kinds of type bindings for generic types: a) generic type -> request for new query isGenericType() b) parameterized type -> ITypeBinding#isParameterizedType() c) raw type -> ITypeBinding#isRawType() Currently, clients do the check for isGenericType() with 'getTypeParameters().length > 0'. For isParameterizedType(), they could also ask 'getTypeArguments().length > 0', but it seem strange that there is an explicit query in one case but not the other. The Javadoc of ITypeBinding#getErasure() could then mention that isGenericType() is true for the returned type binding iff either of the receiver's isGenericType(), isParameterizedType(), isRawType() was true.
Added ITypeBinding.isGenericType() IMethodBinding.isGenericMethod(). Updated specs for isRawType/Method and isParameterizedType/Method and getErasure as suggested. Updated existing AST converter tests to ensure that both new methods work. Olivier, ASTConverter15Test.test0038 and test0044 have failures on some of the predicates. I'll enter a separate PR to track these.
*** Bug 77360 has been marked as a duplicate of this bug. ***
Verified in 200412140800