-
Epic
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
Evolve bits mapping
We map a "bits" type to a dedicated TypeObject. We already have a ScalarTypeObject specialization which has getValue() method.
Examining the generated code for a , it creates this atrocity:
public static MyBits getDefaultInstance(final String defaultValue) { List<String> properties = Lists.newArrayList("bitOne", "bitTwo", "bitZero" ); if (!properties.contains(defaultValue)) { throw new IllegalArgumentException("invalid default parameter"); } int i = 0; return new MyBits( properties.get(i++).equals(defaultValue) ? Boolean.TRUE : null, properties.get(i++).equals(defaultValue) ? Boolean.TRUE : null, properties.get(i++).equals(defaultValue) ? Boolean.TRUE : null ); }
There are so many things wrong in this mapping it's not even funny. Let's evolve this thing into something sane in terms of interface modeling, implementation design as well as interactions with runtime.