else {
throw new IllegalStateException("Invalid value cache code " + valueCache);
}
// Try to resolve the method
final FastMethod staticMethod;
Method method;
try
{
method = validationContext.getMethodResolutionService().resolveMethod(clazz.getName(), firstItem.getName(), paramTypes);
FastClass declaringClass = FastClass.create(Thread.currentThread().getContextClassLoader(), method.getDeclaringClass());
staticMethod = declaringClass.getMethod(method);
}
catch(Exception e)
{
throw new ExprValidationException(e.getMessage());
}
// 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(method, validationContext.getEventAdapterService(), chainList);
ExprDotEvalTypeInfo typeInfo = optionalLambdaWrap != null ? optionalLambdaWrap.getTypeInfo() : ExprDotEvalTypeInfo.scalarOrUnderlying(method.getReturnType());
ExprDotEval[] eval = ExprDotNodeUtility.getChainEvaluators(typeInfo, chainList, validationContext, false, new ExprDotNodeFilterAnalyzerInputStatic()).getChainWithUnpack();
evaluator = new ExprDotEvalStaticMethod(validationContext.getStatementName(), clazz.getName(), staticMethod, childEvals, allConstants, optionalLambdaWrap, eval);
// If caching the result, evaluate now and return the result.
if (isReturnsConstantResult) {
final Object result = evaluator.evaluate(null, true, null);
evaluator = new ExprEvaluator() {
public Object evaluate(EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
return result;
}
public Class getType() {
return staticMethod.getReturnType();
}
public Map<String, Object> getEventType() throws ExprValidationException {
return null;
}