Description
Method get() of class WTKXSerializer returns value of type Object, you see:
http://incubator.apache.org/pivot/1.3/docs/api/org/apache/pivot/wtkx/WTKXSerializer.html#get(java.lang.String)
As demostrated in documentation it cause code like this: (http://incubator.apache.org/pivot/1.3/tutorials/push_buttons.html)
private PushButton pushButton = null;
...
pushButton = (PushButton)wtkxSerializer.get("pushButton");
In an alternative way, get() method may be declared as:
<T> T get(String key)
This way client code will be just:
pushButton = wtkxSerializer.get("pushButton");
so the type-case will be implicit. This feature is widely used in HtmlUnit framework and I find it quite neat.
May be it coult be adopted to pivot project