get

inline fun <T : Annotation> Annotation.get(): T

Gets the instance of a declared annotation.

Return

an instance of the T annotation.

Parameters

T

the exact type of the annotation.

Throws

ReflectionException

if unable to get the instance due to a type mismatch.