public TryStatementTreeImpl newFinallyBlock(InternalSyntaxToken finallyToken, BlockTreeImpl block) { return new TryStatementTreeImpl(finallyToken, block); }
public TryStatementTreeImpl completeStandardTryStatement(InternalSyntaxToken tryToken, BlockTreeImpl block, TryStatementTreeImpl partial) { return partial.completeStandardTry(tryToken, block); }
public TryStatementTreeImpl completeTryWithResources(InternalSyntaxToken tryToken, InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, InternalSyntaxToken closeParenToken, BlockTreeImpl block, List<CatchTreeImpl> catches) { this.tryToken = tryToken; this.openParenToken = openParenToken; this.resources = resources; this.variableTreeResources = filterVariableTreeResources(resources); this.closeParenToken = closeParenToken; this.block = block; this.catches = getCatches(catches); return this; }
public TryStatementTreeImpl newTryWithResourcesStatement( InternalSyntaxToken tryToken, InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, InternalSyntaxToken closeParenToken, BlockTreeImpl block, Optional<List<CatchTreeImpl>> catches, Optional<TryStatementTreeImpl> finallyBlock) { List<CatchTreeImpl> catchTrees = catches.or(ImmutableList.<CatchTreeImpl>of()); if (finallyBlock.isPresent()) { return finallyBlock.get().completeTryWithResources(tryToken, openParenToken, resources, closeParenToken, block, catchTrees); } else { return new TryStatementTreeImpl(tryToken, openParenToken, resources, closeParenToken, block, catchTrees); } }
public TryStatementTreeImpl newTryCatch(Optional<List<CatchTreeImpl>> catches, Optional<TryStatementTreeImpl> finallyBlock) { List<CatchTreeImpl> catchTrees = catches.or(ImmutableList.<CatchTreeImpl>of()); if (finallyBlock.isPresent()) { return finallyBlock.get().completeWithCatches(catchTrees); } else { return new TryStatementTreeImpl(catchTrees, null, null); } }
public TryStatementTreeImpl completeWithCatches(List<CatchTreeImpl> catches) { this.catches = getCatches(catches); return this; }
private static List<CatchTree> getCatches(List<CatchTreeImpl> catches) { return TryStatementTreeImpl.<CatchTree>getList(catches); }
public TryStatementTreeImpl(List<CatchTreeImpl> catches, @Nullable BlockTreeImpl finallyBlock) { super(Kind.TRY_STATEMENT); this.openParenToken = null; this.resources = ImmutableList.of(); this.closeParenToken = null; this.catches = catches; this.finallyBlock = finallyBlock; for (CatchTreeImpl catchTree : catches) { addChild(catchTree); } if (finallyBlock != null) { addChild(finallyBlock); } }
public TryStatementTreeImpl completeStandardTry(InternalSyntaxToken tryToken, BlockTreeImpl block) { this.tryToken = tryToken; this.block = block; prependChildren(tryToken, block); return this; }
public TryStatementTreeImpl newTryWithResourcesStatement( InternalSyntaxToken tryToken, InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, InternalSyntaxToken closeParenToken, BlockTreeImpl block, Optional<List<CatchTreeImpl>> catches, Optional<TryStatementTreeImpl> finallyBlock) { List<CatchTreeImpl> catchTrees = catches.or(ImmutableList.<CatchTreeImpl>of()); if (finallyBlock.isPresent()) { return finallyBlock.get().completeTryWithResources(tryToken, openParenToken, resources, closeParenToken, block, catchTrees); } else { return new TryStatementTreeImpl(tryToken, openParenToken, resources, closeParenToken, block, catchTrees); } }
public TryStatementTreeImpl newTryCatch(Optional<List<CatchTreeImpl>> catches, Optional<TryStatementTreeImpl> finallyBlock) { List<CatchTreeImpl> catchTrees = catches.or(ImmutableList.<CatchTreeImpl>of()); if (finallyBlock.isPresent()) { return finallyBlock.get().completeWithCatches(catchTrees); } else { return new TryStatementTreeImpl(catchTrees, null, null); } }
public TryStatementTreeImpl completeTryWithResources(InternalSyntaxToken tryToken, InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, InternalSyntaxToken closeParenToken, BlockTreeImpl block, List<CatchTreeImpl> catches) { this.tryToken = tryToken; this.openParenToken = openParenToken; this.resources = resources; this.closeParenToken = closeParenToken; this.block = block; this.catches = getCatches(catches); return this; }
private static List<CatchTree> getCatches(List<CatchTreeImpl> catches) { return TryStatementTreeImpl.<CatchTree>getList(catches); }
public TryStatementTreeImpl( InternalSyntaxToken tryToken, InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, InternalSyntaxToken closeParenToken, BlockTreeImpl block, List<CatchTreeImpl> catches, @Nullable BlockTreeImpl finallyBlock) { super(Kind.TRY_STATEMENT); this.tryToken = tryToken; this.openParenToken = openParenToken; this.resources = (List) resources; this.closeParenToken = closeParenToken; this.block = block; this.catches = catches; this.finallyBlock = finallyBlock; addChild(tryToken); addChild(openParenToken); addChild(resources); addChild(closeParenToken); addChild(block); for (CatchTreeImpl catchTree : catches) { addChild(catchTree); } if (finallyBlock != null) { addChild(finallyBlock); } }
public TryStatementTreeImpl newTryWithResourcesStatement( InternalSyntaxToken tryToken, InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, InternalSyntaxToken closeParenToken, BlockTreeImpl block, Optional<List<CatchTreeImpl>> catches, Optional<TryStatementTreeImpl> finallyBlock) { List<CatchTreeImpl> catchTrees = catches.or(ImmutableList.<CatchTreeImpl>of()); if (finallyBlock.isPresent()) { return finallyBlock.get().completeTryWithResources(tryToken, openParenToken, resources, closeParenToken, block, catchTrees); } else { return new TryStatementTreeImpl(tryToken, openParenToken, resources, closeParenToken, block, catchTrees); } }
public TryStatementTreeImpl newTryCatch(Optional<List<CatchTreeImpl>> catches, Optional<TryStatementTreeImpl> finallyBlock) { List<CatchTreeImpl> catchTrees = catches.or(ImmutableList.<CatchTreeImpl>of()); if (finallyBlock.isPresent()) { return finallyBlock.get().completeWithCatches(catchTrees); } else { return new TryStatementTreeImpl(catchTrees, null, null); } }
public TryStatementTreeImpl newFinallyBlock(InternalSyntaxToken finallyToken, BlockTreeImpl block) { return new TryStatementTreeImpl(finallyToken, block); }
public TryStatementTreeImpl completeTryWithResources(InternalSyntaxToken tryToken, InternalSyntaxToken openParenToken, ResourceListTreeImpl resources, InternalSyntaxToken closeParenToken, BlockTreeImpl block, List<CatchTreeImpl> catches) { this.tryToken = tryToken; this.openParenToken = openParenToken; this.resources = resources; this.variableTreeResources = filterVariableTreeResources(resources); this.closeParenToken = closeParenToken; this.block = block; this.catches = getCatches(catches); return this; }
public TryStatementTreeImpl completeStandardTryStatement(InternalSyntaxToken tryToken, BlockTreeImpl block, TryStatementTreeImpl partial) { return partial.completeStandardTry(tryToken, block); }
public TryStatementTreeImpl completeWithCatches(List<CatchTreeImpl> catches) { this.catches = getCatches(catches); return this; }