mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Update dependency com.pinterest.ktlint:ktlint-cli to v1.3.0 (#1853)
* Update dependency com.pinterest.ktlint:ktlint-cli to v1.3.0 * Disable expression rule * Reformat * Whatever --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jake Wharton <jw@squareup.com>
This commit is contained in:
@@ -774,20 +774,24 @@ private sealed class FromJsonComponent {
|
||||
|
||||
data class ParameterOnly(
|
||||
override val parameter: TargetParameter,
|
||||
) : FromJsonComponent(), ParameterComponent {
|
||||
) : FromJsonComponent(),
|
||||
ParameterComponent {
|
||||
override val type: TypeName = parameter.type
|
||||
}
|
||||
|
||||
data class PropertyOnly(
|
||||
override val property: PropertyGenerator,
|
||||
) : FromJsonComponent(), PropertyComponent {
|
||||
) : FromJsonComponent(),
|
||||
PropertyComponent {
|
||||
override val type: TypeName = property.target.type
|
||||
}
|
||||
|
||||
data class ParameterProperty(
|
||||
override val parameter: TargetParameter,
|
||||
override val property: PropertyGenerator,
|
||||
) : FromJsonComponent(), ParameterComponent, PropertyComponent {
|
||||
) : FromJsonComponent(),
|
||||
ParameterComponent,
|
||||
PropertyComponent {
|
||||
override val type: TypeName = parameter.type
|
||||
}
|
||||
}
|
||||
|
@@ -43,8 +43,9 @@ internal fun Resolver.getClassDeclarationByName(name: String): KSClassDeclaratio
|
||||
|
||||
internal fun <T : Annotation> KSAnnotated.getAnnotationsByType(annotationKClass: KClass<T>): Sequence<T> {
|
||||
return this.annotations.filter {
|
||||
it.shortName.getShortName() == annotationKClass.simpleName && it.annotationType.resolve().declaration
|
||||
.qualifiedName?.asString() == annotationKClass.qualifiedName
|
||||
it.shortName.getShortName() == annotationKClass.simpleName &&
|
||||
it.annotationType.resolve().declaration
|
||||
.qualifiedName?.asString() == annotationKClass.qualifiedName
|
||||
}.map { it.toAnnotation(annotationKClass.java) }
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user