public final class Blocks extends Object
Helper methods concerning BlockStatement
s.
BlockBuilder
Modifier and Type | Method and Description |
---|---|
static BlockStatement |
create(Statement statement,
BlockStatement block)
Prepends a statement to a block.
|
static Expression |
simple(BlockStatement block)
Converts a simple "{ return expr; }" block into "expr"; otherwise
throws.
|
static BlockStatement |
toBlock(Node body) |
static BlockStatement |
toFunctionBlock(Node body) |
public static BlockStatement toFunctionBlock(Node body)
public static BlockStatement toBlock(Node body)
public static BlockStatement create(Statement statement, BlockStatement block)
public static Expression simple(BlockStatement block)
Copyright © 2012-2014 Julian Hyde. All Rights Reserved.