public static <T extends Context> APIInterface getServiceInstance(T context) {
if (apiInterface == null) {
// do Something
}
return apiInterface;
}
This method is currently accepting all the objects .. Activity.this .. getApplicationContext(), getContext() and getBaseContext()
Can we restrict this method to only accept Context object as a parameter / not Activity.
Thanks