Good day to all.
Just wondering if using 'extends' can inherit documentation.
Example:
Super Class
Sub Class
Doing this allows the UsefulMethod method to become available to use through the subclass BUT, the instructions are lost. Only way I have managed to do it is to copy the Documentation into the sub class. I guess this is kinda creating a pseudo method?
example
Is this the way to do it or is there a simple way?
Thanks
Just wondering if using 'extends' can inherit documentation.
Example:
Super Class
B4X:
class SuperClass{
/**
*Does something really useful with the passed string of text
*Example:
*wow = UsefulMethod("example text")
*/
public void UsefulMethod(String text){
//Do some cool stuff
}
}
Sub Class
B4X:
class SubClass extends SuperClass{
}
Doing this allows the UsefulMethod method to become available to use through the subclass BUT, the instructions are lost. Only way I have managed to do it is to copy the Documentation into the sub class. I guess this is kinda creating a pseudo method?
example
B4X:
class SubClass extends SuperClass{
/**
*Does something really useful with the passed string of text
*Example:
*wow = UsefulMethod("example text")
*/
public void UsefulMethod(String text){
super.UsefulMethod(text)
}
}
Is this the way to do it or is there a simple way?
Thanks