Archived

This forum has been archived. Please start a new discussion on GitHub.

Metadata directives

I like the ability to use metadata directives to refine the code generation. However, for code like this (taken from the FAQ question about using Java's generic types):
// Slice
["java:type:java.util.LinkedList<Integer>"] sequence<int> IntList;
interface I
{
    IntList getList();
};

It forces the getList() method in the servant to return a LinkedList when it would really be nicer if it just returned a java.util.List. That is, I'd rather it return an interface.

Is there a way to use metadata to tell the code generator which concrete class to use but also which type to return? If not, please consider this a feature request. :)

Thanks!

Comments

  • mes
    mes California
    Hi Chris,

    It's not currently possible to specify an abstract type. We're aware of this limitation and might do something about it in a future release, but I can't make any promises. Now, if you were a commercial customer... ;)

    Take care,
    - Mark