Annotation Info
Holds metadata about a single annotation instance present on a method or parameter.
Instances are created at compile time by the AspectK compiler plugin and embedded inside MethodSignature or MethodParameter. They allow advice methods to inspect annotation details at runtime without incurring additional reflection overhead.
Only arguments that are explicitly provided in source are included in args; omitted optional arguments (those relying on their default values) are not present.
Mapping args to parameterNames
args and parameterNames are parallel lists: args[i] is the value of the annotation parameter named parameterNames[i]. Use zip to iterate them together:
val annotationInfo: AnnotationInfo = ...
annotationInfo.parameterNames.zip(annotationInfo.args).forEach { (name, value) ->
println("$name = $value")
}Properties
The names of the annotation parameters corresponding to each entry in args, in the same order. Always has the same length as args.
The KClass of the annotation.