ilya.gorbunov
11/18/2015, 3:53 PMdamian
11/18/2015, 3:56 PMdalexander
11/18/2015, 4:20 PMpublic companion object Singleton: SomeInterface by internalInstance {
val internalInstance: SomeInterface = SomeInterfaceImplementor()
}
Is there any way to make delegating to a member variable work? This snippet produces the error Variable 'internalInstance' must be initialized
although it seems like it should be initialized? Is there something that happens before vals are initialized during object creation that would cause issues?jkbbwr
11/18/2015, 4:40 PMjkbbwr
11/18/2015, 4:41 PMMap<String, Any>
become Map<String, ?>
in Javaarthur
11/18/2015, 4:41 PM{function1()} and {function2()}
which would cause function1 and function2 to be calle din parallel. It could then also wait for responses.arthur
11/18/2015, 4:41 PMjkbbwr
11/18/2015, 4:41 PMMap<String, ? extends Object>
mikehearn
11/18/2015, 4:42 PMmikehearn
11/18/2015, 4:43 PMmikehearn
11/18/2015, 4:44 PMmikehearn
11/18/2015, 4:44 PMjkbbwr
11/18/2015, 4:44 PMout
is implicit in Map<String, Any>mikehearn
11/18/2015, 4:45 PMjkbbwr
11/18/2015, 4:45 PMjkbbwr
11/18/2015, 4:47 PMfun register(type: Int, txFactory: (data: Map<String, Any>) -> ITransaction)
is the method signaturejkbbwr
11/18/2015, 4:47 PMyole
11/18/2015, 4:48 PMjkbbwr
11/18/2015, 4:49 PMromster
11/18/2015, 4:50 PMyole
11/18/2015, 4:50 PMyole
11/18/2015, 4:51 PM400.0, 200.0
yole
11/18/2015, 4:51 PMyole
11/18/2015, 4:52 PMromster
11/18/2015, 4:53 PMapatrida
11/18/2015, 5:02 PMgroupId:artifactId:packaging:classifier:version
… given both build systems mention that, and it is common in Ivy as well to use classifiers, then there IS a way to do this that is standard.
>> classifier:The classifier allows to distinguish artifacts that were built from the same POM but differ in their content. It is some optional and arbitrary string that - if present - is appended to the artifact name just after the version number. As a motivation for this element, consider for example a project that offers an artifact targeting JRE 1.5 but at the same time also an artifact that still supports JRE 1.4. The first artifact could be equipped with the classifier jdk15 and the second one with jdk14 such that clients can choose which one to use. Another common use case for classifiers is the need to attach secondary artifacts to the project's main artifact. If you browse the Maven central repository, you will notice that the classifiers sources and javadoc are used to deploy the project source code and API docs along with the packaged class files.
apatrida
11/18/2015, 5:07 PMapatrida
11/18/2015, 5:07 PMapatrida
11/18/2015, 5:09 PMdanko9
11/18/2015, 5:13 PM