This commit improves CodeWarnings so that it detects if an enclosing class is deprecated. Previously, it would only consider the annotated element itself and the enclosing element is important for a class as it is required to refer to it. Closes gh-33273