#java inheritance alternatives