开发者

Which interface should I implement to have parse method

I'm working with webservices. I have a java object defined for the re开发者_StackOverflowquest. I'd like to create a java object of this type from a String or a XmlObject. Which interface should I implement to use the method parse to do this?

Thanks and regards


Won't you be better off using some kind of serialization/deserialization library such as XStream or something


You could create your own interface :)

public interface Parser<E>
{
  E parse(String sourceString);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜