private static List<? extends TypeMirror> computeParenthesis( Set<ElementKind> types, CompilationInfo info, TreePath parent, Tree error, int offset) { ParenthesizedTree pt = (ParenthesizedTree) parent.getLeaf(); if (pt.getExpression() != error) { return null; } TreePath parentParent = parent.getParentPath(); List<? extends TypeMirror> upperTypes = resolveType(types, info, parentParent, pt, offset, null, null); if (upperTypes == null) { return null; } return upperTypes; }
@Override public Tree visitParenthesized(ParenthesizedTree node, Void v) { return node.getExpression().accept(this, null); }
@Override public @Nullable FlowCondition visitParenthesized(ParenthesizedTree node, Void p) { // Reduce parens. return visit(node.getExpression(), p); }