å ãã¿ã¯StackOverflowã®ãã¡ãã®è³ªåã inheritance - Java/JAXB: Unmarshall Xml to specific subclass based on an attribute - Stack Overflow ä¸è¨ã®ä¾ã§ã¯ã¯ã©ã¹åãã®ãã®ãå±æ§å¤ã¨ãã¦è¨å®ãã¦ããããããã§ã¯ãªããã³ã¼ãå¤ãçãªå±æ§ã§ãµãã¯ã©ã¹ãæå®ãããå ´åã«ã¯ã©ãããã°è¯ããï¼ ã©ãããå ´åãã¨ããã¨ãä¾ãã°ä»¥ä¸ã®ãããªXMLãéæ´ååãããã¨ããã <commandList> <command code="C" data="æ°è¦ä½æãã¼ã¿" /> <command code="D" id="1" /> </commandList> ããã¯ãã¼ã¿æä½ã è¦ç´ ã§æå®ãããã®ã§ãæä½ã®ç¨®é¡ã¯ code å±æ§ã§æ±ºã¾ãã Cï¼CREATEï¼ãªã data å±æ§ã®å¤ã使ã£ã¦æ°è¦ã¬ã³ã¼ãã
{{#tags}}- {{label}}
{{/tags}}