How can I keep GWT from trying to include every serializable class when I use ArrayList

前端 未结 4 894
隐瞒了意图╮
隐瞒了意图╮ 2021-02-08 05:30

I have an RPC service in GWT that needs to return a List. The List can be filled with various types of objects, all of which are serializable and all of are referenced elsewher

4条回答
  •  借酒劲吻你
    2021-02-08 06:03

    You will have to help GWT by being very precise in what you return. A typical solution is to use a root class or marker interface and declare that the RPC method returns an ArrayList, then GWT can trim down the possible types.

提交回复
热议问题