Use the IReflector Interface

All iSDK classes have access to a toolbox interface called IReflector. This interface provides functionality that enables the use of Java reflection. Within any class that extends one of the template classes, the user can call getNewReflectionBuilder() to get an instance of IReflectionBuilder.

Note: getNewReflectionBuilder() must be called in the constructor of your plug-in class. You may hit a NullPointerException if it is called elsewhere.

This interface supports the following methods:

/** 
* load a class. classLoader specified in the IReflector.execute method 
**/
IReflectionBuilder loadClass(String className);
/**
 * Create a new object
 * @param className class to create
 * @param argTypes argument types
 * @return this
 */
IReflectionBuilder createObject(String className, String... argTypes);
/**
 * Invoke a static method
 * @param methodName method to invoke
 * @param searchSuperClass search super classes for the method. Else only declared methods are called
 * @param argTypes for overloaded methods
 * @return this
 */
IReflectionBuilder invokeStaticMethod(String methodName, boolean searchSuperClass, String... argTypes);
/**
 * Similar to invoke static method, invoke a instance method
 * @param methodName method to invoke
 * @param searchSuperClass search super classes for the method. Else only declared methods are called
 * @param argTypes for overloaded methods
 * @return this
 */
IReflectionBuilder invokeInstanceMethod(String methodName, boolean searchSuperClass, String... argTypes);
/**
 * Access a field
 * @param fieldName field name to access
 * @param searchSuperClass should search super class for the field name
 * @return this
 */
IReflectionBuilder accessFieldValue(String fieldName, boolean searchSuperClass);
These can be called in any order, essentially forming a getter chain. After crafting your chain of calls, the build() method must be called, returning an IReflector.
The IReflector is used by invoking its execute() method:
/**
 * Execute the reflector chain
 * @param classLoader required - classloader referenced to load classes
 * @param target The steps will start executing on this object. null if first step is loadClass or staticMethod
 * @param params params to be passed to the steps
 * @return returns with correct cast
 * @throws ReflectorException
 */
<E> E execute(ClassLoader classLoader, Object target, Object[]... params) throws ReflectorException;
/**
 * Execute the reflector chain
 * @param classLoader required - classloader referenced to load classes
 * @param target The steps will start executing on this object. null if first step is loadClass or staticMethod
 * @param params params to be passed to the steps
 * @return returns with correct cast
 * @throws ReflectorException
 */
<E> E execute(ClassLoader classLoader, Object target, OperationParams params)
 throws ReflectorException;

The use of these reflectors is often critical for getting the desired functionality (extracting values from payloads, decorating objects with correlation headers, and so on).