Bug 156871 - API to create ITypeBinding from type name
Summary: API to create ITypeBinding from type name
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-11 09:51 EDT by Markus Keller CLA
Modified: 2006-09-11 09:51 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2006-09-11 09:51:10 EDT
3.2

As discussed on the JDT summit:

- find and create bindings in existing binding environments
    * find type binding by name or key

The API would be a generalization of AST#resolveWellKnownType(String), with the difference that type bindings can be resolved for all types on the classpath. The best home for the API would be the BindingEnvironment (see bug 150657).

The method could be

    ITypeBinding resolveTypeBinding(String name)

and should work for primitive types, classes, interfaces, enums, and annotations. For generic types, the method should resolve to the type declaration (isGenericType() == true).