`clang-format` can be used for auto-formatting Java files the same way it is for Objective-C and C++.