private static Symbol.TypeSymbol wrapperClassSymbol(NewClassTree newClassTree) {
   Symbol.TypeSymbol classSymbol = newClassTree.symbolType().symbol();
   if (PRIMITIVE_TYPES_BY_WRAPPER.containsKey(newClassTree.symbolType().fullyQualifiedName())
       && !newClassTree.arguments().isEmpty()) {
     return classSymbol;
   }
   return null;
 }
 private static boolean isOpeningResource(NewClassTree syntaxNode) {
   if (isWithinTryHeader(syntaxNode)) {
     return false;
   }
   return needsClosing(syntaxNode.symbolType());
 }
예제 #3
0
 @Override
 public void visitNewClass(NewClassTree tree) {
   super.visitNewClass(tree);
   checkSymbol(tree.symbolType().symbol());
 }