Hi,

I think the idea to add the possibility to specify interfaces would be a nice 
enhancement, since there are some places in our case where this would have made 
life easier, especially if specifying multiple interfaces are allowed. I don’t 
think interfaces will necessarily address all issues that motivates the use of 
wrapper classes, e.g. caching of derived values in private instance variables, 
since Java interfaces can’t have instance variables, but it would definitely be 
a welcomed feature. You have my vote :-)

Cheers,
Mario












> On 15 Nov 2019, at 17:59 , Marshall Schor <m...@schor.com> wrote:
> 
> Interesting...
> 
> I'm wondering how to arrange things so that for JCas class "x.y.z.Foo",
> 
> you could have an associated class or interface that could make use of the
> 
> getters and setters for the features in the Foo type.
> 
> -Marshall
> 
> On 11/15/2019 11:34 AM, Richard Eckart de Castilho wrote:
>> On 15. Nov 2019, at 17:26, Marshall Schor <m...@schor.com> wrote:
>>> Also, you might not run the JCasGen code very often, because it only would 
>>> need
>>> to be run if the type system changed.
>> I think with Java supporting default methods in interfaces these days, it 
>> would be great
>> if there was a way to have an annotation type implement additional 
>> interfaces. That could
>> allow for a nice decoupling of generated code and extra functionality if the 
>> interfaces
>> e.g. inherit from the FeatureStructure interface and thereby would have 
>> access to the 
>> methods to get/set features.
>> 
>> -- Richard

Reply via email to