不幸的是,JAXB没有发现这一点并使用布尔数据类型,toptype类的这个属性可以接受任何字符串值。
Unfortunately, JAXB failed to pick up on this and use a Boolean data type — instead, the TopType class accepts any string value for this attribute.
如果需要其他的数据类型,比如说整数、浮点数或者布尔值,必须使用相应的包装器类来解析字符串。
If you need another data type such as integer, floating point, or Boolean value, you will have to parse the string using the appropriate wrapper class.
应用推荐