|Re: What is the role of I*Binding in Eclipse JDT? [message #1006776 is a reply to message #1006156]
||Fri, 01 February 2013 18:54
| Stephan Herrmann
Registered: July 2009
To see the difference you may, e.g., look at the return type of a method:|
- Java Model: String IMethod.getReturnType()
- AST: Type MethodDeclaration.getReturnType2()
- Binding: ITypeBinding IMethodBinding.getReturnType()
The first is just a String, the name of the return type. In the AST you get the same information but artfully wrapped in syntax nodes like SimpleType(SimpleName).
Only in the binding will you find the resolved type, an object which you can query for the various properties of this type. OTOH, resolving is an expensive operation, hence the other kinds, which can be constructed more easily.
Powered by FUDForum
. Page generated in 0.03138 seconds