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);
}
精彩评论