This seems ok except for the fact that in the generated class the type of 'aBoolean' has changed from being the primitive boolean to the class Boolean. This means that upon creation of an instance of AType, ABoolean has a null value and the method call isABoolean() can return null.
This change from the primitive boolean to the class Boolean fundamentally changes the behaviour of the generated methods.
Is my approach the best way of validating element values that are mapped to a primitive? If so, what should i do about the change of type in the generated classes?