私はこのような単純なクラスを持っています:
public static class MyData {
@Text(required = false)
protected String value;
@Attribute(required = true)
protected String id;
@Text
public String getValue() {
return value;
}
@Text
public void setValue(String value) {
this.value = value;
}
public String getId() {
return id;
}
public void setId(String value) {
this.id = value;
}
}
例外が発生しています:
Exception Text annotation
@org.simpleframework.xml.Text(data=false, empty=, required=true)
on method 'value' used with elements in class MyData
実際のXMLは次のとおりです。
<MyData id="fakeId">An HTTP Link is here</MyData>
任意のアイデア:@Text
getValue / setValueに注釈がないなど、いくつかの組み合わせを試しましたが、役に立たないようです。