Class ExpressionNode
java.lang.Object
io.micronaut.expressions.parser.ast.ExpressionNode
- Direct Known Subclasses:
AbstractMethodCall
,BeanContextAccess
,BinaryOperator
,BoolLiteral
,ComparablesComparisonOperation
,ContextElementAccess
,DoubleLiteral
,EnvironmentAccess
,FloatLiteral
,InstanceofOperator
,IntLiteral
,LongLiteral
,MatchesOperator
,NullLiteral
,NumericComparisonOperation
,OneDimensionalArray
,RelationalOperator
,StringLiteral
,SubscriptOperator
,TernaryExpression
,ThisAccess
,TypeIdentifier
,UnaryOperator
Abstract evaluated expression AST node.
- Since:
- 4.0.0
- Author:
- Sergey Gavrilov
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Compiles this expression AST node against passes compilation context.protected ClassElement
Resolves the class element for this node.protected ClassElement
Resolves the class element for this node.protected abstract @NonNull org.objectweb.asm.Type
Resolves expression AST node type.protected abstract void
Generates bytecode for this AST node.final @NonNull ClassElement
On resolution stage type information is collected and node validity is checked.final @NonNull ClassElement
On resolution stage type information is collected and node validity is checked.final @NonNull org.objectweb.asm.Type
On resolution stage type information is collected and node validity is checked.final @NonNull org.objectweb.asm.Type
On resolution stage type information is collected and node validity is checked.
-
Field Details
-
nodeType
protected org.objectweb.asm.Type nodeType -
classElement
-
-
Constructor Details
-
ExpressionNode
public ExpressionNode()
-
-
Method Details
-
compile
Compiles this expression AST node against passes compilation context. Node compilation includes type resolution and bytecode generation.- Parameters:
ctx
- expression compilation context
-
generateBytecode
Generates bytecode for this AST node.- Parameters:
ctx
- expression compilation context
-
resolveType
@NonNull public final @NonNull org.objectweb.asm.Type resolveType(@NonNull @NonNull ExpressionVisitorContext ctx) On resolution stage type information is collected and node validity is checked. Once type is resolved, type resolution result is cached.- Parameters:
ctx
- expression compilation context- Returns:
- resolved type
-
resolveType
@NonNull public final @NonNull org.objectweb.asm.Type resolveType(@NonNull @NonNull ExpressionCompilationContext ctx) On resolution stage type information is collected and node validity is checked. Once type is resolved, type resolution result is cached.- Parameters:
ctx
- expression compilation context- Returns:
- resolved type
-
resolveClassElement
@NonNull public final @NonNull ClassElement resolveClassElement(@NonNull @NonNull ExpressionVisitorContext ctx) On resolution stage type information is collected and node validity is checked. Once type is resolved, type resolution result is cached.- Parameters:
ctx
- expression compilation context- Returns:
- resolved type
-
resolveClassElement
@NonNull public final @NonNull ClassElement resolveClassElement(@NonNull @NonNull ExpressionCompilationContext ctx) On resolution stage type information is collected and node validity is checked. Once type is resolved, type resolution result is cached.- Parameters:
ctx
- expression compilation context- Returns:
- resolved type
-
doResolveClassElement
Resolves the class element for this node.- Parameters:
ctx
- The expression compilation context- Returns:
- The resolved type
-
doResolveClassElement
Resolves the class element for this node.- Parameters:
ctx
- The expression compilation context- Returns:
- The resolved type
-
doResolveType
@NonNull protected abstract @NonNull org.objectweb.asm.Type doResolveType(@NonNull @NonNull ExpressionVisitorContext ctx) Resolves expression AST node type.- Parameters:
ctx
- expression compilation context- Returns:
- resolved type
-