I am trying to figure out how to set up the method name that JAXB 2.1.12 creates. I have an epic XML schema (which is not in my control) and it contains a group with a select element that contains about 200 other elements. Therefore, when I create JAXB classes, the get () method that is created is pretty useless - it ends with something like "getElement1AndElement2AndElement3 ()".
I would like to rename the get () method to be something better, but I cannot figure out exactly how to do this. I know that the tutorial describes setting class names with an element.
I found a really old article ( http://onjava.com/pub/a/onjava/2003/12/10/jaxb.html?page=2 ) that describes attaching the "name" attribute to an element that seems to be I need to do. Unfortunately, I think the article is for version 1.x of JAXB, and the name attribute is no longer valid in the select item with JAXB 2.0.
Does anyone know how I can customize the method name that is generated? Please let me know if examples or any other information will be useful, or if what I am trying to do is not possible.
Thank!
source
share