Limiting access to generated collections [message #800059] |
Thu, 16 February 2012 16:32 |
Hayden Marchant Messages: 12 Registered: November 2009 |
Junior Member |
|
|
I am using ECORE to generate a model that will be exposed as a Public API to our users.
I would like to make the access to the collections read-only, so that when a client calls parent.getChildren() and gets a List<Child> back, it will NOT be possible to modify that list. In our implementation classes, which API users will not have access to, we WOULD like to have full modify access to these list features. So I'm looking to have option of generating 2 impl methods for accessing list, but exposing only 1 of them in the interface.
How could we accomplish such a design? I've been searching high and low for examples/documentation on this level of generation capabilities with no luck so far.
|
|
|
Powered by
FUDForum. Page generated in 0.01956 seconds