本文整理汇总了Java中com.espertech.esper.epl.enummethod.dot.ExprDeclaredOrLambdaNode.validated方法的典型用法代码示例。如果您正苦于以下问题:Java ExprDeclaredOrLambdaNode.validated方法的具体用法?Java ExprDeclaredOrLambdaNode.validated怎么用?Java ExprDeclaredOrLambdaNode.validated使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.epl.enummethod.dot.ExprDeclaredOrLambdaNode
的用法示例。
在下文中一共展示了ExprDeclaredOrLambdaNode.validated方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValidatedSubtreeInternal
import com.espertech.esper.epl.enummethod.dot.ExprDeclaredOrLambdaNode; //导入方法依赖的package包/类
private static ExprNode getValidatedSubtreeInternal(ExprNode exprNode, ExprValidationContext validationContext, boolean isTopLevel) throws ExprValidationException {
ExprNode result = exprNode;
if (exprNode instanceof ExprLambdaGoesNode) {
return exprNode;
}
for (int i = 0; i < exprNode.getChildNodes().length; i++) {
ExprNode childNode = exprNode.getChildNodes()[i];
if (childNode instanceof ExprDeclaredOrLambdaNode) {
ExprDeclaredOrLambdaNode node = (ExprDeclaredOrLambdaNode) childNode;
if (node.validated()) {
continue;
}
}
ExprNode childNodeValidated = getValidatedSubtreeInternal(childNode, validationContext, false);
exprNode.setChildNode(i, childNodeValidated);
}
try {
ExprNode optionalReplacement = exprNode.validate(validationContext);
if (optionalReplacement != null) {
return getValidatedSubtreeInternal(optionalReplacement, validationContext, isTopLevel);
}
} catch (ExprValidationException e) {
if (exprNode instanceof ExprIdentNode) {
ExprIdentNode identNode = (ExprIdentNode) exprNode;
try {
result = resolveStaticMethodOrField(identNode, e, validationContext);
} catch (ExprValidationException ex) {
e = ex;
result = resolveAsStreamName(identNode, e, validationContext);
}
} else {
throw e;
}
}
// For top-level expressions check if we perform audit
if (isTopLevel) {
if (validationContext.isExpressionAudit()) {
return (ExprNode) ExprNodeProxy.newInstance(validationContext.getStreamTypeService().getEngineURIQualifier(), validationContext.getStatementName(), result);
}
} else {
if (validationContext.isExpressionNestedAudit() && !(result instanceof ExprIdentNode) && !(ExprNodeUtilityCore.isConstantValueExpr(result))) {
return (ExprNode) ExprNodeProxy.newInstance(validationContext.getStreamTypeService().getEngineURIQualifier(), validationContext.getStatementName(), result);
}
}
return result;
}
示例2: getValidatedSubtreeInternal
import com.espertech.esper.epl.enummethod.dot.ExprDeclaredOrLambdaNode; //导入方法依赖的package包/类
private static ExprNode getValidatedSubtreeInternal(ExprNode exprNode, ExprValidationContext validationContext, boolean isTopLevel) throws ExprValidationException
{
ExprNode result = exprNode;
if (exprNode instanceof ExprLambdaGoesNode) {
return exprNode;
}
for (int i = 0; i < exprNode.getChildNodes().size(); i++)
{
ExprNode childNode = exprNode.getChildNodes().get(i);
if (childNode instanceof ExprDeclaredOrLambdaNode) {
ExprDeclaredOrLambdaNode node = (ExprDeclaredOrLambdaNode) childNode;
if (node.validated()) {
continue;
}
}
ExprNode childNodeValidated = getValidatedSubtreeInternal(childNode, validationContext, false);
exprNode.getChildNodes().set(i, childNodeValidated);
}
try
{
exprNode.validate(validationContext);
}
catch(ExprValidationException e)
{
if (exprNode instanceof ExprIdentNode)
{
ExprIdentNode identNode = (ExprIdentNode) exprNode;
try
{
result = resolveStaticMethodOrField(identNode, e, validationContext);
}
catch(ExprValidationException ex)
{
e = ex;
result = resolveAsStreamName(identNode, e, validationContext);
}
}
else
{
throw e;
}
}
// For top-level expressions check if we perform audit
if (isTopLevel) {
if (validationContext.isExpressionAudit()) {
return (ExprNode) ExprNodeProxy.newInstance(validationContext.getStreamTypeService().getEngineURIQualifier(), validationContext.getStatementName(), result);
}
}
else {
if (validationContext.isExpressionNestedAudit() && !(result instanceof ExprIdentNode) && !(ExprNodeUtility.isConstantValueExpr(result))) {
return (ExprNode) ExprNodeProxy.newInstance(validationContext.getStreamTypeService().getEngineURIQualifier(), validationContext.getStatementName(), result);
}
}
return result;
}