Adding code to support injecting classes using attributes