Examples of AstFunction


Examples of org.apache.el.parser.AstFunction

   * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
   */
  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();

View Full Code Here

Examples of org.apache.el.parser.AstFunction

   * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
   */
  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();

View Full Code Here

Examples of org.apache.el.parser.AstFunction

   * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
   */
  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();

View Full Code Here

Examples of org.apache.struts2.el.parser.AstFunction

     * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
     */
    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();

View Full Code Here

Examples of org.jboss.el.parser.AstFunction

   * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
   */
  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 = null;
     
      if (fnMapper instanceof ExtendedFunctionMapper)
      {
         m = ((ExtendedFunctionMapper) fnMapper).resolveFunction(funcNode.getPrefix(),
               funcNode.getLocalName(), node.jjtGetNumChildren());   
      }
      else
      {
         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 (!m.isVarArgs() && 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();

View Full Code Here

Examples of org.jboss.el.parser.AstFunction

   * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
   */
  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 = null;
     
      if (fnMapper instanceof ExtendedFunctionMapper)
      {
         m = ((ExtendedFunctionMapper) fnMapper).resolveFunction(funcNode.getPrefix(),
           funcNode.getLocalName(), node.jjtGetNumChildren())
      }
      else
      {
         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 (!m.isVarArgs() && 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();

View Full Code Here

Examples of org.jboss.el.parser.AstFunction

   * @see com.sun.el.parser.NodeVisitor#visit(com.sun.el.parser.Node)
   */
  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 = null;
     
      if (fnMapper instanceof ExtendedFunctionMapper)
      {
         m = ((ExtendedFunctionMapper) fnMapper).resolveFunction(funcNode.getPrefix(),
               funcNode.getLocalName(), node.jjtGetNumChildren());   
      }
      else
      {
         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 (!m.isVarArgs() && 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();

View Full Code Here

Examples of org.lilypondbeans.jccparser.ASTFunction

            return false;
        }
        int tkind = node.jjtGetFirstToken().kind;
        if (tkind == ParserConstants.dynamics || tkind == ParserConstants.crescendo || tkind == ParserConstants.decrescendo) {

            ASTFunction func = (ASTFunction) node;
            DynamicsLayout layout = new DynamicsLayout();
            if (tkind == ParserConstants.crescendo) {
                layout.text = "<";
            } else if (tkind == ParserConstants.decrescendo) {
                layout.text = ">";
            } else { //\p \f etc
                String image = func.jjtGetFirstToken().image;
                try {

                    if (image.startsWith("\\")) {
                        layout.text = func.jjtGetFirstToken().image.substring(1);
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
            func.setLayoutObject(layout);
            layout.distanceRight = 0;
            if(func.pitch==null)//e.g. afterGrace
                return true;
            layout.priority = func.pitch.getlayoutObject().priority;
View Full Code Here

Examples of org.openntf.formula.ast.ASTFunction

    }
  }

  final private void formula() throws ParseException {
    /*@bgen(jjtree) Function */
    ASTFunction jjtn000 = new ASTFunction(this, JJTFUNCTION);
    boolean jjtc000 = true;
    jjtree.openNodeScope(jjtn000);
    Token t;
    try {
      t = getToken(0);
      if (jj_2_6(2)) {
        jj_consume_token(OParen);
        statement();
        label_19: while (true) {
          switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
          case EOS:
            ;
            break;
          default:
            jj_la1[39] = jj_gen;
            break label_19;
          }
          jj_consume_token(EOS);
          statement();
        }
        jj_consume_token(CParen);
      } else {
        ;
      }
      jjtree.closeNodeScope(jjtn000, true);
      jjtc000 = false;
      jjtn000.init(t.image);
    } catch (Throwable jjte000) {
      if (jjtc000) {
        jjtree.clearNodeScope(jjtn000);
        jjtc000 = false;
      } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.