private static AstMethodArguments getArguments(Node n) { if (n instanceof AstDotSuffix && n.jjtGetNumChildren() > 0) { return (AstMethodArguments) n.jjtGetChild(0); } if (n instanceof AstBracketSuffix && n.jjtGetNumChildren() > 1) { return (AstMethodArguments) n.jjtGetChild(1); } return null; }
private static AstMethodArguments getArguments(Node n) { if (n instanceof AstDotSuffix && n.jjtGetNumChildren() > 0) { return (AstMethodArguments) n.jjtGetChild(0); } if (n instanceof AstBracketSuffix && n.jjtGetNumChildren() > 1) { return (AstMethodArguments) n.jjtGetChild(1); } return null; }
private static AstMethodArguments getArguments(Node n) { if (n instanceof AstDotSuffix && n.jjtGetNumChildren() > 0) { return (AstMethodArguments) n.jjtGetChild(0); } if (n instanceof AstBracketSuffix && n.jjtGetNumChildren() > 1) { return (AstMethodArguments) n.jjtGetChild(1); } return null; }
private static AstMethodArguments getArguments(Node n) { if (n instanceof AstDotSuffix && n.jjtGetNumChildren() > 0) { return (AstMethodArguments) n.jjtGetChild(0); } if (n instanceof AstBracketSuffix && n.jjtGetNumChildren() > 1) { return (AstMethodArguments) n.jjtGetChild(1); } return null; }
private static AstMethodArguments getArguments(Node n) { if (n instanceof AstDotSuffix && n.jjtGetNumChildren() > 0) { return (AstMethodArguments) n.jjtGetChild(0); } if (n instanceof AstBracketSuffix && n.jjtGetNumChildren() > 1) { return (AstMethodArguments) n.jjtGetChild(1); } return null; }
public Object getValue(EvaluationContext ctx) { HashSet<Object> set = new HashSet<Object>(); HashMap<Object, Object> map = new HashMap<Object, Object>(); int paramCount = this.jjtGetNumChildren(); for (int i = 0; i < paramCount; i++) { Node entry = this.children[i]; Object v1 = entry.jjtGetChild(0).getValue(ctx); if (entry.jjtGetNumChildren() > 1) { // expr: expr map.put(v1, entry.jjtGetChild(1).getValue(ctx)); } else { set.add(v1); } } // It is error to have mixed set/map entries if (set.size() > 0 && map.size() > 0) { throw new ELException("Cannot mix set entry with map entry."); } if (map.size() > 0) { return map; } return set; } }
public Object getValue(EvaluationContext ctx) { HashSet<Object> set = new HashSet<Object>(); HashMap<Object, Object> map = new HashMap<Object, Object>(); int paramCount = this.jjtGetNumChildren(); for (int i = 0; i < paramCount; i++) { Node entry = this.children[i]; Object v1 = entry.jjtGetChild(0).getValue(ctx); if (entry.jjtGetNumChildren() > 1) { // expr: expr map.put(v1, entry.jjtGetChild(1).getValue(ctx)); } else { set.add(v1); } } // It is error to have mixed set/map entries if (set.size() > 0 && map.size() > 0) { throw new ELException("Cannot mix set entry with map entry."); } if (map.size() > 0) { return map; } return set; } }
public Object getValue(EvaluationContext ctx) { HashSet<Object> set = new HashSet<Object>(); HashMap<Object, Object> map = new HashMap<Object, Object>(); int paramCount = this.jjtGetNumChildren(); for (int i = 0; i < paramCount; i++) { Node entry = this.children[i]; Object v1 = entry.jjtGetChild(0).getValue(ctx); if (entry.jjtGetNumChildren() > 1) { // expr: expr map.put(v1, entry.jjtGetChild(1).getValue(ctx)); } else { set.add(v1); } } // It is error to have mixed set/map entries if (set.size() > 0 && map.size() > 0) { throw new ELException("Cannot mix set entry with map entry."); } if (map.size() > 0) { return map; } return set; } }
int numChildren = n.jjtGetNumChildren(); if (numChildren == 1) { n = n.jjtGetChild(0);
int numChildren = n.jjtGetNumChildren(); if (numChildren == 1) { n = n.jjtGetChild(0);
int numChildren = n.jjtGetNumChildren(); if (numChildren == 1) { n = n.jjtGetChild(0);
int numChildren = n.jjtGetNumChildren(); if (numChildren == 1) { n = n.jjtGetChild(0);
int numChildren = n.jjtGetNumChildren(); if (numChildren == 1) { n = n.jjtGetChild(0);
public void visit(Node node) throws ELException { if (node instanceof AstFunction) { AstFunction funcNode = (AstFunction) node; if (this.fnMapper == null) { throw new ELException(MessageFactory.get("error.fnMapper.null")); } Method m = fnMapper.resolveFunction(funcNode.getPrefix(), funcNode .getLocalName()); if (m == null) { throw new ELException(MessageFactory.get( "error.fnMapper.method", funcNode.getOutputName())); } int pcnt = m.getParameterTypes().length; if (node.jjtGetNumChildren() != pcnt) { throw new ELException(MessageFactory.get( "error.fnMapper.paramcount", funcNode.getOutputName(), "" + pcnt, "" + node.jjtGetNumChildren())); } } else if (node instanceof AstIdentifier && this.varMapper != null) { String variable = ((AstIdentifier) node).getImage(); // simply capture it this.varMapper.resolveVariable(variable); } }
public void visit(Node node) throws ELException { if (node instanceof AstFunction) { AstFunction funcNode = (AstFunction) node; if (this.fnMapper == null) { throw new ELException(MessageFactory.get("error.fnMapper.null")); } Method m = fnMapper.resolveFunction(funcNode.getPrefix(), funcNode .getLocalName()); if (m == null) { throw new ELException(MessageFactory.get( "error.fnMapper.method", funcNode.getOutputName())); } int pcnt = m.getParameterTypes().length; if (node.jjtGetNumChildren() != pcnt) { throw new ELException(MessageFactory.get( "error.fnMapper.paramcount", funcNode.getOutputName(), "" + pcnt, "" + node.jjtGetNumChildren())); } } else if (node instanceof AstIdentifier && this.varMapper != null) { String variable = ((AstIdentifier) node).getImage(); // simply capture it this.varMapper.resolveVariable(variable); } }
public void visit(Node node) throws ELException { if (node instanceof AstFunction) { AstFunction funcNode = (AstFunction) node; if (this.fnMapper == null) { throw new ELException(MessageFactory.get("error.fnMapper.null")); } Method m = fnMapper.resolveFunction(funcNode.getPrefix(), funcNode .getLocalName()); if (m == null) { throw new ELException(MessageFactory.get( "error.fnMapper.method", funcNode.getOutputName())); } int pcnt = m.getParameterTypes().length; if (node.jjtGetNumChildren() != pcnt) { throw new ELException(MessageFactory.get( "error.fnMapper.paramcount", funcNode.getOutputName(), "" + pcnt, "" + node.jjtGetNumChildren())); } } else if (node instanceof AstIdentifier && this.varMapper != null) { String variable = ((AstIdentifier) node).getImage(); // simply capture it this.varMapper.resolveVariable(variable); } }
int numChildren = n.jjtGetNumChildren(); if (numChildren == 1) { n = n.jjtGetChild(0);