My current understanding is that JDT provides us two different interface and class hierachies for representing and manipulating Java code:
Java Model: provides a way of representing a java project. Fast to create but does not contain as many information as AST class hierachy, for example there are no information available about the exact position of each element in the source file (in AST that's available)
AST: more detailed representation of the source code plus provides means for manipulating it.
Is that correct?
Now, there is also a hierarchy of interfaces named I*Binding (starting at IBinding), for example IMethodBinding. So for example, we have 3 different types for dealing with methods:
- IMethod (from Java Model)
- MethodInvocation (from AST, could get it from IMethod)
- IMethodBinding
From doc IMethodBinding seems very like MethodInvocation from AST but I don't see a clear distinction and when should I use them. Could someone please clarify this?