FinalCaseClass

com.choreograph.scalafix.FinalCaseClass
See theFinalCaseClass companion object

Marks all case classes as final.

Case classes are typically leaf types in inheritance hierarchies, and making them final prevents unintended inheritance which can cause issues with pattern matching and equality.

Example:

  • case class Foo(x: Int) → final case class Foo(x: Int)

Attributes

Companion
object
Source
FinalCaseClass.scala
Graph
Supertypes
class Rule
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def fix(using doc: SyntacticDocument): Patch

Attributes

Definition Classes
Source
FinalCaseClass.scala

Inherited methods

Attributes

Inherited from:
Rule
def beforeStart(): Unit

Attributes

Inherited from:
Rule

Attributes

Inherited from:
Rule

Attributes

Inherited from:
Rule

Attributes

Inherited from:
Rule

Attributes

Inherited from:
Rule
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Rule -> Any
Inherited from:
Rule

Attributes

Inherited from:
Rule

Inherited fields

val name: RuleName

Attributes

Inherited from:
Rule