Class ExpressionTyper
java.lang.Object
org.drools.model.codegen.execmodel.generator.expressiontyper.ExpressionTyper
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExpressionTyper(RuleContext ruleContext) ExpressionTyper(RuleContext ruleContext, Class<?> patternType, String bindingId, boolean isPositional) ExpressionTyper(RuleContext ruleContext, Class<?> patternType, String bindingId, boolean isPositional, ExpressionTyperContext context) -
Method Summary
Modifier and TypeMethodDescriptionstatic com.github.javaparser.ast.expr.ExpressionconvertArithmeticBinaryToMethodCall(com.github.javaparser.ast.expr.BinaryExpr binaryExpr, Optional<Class<?>> originalPatternType, RuleContext ruleContext) static com.github.javaparser.ast.expr.ExpressionfindLeftLeafOfNameExpr(com.github.javaparser.ast.Node expression) static com.github.javaparser.ast.expr.ExpressionfindLeftLeafOfNameExprTraversingParent(com.github.javaparser.ast.Node expression) static TypegetBinaryTypeAfterConversion(Type leftType, Type rightType) static booleanshouldConvertArithmeticBinaryToMethodCall(com.github.javaparser.ast.expr.BinaryExpr.Operator operator, Type leftType, Type rightType) toTypedExpression(com.github.javaparser.ast.expr.Expression drlxExpr) static Optional<TypedExpression>tryParseAsConstantField(TypeResolver typeResolver, com.github.javaparser.ast.expr.Expression scope, String name)
-
Constructor Details
-
ExpressionTyper
public ExpressionTyper(RuleContext ruleContext, Class<?> patternType, String bindingId, boolean isPositional) -
ExpressionTyper
-
ExpressionTyper
public ExpressionTyper(RuleContext ruleContext, Class<?> patternType, String bindingId, boolean isPositional, ExpressionTyperContext context)
-
-
Method Details
-
toTypedExpression
-
tryParseAsConstantField
public static Optional<TypedExpression> tryParseAsConstantField(TypeResolver typeResolver, com.github.javaparser.ast.expr.Expression scope, String name) -
convertArithmeticBinaryToMethodCall
public static com.github.javaparser.ast.expr.Expression convertArithmeticBinaryToMethodCall(com.github.javaparser.ast.expr.BinaryExpr binaryExpr, Optional<Class<?>> originalPatternType, RuleContext ruleContext) -
shouldConvertArithmeticBinaryToMethodCall
-
getBinaryTypeAfterConversion
-
findLeftLeafOfNameExprTraversingParent
public static com.github.javaparser.ast.expr.Expression findLeftLeafOfNameExprTraversingParent(com.github.javaparser.ast.Node expression) -
findLeftLeafOfNameExpr
public static com.github.javaparser.ast.expr.Expression findLeftLeafOfNameExpr(com.github.javaparser.ast.Node expression)
-