Examples of FormalParameter


Examples of de.danet.an.workflow.api.FormalParameter

    }
    if (fpMode != FormalParameter.Mode.IN) {
        resultSignature.put (fpId, dtc);
    }
    contextSignature.put (fpId, dtc);
    fps.add (new FormalParameter
       (fpId, Integer.toString(fpIdx++), fpMode, dtc));
      } else if (loc.equals ("FormalParameters")) {
    formalParams = (FormalParameter[])
        fps.toArray(new FormalParameter[fps.size()]);
      }
View Full Code Here

Examples of de.danet.an.workflow.api.FormalParameter

  }
  int index = 0;
  for (Iterator formParamIter = subFlowFormalParams.iterator();
       formParamIter.hasNext(); index ++) {
      Element fpElem = (Element)formParamIter.next();
      FormalParameter fp = new FormalParameter
    (fpElem.getAttributeValue("Id"), Integer.toString(index),
     FormalParameter.Mode.fromString
     (fpElem.getAttributeValue("Mode")),
     XPDLUtil.extractDataType
     (fpElem.getChild("DataType", xpdlns)));
      String actParam = ((String)actualParams.get(index)).trim();
      if (callerFpMap.containsKey(actParam)) {
    // check the mode of the formal parameter of the calling
    // process
    String callerParamMode = (String)callerFpMap.get(actParam);
    if (callerParamMode.indexOf(fp.mode().toString()) == -1){
        eh.add (new PrioritizedMessage
          (PrioritizedMessage.Priority.ERROR, bundleBase
           + "#procdef.activity.subflow.parammode.notmatched",
           new Object [] {
        subFlowId, actParam, callerParamMode,
        fp.mode().toString(), activityId,
        processId}));
        return false;
    }
      }
      if (procdataMap.containsKey(actParam)) {
                boolean compat = true;
                if (fp.mode().equals(FormalParameter.Mode.IN)
                    || fp.mode().equals(FormalParameter.Mode.INOUT)) {
                    compat = typeCompatible
                        (fp.type(), XPDLUtil.extractDataType
                         (((ProcData)procdataMap.get(actParam)).dataType));
                }
                if (fp.mode().equals(FormalParameter.Mode.OUT)
                    || fp.mode().equals(FormalParameter.Mode.INOUT)) {
                    compat = compat && typeCompatible
                        (XPDLUtil.extractDataType
                         (((ProcData)procdataMap.get(actParam)).dataType),
                         fp.type());
                }
    if (!compat) {
        String[] errDatas = {subFlowId, activityId, processId};
        eh.add (new PrioritizedMessage
          (PrioritizedMessage.Priority.ERROR, bundleBase
           + "#procdef.activity.subflow"
           + ".paramdatatype.notmatched", errDatas));
        return false;
    }
      } else {
    if (fp.mode() != FormalParameter.Mode.IN) {
        eh.add
      (new PrioritizedMessage
       (PrioritizedMessage.Priority.ERROR, bundleBase
        + "#procdef.activity.subflow.datanotfound",
        new Object[] {subFlowId, actParam, activityId,
          processId}));
        return false;
    }
    if (XPDLUtil.isXMLType (fp.type())) {
        String res = notXMLOrValid (actParam);
        if (res != null) {
      eh.add
          (new PrioritizedMessage
           (PrioritizedMessage.Priority.ERROR, bundleBase
View Full Code Here

Examples of de.danet.an.workflow.api.FormalParameter

  throws InvalidDataException {
  try {
      ProcessData pd = new DefaultProcessData ();
      Set items = new HashSet (result.keySet());
      for (int i = 0; i < fps.length; i++) {
    FormalParameter fp = fps[i];
    if (fp.mode() == FormalParameter.Mode.IN) {
        continue;
    }
    Object actParam = actualParameters()[i];
    if (!result.containsKey(fp.id())) {
        throw new InvalidDataException
      ("Result does not include out parameter \""
       + fp.id() + "\".");
    }
    pd.put (actParam, result.get(fp.id()));
    items.remove (fp.id());
      }
      if (items.size() > 0) {
    Iterator itr = items.iterator();
    throw new InvalidDataException
        ("Result includes excessive parameter \""
View Full Code Here

Examples of de.danet.an.workflow.api.FormalParameter

      if (loc.equals ("Description")) {
    description = text();
      } else if (loc.equals ("FormalParameter")) {
    Object dtc = removeContextData ("DataType");
    String index = (new Integer(fpIndex++)).toString();
    fpList.add (new FormalParameter(fpId, index, fpMode, dtc));
      } else if (loc.equals ("FormalParameters")) {
    formalParameters = (FormalParameter[])fpList
        .toArray(new FormalParameter[fpList.size()]);
    fpList = null;
      } else if (XPDLUtil.isXpdlExtNs(uri)
View Full Code Here

Examples of de.danet.an.workflow.api.FormalParameter

        ProcessData res = processContext();
        FormalParameter[] fps
      = processDefinition().formalParameters();
        ProcessData pd = new ProcessDataWithParams (fps);
        for (int i = 0; i < fps.length; i++) {
      FormalParameter fp = fps[i];
      if (fp.mode() == FormalParameter.Mode.IN) {
          continue;
      }
      String fpn = fps[i].id();
      pd.put (fpn, res.get (fpn));
        }
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.FormalParameter

  {
    ArrayList<FormalParameter> parameters = new ArrayList<FormalParameter>();
   
    for(ParameterInfo parameter : fExtractedMethodParameters)
    {
      FormalParameter formalParameter = new FormalParameter(ast);
     
      Expression variable = ast.newVariable(parameter.getParameterName());
     
      if(passByReference(parameter.getParameterName())) {
        variable = ast.newReference(variable);
      }
     
      formalParameter.setParameterName(variable);
     
      if(parameter.getParameterDefaultValue() != null && !parameter.getParameterDefaultValue().isEmpty()) {
        formalParameter.setDefaultValue(ast.newScalar(parameter.getParameterDefaultValue()));
      }
     
      if(fAddTypeHint && parameter.getParameterType() != null && !parameter.getParameterType().isEmpty()) {
        formalParameter.setParameterType(ast.newIdentifier(parameter.getParameterType()));
      }
     
      parameters.add(formalParameter);
    }
     
View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.FormalParameter

        }

        for (Object argument : currentMethod.getArguments()) {
            /* public function (Form $form) { } */
            if (argument instanceof FormalParameter) {
                FormalParameter param = (FormalParameter) argument;

                if (param.getParameterType() instanceof FullyQualifiedReference) {

                    FullyQualifiedReference ref = (FullyQualifiedReference) param.getParameterType();
                    NamespaceReference nsRef = createFromFQCN(ref);

                    if (nsRef != null) {
                        TemplateVariable tempVar= new TemplateVariable(currentMethod, param.getName(), param.sourceStart(), param.sourceEnd(), nsRef.namespace, nsRef.className);
                        deferredVariables.push(tempVar);
                    }

                /* public function ($somevar) { } */
                } else {
                    TemplateVariable tempVar= new TemplateVariable(currentMethod, param.getName(), param.sourceStart(), param.sourceEnd(), null, null);
                    deferredVariables.push(tempVar);
                }
            }
        }

View Full Code Here

Examples of org.eclipse.php.internal.core.compiler.ast.nodes.FormalParameter

        JSONArray args = new JSONArray();

        for (Object o : arguments) {

            FormalParameter param = (FormalParameter) o;

            if (param == null)
                continue;

            JSONObject arg = new JSONObject();
            ASTNode init = param.getInitialization();

            String defaultValue = init != null
                    ? init.getClass().toString()
                    : "";

            if (init instanceof Scalar) {
                Scalar scalar = (Scalar) init;
                defaultValue = scalar.getValue();

            }

            this.arguments.put(param.getName(), defaultValue);
            arg.put(param.getName(), defaultValue);
            args.add(arg);

        }

        filterArguments = args;
View Full Code Here

Examples of org.enhydra.shark.xpdl.elements.FormalParameter

         FormalParameters fps=app.getApplicationTypes().getFormalParameters();
         Map m=createContextMap(aps,fps);
         Iterator itFps=fps.toElements().iterator();
         Iterator itAps=aps.toElements().iterator();
         while (itFps.hasNext() && itAps.hasNext()) {
            FormalParameter fp=(FormalParameter)itFps.next();
            ActualParameter ap=(ActualParameter)itAps.next();
            String fpMode=fp.getMode();
            String fpId=fp.getId();
            Object paramVal=m.get(fpId);

            param=new AppParameter(ap.toValue(),fpId,fpMode,paramVal,SharkUtilities.getJavaClass(fp));
            parameters.add(param);
         }
View Full Code Here

Examples of org.enhydra.shark.xpdl.elements.FormalParameter

         FormalParameters fps=app.getApplicationTypes().getFormalParameters();
         Map m=createContextMap(aps,fps);
         Iterator itFps=fps.toElements().iterator();
         Iterator itAps=aps.toElements().iterator();
         while (itFps.hasNext() && itAps.hasNext()) {
            FormalParameter fp=(FormalParameter)itFps.next();
            ActualParameter ap=(ActualParameter)itAps.next();
            String fpMode=fp.getMode();
            String fpId=fp.getId();
            Object paramVal=m.get(fpId);

            param=new AppParameter(ap.toValue(),fpId,fpMode,paramVal,SharkUtilities.getJavaClass(fp));
            parameters.add(param);
         }
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.