• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package android.platform.test.rule
2 
3 /** Checks if the class, or any of its superclasses, have [annotation]. */
hasAnnotationnull4 fun <T> Class<T>?.hasAnnotation(annotation: Class<out Annotation>): Boolean =
5     if (this == null) {
6         false
7     } else if (isAnnotationPresent(annotation)) {
8         true
9     } else {
10         superclass.hasAnnotation(annotation)
11     }
12