Re-implement create_stripped_java_factory.py with javalang

This gives us more flexibility to stub more sophisticated factories. As
a first improvement we can now use private imports that are used in the
body of the real factory.

Bug: 968274
Change-Id: I5f4f8609cfb51ecae3fd7aa99078ef589be00236
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1647402
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Auto-Submit: Tibor Goldschwendt <tiborg@chromium.org>
Reviewed-by: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667591}
2 files changed