mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
In this mode, javac AST and Symbol files are used during Kotlin compilation instead of PSI / binary stuff. Later, they are reused for Java file compilation. javac in this mode is integrated into kotlinc.
22 lines
356 B
Java
Vendored
22 lines
356 B
Java
Vendored
package test;
|
|
|
|
public final class Singleton {
|
|
|
|
private Singleton() {}
|
|
|
|
private static Singleton INSTANCE;
|
|
|
|
public static String getString() {
|
|
return getInstance().toString();
|
|
}
|
|
|
|
public static Singleton getInstance() {
|
|
if (INSTANCE == null) {
|
|
INSTANCE = new Singleton();
|
|
}
|
|
|
|
return INSTANCE;
|
|
}
|
|
|
|
}
|