Satisfied Interfaces: Annotation, ConstrainedAnnotation<Value,Value?,ProgramElement>
Direct Known Satisfying Classes: AbstractAnnotation, ActualAnnotation, AnnotationAnnotation, AuthorsAnnotation, DefaultAnnotation, DeprecationAnnotation, DocAnnotation, FinalAnnotation, FormalAnnotation, LateAnnotation, LicenseAnnotation, NativeAnnotation, OptionalImportAnnotation, SharedAnnotation, TagsAnnotation, VariableAnnotation
All Known Subtypes Hierarchy

- OptionalAnnotation
  - AbstractAnnotation
  - ActualAnnotation
  - AnnotationAnnotation
  - AuthorsAnnotation
  - DefaultAnnotation
  - DeprecationAnnotation
  - DocAnnotation
  - FinalAnnotation
  - FormalAnnotation
  - LateAnnotation
  - LicenseAnnotation
  - NativeAnnotation
  - OptionalImportAnnotation
  - SharedAnnotation
  - TagsAnnotation
  - VariableAnnotation

An annotation that may occur at most once at a single program element and only on certain program elements.

An optional annotation is declared simply by having the annotation class satisfy OptionalAnnotation instead of Annotation. For example the following would only be allowed on `class` declarations:

    final annotation class ExampleClass()
            satisfies OptionalAnnotation<Example, ClassDeclaration> {}

At runtime a ceylon.language.meta.declaration::Declaration instance can be queried for its `OptionalAnnotation`s of a certain type using ceylon.language.meta::annotations or ceylon.language.meta::optionalAnnotation.

See also: Annotation

Inherited Attributes
Attributes inherited from: Object hash, string

Inherited Methods
Methods inherited from: Object equals
Methods inherited from: ConstrainedAnnotation<Value,Values,ProgramElement> occurs