soabase / soabase-halva

Idiomatic Scala ... in Java
https://github.com/soabase/soabase-halva/blob/master/README.md
Apache License 2.0
81 stars 5 forks source link

Support type aliases of concrete types, constructor overrides, co-variant returns #23

Closed Alex-At-Home closed 8 years ago

Alex-At-Home commented 8 years ago

Currently can only type alias interfaces

eg Common concrete cases include String, LinkedList, fj.data.List

Randgalt commented 8 years ago

String is final. There's no way to alias it that I can think of :(

Alex-At-Home commented 8 years ago

er yes, actually Int/Double/etc are the more common uses in scala (eg Double -> Weight), of course they have the same final issue though a more tractable interface you could simply re-implement. Anyway the main cases were the various collections implementations, String was just a throw-out-there thought

Randgalt commented 8 years ago

I should probably override the parent constructors.

Randgalt commented 8 years ago

Also, per #24 - when wrapping methods that return the parent type, wrap in the aliased type.