use of org.codehaus.groovy.ast.ClassHelper.GENERATED_LAMBDA_TYPE in project groovy by apache.
the class StaticTypesLambdaWriter method getOrAddLambdaClass.
private ClassNode getOrAddLambdaClass(final LambdaExpression expression, final int modifiers, final MethodNode abstractMethod) {
return lambdaClassNodes.computeIfAbsent(expression, key -> {
ClassNode lambdaClass = createLambdaClass(expression, modifiers, abstractMethod);
controller.getAcg().addInnerClass(lambdaClass);
lambdaClass.addInterface(GENERATED_LAMBDA_TYPE);
lambdaClass.putNodeMetaData(StaticCompilationMetadataKeys.STATIC_COMPILE_NODE, Boolean.TRUE);
lambdaClass.putNodeMetaData(WriterControllerFactory.class, (WriterControllerFactory) x -> controller);
return lambdaClass;
});
}
Aggregations