FileDocCategorySizeDatePackage
ReflectIntermediateClass.javaAPI DocAndroid 5.1 API1729Thu Mar 12 22:22:12 GMT 2015com.android.framework.multidexlegacytestservices

ReflectIntermediateClass

public class ReflectIntermediateClass extends Object
Offer an indirection to some Big0xx classes and have their initialization spread along a period of time.

Fields Summary
Constructors Summary
Methods Summary
public static intget(int from, int to, int sleepMillis)

        int value = 0;
        for (int i = from; i <= to; i++) {
            Class<?> bigClass = Class.forName(
                    "com.android.framework.multidexlegacytestservices.manymethods.Big0" + i);
            Method get = bigClass.getMethod("get" + i);
            value += ((Integer) get.invoke(bigClass.newInstance())).intValue();
            try {
                Thread.sleep(sleepMillis);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        return value;