Class StaticSweep
static-fields.md Step 1.
bin/static-sweep target/classes --lib target/dependency --report target/static-sweep.md
Options: --lib <dir> puts every jar in a directory on the resolution classpath and
--cp <path> takes the entries directly (both repeatable, both optional — a dependency's
absence costs only precision, and the report says which types went unresolved);
--report <path> writes the Markdown to a file instead of stdout; --diff <dir>
gives every row its fate in a second tree, which is the sweep's completeness check once the
migration has run; --src <dir> warns when the classes are older than the sources.
Point it at the app you have not migrated yet. A Swing app under migration builds by definition, so its stage-1 classes exist on day zero — this is not the post-swap build the guide cannot assume.
A progress meter, not a gate. Exit 0 whenever the sweep ran, because a non-empty
worklist mid-migration is the expected state; MigrationGuardrails is the gate that throws.
The loud failure is no class files at all, in either tree — exit 2 naming the build to run,
since an empty worklist over an unbuilt tree is a silent success, and a diff against an empty one
reports every row gone. A path that names nothing elsewhere (--lib, --src) is a
note at the top of the report, since the sweep still ran.
And no verdicts, deliberately: which Reason a row claims, whether isLoggedIn is
session or tab scope, whether a counter must stay contiguous — those need the app's intent.
-
Method Summary
-
Method Details
-
main
-