@ Check public void checkReservedAnnotation ( XtendAnnotationTarget annotationTarget ) { if ( ! isIgnored ( USED_RESERVED_SARL_ANNOTATION ) ) { if ( annotationTarget . getAnnotations ( ) . isEmpty ( ) || ! isRelevantAnnotationTarget ( annotationTarget ) ) { return ; } final QualifiedName reservedPackage = this . qualifiedNameConverter . toQualifiedName ( EarlyExit . class . getPackage ( ) . getName ( ) ) ; final String earlyExitAnnotation = EarlyExit . class . getName ( ) ; for ( final XAnnotation annotation : annotationTarget . getAnnotations ( ) ) { final JvmType type = annotation . getAnnotationType ( ) ; if ( type != null && ! type . eIsProxy ( ) ) { if ( Objects . equal ( type . getIdentifier ( ) , earlyExitAnnotation ) ) { // Special case: EarlyExit is allowed on events for declaring early-exit events if ( ! ( annotationTarget instanceof SarlEvent ) ) { addIssue ( MessageFormat . format ( Messages . SARLValidator_87 , type . getSimpleName ( ) ) , annotation , USED_RESERVED_SARL_ANNOTATION ) ; } } else { final QualifiedName annotationName = this . qualifiedNameConverter . toQualifiedName ( type . getIdentifier ( ) ) ; if ( annotationName . startsWith ( reservedPackage ) ) { addIssue ( MessageFormat . format ( Messages . SARLValidator_87 , type . getSimpleName ( ) ) , annotation , USED_RESERVED_SARL_ANNOTATION ) ; } } } } } }
Check for reserved annotations .