libgdx/libgdx — pull request #765 by hneuer (2013-09-22 07:17:56+00:00)
Title: GWT Reflection: Use switch instead of if-cascade

Changed code generation so that a switch is used instead of the if-cascades in the generated code.

New generated code in IReflectionCacheGenerated:

public Object newInstance (Type type) {
String param = type.getName();
switch(param.hashCode()) {
case -256833987:
if("com.badlogic.gdx.scenes.scene2d.utils.FocusListener.FocusEvent".equals(param)) {return new com.badlogic.gdx.scenes.scene2d.utils.FocusListener.FocusEvent();}
break;
case -1926512153:
if("com.badlogic.gdx.scenes.scene2d.actions.AlphaAction".equals(param)) {return new com.badlogic.gdx.scenes.scene2d.actions.AlphaAction();}
break;
...