@Override public void visitCatch(JCCatch node) { set(node, new Catch() .rawExceptionDeclaration(toTree(node.getParameter(), FlagKey.VARDEF_IS_DEFINITION)) .rawBody(toTree(node.getBlock()))); }
@Override public void visitCatch(JCCatch node) { set(node, new Catch() .rawExceptionDeclaration(toTree(node.getParameter(), FlagKey.VARDEF_IS_DEFINITION)) .rawBody(toTree(node.getBlock()))); }
@Override public void visitCatch(JCCatch node) { set(node, new Catch() .rawExceptionDeclaration(toTree(node.getParameter(), FlagKey.VARDEF_IS_DEFINITION)) .rawBody(toTree(node.getBlock()))); }
@Override public boolean visitCatch(Catch node) { formatter.buildInline(node); formatter.keyword("catch"); formatter.space(); formatter.append("("); visit(node.rawExceptionDeclaration()); formatter.append(")"); formatter.space(); formatter.startSuppressBlock(); visit(node.rawBody()); formatter.endSuppressBlock(); formatter.closeInline(); return true; }
@Override public boolean visitCatch(Catch node) { formatter.buildInline(node); formatter.keyword("catch"); formatter.space(); formatter.append("("); visit(node.rawExceptionDeclaration()); formatter.append(")"); formatter.space(); formatter.startSuppressBlock(); visit(node.rawBody()); formatter.endSuppressBlock(); formatter.closeInline(); return true; }
@Override public boolean visitCatch(Catch node) { formatter.buildInline(node); formatter.keyword("catch"); formatter.space(); formatter.append("("); visit(node.rawExceptionDeclaration()); formatter.append(")"); formatter.space(); formatter.startSuppressBlock(); visit(node.rawBody()); formatter.endSuppressBlock(); formatter.closeInline(); return true; }
public Node createCatch(Node modifiers, Node type, Node varName, Node body) { VariableDefinitionEntry varNameEntry = new VariableDefinitionEntry().astName(createIdentifierIfNeeded(varName, currentPos())); if (varName != null) varNameEntry.setPosition(varName.getPosition()); VariableDefinition decl = new VariableDefinition().rawTypeReference(type).rawVariables().addToEnd( varNameEntry); if (type != null && varName != null) decl.setPosition(new Position(type.getPosition().getStart(), varName.getPosition().getEnd())); if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos())); return posify(new Catch().rawExceptionDeclaration(decl).rawBody(body)); }
public Node createCatch(Node modifiers, Node type, Node varName, Node body) { VariableDefinitionEntry varNameEntry = new VariableDefinitionEntry().astName(createIdentifierIfNeeded(varName, currentPos())); if (varName != null) varNameEntry.setPosition(varName.getPosition()); VariableDefinition decl = new VariableDefinition().rawTypeReference(type).rawVariables().addToEnd( varNameEntry); if (type != null && varName != null) decl.setPosition(new Position(type.getPosition().getStart(), varName.getPosition().getEnd())); if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos())); return posify(new Catch().rawExceptionDeclaration(decl).rawBody(body)); }
public Node createCatch(Node modifiers, Node type, Node varName, Node body) { VariableDefinitionEntry varNameEntry = new VariableDefinitionEntry().astName(createIdentifierIfNeeded(varName, currentPos())); if (varName != null) varNameEntry.setPosition(varName.getPosition()); VariableDefinition decl = new VariableDefinition().rawTypeReference(type).rawVariables().addToEnd( varNameEntry); if (type != null && varName != null) decl.setPosition(new Position(type.getPosition().getStart(), varName.getPosition().getEnd())); if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos())); return posify(new Catch().rawExceptionDeclaration(decl).rawBody(body)); }