BUG-5970: do not add value to union hashCode/equals/toString
The value of a union is derived from its members and should not
be part of general Object methods, as the members are already
part of these methods.
Also override definition for getValue() and generate alternate
code to lazily fill _value. The output could use some visual
improvement, but that is something for another day.
It also fixes the copy constructor so it does not clone the
_value field unnecessarily.
Change-Id: Ibbbce99e1e84a0dfa55f70872fedad78e57e8f1e
Signed-off-by: Robert Varga <[email protected]>