1.

Can Call Apex Class Method On The Fly (dynamically)?

Answer»

While you can instantiate a class based on its name using the Type SYSTEM class, you can’t dynamically locate a method and EXECUTE it. The best that you can do is to dynamically CREATE an instance of a class that IMPLEMENTS an interface and EXECUTES one of the methods on the interface.

While you can instantiate a class based on its name using the Type system class, you can’t dynamically locate a method and execute it. The best that you can do is to dynamically create an instance of a class that implements an interface and executes one of the methods on the interface.



Discussion

No Comment Found