-
-
Save dfreudenberger/d9f7e6aa7031aa106a14692223c3d1b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// java | |
void consume(List<SomeClass> values) | |
{ | |
} | |
// kotlin | |
fun consume(values : List<SomeClass>) | |
{ | |
} | |
// reflection stuff | |
var param = class.getMethods()[0].getParameters()[0]; | |
var type = ((ParameterizedType) param.getParameterizedType()).getActualTypeArguments()[0]; | |
java: type.getTypeName() returns "SomeClass" | |
kotlin: type.getTypeName() returns "? extends SomeClass" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment