Package | Description |
---|---|
net.hydromatic.linq4j.expressions |
Object model for Java expressions.
|
Modifier and Type | Field and Description |
---|---|
BlockStatement |
ConstructorDeclaration.body |
BlockStatement |
FunctionExpression.body |
BlockStatement |
MethodDeclaration.body |
Modifier and Type | Method and Description |
---|---|
BlockStatement |
BlockStatement.accept(Visitor visitor) |
static BlockStatement |
Expressions.block(Iterable<? extends Statement> statements)
Creates a BlockExpression that contains the given statements.
|
static BlockStatement |
Expressions.block(Statement... statements)
Creates a BlockExpression that contains the given statements,
using varargs.
|
static BlockStatement |
Expressions.block(Type type,
Iterable<? extends Statement> expressions)
Creates a BlockExpression that contains the given expressions,
has no variables and has specific result type.
|
static BlockStatement |
Expressions.block(Type type,
Statement... statements)
Creates a BlockExpression that contains the given statements
and has a specific result type, using varargs.
|
static BlockStatement |
Blocks.create(Statement statement,
BlockStatement block)
Prepends a statement to a block.
|
BlockStatement |
BlockBuilder.toBlock()
Returns a block consisting of the current list of statements.
|
static BlockStatement |
Blocks.toBlock(Node body) |
static BlockStatement |
Blocks.toFunctionBlock(Node body) |
BlockStatement |
Visitor.visit(BlockStatement blockStatement,
List<Statement> statements) |
Modifier and Type | Method and Description |
---|---|
Expression |
BlockBuilder.append(String name,
BlockStatement block)
Appends a block to a list of statements and returns an expression
(possibly a variable) that represents the result of the newly added
block.
|
Expression |
BlockBuilder.append(String name,
BlockStatement block,
boolean optimize)
Appends an expression to a list of statements, optionally optimizing it
to a variable if it is used more than once.
|
static ConstructorDeclaration |
Expressions.constructorDecl(int modifier,
Type declaredAgainst,
Iterable<? extends ParameterExpression> parameters,
BlockStatement body)
Declares a constructor.
|
static BlockStatement |
Blocks.create(Statement statement,
BlockStatement block)
Prepends a statement to a block.
|
static <F extends Function<?>> |
Expressions.lambda(BlockStatement body,
Iterable<? extends ParameterExpression> parameters)
Creates a LambdaExpression by first constructing a delegate
type.
|
static <F extends Function<?>> |
Expressions.lambda(BlockStatement body,
ParameterExpression... parameters)
Creates a LambdaExpression by first constructing a delegate
type, using varargs.
|
static <T,F extends Function<? extends T>> |
Expressions.lambda(Class<F> type,
BlockStatement body,
Iterable<? extends ParameterExpression> parameters)
Creates a LambdaExpression by first constructing a delegate
type.
|
static <T,F extends Function<? extends T>> |
Expressions.lambda(Class<F> type,
BlockStatement body,
ParameterExpression... parameters)
Creates a LambdaExpression by first constructing a delegate
type, using varargs.
|
static MethodDeclaration |
Expressions.methodDecl(int modifier,
Type resultType,
String name,
Iterable<? extends ParameterExpression> parameters,
BlockStatement body)
Declares a method.
|
Visitor |
Visitor.preVisit(BlockStatement blockStatement) |
static Expression |
Blocks.simple(BlockStatement block)
Converts a simple "{ return expr; }" block into "expr"; otherwise
throws.
|
BlockStatement |
Visitor.visit(BlockStatement blockStatement,
List<Statement> statements) |
MemberDeclaration |
Visitor.visit(ConstructorDeclaration constructorDeclaration,
BlockStatement body) |
Expression |
Visitor.visit(FunctionExpression functionExpression,
BlockStatement body) |
MemberDeclaration |
Visitor.visit(MethodDeclaration methodDeclaration,
BlockStatement body) |
Constructor and Description |
---|
ConstructorDeclaration(int modifier,
Type declaredAgainst,
List<ParameterExpression> parameters,
BlockStatement body) |
FunctionExpression(Class<F> type,
BlockStatement body,
List<ParameterExpression> parameters) |
MethodDeclaration(int modifier,
String name,
Type resultType,
List<ParameterExpression> parameters,
BlockStatement body) |
Copyright © 2012-2014 Julian Hyde. All Rights Reserved.