public class DataClassContainsFunctions
This rule reports functions inside data classes which have not been whitelisted as a conversion function.
Data classes should mainly be used to store data. This rule assumes that they should not contain any extra functions
aside functions that help with converting objects from/to one another.
Data classes will automatically have a generated equals
, toString
and hashCode
function by the compiler.
Modifier and Type | Class and Description |
---|---|
static class |
DataClassContainsFunctions.Companion |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONVERSION_FUNCTION_PREFIX |
static DataClassContainsFunctions.Companion |
Companion |
Constructor and Description |
---|
DataClassContainsFunctions(io.gitlab.arturbosch.detekt.api.Config config)
This rule reports functions inside data classes which have not been whitelisted as a conversion function.
|
DataClassContainsFunctions()
This rule reports functions inside data classes which have not been whitelisted as a conversion function.
|
Modifier and Type | Method and Description |
---|---|
io.gitlab.arturbosch.detekt.api.Issue |
getIssue() |
void |
visitClass(org.jetbrains.kotlin.psi.KtClass klass) |
public static java.lang.String CONVERSION_FUNCTION_PREFIX
public static DataClassContainsFunctions.Companion Companion
public DataClassContainsFunctions(io.gitlab.arturbosch.detekt.api.Config config)
This rule reports functions inside data classes which have not been whitelisted as a conversion function.
Data classes should mainly be used to store data. This rule assumes that they should not contain any extra functions
aside functions that help with converting objects from/to one another.
Data classes will automatically have a generated equals
, toString
and hashCode
function by the compiler.
public DataClassContainsFunctions()
This rule reports functions inside data classes which have not been whitelisted as a conversion function.
Data classes should mainly be used to store data. This rule assumes that they should not contain any extra functions
aside functions that help with converting objects from/to one another.
Data classes will automatically have a generated equals
, toString
and hashCode
function by the compiler.