Java jaxb2注释插件无法注释匿名类
我似乎无法让xjc注释匿名类。这就是我的自定义注释的外观Java jaxb2注释插件无法注释匿名类,java,xsd,jaxb,xjc,jaxb2-annotate-plugin,Java,Xsd,Jaxb,Xjc,Jaxb2 Annotate Plugin,我似乎无法让xjc注释匿名类。这就是我的自定义注释的外观 @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD,ElementType.TYPE}) public @interface MyCustomAnnotation{ String value() default ""; } 具有匿名类的元素如下所示 <xs:element name="myElement" mi
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.TYPE})
public @interface MyCustomAnnotation{
String value() default "";
}
具有匿名类的元素如下所示
<xs:element name="myElement" minOccurs="0">
<xs:complexType>
<xs:annotation>
<xs:appinfo>
<annox:annotate type="com.organization.MyCustomAnnotation" target="field" value="Brief description."></annox:annotate>
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element name="fieldA" type="xs:double">
<xs:annotation>
<xs:appinfo>
<annox:annotate type="com.organization.MyCustomAnnotation" target="field" value="FieldA description."></annox:annotate>
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="fieldB" type="xs:int">
<xs:annotation>
<xs:appinfo>
<annox:annotate type="com.organization.MyCustomAnnotation" target="field" value="FieldB description."></annox:annotate>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
@MyCustomAnnotation("Brief description")
protected MainClass.MyElement myElement;