assertClass function

ClassElement assertClass(
  1. Element element
)

Asserts that element is a class.

Implementation

ClassElement assertClass(Element element) {
  if (element is ClassElement) {
    return element;
  }

  throw Exception('Annotation must be used on a class.');
}