Im developing Android Application and somehow I should call "super" without super keyword inside method. Can I call super with instance of class? For example:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
How can I call super.onCreate(savedInstanceState) without using super keyword?
UPDATE 1 I tried this but this is not working too.
@Override
public void onCreate(Bundle savedInstanceState) {
try {
getClass().getSuperclass().getMethod("onCreate",Bundle.class).invoke(this,savedInstanceState);
}
catch (IllegalAccessException e) {
e.printStackTrace();
}
catch (InvocationTargetException e) {
e.printStackTrace();
}
catch (NoSuchMethodException e) {
e.printStackTrace();
}
}
Note: Please understand what I'm talking about. Don't say 'call super()'.