Package org.apache.ws.jaxme.js

Examples of org.apache.ws.jaxme.js.Parameter


                            JavaField pLevelVar) throws SAXException {
      if (!pController.hasSimpleContent()) {
          return null;
      }
      JavaMethod jm = pSource.newJavaMethod("characters", void.class, JavaSource.PUBLIC);
      Parameter buffer = jm.addParam(char[].class, "pChars");
      Parameter offset = jm.addParam(int.class, "pOffset");
      Parameter length = jm.addParam(int.class, "pLength");
      jm.addThrows(SAXException.class);
      jm.addIf(pLevelVar, " == 1");
      jm.addLine("__content.append(", buffer, ", ", offset, ", ", length, ");");
      jm.addEndIf();
      return jm;
View Full Code Here


          throw new IllegalStateException("No such placeholder: 'GroupSG' in method 'startElement'");
      }
      placeHolder.remove();

      Parameter[] parameters = jm.getParams();
      Parameter pNamespaceURI = parameters[0];
      Parameter pLocalName = parameters[1];
      Parameter pQName = parameters[2];
      Parameter pAttr = parameters[3];
     
      jm.addCase("1");
      Set namespaces = new HashSet();
      for (int i = 0;  i < myParticles.length;  i++) {
          ParticleSG child = myParticles[i];
View Full Code Here

    }
        if (ccSG != null) {
            return null;
        }
    JavaMethod jm = getJavaSource().newJavaMethod("addText", void.class, JavaSource.PUBLIC);
    Parameter buffer = jm.addParam(char[].class, "pBuffer");
    Parameter offset = jm.addParam(int.class, "pOffset");
    Parameter length = jm.addParam(int.class, "pLength");
    jm.addLine(outerHandler.getJavaSource().getQName(), ".this.addText(",
            buffer, ", ", offset, ", ", length, ");");
        return jm;
    }
View Full Code Here

    JavaField jf = js.newJavaField("jaxbContext", JAXBContextImpl.class, "private");
    JavaField properties = js.newJavaField("properties", Map.class, "private");

    JavaMethod newInstanceMethod = js.newJavaMethod("newInstance", Object.class, "public");
    newInstanceMethod.addThrows(JAXBException.class);
    Parameter pElementInterface = newInstanceMethod.addParam(Class.class, "pElementInterface");
    newInstanceMethod.addLine("return ", jf, ".getManager(", pElementInterface, ").getElementJ();");

    {
      JavaMethod getPropertyMethod = js.newJavaMethod("getProperty", Object.class, "public");
      Parameter pName = getPropertyMethod.addParam(String.class, "pName");
      getPropertyMethod.addIf(properties, " == null");
      getPropertyMethod.addLine("return null;");
      getPropertyMethod.addEndIf();
      getPropertyMethod.addLine("return ", properties, ".get(", pName, ");");
    }

    {
      JavaMethod setPropertyMethod = js.newJavaMethod("setProperty", void.class, "public");
      Parameter pName = setPropertyMethod.addParam(String.class, "pName");
      Parameter pValue = setPropertyMethod.addParam(Object.class, "pValue");
      setPropertyMethod.addIf(properties, " == null");
      setPropertyMethod.addLine(properties, " = new ", HashMap.class, "();");
      setPropertyMethod.addEndIf();
      setPropertyMethod.addLine(properties, ".put(", pName, ", ", pValue, ");");
    }
View Full Code Here

         jm.addParam(parameters[i]);
       }
       List callParameters = new ArrayList();
       callParameters.add("pController");
       for (int i = 0;  i < parameters.length;  i++) {
         Parameter parameter = parameters[i];
         callParameters.add(", ");
         callParameters.add(parameter.getName());
       }
        jm.addLine((JavaQNameImpl.VOID.equals(pMethod.getType()) ? "" : "return "),
               "backingObject.",
              pMethod.getName(), "(", callParameters, ");");
       return jm;
View Full Code Here

       JavaMethod jm = pSource.newJavaMethod(pMethod);
       Parameter[] parameters = jm.getParams();
       List callParameters = new ArrayList();
       callParameters.add("this");
       for (int i = 0;  i < parameters.length;  i++) {
         Parameter parameter = parameters[i];
         callParameters.add(", ");
         callParameters.add(parameter.getName());
       }
       jm.addLine((JavaQNameImpl.VOID.equals(pMethod.getType()) ? "" : "return "),
           "backingObject.",
           pMethod.getName(), "(", callParameters, ");");
       return jm;
View Full Code Here

        JavaQName typeQName = getQName(typeName);
        return pMethod.addParam(typeQName, paramName);
    }

    private void parseParameter(AbstractJavaMethod pMethod, AST pAST) {
        Parameter param = getParameter(pMethod, pAST);
        parseModifiers(param, pAST);
    }
View Full Code Here

       JavaMethod jm = pSource.newJavaMethod(pMethod);
       Parameter[] parameters = jm.getParams();
       List callParameters = new ArrayList();
       callParameters.add("this");
       for (int i = 0;  i < parameters.length;  i++) {
         Parameter parameter = parameters[i];
         callParameters.add(", ");
         callParameters.add(parameter.getName());
       }
       jm.addLine((Void.TYPE.equals(pMethod.getReturnType()) ? "" : " return "),
           "backingObject.",
           pMethod.getName(), "(", callParameters, ");");
       return jm;
View Full Code Here

                                            Method pMethod) {
     JavaMethod jm = pJs.newJavaMethod(pMethod);
      Parameter[] parameters = jm.getParams();
    List callParameters = new ArrayList();
      for (int i = 0;  i < parameters.length;  i++) {
      Parameter parameter = parameters[i];
        if (callParameters.size() > 0) {
          callParameters.add(", ");
        }
        callParameters.add(parameter.getName());
      }
    jm.addLine((Void.TYPE.equals(pMethod.getReturnType()) ? "" : " return "),
            "((", pInterfaceDescription.getInterface(), ") backingObject).",
            pMethod.getName(), "(", callParameters, ");");
    return jm;
View Full Code Here

         jm.addParam(parameters[i]);
       }
       List callParameters = new ArrayList();
       callParameters.add("pController");
       for (int i = 0;  i < parameters.length;  i++) {
         Parameter parameter = parameters[i];
         callParameters.add(", ");
         callParameters.add(parameter.getName());
       }
       jm.addLine((Void.TYPE.equals(pMethod.getReturnType()) ? "" : " return "),
           "backingObject.",
           pMethod.getName(), "(", callParameters, ");");
       return jm;
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.js.Parameter

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.