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 aAppliedFixrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable AppliedFixapply(CharSequence source, com.sun.tools.javac.tree.EndPosTable endPositions, Fix suggestedFix) Applies the suggestedFix to the source.static StringapplyReplacements(CharSequence source, com.sun.tools.javac.tree.EndPosTable endPositions, Fix fix) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisRemoveLinerecord component.snippet()Returns the value of thesnippetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AppliedFix
Creates an instance of aAppliedFixrecord class.- Parameters:
snippet- the value for thesnippetrecord componentisRemoveLine- the value for theisRemoveLinerecord 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 thecomparemethod from their corresponding wrapper classes. -
snippet
Returns the value of thesnippetrecord component.- Returns:
- the value of the
snippetrecord component
-
isRemoveLine
public boolean isRemoveLine()Returns the value of theisRemoveLinerecord component.- Returns:
- the value of the
isRemoveLinerecord component
-