apatrida
10/06/2015, 10:26 PMapatrida
10/06/2015, 10:26 PMapatrida
10/06/2015, 10:26 PMapatrida
10/06/2015, 10:27 PMapatrida
10/06/2015, 10:27 PMapatrida
10/06/2015, 10:29 PMapatrida
10/06/2015, 10:29 PMapatrida
10/06/2015, 10:29 PMapatrida
10/06/2015, 10:30 PMapatrida
10/06/2015, 10:30 PMapatrida
10/06/2015, 10:31 PMapatrida
10/06/2015, 10:31 PMdesseim
10/06/2015, 10:38 PMapatrida
10/06/2015, 10:53 PMapatrida
10/06/2015, 10:53 PMapatrida
10/06/2015, 10:54 PMapatrida
10/06/2015, 10:55 PMapatrida
10/06/2015, 10:59 PMdesseim
10/06/2015, 11:02 PMapatrida
10/06/2015, 11:03 PMapatrida
10/06/2015, 11:03 PMLogger LOG = LoggerFactory.getLogger(this.getClass());
// or
Logger LOG = LoggerFactory.getLogger(MyClassWithGenerics.class);
apatrida
10/06/2015, 11:04 PMapatrida
10/06/2015, 11:04 PMLogger LOG = LoggerFactory.getLogger(MyClass<String>);
udalov
List<String>.class
in Javaudalov
List.class
means the class of raw List, whereas in Kotlin List::class
is the class of List of something (List<*>
)udalov
udalov
List<String> l = List.class.newInstance()
would compile in Javaudalov
val l: List<String> = List::class.newInstance()
won't in Kotlin, because List::class
is List<*>
and it can only give back Any
apatrida
10/06/2015, 11:09 PMapatrida
10/06/2015, 11:10 PM