Reflection in Apex

For experienced developers, the lack of reflection capabilities in the Apex language can be a limitation in the type of patterns that can be ported from other languages (Java, C# etc.). With Summer 12, the Type class now supports the newInstance method, enabling instantiation via the class name as a string. Sounds simple, but this method opens the door to a number of typical reflection use cases. Excellent news.

This developer force post provides an excellent intro.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: