Class TreeUtilsAfterJava11.JCVariableDeclUtils

java.lang.Object
org.checkerframework.javacutil.TreeUtilsAfterJava11.JCVariableDeclUtils
Enclosing class:
TreeUtilsAfterJava11

@Deprecated(forRemoval=true, since="4.0.0") public static class TreeUtilsAfterJava11.JCVariableDeclUtils extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Utility methods for accessing JCVariableDecl methods.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    declaredUsingVar(com.sun.tools.javac.tree.JCTree.JCVariableDecl variableTree)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use JCTree.JCVariableDecl.declaredUsingVar()

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • declaredUsingVar

      @Deprecated(forRemoval=true, since="4.0.0") @Pure public static boolean declaredUsingVar(com.sun.tools.javac.tree.JCTree.JCVariableDecl variableTree)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use JCTree.JCVariableDecl.declaredUsingVar()
      For Java 17+, returns true if variableTree was declared using var. Otherwise, returns false.

      Use TreeUtils.isVariableTreeDeclaredUsingVar(VariableTree) for a method that works on all versions of java.

      Parameters:
      variableTree - a variable tree
      Returns:
      true if variableTree was declared using var and using Java 17+