Class MigrationPlan
java.lang.Object
com.patbaumgartner.spring.migrator.core.MigrationPlan
The outcome of analysing a project: every deprecated property that was found, why the
migrator classified it the way it did, and the exact file content that would be written
if the plan is applied.
Analysis and mutation are separate on purpose. Callers can inspect a plan, decide to fail the build, and never touch a single file, which avoids the trap of rewriting some files and then aborting because of a finding elsewhere.
-
Method Summary
Modifier and TypeMethodDescriptionchanges()Returns every finding, in file and line order.Returns the findings with a given outcome.Returns messages about conditions that make the result less trustworthy, such as unreadable files or an empty metadata repository.booleanReturns whether any deprecated property was found.booleanReturns whether applying the plan would modify any file.render(boolean applied) Renders a human-readable report.
-
Method Details
-
changes
Returns every finding, in file and line order.- Returns:
- all changes
-
changes
Returns the findings with a given outcome.- Parameters:
outcome- the outcome to filter by- Returns:
- the matching changes
-
diagnostics
Returns messages about conditions that make the result less trustworthy, such as unreadable files or an empty metadata repository.- Returns:
- the diagnostics
-
hasFindings
public boolean hasFindings()Returns whether any deprecated property was found.- Returns:
- whether the plan has findings
-
hasPendingWrites
public boolean hasPendingWrites()Returns whether applying the plan would modify any file.- Returns:
- whether there is anything to write
-
render
Renders a human-readable report.- Parameters:
applied- whether the plan has been written to disk- Returns:
- the report text
-