public void onTitleChanged(java.lang.CharSequence title, int color) {
if (ScriptLoader.isCalledFromJRuby()) {super.onTitleChanged(title, color); return;}
if (!JRubyAdapter.isInitialized()) {
Log.i("Method called before JRuby runtime was initialized: RubotoActivity#onTitleChanged");
{super.onTitleChanged(title, color); return;}
}
String rubyClassName = scriptInfo.getRubyClassName();
if (rubyClassName == null) {super.onTitleChanged(title, color); return;}
if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(false).any?{|m| m.to_sym == :onTitleChanged}")) {
JRubyAdapter.runRubyMethod(scriptInfo.getRubyInstance(), "onTitleChanged", new Object[]{title, color});
} else {
if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(false).any?{|m| m.to_sym == :on_title_changed}")) {
JRubyAdapter.runRubyMethod(scriptInfo.getRubyInstance(), "on_title_changed", new Object[]{title, color});
} else {
if ((Boolean)JRubyAdapter.runScriptlet(rubyClassName + ".instance_methods(true).any?{|m| m.to_sym == :on_title_changed}")) {
JRubyAdapter.runRubyMethod(scriptInfo.getRubyInstance(), "on_title_changed", new Object[]{title, color});
} else {
JRubyAdapter.runRubyMethod(scriptInfo.getRubyInstance(), "onTitleChanged", new Object[]{title, color});
}
}
}
}