mardi 6 janvier 2015

how to reflect method that return instance of class using Java Reflection

Is it possible to have a reflection for getDefault() method from this class? I am trying to have a reflection for getDefault() method can anyone help?



public class MSimTelephonyManager extends TelephonyManager {
/** @hide */
protected static ITelephonyRegistryMSim sRegistryMsim;

/** @hide */
public MSimTelephonyManager(Context context) {
super(context);
sRegistryMsim = ITelephonyRegistryMSim.Stub.asInterface(ServiceManager.getService(
"telephony.msim.registry"));
}

/** @hide */
private MSimTelephonyManager() {
}

private static MSimTelephonyManager sInstance = new MSimTelephonyManager();

/** @hide
/* @deprecated - use getSystemService as described above */
public static MSimTelephonyManager getDefault() {
return sInstance;
}
}





Aucun commentaire:

Enregistrer un commentaire