Class LambdaRewriter
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.opgraph.op4rewriters.LambdaRewriter
-
- All Implemented Interfaces:
Op04Rewriter
,ExpressionRewriter
public class LambdaRewriter extends java.lang.Object implements Op04Rewriter, ExpressionRewriter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
LambdaRewriter.CannotDelambaException
static class
LambdaRewriter.LambdaInternalRewriter
-
Field Summary
Fields Modifier and Type Field Description private Method
method
private java.util.LinkedList<Expression>
processingStack
private DCCommonState
state
private ClassFile
thisClassFile
private JavaTypeInstance
typeInstance
-
Constructor Summary
Constructors Constructor Description LambdaRewriter(DCCommonState state, Method method)
-
Method Summary
-
-
-
Field Detail
-
state
private final DCCommonState state
-
thisClassFile
private final ClassFile thisClassFile
-
typeInstance
private final JavaTypeInstance typeInstance
-
method
private final Method method
-
processingStack
private final java.util.LinkedList<Expression> processingStack
-
-
Constructor Detail
-
LambdaRewriter
public LambdaRewriter(DCCommonState state, Method method)
-
-
Method Detail
-
rewrite
public void rewrite(Op04StructuredStatement root)
- Specified by:
rewrite
in interfaceOp04Rewriter
-
handleStatement
public void handleStatement(StatementContainer statementContainer)
- Specified by:
handleStatement
in interfaceExpressionRewriter
-
rewriteExpression
public Expression rewriteExpression(Expression expression, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
rewriteExpression
in interfaceExpressionRewriter
-
rewriteExpression
public ConditionalExpression rewriteExpression(ConditionalExpression expression, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
rewriteExpression
in interfaceExpressionRewriter
-
rewriteExpression
public LValue rewriteExpression(LValue lValue, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
rewriteExpression
in interfaceExpressionRewriter
-
rewriteExpression
public StackSSALabel rewriteExpression(StackSSALabel lValue, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
- Specified by:
rewriteExpression
in interfaceExpressionRewriter
-
rewriteDynamicExpression
private Expression rewriteDynamicExpression(DynamicInvokation dynamicExpression)
-
couldBeAmbiguous
private void couldBeAmbiguous(Expression fn, Expression arg, LambdaExpression res)
-
getExplicitLambdaTypes
private java.util.List<JavaTypeInstance> getExplicitLambdaTypes(JavaTypeInstance functionArgType)
-
getLambdaVariable
private static Expression getLambdaVariable(Expression e)
-
rewriteDynamicExpression
private Expression rewriteDynamicExpression(DynamicInvokation dynamicExpression, StaticFunctionInvokation functionInvokation, java.util.List<Expression> curriedArgs)
-
isNewArrayLambda
private static boolean isNewArrayLambda(Expression e, java.util.List<Expression> curriedArgs, java.util.List<LValue> anonymousLambdaArgs)
-
-