public TryStatementTreeImpl newFinallyBlock(InternalSyntaxToken finallyToken, BlockTreeImpl block) { return new TryStatementTreeImpl(finallyToken, block); }
public TryStatementTreeImpl newFinallyBlock(InternalSyntaxToken finallyToken, BlockTreeImpl block) { return new TryStatementTreeImpl(finallyToken, block); }
public TryStatementTreeImpl newFinallyBlock(InternalSyntaxToken finallyToken, BlockTreeImpl block) { return new TryStatementTreeImpl(finallyToken, block); }
public TryStatementTreeImpl newTryFinally(BlockTreeImpl finallyBlock) { return new TryStatementTreeImpl(finallyBlock); }
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 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 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 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<BlockTreeImpl> finallyBlock) { return new TryStatementTreeImpl(catches.isPresent() ? catches.get() : ImmutableList.<CatchTreeImpl>of(), finallyBlock.isPresent() ? finallyBlock.get() : null); }
public TryStatementTreeImpl newTryWithResourcesStatement( AstNode tryTokenAstNode, AstNode openParenTokenAstNode, ResourceListTreeImpl resources, AstNode closeParenTokenAstNode, BlockTreeImpl block, Optional<List<CatchTreeImpl>> catches, Optional<BlockTreeImpl> finallyBlock) { InternalSyntaxToken tryToken = InternalSyntaxToken.create(tryTokenAstNode); InternalSyntaxToken openParenToken = InternalSyntaxToken.create(openParenTokenAstNode); InternalSyntaxToken closeParenToken = InternalSyntaxToken.create(closeParenTokenAstNode); return new TryStatementTreeImpl( tryToken, openParenToken, resources, closeParenToken, block, catches.isPresent() ? catches.get() : ImmutableList.<CatchTreeImpl>of(), finallyBlock.isPresent() ? finallyBlock.get() : null); }