Well, I did hesitate to use the term because I believe it's more aptly called "xenophobia". But If the way you recognize foreigners is by their race, then I think it kind of becomes a distinction without a difference.
I have tried to make the case elsewhere that it's not exactly even anti-foreigner, but that Japanese people hold very high standards of behavior for themselves as well, so that anyone different is eschewed. However, of course, all foreigners will fit into that category.
In the end, it's very difficult to parse between these motivations when the functional outcome is nearly the same. It'd be basically impossible to discern where one mode of behavior starts and another ends--even in the mind of the individual acting it out.