implementation of class and attributeToInject