Reflection - support for annotations - OpenEdge Development - Products Enhancements - Progress Community

 OpenEdge Development

Reflection - support for annotations

It should be possible to get (values of) annotations through reflection.

Since currently annotations are not compiled in (they are ignored by the compiler), annotations itself would need enhancements comparable to the Java annotations or c# attributes (which are type safe).

See discussion

  • See also

  • And we should also be able to get the string values for an annotation from OS tools such as "what". This would allow us to put version stamps into enum classes - which is impossible today.  Here is a snippet from a case I opened regarding this:

    We use an include file to version stamp the components used to compile an object (.r) file. The include file looks like:

       form "@(#){1} {3} {6}" with frame f-rcsid width 360.

    The include file is included using syntax like:

    {lib/rcs.i {0} $Revision: 23928 $ $Date: 2012-12-12 14:15:35 -0500 (Wed, 12 Dec 2012) $}

    Where the Revision and Date keywords are expanded/updated when the file is committed to our Subversion repository.

    We can then use the "what" command to determine the versions of the .w, .p, .cls file as well as any include files which were used when the .r was compiled.  I.e:

    # what driver.r


           comm/driver.p 34733 2017-08-01

           comm/poll_def.i 25908 2014-03-10

           lib/lockit.i 9061 2002-02-20

           lib/get_parm.i 84 1995-08-24