Record Class AppliedFix
java.lang.Object
java.lang.Record
com.google.errorprone.fixes.AppliedFix
-
Constructor Summary
ConstructorsConstructorDescriptionAppliedFix
(String snippet, boolean isRemoveLine) Creates an instance of aAppliedFix
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable AppliedFix
apply
(CharSequence source, com.sun.tools.javac.tree.EndPosTable endPositions, Fix suggestedFix) Applies the suggestedFix to the source.static String
applyReplacements
(CharSequence source, com.sun.tools.javac.tree.EndPosTable endPositions, Fix fix) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisRemoveLine
record component.snippet()
Returns the value of thesnippet
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
AppliedFix
Creates an instance of aAppliedFix
record class.- Parameters:
snippet
- the value for thesnippet
record componentisRemoveLine
- the value for theisRemoveLine
record component
-
-
Method Details
-
apply
public static @Nullable AppliedFix apply(CharSequence source, com.sun.tools.javac.tree.EndPosTable endPositions, Fix suggestedFix) Applies the suggestedFix to the source. Returns null if applying the fix results in no change to the source, or a change only to imports. -
applyReplacements
public static String applyReplacements(CharSequence source, com.sun.tools.javac.tree.EndPosTable endPositions, Fix fix) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
snippet
Returns the value of thesnippet
record component.- Returns:
- the value of the
snippet
record component
-
isRemoveLine
public boolean isRemoveLine()Returns the value of theisRemoveLine
record component.- Returns:
- the value of the
isRemoveLine
record component
-