Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] XmlDiscriminatorValue and Regex

Hi Matt,

The @XmlClassExtractor extension would work better for your use case.  It gives you the chance to run some custom logic to determine the subclass.


-Blaise


On 2012-10-08, at 12:25 AM, Matt Bertolini <viper2843@xxxxxxxxx> wrote:

Is it possible to use a regular _expression_ inside the @XmlDiscriminatorValue attribute? For example:

@XmlDiscriminatorValue("^[a-z]*/[a-z]*\+xml$")

This would be a great help to me as I potentially have multiple values that would map over to the same Java class. If this is not possible, is this something that might be considered if I submitted it as a feature request?

Thanks,
Matt Bertolini
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top