Details
-
Improvement
-
Status: In Review
-
Low
-
Resolution: Unresolved
-
None
-
Operating System: All
Platform: All
Description
In situations where we have a containing element which has as its child a single container, we should make it easy to autobox it.
Example:
choice ch {
case foo-case {
container foo {
...
}
}
}
foo-case contains a single container, foo. We should add an interface to Foo AutoBoxAble<FooCase>, and provide it a method
class Foo { ... public FooCase autoBox() { // wraps Foo in FooCase and returns it } }
The same can also be done for containers:
container bar-container {
container bar {
...
}
}
public class Bar {
public BarContainer autoBox();
}
and lists
list baz-entry { container baz { ... } }
public class Baz { public BazEntry autoBox(); }
Note, this would be done only in the case where there was only where there is a single container child.
Attachments
Issue Links
- is blocked by
-
MDSAL-237 Milestone: Implement Binding Specification - Java v2
- Resolved
Gerrit Reviews
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 93856,21 | Autoboxing support | master | mdsal | Status: NEW | +1 | +1 |