langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java
changeset 28142 32a6b1af81b1
parent 27224 228abfa87080
child 29051 7244db2ab176
equal deleted inserted replaced
28141:a9bd48f9cf07 28142:32a6b1af81b1
   309             case ERRONEOUS:
   309             case ERRONEOUS:
   310                 return true;
   310                 return true;
   311             default:
   311             default:
   312                 return false;
   312                 return false;
   313         }
   313         }
       
   314     }
       
   315 
       
   316     /** Return true if the tree corresponds to a statement */
       
   317     public static boolean isStatement(JCTree tree) {
       
   318         return (tree instanceof JCStatement) &&
       
   319                 !tree.hasTag(CLASSDEF) &&
       
   320                 !tree.hasTag(Tag.BLOCK) &&
       
   321                 !tree.hasTag(METHODDEF);
   314     }
   322     }
   315 
   323 
   316     /**
   324     /**
   317      * Return true if the AST corresponds to a static select of the kind A.B
   325      * Return true if the AST corresponds to a static select of the kind A.B
   318      */
   326      */