is this the correct approach at pulling out an ann...
# ksp
w
is this the correct approach at pulling out an annotation argument?
Copy code
parameter.annotations.firstOrNull { annot ->
    annot.annotationType.resolve().isAssignableFrom(annotationType)
}?.arguments?.firstOrNull()?.let { annotation ->
    foo = (annotation.value as? String)
}
i’m not used to casting like this, so just checking i’m not going down the wrong path
j
yes you have to cast the annotation argument value manually.