XSD中的属性枚举

时间:2019-01-11 14:08:01

标签: java xsd jaxb

是否可以创建带有枚举的XSD,且每个选项都具有属性? Java中的示例代码:

public enum MyEnumeration {

    VAL1("value1", 5, 10);

    private String value;
    private int attr1;
    private int attr2;

    public MyEnumeration(String value, int attr1, int attr2) {
        this.value = value;
        this.attr1 = attr1;
        this.attr2 = attr2;
    }
}

0 个答案:

没有答案