highsource / highsource/jaxb2-annotate-plugin

Add annotation to simpleContent (with extension)

Open
#66 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
73
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Hi,
I have an issue that requires me to add the @XmlValueExtension annotation to an object attribute that is generated by a Simple content extending double.
I can't find how to bind this in my xjb file.
My XSD looks like :
```



















```
I get the following classes
```
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "level1")
public class Level1
implements Serializable
{

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "level2")
public static class Level2
implements Serializable
{

protected UIList level3 = new UIArrayList();

public UIList getLevel3() {
return this.level3;
}

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "level3")
public static class Level3
implements Serializable
{
@XmlValue
@XmlSchemaType(name = "double")
protected Valuevalue;
@XmlAttribute(name = "level4", required = true)
protected Value level4;

/**
* Obtient la valeur de la propriété value.
*
* @return
* possible object is
* {@link String }
*
*/
public ValuegetValue() {
return value;
}

/**
* Définit la valeur de la propriété value.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(Valuevalue) {
this.value = value;
}

}

}

}
```
I would like to add the annotation @XmlValueExtension to the protected Valuevalue;

I've tried the following :
```

@java.lang.SuppressWarnings("something")

```

But I can only annotate the class, not the value attribute.

Thanks for the help

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.