Rename class programmatically
How do I rename class programmatically?
This discussion touches on data move which, is not a concern in my case (BPL renames).
I also don't care about external references.
The best I got is:
- Get class text as string
- Replace class name in this string
- Save new string as new class
- Open new class as object
- Delete storage
- Compile class
Are there any better alternatives?
Also found this discussion.
Adapted from @Krishnamuthu Venkatachalam answer
This deserves Github+Open Exchange+ZPM ObjectScript library
Already in PythonGateway.
That's great. But I meant to have some general module as Math module @Peter Steiwer introduced.
I would somehow try to use solutions out of the box, for example %Compiler.COS.Refactor:ChangeClName().
In this class are many other useful methods for refactoring.