Results 1 to 1 of 1
- 02-22-2010, 05:37 AM #1Member
- Join Date
- Feb 2010
- Rep Power
JAXB: Inner classes avoided during class generation?
Working with JAXB 2.0 and I see JAXB occasionally uses inner classes when generating from a schema. It looks like you can customize the generation to avoid inner classes in some scenarios (I believe for class name collisions).....however, I would like to totally avoid inner classes altogether.
#1 My first question is - can it be done and how?
I also am customizing the class generation by specifying a superclass that all classes extend from. It works well during class generation and the code compiles....however, I noticed the inner classes also were extending the superclass. Unfortunately, when I try marshalling to XML I take a JAXBException because of that.
#2 My second question is - is there a way to tell JAXB to exclude inner classes from being extended...or is it possible/feasible to edit the generated code for the inner classes to remove the "extends" clause (and possibly some of the annotations)?
- By pesho318i in forum EclipseReplies: 0Last Post: 12-03-2008, 02:00 AM
- By vitalstrike82 in forum Web FrameworksReplies: 0Last Post: 05-13-2008, 06:16 AM
- By olbion in forum New To JavaReplies: 2Last Post: 05-05-2008, 10:55 AM
- By jazz2k8 in forum New To JavaReplies: 12Last Post: 04-23-2008, 03:40 AM
- By StealthRT in forum New To JavaReplies: 3Last Post: 04-08-2008, 07:12 AM