import {
  Type,
} from '../type';

import { Annotation } from './Annotation';

export interface AnnotatedElement {
  _addAnnotation<AnnotationType extends Annotation>(annotation: AnnotationType): void;

  isAnnotationPresent<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): boolean;
  getOwnAnnotation<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): AnnotationType | undefined;
  getOwnAnnotations(): Map<Type<any>, Annotation>;
  getOwnAnnotationsByType<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): AnnotationType[] | undefined;
  getAnnotation<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): AnnotationType | undefined;
  getAnnotations(): Map<Type<any>, Annotation>;
  getAnnotationsByType<AnnotationType extends Annotation>(annotationClass: Type<AnnotationType>): AnnotationType[] | undefined;
}
