core/src/reflect/AnnotatedElement.ts
crusader 06967e23c9 ing
2018-05-16 15:57:12 +09:00

18 lines
911 B
TypeScript

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;
}