Package io.codemodder
Class CodemodChange
java.lang.Object
io.codemodder.CodemodChange
Represents a change made to the code.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic CodemodChangefrom(int line) ACodemodChangeconvenience builder for weaves that don't require a new dependency.static CodemodChangefrom(int line, DependencyGAV dependencyNeeded) ACodemodChangeconvenience builder for weaves that only requires one new dependency.static CodemodChangestatic CodemodChangestatic CodemodChangefrom(int line, List<DependencyGAV> dependenciesNeeded) Builds a weave.A list of the dependencies that are required to be added to the project in order to support this change.A description of the change that is being made.List<io.codemodder.codetf.CodeTFParameter>A list of the codemod parameters that are involved in this change.inthashCode()intThe line number associated with the change.toString()
-
Method Details
-
equals
-
hashCode
public int hashCode() -
lineNumber
public int lineNumber()The line number associated with the change. Doesn't necessarily mean the line where it starts, ends, or was discovered, but should be deterministic on consecutive runs. -
getParameters
A list of the codemod parameters that are involved in this change. -
getDependenciesNeeded
A list of the dependencies that are required to be added to the project in order to support this change. -
getDescription
A description of the change that is being made. If not provided, the default description will be used. -
from
Builds a weave. -
from
ACodemodChangeconvenience builder for weaves that only requires one new dependency. Equivalent to calling:CodemodChange.from(line, code, List.of(dependencyNeeded)) -
from
ACodemodChangeconvenience builder for weaves that don't require a new dependency. Equivalent to calling:CodemodChange.from(line, code, List.of()) -
from
-
from
-
toString
-