annotationMatches<A> method

  1. @protected
bool annotationMatches<A>(
  1. Annotation annotation
)

Implementation

@protected
bool annotationMatches<A>(Annotation annotation) {
  if (annotation.getClass().getType() == A) {
    return true;
  }

  if (annotation.getClass().isInstance(A)) {
    return true;
  }

  final cls = Class<A>();
  if (annotation.getClass().isInstance(cls)) {
    return true;
  }

  return false;
}