Package org.apache.derby.impl.sql.compile

Examples of org.apache.derby.impl.sql.compile.MethodCallNode


/*
* <A NAME="staticMethodInvocation">staticMethodInvocation</A>
*/
  final public ValueNode staticMethodInvocation(String javaClassName) throws ParseException, StandardException {
        Vector  parameterList = new Vector();
        MethodCallNode  methodNode;
    methodNode = staticMethodName(javaClassName);
    methodCallParameterList(parameterList);
                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here


* <A NAME="routineInvocation">routineInvocation</A>
*/
  final public ValueNode routineInvocation() throws ParseException, StandardException {
        Vector  parameterList = new Vector();
        TableName       routineName;
        MethodCallNode  methodNode;
    routineName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    methodCallParameterList(parameterList);
                methodNode = (MethodCallNode) nodeFactory.getNode(
                                                                C_NodeTypes.STATIC_METHOD_CALL_NODE,
                                                                routineName,
                                                                null,
                                                                getContextManager());

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

/*
* <A NAME="nonStaticMethodInvocation">nonStaticMethodInvocation</A>
*/
  final public ValueNode nonStaticMethodInvocation(ValueNode receiver) throws ParseException, StandardException {
        Vector                                  parameterList = new Vector();
        MethodCallNode                  methodNode;
        ParameterNode                   parameterNode;
    if (getToken(3).kind == LEFT_PAREN) {
      switch (jj_nt.kind) {
      case FIELD_REFERENCE:
        jj_consume_token(FIELD_REFERENCE);
        break;
      case PERIOD:
        jj_consume_token(PERIOD);
        break;
      default:
        jj_la1[110] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      methodNode = methodName(receiver);
      methodCallParameterList(parameterList);
                /*
    ** ? parameters are not allowed for the receiver --
    ** unless the receiver is standing in for a named parameter,
    ** whose type is therefore known.
    */
                if (receiver instanceof ParameterNode)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_PARAMETER_RECEIVER,
                                                                                                methodNode.getMethodName());}
                }

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
    */
                {if (true) return (ValueNode) nodeFactory.getNode(
                                                                C_NodeTypes.JAVA_TO_SQL_VALUE_NODE,
                                                                methodNode,
                                                                getContextManager());}
    } else {
      switch (jj_nt.kind) {
      case PERIOD:
        jj_consume_token(PERIOD);
        methodNode = methodName(receiver);
                /*
    ** ? parameters are not allowed for the receiver --
    ** unless the receiver is standing in for a named parameter,
    ** whose type is therefore known.
    */
                if (receiver instanceof ParameterNode)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_PARAMETER_RECEIVER,
                                                                                                methodNode.getMethodName());}
                }

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

                                                                sysFunName,
                                                                new Integer(0),
                                                                new Integer(0),
                                                                getContextManager());

                MethodCallNode methodNode = (MethodCallNode) nodeFactory.getNode(
                                                                C_NodeTypes.STATIC_METHOD_CALL_NODE,
                                                                functionName,
                                                                null,
                                                                getContextManager());

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

/*
* <A NAME="nonStaticMethodInvocation">nonStaticMethodInvocation</A>
*/
  final public ValueNode nonStaticMethodInvocation(ValueNode receiver) throws ParseException, StandardException {
        Vector                                  parameterList = new Vector();
        MethodCallNode                  methodNode;
        ParameterNode                   parameterNode;
    if (getToken(3).kind == LEFT_PAREN) {
      switch (jj_nt.kind) {
      case FIELD_REFERENCE:
        jj_consume_token(FIELD_REFERENCE);
        break;
      case PERIOD:
        jj_consume_token(PERIOD);
        break;
      default:
        jj_la1[110] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      methodNode = methodName(receiver);
      methodCallParameterList(parameterList);
                /*
    ** ? parameters are not allowed for the receiver --
    ** unless the receiver is standing in for a named parameter,
    ** whose type is therefore known.
    */
                if (receiver instanceof ParameterNode)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_PARAMETER_RECEIVER,
                                                                                                methodNode.getMethodName());}
                }

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
    */
                {if (true) return (ValueNode) nodeFactory.getNode(
                                                                C_NodeTypes.JAVA_TO_SQL_VALUE_NODE,
                                                                methodNode,
                                                                getContextManager());}
    } else {
      switch (jj_nt.kind) {
      case PERIOD:
        jj_consume_token(PERIOD);
        methodNode = methodName(receiver);
                /*
    ** ? parameters are not allowed for the receiver --
    ** unless the receiver is standing in for a named parameter,
    ** whose type is therefore known.
    */
                if (receiver instanceof ParameterNode)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_PARAMETER_RECEIVER,
                                                                                                methodNode.getMethodName());}
                }

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

                                                                sysFunName,
                                                                new Integer(0),
                                                                new Integer(0),
                                                                getContextManager());

                MethodCallNode methodNode = (MethodCallNode) nodeFactory.getNode(
                                                                C_NodeTypes.STATIC_METHOD_CALL_NODE,
                                                                functionName,
                                                                null,
                                                                getContextManager());

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

/*
* <A NAME="staticMethodInvocation">staticMethodInvocation</A>
*/
  final public ValueNode staticMethodInvocation(String javaClassName) throws ParseException, StandardException {
        Vector  parameterList = new Vector();
        MethodCallNode  methodNode;
    methodNode = staticMethodName(javaClassName);
    methodCallParameterList(parameterList);
                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

* <A NAME="routineInvocation">routineInvocation</A>
*/
  final public ValueNode routineInvocation() throws ParseException, StandardException {
        Vector  parameterList = new Vector();
        TableName       routineName;
        MethodCallNode  methodNode;
    routineName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
    methodCallParameterList(parameterList);
                methodNode = (MethodCallNode) nodeFactory.getNode(
                                                                C_NodeTypes.STATIC_METHOD_CALL_NODE,
                                                                routineName,
                                                                null,
                                                                getContextManager());

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

/*
* <A NAME="nonStaticMethodInvocation">nonStaticMethodInvocation</A>
*/
  final public ValueNode nonStaticMethodInvocation(ValueNode receiver) throws ParseException, StandardException {
        Vector                                  parameterList = new Vector();
        MethodCallNode                  methodNode;
        ParameterNode                   parameterNode;
    if (getToken(3).kind == LEFT_PAREN) {
      switch (jj_nt.kind) {
      case FIELD_REFERENCE:
        jj_consume_token(FIELD_REFERENCE);
        break;
      case PERIOD:
        jj_consume_token(PERIOD);
        break;
      default:
        jj_la1[109] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      methodNode = methodName(receiver);
      methodCallParameterList(parameterList);
                /*
    ** ? parameters are not allowed for the receiver --
    ** unless the receiver is standing in for a named parameter,
    ** whose type is therefore known.
    */
                if (receiver instanceof ParameterNode)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_PARAMETER_RECEIVER,
                                                                                                methodNode.getMethodName());}
                }

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
    */
                {if (true) return (ValueNode) nodeFactory.getNode(
                                                                C_NodeTypes.JAVA_TO_SQL_VALUE_NODE,
                                                                methodNode,
                                                                getContextManager());}
    } else {
      switch (jj_nt.kind) {
      case PERIOD:
        jj_consume_token(PERIOD);
        methodNode = methodName(receiver);
                /*
    ** ? parameters are not allowed for the receiver --
    ** unless the receiver is standing in for a named parameter,
    ** whose type is therefore known.
    */
                if (receiver instanceof ParameterNode)
                {
                        {if (true) throw StandardException.newException(SQLState.LANG_PARAMETER_RECEIVER,
                                                                                                methodNode.getMethodName());}
                }

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

                                                                sysFunName,
                                                                new Integer(0),
                                                                new Integer(0),
                                                                getContextManager());

                MethodCallNode methodNode = (MethodCallNode) nodeFactory.getNode(
                                                                C_NodeTypes.STATIC_METHOD_CALL_NODE,
                                                                functionName,
                                                                null,
                                                                getContextManager());

                methodNode.addParms(parameterList);

                /*
    ** Assume this is being returned to the SQL domain.  If it turns
    ** out that this is being returned to the Java domain, we will
    ** get rid of this node.
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.sql.compile.MethodCallNode

Copyright © 2018 www.massapicom. 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.