举例xsd片段:
<xs:complexType name="SnodSlotAddrType">
<xs:annotation>
<xs:appinfo>
<annox:annotate target="class">
<saj:SnodJavaClass name="SNOD_SLOTADDR"/>
<saj:SnodJavaClass packageName="tellabs.inmfwk.tool.snod.java"/>
</annox:annotate>
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element name="SSlot" type="xs:short">
<xs:annotation>
<xs:appinfo>
<annox:annotate target="field">
<saj:SnodCppField comment="SSlot" columnSize="10" />
<saj:SnodJavaField type="SHORT"/>
</annox:annotate>
</xs:appinfo>
</xs:annotation>
</xs:element>
注意,同一个annotation分2个写,使用xjc生成java文件中,没法支持,通不过。