I have a Kotlin class that has a class object, for example.
public class Foo { public class object { public val SomeValue : Int = 0 } }
If I use this class from Java, how do I access SomeValue inside the class object? If it were a Java class with a static property, I would just use Foo.SomeValue - but I can't do it here.
IntellIJ shows that I can access Foo.object.$instance , but $instance does not have getSomeValue or anything like that. If I try to use $ instance.SomeValue anyway when I create an error message, I will say:
SomeValue has private access to Foo.object
I am using Kotlin 0.5.1.
Wilka source share