Question

I am not able to find anything on reflection in OpenEdge ABL and how to do it. Is it even possible?

Was it helpful?

Solution

It is possible. There are not as many possibilities in OpenEdge as in languagaes like Java or C#, but since version 11 it has basic functionality.

To use reflection look at Progress.Lang.Object which has a method GetClass() that returns an instance of Progress.Lang.Class.

These are the members of Progress.Lang.Class from the OpenEdge Help (Version 11.1, should be the same for all 11.x versions):

enter image description here

In earlier versions of OpenEdge the reflection capabilities were even worse. But it was possible to invoke methods and create instances dynamically.

You should also have a look at the DYNAMIC-NEW statement and the DYNAMIC-INVOKE function.

OTHER TIPS

It hasn't been implemented yet.

And don't forget the GET-SIGNATURE() method and the INTERNAL-ENTRIES attribute.

I was looking for Reflection in OpenEdge ABL in 2021 and I found that there are more possibilities now (I'm using OE 11.6). I wasn't able to find extensive documentation but here is a start: https://docs.progress.com/bundle/openedge-oo-abl-develop-applications/page/Reflection.html

When using Progress Developer Studio you will able to see the possibilities when using auto-complete (Ctrl + Space). enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top