Source:
public void generateMethods(ClassDefinition classDefinition, CallSiteBinder callSiteBinder, RowExpression filter, List<RowExpression> projections) { CachedInstanceBinder cachedInstanceBinder = new CachedInstanceBinder(classDefinition, callSiteBinder); List<PreGeneratedExpressions> allPreGeneratedExpressions = new ArrayList<>(projections.size() + 1); generateProcessMethod(classDefinition, projections.size()); PreGeneratedExpressions filterPreGeneratedExpressions = generateMethodsForLambdaAndTry(classDefinition, callSiteBinder, cachedInstanceBinder, filter, "filter"); allPreGeneratedExpressions.add(filterPreGeneratedExpressions); generateFilterMethod(classDefinition, callSiteBinder, cachedInstanceBinder, filterPreGeneratedExpressions, filter); for (int i = 0; i < projections.size(); i++) { String methodName = "project_" + i; PreGeneratedExpressions projectPreGeneratedExpressions = generateMethodsForLambdaAndTry(classDefinition, callSiteBinder, cachedInstanceBinder, projections.get(i), methodName); allPreGeneratedExpressions.add(projectPreGeneratedExpressions); generateProjectMethod(classDefinition, callSiteBinder, cachedInstanceBinder, projectPreGeneratedExpressions, methodName, projections.get(i)); } MethodDefinition constructorDefinition = classDefinition.declareConstructor(a(PUBLIC)); BytecodeBlock constructorBody = constructorDefinition.getBody(); Variable thisVariable = constructorDefinition.getThis(); constructorBody.comment("super();") .append(thisVariable) .invokeConstructor(Object.class); cachedInstanceBinder.generateInitializations(thisVariable, constructorBody); for (PreGeneratedExpressions preGeneratedExpressions : allPreGeneratedExpressions) { preGeneratedExpressions.getLambdaFieldMap().values().forEach( lambdaExpressionField -> lambdaExpressionField.generateInitialization(thisVariable, constructorBody) ); } constructorBody.ret(); }

Target:
public void generateMethods(ClassDefinition classDefinition, CallSiteBinder callSiteBinder, RowExpression filter, List<RowExpression> projections) { CachedInstanceBinder cachedInstanceBinder = new CachedInstanceBinder(classDefinition, callSiteBinder); List<PreGeneratedExpressions> allPreGeneratedExpressions = new ArrayList<>(projections.size() + 1); generateProcessMethod(classDefinition, projections.size()); PreGeneratedExpressions filterPreGeneratedExpressions = generateMethodsForLambdaAndTry(classDefinition, callSiteBinder, cachedInstanceBinder, filter, "filter"); allPreGeneratedExpressions.add(filterPreGeneratedExpressions); generateFilterMethod(classDefinition, callSiteBinder, cachedInstanceBinder, filterPreGeneratedExpressions, filter); for (int i = 0; i < projections.size(); i++) { String methodName = "project_" + i; PreGeneratedExpressions projectPreGeneratedExpressions = generateMethodsForLambdaAndTry(classDefinition, callSiteBinder, cachedInstanceBinder, projections.get(i), methodName); allPreGeneratedExpressions.add(projectPreGeneratedExpressions); generateProjectMethod(classDefinition, callSiteBinder, cachedInstanceBinder, projectPreGeneratedExpressions, methodName, projections.get(i)); } MethodDefinition constructorDefinition = classDefinition.declareConstructor(a(PUBLIC)); BytecodeBlock constructorBody = constructorDefinition.getBody(); Variable thisVariable = constructorDefinition.getThis(); constructorBody.comment("super();") .append(thisVariable) .invokeConstructor(Object.class); cachedInstanceBinder.generateInitializations(thisVariable, constructorBody); for (PreGeneratedExpressions preGeneratedExpressions : allPreGeneratedExpressions) { for (LambdaExpressionField field : preGeneratedExpressions.getLambdaFieldMap().values()) { field.generateInitialization(thisVariable, constructorBody); } } constructorBody.ret(); }