Example: In C-code it is possible to call parts of assembler code, like:
int main()
{
//... stuff
__asm
{
lea ebx, hal
mov ecx, [ebx]hal.same_name ;
mov esi, [ebx].weasel ;
}
// .. further stuff
return 0;
}
Is such a code integration possible for Kotlin code in Java (*.java) files?
(I am not talkin about JNI or C/C++ in Java!) I would like to extend already existing (AndroidStudio-) Java-Source-Code with Kotlin language.
//.. this is *.java file
public class MyAlreadyExistingJavaClass {
private int memberVar;
public MyAlreadyExistingJavaClass()
{
}
// this is Kotlin within *.java file
// extend this Java file with this constuctor in KOTLIN ?
// would make above default constructor unneccessary.
class MyAlreadyExistingJavaClass(number: Int = 0)
{
memberVar = number;
}
}