Package io.codemodder
Class CodemodChange
java.lang.Object
io.codemodder.CodemodChange
Represents a change made to the code.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static CodemodChange
from
(int line) ACodemodChange
convenience builder for weaves that don't require a new dependency.static CodemodChange
from
(int line, DependencyGAV dependencyNeeded) ACodemodChange
convenience builder for weaves that only requires one new dependency.static CodemodChange
static CodemodChange
static CodemodChange
from
(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.int
hashCode()
int
The 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
ACodemodChange
convenience builder for weaves that only requires one new dependency. Equivalent to calling:CodemodChange.from(line, code, List.of(dependencyNeeded))
-
from
ACodemodChange
convenience builder for weaves that don't require a new dependency. Equivalent to calling:CodemodChange.from(line, code, List.of())
-
from
-
from
-
toString
-