GetAnnotations( ) method
- Last Updated: March 13, 2026
- 2 minute read
- OpenEdge
- Version 13.1
- Documentation
Returns an array (EXTENT) of annotation instances directly associated with
the reflected element. Each instance represents a specific annotation, inherits from
Progress.Lang.Annotation, and provides read‑only access to the
annotation’s property values stored in r‑code. Because the returned array is typed
as Progress.Lang.Annotation, you can cast individual elements to
their user‑defined annotation classes when you need to access concrete annotation
properties. The instances are created by the runtime when accessed through
reflection.
GetAnnotations() returns only the annotations that are directly associated
with the reflected element. If you want to include annotations for the corresponding
element found in the inheritance hierarchy, use the overloaded form that accepts
searchInherited. When searchInherited is
TRUE, the method searches for the element in the hierarchy and
includes all annotations found for the versions of that element in the hierarchy.
Otherwise it follows the default behavior of returning only annotations on the
actual element being reflected on. Constructors are not inherited, so
searchInherited has no effect when reflecting on a constructor.
If there are no annotations, an indeterminate array is returned.
Return type:
Progress.Lang.Annotation class
EXTENT
Access: Read-only
Applies to: Progress.Lang.Class class, Progress.Reflect.Constructor class, Progress.Reflect.Event class, Progress.Reflect.Method class, Progress.Reflect.Property class, Progress.Reflect.Variable class
Syntax
|
|
|
- searchInherited
- A LOGICAL value that specifies whether to search for the element in the class hierarchy and include annotations found for the versions of the element in the hierarchy.
- annotationType
- A
Progress.Lang.Classthat identifies the annotation class to retrieve. Use this overloaded form to return only annotations of the specified annotation type.
See also
ANNOTATION statement, [ ] Strongly typed annotation, Progress.Lang.Annotation class, GetAnnotation( ) method, HasAnnotation( ) method