How to Simulate Polymorphic Methods
I would like to be able to do something like the following:
&myCustomClass.CustomMethod(1, 2, 3);
&myCustomClass.CustomMethod(1, 2);
and have PeopleTools route the calls to methods with different signatures, i.e., polymorphism. I know PeopleTools doesn't support this natively. Has anyone come up with a clever way to simulate it? Off the top of my head, I can think of 2, but they're clunky and inelegant
- create one method that accepts an array, then have it delegate to sub-methods based on the number/type of elements
- write the entire class in Java