Class DeprecatedCheckerHelper

java.lang.Object
org.sonar.java.checks.helpers.DeprecatedCheckerHelper

public class DeprecatedCheckerHelper extends Object
  • Method Details

    • hasJavadocDeprecatedTag

      public static boolean hasJavadocDeprecatedTag(Tree tree)
    • deprecatedAnnotation

      @CheckForNull public static AnnotationTree deprecatedAnnotation(Tree tree)
    • reportTreeForDeprecatedTree

      public static Tree reportTreeForDeprecatedTree(Tree tree)
    • getAnnotationAttributeValue

      public static <T> Optional<T> getAnnotationAttributeValue(AnnotationTree annotationTree, String attributeName, Class<T> valueType)
      Parameters:
      annotationTree - The annotation tree to check
      attributeName - The attribute name of the attribute to get the value for
      Returns:
      an Optional containing the value of the attribute if found, otherwise an empty Optional