How to find a class that fulfills one or more attribute.