// If variable then resolve as such
String contextNameVariable = validationContext.getVariableService().isContextVariable(firstItem.getName());
if (contextNameVariable != null) {
throw new ExprValidationException("Method invocation on context-specific variable is not supported");
}
VariableReader variableReader = validationContext.getVariableService().getReader(firstItem.getName(), VariableService.NOCONTEXT_AGENTINSTANCEID);
if (variableReader != null) {
EPType typeInfo;
ExprDotStaticMethodWrap wrap;
if (variableReader.getVariableMetaData().getType().isArray()) {
typeInfo = EPTypeHelper.collectionOfSingleValue(variableReader.getVariableMetaData().getType().getComponentType());
wrap = new ExprDotStaticMethodWrapArrayScalar(variableReader.getVariableMetaData().getVariableName(), variableReader.getVariableMetaData().getType().getComponentType());
}
else if (variableReader.getVariableMetaData().getEventType() != null) {
typeInfo = EPTypeHelper.singleEvent(variableReader.getVariableMetaData().getEventType());
wrap = null;
}
else {
typeInfo = EPTypeHelper.singleValue(variableReader.getVariableMetaData().getType());
wrap = null;
}
ExprDotNodeRealizedChain evals = ExprDotNodeUtility.getChainEvaluators(null, typeInfo, modifiedChain, validationContext, false, new ExprDotNodeFilterAnalyzerInputStatic());
exprEvaluator = new ExprDotEvalVariable(this, variableReader, wrap, evals.getChainWithUnpack());