private static ExprNodeUtilMethodDesc GetValidateMethodDescriptor( Type methodTarget, string methodName, IList<ExprNode> parameters, ExprValidationContext validationContext) { ExprNodeUtilResolveExceptionHandler exceptionHandler = new ProxyExprNodeUtilResolveExceptionHandler( e => new ExprValidationException("Failed to resolve method '" + methodName + "': " + e.Message, e)); var wildcardType = validationContext.StreamTypeService.EventTypes.Length != 1 ? null : validationContext.StreamTypeService.EventTypes[0]; return ExprNodeUtilityResolve.ResolveMethodAllowWildcardAndStream( methodTarget.FullName, methodTarget, methodName, parameters, wildcardType != null, wildcardType, exceptionHandler, methodName, validationContext.StatementRawInfo, validationContext.StatementCompileTimeService); }
public ContextControllerHashedGetterSingleRowForge( Pair<Type, ImportSingleRowDesc> func, IList<ExprNode> parameters, int granularity, EventType eventType, StatementRawInfo statementRawInfo, StatementCompileTimeServices services) { ExprNodeUtilMethodDesc staticMethodDesc = ExprNodeUtilityResolve.ResolveMethodAllowWildcardAndStream( func.First.Name, null, func.Second.MethodName, parameters, true, eventType, new ExprNodeUtilResolveExceptionHandlerDefault(func.Second.MethodName, true), func.Second.MethodName, statementRawInfo, services); this.granularity = granularity; this.nodes = staticMethodDesc.ChildForges; this.reflectionMethod = staticMethodDesc.ReflectionMethod; this.statementName = statementRawInfo.StatementName; }
public override IList<StmtClassForgeableFactory> Validate( StreamTypeService typeService, StatementBaseInfo @base, StatementCompileTimeServices services) { // validate and visit var validationContext = new ExprValidationContextBuilder(typeService, @base.StatementRawInfo, services) .WithAllowBindingConsumption(true) .Build(); var visitor = new ExprNodeIdentifierAndStreamRefVisitor(true); var validatedInputParameters = new List<ExprNode>(); foreach (var exprNode in methodStreamSpec.Expressions) { var validated = ExprNodeUtilityValidate.GetValidatedSubtree( ExprNodeOrigin.METHODINVJOIN, exprNode, validationContext); validatedInputParameters.Add(validated); validated.Accept(visitor); } // determine required streams foreach (ExprNodePropOrStreamDesc @ref in visitor.Refs) { SubordinateStreams.Add(@ref.StreamNum); } // class-based evaluation MethodInfo targetMethod = null; if (metadata.MethodProviderClass != null) { // resolve actual method to use ExprNodeUtilResolveExceptionHandler handler = new ProxyExprNodeUtilResolveExceptionHandler { ProcHandle = e => { if (methodStreamSpec.Expressions.Count == 0) { return new ExprValidationException( "Method footprint does not match the number or type of expression parameters, expecting no parameters in method: " + e.Message); } var resultTypes = ExprNodeUtilityQuery.GetExprResultTypes(validatedInputParameters); return new ExprValidationException( "Method footprint does not match the number or type of expression parameters, expecting a method where parameters are typed '" + TypeHelper.GetParameterAsString(resultTypes) + "': " + e.Message); } }; var desc = ExprNodeUtilityResolve.ResolveMethodAllowWildcardAndStream( metadata.MethodProviderClass.FullName, metadata.IsStaticMethod ? null : metadata.MethodProviderClass, methodStreamSpec.MethodName, validatedInputParameters, false, null, handler, methodStreamSpec.MethodName, @base.StatementRawInfo, services); InputParamEvaluators = desc.ChildForges; targetMethod = desc.ReflectionMethod; } else { // script-based evaluation InputParamEvaluators = ExprNodeUtilityQuery.GetForges(ExprNodeUtilityQuery.ToArray(validatedInputParameters)); } // plan multikey MultiKeyPlan multiKeyPlan = MultiKeyPlanner.PlanMultiKey(InputParamEvaluators, false, @base.StatementRawInfo, services.SerdeResolver); MultiKeyClassRef = multiKeyPlan.ClassRef; Pair<MethodTargetStrategyForge, MethodConversionStrategyForge> strategies = PollExecStrategyPlanner.Plan(metadata, targetMethod, EventType); target = strategies.First; conversion = strategies.Second; return multiKeyPlan.MultiKeyForgeables; }
public override ExprNode Validate(ExprValidationContext validationContext) { ExprNodeUtilityValidate.Validate(ExprNodeOrigin.PLUGINSINGLEROWPARAM, ChainSpec, validationContext); // get first chain item IList<ExprChainedSpec> chainList = new List<ExprChainedSpec>(ChainSpec); var firstItem = chainList.DeleteAt(0); // Get the types of the parameters for the first invocation var allowWildcard = validationContext.StreamTypeService.EventTypes.Length == 1; EventType streamZeroType = null; if (validationContext.StreamTypeService.EventTypes.Length > 0) { streamZeroType = validationContext.StreamTypeService.EventTypes[0]; } var staticMethodDesc = ExprNodeUtilityResolve.ResolveMethodAllowWildcardAndStream( clazz.FullName, null, firstItem.Name, firstItem.Parameters, allowWildcard, streamZeroType, new ExprNodeUtilResolveExceptionHandlerDefault(firstItem.Name, true), FunctionName, validationContext.StatementRawInfo, validationContext.StatementCompileTimeService); var allowValueCache = true; bool isReturnsConstantResult; switch (config.ValueCache) { case ConfigurationCompilerPlugInSingleRowFunction.ValueCacheEnum.DISABLED: isReturnsConstantResult = false; allowValueCache = false; break; case ConfigurationCompilerPlugInSingleRowFunction.ValueCacheEnum.CONFIGURED: { var isUDFCache = validationContext.StatementCompileTimeService.Configuration.Compiler.Expression .IsUdfCache; isReturnsConstantResult = isUDFCache && staticMethodDesc.IsAllConstants && chainList.IsEmpty(); allowValueCache = isUDFCache; break; } case ConfigurationCompilerPlugInSingleRowFunction.ValueCacheEnum.ENABLED: isReturnsConstantResult = staticMethodDesc.IsAllConstants && chainList.IsEmpty(); break; default: throw new IllegalStateException("Invalid value cache code " + config.ValueCache); } // this may return a pair of null if there is no lambda or the result cannot be wrapped for lambda-function use ExprDotStaticMethodWrap optionalLambdaWrap = ExprDotStaticMethodWrapFactory.Make( staticMethodDesc.ReflectionMethod, chainList, config.OptionalEventTypeName, validationContext); var typeInfo = optionalLambdaWrap != null ? optionalLambdaWrap.TypeInfo : EPTypeHelper.SingleValue(staticMethodDesc.ReflectionMethod.ReturnType); var eval = ExprDotNodeUtility.GetChainEvaluators( -1, typeInfo, chainList, validationContext, false, new ExprDotNodeFilterAnalyzerInputStatic()) .ChainWithUnpack; var staticMethodForge = new ExprDotNodeForgeStaticMethod( this, isReturnsConstantResult, clazz.Name, staticMethodDesc.ReflectionMethod, staticMethodDesc.ChildForges, allowValueCache && staticMethodDesc.IsAllConstants, eval, optionalLambdaWrap, config.IsRethrowExceptions, null, validationContext.StatementName); // If caching the result, evaluate now and return the result. if (isReturnsConstantResult) { forge = new ExprPlugInSingleRowNodeForgeConst(this, staticMethodForge); } else { forge = new ExprPlugInSingleRowNodeForgeNC(this, staticMethodForge); } return null; }
public override ExprNode Validate(ExprValidationContext validationContext) { // check for plannable methods: these are validated according to different rules var appDotMethod = GetAppDotMethod(validationContext.IsFilterExpression); if (appDotMethod != null) { return appDotMethod; } // validate all parameters ExprNodeUtilityValidate.Validate(ExprNodeOrigin.DOTNODEPARAMETER, ChainSpec, validationContext); // determine if there are enumeration method expressions in the chain var hasEnumerationMethod = false; foreach (var chain in ChainSpec) { if (EnumMethodEnumExtensions.IsEnumerationMethod(chain.Name)) { hasEnumerationMethod = true; break; } } // determine if there is an implied binding, replace first chain element with evaluation node if there is if (validationContext.StreamTypeService.HasTableTypes && validationContext.TableCompileTimeResolver != null && ChainSpec.Count > 1 && ChainSpec[0].IsProperty) { var tableNode = TableCompileTimeUtil.GetTableNodeChainable( validationContext.StreamTypeService, ChainSpec, validationContext.ImportService, validationContext.TableCompileTimeResolver); if (tableNode != null) { var node = ExprNodeUtilityValidate.GetValidatedSubtree( ExprNodeOrigin.DOTNODE, tableNode.First, validationContext); if (tableNode.Second.IsEmpty()) { return node; } ChainSpec.Clear(); ChainSpec.AddAll(tableNode.Second); AddChildNode(node); } } // The root node expression may provide the input value: // Such as "window(*).doIt(...)" or "(select * from Window).doIt()" or "prevwindow(sb).doIt(...)", in which case the expression to act on is a child expression // var streamTypeService = validationContext.StreamTypeService; if (ChildNodes.Length != 0) { // the root expression is the first child node var rootNode = ChildNodes[0]; // the root expression may also provide a lambda-function input (Iterator<EventBean>) // Determine collection-type and evaluator if any for root node var enumSrc = ExprDotNodeUtility.GetEnumerationSource( rootNode, validationContext.StreamTypeService, hasEnumerationMethod, validationContext.IsDisablePropertyExpressionEventCollCache, validationContext.StatementRawInfo, validationContext.StatementCompileTimeService); EPType typeInfoX; if (enumSrc.ReturnType == null) { typeInfoX = EPTypeHelper.SingleValue( rootNode.Forge.EvaluationType); // not a collection type, treat as scalar } else { typeInfoX = enumSrc.ReturnType; } var evalsX = ExprDotNodeUtility.GetChainEvaluators( enumSrc.StreamOfProviderIfApplicable, typeInfoX, ChainSpec, validationContext, isDuckTyping, new ExprDotNodeFilterAnalyzerInputExpr()); forge = new ExprDotNodeForgeRootChild( this, null, null, null, hasEnumerationMethod, rootNode.Forge, enumSrc.Enumeration, typeInfoX, evalsX.Chain, evalsX.ChainWithUnpack, false); return null; } // No root node, and this is a 1-element chain i.e. "something(param,...)". // Plug-in single-row methods are not handled here. // Plug-in aggregation methods are not handled here. if (ChainSpec.Count == 1) { var spec = ChainSpec[0]; if (spec.Parameters.IsEmpty()) { throw HandleNotFound(spec.Name); } // single-parameter can resolve to a property Pair<PropertyResolutionDescriptor, string> propertyInfoPairX = null; try { propertyInfoPairX = ExprIdentNodeUtil.GetTypeFromStream( streamTypeService, spec.Name, streamTypeService.HasPropertyAgnosticType, false, validationContext.TableCompileTimeResolver); } catch (ExprValidationPropertyException) { // fine } // if not a property then try built-in single-row non-grammar functions if (propertyInfoPairX == null && spec.Name.ToLowerInvariant() .Equals(ImportServiceCompileTime.EXT_SINGLEROW_FUNCTION_TRANSPOSE)) { if (spec.Parameters.Count != 1) { throw new ExprValidationException( "The " + ImportServiceCompileTime.EXT_SINGLEROW_FUNCTION_TRANSPOSE + " function requires a single parameter expression"); } forge = new ExprDotNodeForgeTransposeAsStream(this, ChainSpec[0].Parameters[0].Forge); } else if (spec.Parameters.Count != 1) { throw HandleNotFound(spec.Name); } else { if (propertyInfoPairX == null) { throw new ExprValidationException( "Unknown single-row function, aggregation function or mapped or indexed property named '" + spec.Name + "' could not be resolved"); } forge = GetPropertyPairEvaluator(spec.Parameters[0].Forge, propertyInfoPairX, validationContext); } return null; } // handle the case where the first chain spec element is a stream name. ExprValidationException prefixedStreamNumException = null; var prefixedStreamNumber = PrefixedStreamName(ChainSpec, validationContext.StreamTypeService); if (prefixedStreamNumber != -1) { var specAfterStreamName = ChainSpec[1]; // Attempt to resolve as property Pair<PropertyResolutionDescriptor, string> propertyInfoPairX = null; try { var propName = ChainSpec[0].Name + "." + specAfterStreamName.Name; propertyInfoPairX = ExprIdentNodeUtil.GetTypeFromStream( streamTypeService, propName, streamTypeService.HasPropertyAgnosticType, false, validationContext.TableCompileTimeResolver); } catch (ExprValidationPropertyException) { // fine } if (propertyInfoPairX != null) { if (specAfterStreamName.Parameters.Count != 1) { throw HandleNotFound(specAfterStreamName.Name); } forge = GetPropertyPairEvaluator( specAfterStreamName.Parameters[0].Forge, propertyInfoPairX, validationContext); return null; } // Attempt to resolve as event-underlying object instance method var eventType = validationContext.StreamTypeService.EventTypes[prefixedStreamNumber]; var type = eventType.UnderlyingType; IList<ExprChainedSpec> remainderChain = new List<ExprChainedSpec>(ChainSpec); remainderChain.RemoveAt(0); ExprValidationException methodEx = null; ExprDotForge[] underlyingMethodChain = null; try { var typeInfoX = EPTypeHelper.SingleValue(type); if (validationContext.TableCompileTimeResolver.ResolveTableFromEventType(eventType) != null) { typeInfoX = new ClassEPType(typeof(object[])); } underlyingMethodChain = ExprDotNodeUtility.GetChainEvaluators( prefixedStreamNumber, typeInfoX, remainderChain, validationContext, false, new ExprDotNodeFilterAnalyzerInputStream(prefixedStreamNumber)) .ChainWithUnpack; } catch (ExprValidationException ex) { methodEx = ex; // expected - may not be able to find the methods on the underlying } ExprDotForge[] eventTypeMethodChain = null; ExprValidationException enumDatetimeEx = null; FilterExprAnalyzerAffector filterExprAnalyzerAffector = null; try { var typeInfoX = EPTypeHelper.SingleEvent(eventType); var chain = ExprDotNodeUtility.GetChainEvaluators( prefixedStreamNumber, typeInfoX, remainderChain, validationContext, false, new ExprDotNodeFilterAnalyzerInputStream(prefixedStreamNumber)); eventTypeMethodChain = chain.ChainWithUnpack; filterExprAnalyzerAffector = chain.FilterAnalyzerDesc; } catch (ExprValidationException ex) { enumDatetimeEx = ex; // expected - may not be able to find the methods on the underlying } if (underlyingMethodChain != null) { forge = new ExprDotNodeForgeStream( this, filterExprAnalyzerAffector, prefixedStreamNumber, eventType, underlyingMethodChain, true); } else if (eventTypeMethodChain != null) { forge = new ExprDotNodeForgeStream( this, filterExprAnalyzerAffector, prefixedStreamNumber, eventType, eventTypeMethodChain, false); } if (forge != null) { return null; } if (ExprDotNodeUtility.IsDatetimeOrEnumMethod(remainderChain[0].Name)) { prefixedStreamNumException = enumDatetimeEx; } else { prefixedStreamNumException = new ExprValidationException( "Failed to solve '" + remainderChain[0].Name + "' to either an date-time or enumeration method, an event property or a method on the event underlying object: " + methodEx.Message, methodEx); } } // There no root node, in this case the classname or property name is provided as part of the chain. // Such as "MyClass.myStaticLib(...)" or "mycollectionproperty.doIt(...)" // IList<ExprChainedSpec> modifiedChain = new List<ExprChainedSpec>(ChainSpec); var firstItem = modifiedChain.DeleteAt(0); Pair<PropertyResolutionDescriptor, string> propertyInfoPair = null; try { propertyInfoPair = ExprIdentNodeUtil.GetTypeFromStream( streamTypeService, firstItem.Name, streamTypeService.HasPropertyAgnosticType, true, validationContext.TableCompileTimeResolver); } catch (ExprValidationPropertyException) { // not a property } // If property then treat it as such if (propertyInfoPair != null) { var propertyName = propertyInfoPair.First.PropertyName; var streamId = propertyInfoPair.First.StreamNum; var streamType = streamTypeService.EventTypes[streamId]; EPType typeInfoX; ExprEnumerationForge enumerationForge = null; EPType inputType; ExprForge rootNodeForge = null; EventPropertyGetterSPI getter; if (firstItem.Parameters.IsEmpty()) { getter = ((EventTypeSPI) streamType).GetGetterSPI(propertyInfoPair.First.PropertyName); var propertyEval = ExprDotNodeUtility.GetPropertyEnumerationSource( propertyInfoPair.First.PropertyName, streamId, streamType, hasEnumerationMethod, validationContext.IsDisablePropertyExpressionEventCollCache); typeInfoX = propertyEval.ReturnType; enumerationForge = propertyEval.Enumeration; inputType = propertyEval.ReturnType; rootNodeForge = new PropertyDotNonLambdaForge( streamId, getter, propertyInfoPair.First.PropertyType.GetBoxedType()); } else { // property with parameter - mapped or indexed property var desc = EventTypeUtility.GetNestablePropertyDescriptor( streamTypeService.EventTypes[propertyInfoPair.First.StreamNum], firstItem.Name); if (firstItem.Parameters.Count > 1) { throw new ExprValidationException( "Property '" + firstItem.Name + "' may not be accessed passing 2 or more parameters"); } var paramEval = firstItem.Parameters[0].Forge; typeInfoX = EPTypeHelper.SingleValue(desc.PropertyComponentType); inputType = typeInfoX; getter = null; if (desc.IsMapped) { if (paramEval.EvaluationType != typeof(string)) { throw new ExprValidationException( "Parameter expression to mapped property '" + propertyName + "' is expected to return a string-type value but returns " + paramEval.EvaluationType.CleanName()); } var mappedGetter = ((EventTypeSPI) propertyInfoPair.First.StreamEventType).GetGetterMappedSPI( propertyInfoPair.First.PropertyName); if (mappedGetter == null) { throw new ExprValidationException( "Mapped property named '" + propertyName + "' failed to obtain getter-object"); } rootNodeForge = new PropertyDotNonLambdaMappedForge( streamId, mappedGetter, paramEval, desc.PropertyComponentType); } if (desc.IsIndexed) { if (paramEval.EvaluationType.GetBoxedType() != typeof(int?)) { throw new ExprValidationException( "Parameter expression to mapped property '" + propertyName + "' is expected to return a Integer-type value but returns " + paramEval.EvaluationType.CleanName()); } var indexedGetter = ((EventTypeSPI) propertyInfoPair.First.StreamEventType).GetGetterIndexedSPI( propertyInfoPair.First.PropertyName); if (indexedGetter == null) { throw new ExprValidationException( "Mapped property named '" + propertyName + "' failed to obtain getter-object"); } rootNodeForge = new PropertyDotNonLambdaIndexedForge( streamId, indexedGetter, paramEval, desc.PropertyComponentType); } } if (typeInfoX == null) { throw new ExprValidationException( "Property '" + propertyName + "' is not a mapped or indexed property"); } // try to build chain based on the input (non-fragment) ExprDotNodeRealizedChain evalsX; var filterAnalyzerInputProp = new ExprDotNodeFilterAnalyzerInputProp( propertyInfoPair.First.StreamNum, propertyInfoPair.First.PropertyName); var rootIsEventBean = false; try { evalsX = ExprDotNodeUtility.GetChainEvaluators( streamId, inputType, modifiedChain, validationContext, isDuckTyping, filterAnalyzerInputProp); } catch (ExprValidationException) { // try building the chain based on the fragment event type (i.e. A.after(B) based on A-configured start time where A is a fragment) var fragment = propertyInfoPair.First.FragmentEventType; if (fragment == null) { throw; } EPType fragmentTypeInfo; if (fragment.IsIndexed) { fragmentTypeInfo = EPTypeHelper.CollectionOfEvents(fragment.FragmentType); } else { fragmentTypeInfo = EPTypeHelper.SingleEvent(fragment.FragmentType); } rootIsEventBean = true; evalsX = ExprDotNodeUtility.GetChainEvaluators( propertyInfoPair.First.StreamNum, fragmentTypeInfo, modifiedChain, validationContext, isDuckTyping, filterAnalyzerInputProp); rootNodeForge = new PropertyDotNonLambdaFragmentForge(streamId, getter); } var filterExprAnalyzerAffector = evalsX.FilterAnalyzerDesc; var streamNumReferenced = propertyInfoPair.First.StreamNum; var rootPropertyName = propertyInfoPair.First.PropertyName; forge = new ExprDotNodeForgeRootChild( this, filterExprAnalyzerAffector, streamNumReferenced, rootPropertyName, hasEnumerationMethod, rootNodeForge, enumerationForge, inputType, evalsX.Chain, evalsX.ChainWithUnpack, !rootIsEventBean); return null; } // If variable then resolve as such var variable = validationContext.VariableCompileTimeResolver.Resolve(firstItem.Name); if (variable != null) { if (variable.OptionalContextName != null) { throw new ExprValidationException( "Method invocation on context-specific variable is not supported"); } EPType typeInfoX; ExprDotStaticMethodWrap wrap; if (variable.Type.IsArray) { typeInfoX = EPTypeHelper.CollectionOfSingleValue( variable.Type.GetElementType(), variable.Type); wrap = new ExprDotStaticMethodWrapArrayScalar(variable.VariableName, variable.Type); } else if (variable.EventType != null) { typeInfoX = EPTypeHelper.SingleEvent(variable.EventType); wrap = null; } else { typeInfoX = EPTypeHelper.SingleValue(variable.Type); wrap = null; } var evalsX = ExprDotNodeUtility.GetChainEvaluators( null, typeInfoX, modifiedChain, validationContext, false, new ExprDotNodeFilterAnalyzerInputStatic()); forge = new ExprDotNodeForgeVariable(this, variable, wrap, evalsX.ChainWithUnpack); return null; } // try resolve as enumeration class with value var enumconstant = ImportCompileTimeUtil.ResolveIdentAsEnumConst( firstItem.Name, validationContext.ImportService, false); if (enumconstant != null) { // try resolve method var methodSpec = modifiedChain[0]; var enumvalue = firstItem.Name; ExprNodeUtilResolveExceptionHandler handler = new ProxyExprNodeUtilResolveExceptionHandler { ProcHandle = ex => { return new ExprValidationException( "Failed to resolve method '" + methodSpec.Name + "' on enumeration value '" + enumvalue + "': " + ex.Message); } }; var wildcardType = validationContext.StreamTypeService.EventTypes.Length != 1 ? null : validationContext.StreamTypeService.EventTypes[0]; var methodDesc = ExprNodeUtilityResolve.ResolveMethodAllowWildcardAndStream( enumconstant.GetType().Name, enumconstant.GetType(), methodSpec.Name, methodSpec.Parameters, wildcardType != null, wildcardType, handler, methodSpec.Name, validationContext.StatementRawInfo, validationContext.StatementCompileTimeService); // method resolved, hook up modifiedChain.RemoveAt(0); // we identified this piece var optionalLambdaWrapX = ExprDotStaticMethodWrapFactory.Make( methodDesc.ReflectionMethod, modifiedChain, null, validationContext); var typeInfoX = optionalLambdaWrapX != null ? optionalLambdaWrapX.TypeInfo : EPTypeHelper.SingleValue(methodDesc.ReflectionMethod.ReturnType); var evalsX = ExprDotNodeUtility.GetChainEvaluators( null, typeInfoX, modifiedChain, validationContext, false, new ExprDotNodeFilterAnalyzerInputStatic()); forge = new ExprDotNodeForgeStaticMethod( this, false, firstItem.Name, methodDesc.ReflectionMethod, methodDesc.ChildForges, false, evalsX.ChainWithUnpack, optionalLambdaWrapX, false, enumconstant, validationContext.StatementName); return null; } // if prefixed by a stream name, we are giving up if (prefixedStreamNumException != null) { throw prefixedStreamNumException; } // If class then resolve as class var secondItem = modifiedChain.DeleteAt(0); var allowWildcard = validationContext.StreamTypeService.EventTypes.Length == 1; EventType streamZeroType = null; if (validationContext.StreamTypeService.EventTypes.Length > 0) { streamZeroType = validationContext.StreamTypeService.EventTypes[0]; } var method = ExprNodeUtilityResolve.ResolveMethodAllowWildcardAndStream( firstItem.Name, null, secondItem.Name, secondItem.Parameters, allowWildcard, streamZeroType, new ExprNodeUtilResolveExceptionHandlerDefault(firstItem.Name + "." + secondItem.Name, false), secondItem.Name, validationContext.StatementRawInfo, validationContext.StatementCompileTimeService); var isConstantParameters = method.IsAllConstants && isUDFCache; var isReturnsConstantResult = isConstantParameters && modifiedChain.IsEmpty(); // this may return a pair of null if there is no lambda or the result cannot be wrapped for lambda-function use var optionalLambdaWrap = ExprDotStaticMethodWrapFactory.Make( method.ReflectionMethod, modifiedChain, null, validationContext); var typeInfo = optionalLambdaWrap != null ? optionalLambdaWrap.TypeInfo : EPTypeHelper.SingleValue(method.ReflectionMethod.ReturnType); var evals = ExprDotNodeUtility.GetChainEvaluators( null, typeInfo, modifiedChain, validationContext, false, new ExprDotNodeFilterAnalyzerInputStatic()); forge = new ExprDotNodeForgeStaticMethod( this, isReturnsConstantResult, firstItem.Name, method.ReflectionMethod, method.ChildForges, isConstantParameters, evals.ChainWithUnpack, optionalLambdaWrap, false, null, validationContext.StatementName); return null; }