Add support for gwt magic methods

Change-Id: I69229fb2578f3282b9acd4fd8bac236cc48542ec