<Can I execute inherited static functions from a B...
# stackoverflow
u
Can I execute inherited static functions from a BaseClass from a ChildClass and get the childs properties? I have a few cases where I want to add static functions or values in a base class so that I can use them in all subclasses that inherits from it. One such case is when i want to create generic tags for each class to use in data mapping as a key, like when i want to find fragments or pass data between activities. For example: open class BaseClass(){ companionObject{ val TAG: String = this.javaClass.simpleName } } class ChildClass: BaseClass() class Main: Activity(){ fun...