Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] JFace Generics

> From: Mickael Istria <mistria@xxxxxxxxxx>
> I may have missed something, but wouldn't the following
> implementation be a valid solution?
> public E[] getElements(I inputElement) {
>    return inputElement.toArray(new E[inputElement.size()]);
> }

You can't instantiate arrays of generic type. I think we're digging into too low level detail for this list. I have entered this bug for the particular issue of generic array return types in JFace:


Back to the top