Examples of ArgumentImpl


Examples of net.sf.jpacriteria.argument.ArgumentImpl

        this.argument = argument;
        this.items = items;
    }

    public CriteriaBuffer(CriteriaBlock block) {
        this(block.getAlias(), new ArgumentImpl());
        block.buildSelect(appendBuffer());
        block.buildFrom(appendBuffer());
        block.buildWhere(appendBuffer());
        block.buildGroupBy(appendBuffer());
        block.buildHaving(appendBuffer());
View Full Code Here

Examples of org.apache.commons.cli2.option.ArgumentImpl

     * @return A new Argument instance using the options specified in this
     * ArgumentBuilder.
     */
    public final Argument create() {
        final Argument argument =
            new ArgumentImpl(
                name,
                description,
                minimum,
                maximum,
                initialSeparator,
View Full Code Here

Examples of org.apache.imperius.spl.parser.statements.impl.ArgumentImpl

              if(type == TypeConstants.referenceType)
              { 
                referenceTypeName = CIMSPLTypeConstants.getReferenceTypeName(cimparameter.getReferenceClassName());
              }
              Argument arg=new ArgumentImpl(type, parameterName, isArr, referenceTypeName);

              methodArgsSymbolTable.insertVariableSymbol(parameterName, type, referenceTypeName, isArr, false, false);
              //System.out.println(" inserted variable symbol into methodArgsSymbolTable "+parameterName);
              methodArgs.add(arg);
            }
View Full Code Here

Examples of org.apache.imperius.spl.parser.statements.impl.ArgumentImpl

          // Construct an argument object
          Argument param;
          String paramName = "";
          try {
            param = new ArgumentImpl(internalType, paramName, isArray, referenceTypeName);
            argTypeList.add(param);
          } catch (SPLException e) {
            e.printStackTrace();
            throw new SPLException(e.getMessage());
          }
View Full Code Here

Examples of org.apache.imperius.spl.parser.statements.impl.ArgumentImpl

              continue;
            }
          boolean typeNotEqual = false;
          for (int i = 0; i < argTypeList.size(); i++) {
            Expression exp = (Expression)paramList.get(i);
            ArgumentImpl arg = (ArgumentImpl)argTypeList.get(i);
            TypeInfo expDataType = exp.getType();
            TypeInfo argDataType = arg.getType();
//            if (expDataType.getIsArray() != argDataType.getIsArray() ||
//                expDataType.getType() != argDataType.getType()) {
            if (expDataType.getType() != argDataType.getType()) {
              typeNotEqual = true;
              break;
            }
          }
          if (typeNotEqual) {
            continue;
          }
           
          break;
          }

        if (methodSym == null) {
          throw new SPLException("invokeClassMethod failed: " + methodName + "does not exit");
        }

            List argTypeList = methodSym.getArgumentList();

            for (int i = 0; i < paramList.size(); i++)
            {
                Expression exp = (Expression) paramList.get(i);

                if (exp instanceof AssignmentExpression) {
                    //System.out.println("assignment Expression");
                    Expression lhsExpression = null;
                    Expression rhsExpression = null;

                    AssignmentExpression assignmentExpression = (AssignmentExpression) exp;
                    if (assignmentExpression.getLHSExpression() instanceof org.apache.imperius.spl.core.Expression)
                    {
                        lhsExpression = (Expression) assignmentExpression
                                .getLHSExpression();
                    }
                    if (assignmentExpression.getRHSExpression() instanceof org.apache.imperius.spl.core.Expression) {
                        rhsExpression = (Expression) assignmentExpression
                                .getRHSExpression();
                    }
                    if ((lhsExpression == null) || (rhsExpression == null))
                    {
                        logger
                                .severe("LHS or RHS or argument in method call is null : "
                                        + lhsExpression.toString()
                                        + " "
                                        + rhsExpression);

                        throw new SPLException(Messages.getString(
                "SPL_ASSIGNMENT_EXP_EXCEPTION_MSG",
                new Object[] { lhsExpression, rhsExpression }));
                    }
                    //System.out.println("lhsExpression class "+ lhsExpression.getClass());
                    //System.out.println("lhsExpression getPropertyName() "+ ((PrimaryExpression) lhsExpression).getPropertyName());
                    // ((PrimaryExpression)lhsExpression).getPropertyName();

                    String keyName = ((PrimaryExpression) lhsExpression)
                            .getclassNameOrInstanceVariableName();
                    //System.out.println("argument name= " + keyName);

                    Object keyValue = rhsExpression.evaluate();
                    //System.out.println("argument value= " + keyValue);

                    String referenceTypeName = "";

                    if (TypeResolver.isReference(rhsExpression.getType()))
                    {

                        referenceTypeName = rhsExpression.getType()
                                .getReferenceTypeName();
                       
                    }

                    if (keyValue != null)
                    {
                        Argument arg = new ArgumentImpl(rhsExpression.getType()
                                .getType(), keyName, rhsExpression.isArray(),
                                referenceTypeName);
                        arg.setValue(keyValue);

                        //System.out.println("created new arg :"+keyName+" "+keyValue.toString());
                        /*
                         * Expression expression=(Expression)pList.get(i); String
                         * nameAndValue=(String)expression.evaluate(); Key
                         */
                        parameterObjects.add(arg);
                    }

                }
                else
                {
                    Object result = exp.evaluate();
                    boolean isArgCreated = false;
                    if(argTypeList != null && argTypeList.size() > 0)
                    {
                      Argument tempArg = null;
                      if(i < argTypeList.size())
                      {
                        tempArg = (Argument)argTypeList.get(i);
                        if(TypeResolver.isReference(tempArg.getType()))
                        {
                          if (TypeResolver.OBJECT_STRING.equals(tempArg
                    .getType().getReferenceTypeName())
                    && TypeResolver.isString(exp.getType()))
                          {
                  Argument arg = new ArgumentImpl(tempArg
                      .getType().getType(), null, tempArg
                      .getType().getIsArray(),
                      TypeResolver.OBJECT_STRING);
                  arg.setValue(result);
                  parameterObjects.add(arg);
                  isArgCreated = true;
                }
                        }
                      }
                      else
                      {
                        // throw exception
                      }
                    }
                    if(!isArgCreated)
                    {
                      //Xiping 05/29/09
                      //get isArray flag from the formal argument list if available
                      boolean flag = exp.isArray();
                      if(argTypeList != null && i < argTypeList.size()) {
              flag = ((Argument)argTypeList.get(i)).getType().getIsArray();
            }
//                     
                      Argument arg = new ArgumentImpl(exp.getType().getType(),
//                              null, exp.isArray(), null);
                              null, flag, null);
                      arg.setValue(result);
                      parameterObjects.add(arg);
                    }
                }
            }

View Full Code Here

Examples of org.apache.imperius.spl.parser.statements.impl.ArgumentImpl

       
        if(type == TypeConstants.referenceType)
        { 
          referenceTypeName = CIMSPLTypeConstants.getReferenceTypeName(cimparameter.getName());
        }
        Argument arg=new ArgumentImpl(type, parameterName, isArray, referenceTypeName);
       
        methodArgsSymbolTable.insertVariableSymbol(parameterName, type, referenceTypeName, isArray, false, false);
        //System.out.println(" inserted variable symbol into methodArgsSymbolTable "+parameterName);
        methodArgs.add(arg);
      }
View Full Code Here

Examples of org.kohsuke.args4j.spi.ArgumentImpl

      for(ConfigElement ce : config.options) {
        Option option = new OptionImpl(ce);
                parser.addOption(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), option);
      }
      for (ConfigElement ce : config.arguments) {
        Argument argument = new ArgumentImpl(ce);
        parser.addArgument(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), argument);
      }
    } catch (Exception e) {
      throw new RuntimeException(Messages.METADATA_ERROR.format(), e);
    }
View Full Code Here

Examples of org.kohsuke.args4j.spi.ArgumentImpl

      for(ConfigElement ce : config.options) {
        Option option = new OptionImpl(ce);
                parser.addOption(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), option);
      }
      for (ConfigElement ce : config.arguments) {
        Argument argument = new ArgumentImpl(ce);
        parser.addArgument(Setters.create(parser, findMethodOrField(bean, ce.field, ce.method),bean), argument);
      }
    } catch (Exception e) {
      throw new RuntimeException(Messages.METADATA_ERROR.format(), e);
    }
View Full Code Here

Examples of railo.runtime.type.scope.ArgumentImpl

    public Object onMissingMethod(PageContext pc, int access,Member member,String name,Object _args[],Struct _namedArgs, boolean superAccess) throws PageException {
      Member ommm = access==-1?
          getMember(pc,KeyConstants._onmissingmethod,false, superAccess):
          getMember(access,KeyConstants._onmissingmethod,false, superAccess);
        if(ommm instanceof UDF) {
          Argument args=new ArgumentImpl();
          if(_args!=null) {
            for(int i=0;i<_args.length;i++) {
              args.setEL(ArgumentIntKey.init(i+1), _args[i]);
            }
          }
          else if(_namedArgs!=null) {
            UDFUtil.argumentCollection(_namedArgs, new FunctionArgument[]{});
           
            Iterator<Entry<Key, Object>> it = _namedArgs.entryIterator();
            Entry<Key, Object> e;
            while(it.hasNext()){
              e = it.next();
              args.setEL(e.getKey(),e.getValue());
            }
           
          }
         
          //Struct newArgs=new StructImpl(StructImpl.TYPE_SYNC);
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.