parser.setResolveBindings(true); // we need bindings later on
CompilationUnit cu = (CompilationUnit) parser.createAST(null);
// List types = cu.structuralPropertiesForType();
for(Object o:cu.types()){
AbstractTypeDeclaration dec = (AbstractTypeDeclaration) o;
List bodyDeclarations = dec.bodyDeclarations();
assertNotNull(dec.resolveBinding());
for(Object body:bodyDeclarations){
MethodDeclaration methodDec = (MethodDeclaration) body;
IMethodBinding binding = methodDec.resolveBinding();
assertNotNull(binding);