Package org.apache.calcite.linq4j.tree
Class Blocks
- java.lang.Object
-
- org.apache.calcite.linq4j.tree.Blocks
-
public final class Blocks extends java.lang.Object
Helper methods concerning
BlockStatement
s.- See Also:
BlockBuilder
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Blocks()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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)
private static BlockStatement
toFunctionBlock(Node body, boolean function)
-
-
-
Method Detail
-
toFunctionBlock
private static BlockStatement toFunctionBlock(Node body, boolean function)
-
toFunctionBlock
public static BlockStatement toFunctionBlock(Node body)
-
toBlock
public static BlockStatement toBlock(Node body)
-
create
public static BlockStatement create(Statement statement, BlockStatement block)
Prepends a statement to a block.
-
simple
public static Expression simple(BlockStatement block)
Converts a simple "{ return expr; }" block into "expr"; otherwise throws.
-
-