// figure out whether it's declared locally
IMethodBinding declaredIn = vb.getDeclaringMethod();
while(declaredIn != null && declaredIn != declaredIn.getMethodDeclaration()) {
declaredIn = declaredIn.getMethodDeclaration();
}
result = new SourceVariable(vb.getName(), vb, method.equals(declaredIn));
}
else if(binding instanceof ITypeBinding) {
ITypeBinding tb = (ITypeBinding) binding;
result = new TypeVariable(tb);
}