All Downloads are FREE. Search and download functionalities are using the official Maven repository.

godot.entrygenerator.exceptions.WrongAnnotationUsageException.kt Maven / Gradle / Ivy

The newest version!
package godot.entrygenerator.exceptions

import org.jetbrains.kotlin.descriptors.PropertyDescriptor
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe

class WrongAnnotationUsageException(
    propertyDescriptor: PropertyDescriptor,
    propertyHintAnnotation: AnnotationDescriptor?,
    effectiveType: String? = null
) : Exception(
    "You annotated ${propertyDescriptor.fqNameSafe} with @${propertyHintAnnotation?.fqName?.asString()?.split(".")?.last()} which ${if (effectiveType != null) "is only applicable to properties of type $effectiveType" else "cannot be applied on properties of type ${propertyDescriptor.type}"}"
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy