[descriptors] Move some annotation-related utilities to the core module
- AnnotationDescriptor#argumentValue is not frontend-specific - AnnotationDescriptor#getAnnotationStringValue is not Native-specific We are going to need these functions in the IR code, so it makes sense to factor them out to the core module.
This commit is contained in:
committed by
teamcity
parent
56cb0bf071
commit
dff2d2ed60
@@ -33,9 +33,8 @@ fun DeclarationDescriptor.hasJvmStaticAnnotation(): Boolean {
|
||||
return annotations.findAnnotation(JVM_STATIC_ANNOTATION_FQ_NAME) != null
|
||||
}
|
||||
|
||||
fun AnnotationDescriptor.argumentValue(parameterName: String): ConstantValue<*>? {
|
||||
return allValueArguments[Name.identifier(parameterName)].takeUnless { it is ErrorValue }
|
||||
}
|
||||
@Deprecated("Moved to the ':core:descriptors' module", level = DeprecationLevel.HIDDEN)
|
||||
fun AnnotationDescriptor.argumentValue(parameterName: String): ConstantValue<*>? = argumentValue(parameterName)
|
||||
|
||||
@Deprecated(
|
||||
"Use org.jetbrains.kotlin.load.java.JvmAbi.JVM_FIELD_ANNOTATION_FQ_NAME or " +
|
||||
|
||||
Reference in New Issue
Block a user