Moshe Einhorn wrote:
> I've started making a patch for this issue, and I have a few remarks:
Cool! Keep us posted.
> 1. Kohsuke - is there a way to pass AnnotationReader to the SchemaGen,
> like to the JAXBContext?
Good point. I have to come up with a way to do it. In the meantime, the
workaround is to use JAXBContext.generateSchema().
> 2. The solution is not that simple since not only I have to had
> @XmlTransient when I have @NotInNetwork
> I also have to remove all the other annotations such as @xmlElement
> @XmlElementWrapper etc.
>
> The annotations are there in the first place since other Serializarions
> configuration might want to Serialize this property.
Yes, but I'm not too sure why it's hard. I'm looking forward to seeing
your code.
> 3. I couldn't find a way to create XmlTransient as a Annotation.
Two approaches. One is to implement this interface by yourself, like this:
public class XmlTransientImpl implements XmlTransient {
public Class<XmlTransient> annotationType() {
return XmlTransient.class;
}
}
The other is to use java.lang.reflect.Proxy.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com