protected override CodegenExpression ProcessFirstColCodegen( Type evaluationType, CodegenExpression expression, CodegenExpression resultEventType, CodegenExpression eventBeanFactory, CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) { var type = VariantEventTypeUtil.GetField(variantEventType, codegenClassScope); var method = codegenMethodScope.MakeChild(typeof(EventBean), this.GetType(), codegenClassScope) .AddParam(evaluationType, "result") .Block .DeclareVar<EventType>("beanEventType", ExprDotMethod(type, "EventTypeForNativeObject", Ref("result"))) .DeclareVar<EventBean>( "wrappedEvent", ExprDotMethod(eventBeanFactory, "AdapterForTypedObject", Ref("result"), Ref("beanEventType"))) .DeclareVar<EventBean>("variant", ExprDotMethod(type, "GetValueAddEventBean", Ref("wrappedEvent"))) .MethodReturn( ExprDotMethod( eventBeanFactory, "AdapterForTypedWrapper", Ref("variant"), StaticMethod(typeof(Collections), "GetEmptyMap", new[] { typeof(string), typeof(object) }), resultEventType)); return LocalMethodBuild(method).Pass(expression).Call(); }
protected override CodegenExpression ProcessSpecificCodegen( CodegenExpression resultEventType, CodegenExpression eventBeanFactory, CodegenExpression props, CodegenMethod methodNode, SelectExprProcessorCodegenSymbol selectEnv, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { var variantType = VariantEventTypeUtil.GetField(variantEventType, codegenClassScope); var innerType = codegenClassScope.AddDefaultFieldUnshared( true, typeof(EventType), EventTypeUtility.ResolveTypeCodegen(innerEventType, EPStatementInitServicesConstants.REF)); CodegenExpression inner = ExprDotMethod(eventBeanFactory, "AdapterForTypedMap", props, innerType); return ExprDotMethod(variantType, "GetValueAddEventBean", inner); }
public CodegenMethod ProcessCodegen( CodegenExpression resultEventType, CodegenExpression eventBeanFactory, CodegenMethodScope codegenMethodScope, SelectExprProcessorCodegenSymbol selectSymbol, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { var methodNode = codegenMethodScope.MakeChild( typeof(EventBean), this.GetType(), codegenClassScope); var refEPS = exprSymbol.GetAddEPS(methodNode); var type = VariantEventTypeUtil.GetField(variantEventType, codegenClassScope); methodNode.Block.MethodReturn( ExprDotMethod(type, "GetValueAddEventBean", ArrayAtIndex(refEPS, Constant(0)))); return methodNode; }
protected override CodegenExpression ProcessSpecificCodegen( CodegenExpression resultEventType, CodegenExpression eventBeanFactory, CodegenExpression props, CodegenMethod methodNode, SelectExprProcessorCodegenSymbol selectEnv, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { var type = VariantEventTypeUtil.GetField(variantEventType, codegenClassScope); var refEPS = exprSymbol.GetAddEPS(methodNode); return StaticMethod( typeof(SelectEvalInsertWildcardSSWrapperRevision), "SelectExprInsertWildcardSSWrapRevision", refEPS, evaluators == null ? Constant(0) : Constant(evaluators.Length), props, type); }
protected override CodegenExpression ProcessSpecificCodegen( CodegenExpression resultEventType, CodegenExpression eventBeanFactory, CodegenExpression props, CodegenMethod methodNode, SelectExprProcessorCodegenSymbol selectEnv, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { var type = VariantEventTypeUtil.GetField(variantEventType, codegenClassScope); var innerType = codegenClassScope.AddDefaultFieldUnshared( true, typeof(EventType), EventTypeUtility.ResolveTypeCodegen(wrappingEventType, EPStatementInitServicesConstants.REF)); CodegenExpressionRef refEPS = exprSymbol.GetAddEPS(methodNode); CodegenExpression wrapped = ExprDotMethod( eventBeanFactory, "AdapterForTypedWrapper", ArrayAtIndex(refEPS, Constant(0)), Ref("props"), innerType); return ExprDotMethod(type, "GetValueAddEventBean", wrapped); }
public CodegenMethod ProcessCodegen( CodegenExpression resultEventType, CodegenExpression eventBeanFactory, CodegenMethodScope codegenMethodScope, SelectExprProcessorCodegenSymbol selectSymbol, ExprForgeCodegenSymbol exprSymbol, CodegenClassScope codegenClassScope) { var variantType = VariantEventTypeUtil.GetField(variantEventType, codegenClassScope); var methodNode = codegenMethodScope.MakeChild( typeof(EventBean), this.GetType(), codegenClassScope); var jw = joinWildcardProcessorForge.ProcessCodegen( resultEventType, eventBeanFactory, methodNode, selectSymbol, exprSymbol, codegenClassScope); methodNode.Block.MethodReturn(ExprDotMethod(variantType, "GetValueAddEventBean", LocalMethod(jw))); return methodNode; }