New method to get beans by type