I have the following interface (SAM):
fun interface WebResponseHandler
{
fun onWebResponseFinished(jsonString:String?)
}
and Inside a class, (lets call the class ClassA) i wrote the following code:
private val onInitWebResponseHandler: VolleyHandler.WebResponseHandler = VolleyHandler.WebResponseHandler()
{
Thread(ParseJsonStringOnInit(WeakReference(this),
weakRefIOnAllScoresDataFirstFetched, it)).start()
}
i can't understand why in the first argument of ParseJsonStringOnInit, this is considered as ClassA and not as VolleyHandler.WebResponseHandler? Is this a convention when using SAM?