Examples of JavaSource


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

    /** Creates a new client class, which is invoking the given
     * server side class <code>pSource</code>.
     */
    public JavaSource addClass(JavaSource pSource, JavaSourceResolver pResolver)
            throws SecurityException, NoSuchMethodException {
        JavaSource js = getFactory().newJavaSource(JavaQNameImpl.getInstance(getTargetPackage(), pSource.getQName().getClassName()), JavaSource.PUBLIC);
        JavaField jf = getXmlRpcCaller(js);
        getConstructor(js, jf);
        Map keys = new HashMap();
        addMethods(js, pSource, keys, jf, pResolver);
        return js;
View Full Code Here

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

            }
        }
        if (pResolver != null) {
            JavaQName[] qNames = pSource.getExtends();
            for (int i = 0;  i < qNames.length;  i++) {
              JavaSource js = pResolver.getJavaSource(qNames[i]);
                if (js != null) {
                  addMethods(pResult, js, pKeys, pField, pResolver);
                }
            }
        }
View Full Code Here

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

        int num = 0;
        for (Iterator iter = methods.entrySet().iterator();  iter.hasNext()) {
            Map.Entry entry = (Map.Entry) iter.next();
            String name = (String) entry.getKey();
            JavaMethod method = (JavaMethod) entry.getValue();
            JavaSource innerClass = getInvoker(pSource, method, pInvoker, num++);
            con.addLine(pMap, ".put(", JavaSource.getQuoted(name), ", new ", innerClass.getQName(), "());");
        }
        return con;
    }
View Full Code Here

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

    /** Creates the dispatcher class. Make sure, that this method
     * is invoked <em>after</em> {@link #addClass(JavaSource, JavaSourceResolver)}!
     * @param pQName Fully qualified class name of the dispatcher class.
     */
    public JavaSource getDispatcher(JavaQName pQName) {
      JavaSource js = getFactory().newJavaSource(pQName, JavaSource.PUBLIC);
        if (isDispatcherImplementsXmlRpcHandler()) {
          js.addImport(JavaQNameImpl.getInstance("org.apache.xmlrpc.XmlRpcHandler", true));
        }
      JavaComment comment = js.newComment();
        comment.addLine("The dispatcher is being used by the XmlRpcServer.");
        comment.addLine("It delegates incoming XML-RPC calls to the classes");
        comment.addLine("and methods, for which client classes have been");
        comment.addLine("created by the " +
                        XmlRpcClientGenerator.class.getName() + ".");
        JavaSource invoker = getInvokerClass(js);
        JavaField map = getInvokerMap(js);
        getDispatcherConstructor(js, map, invoker.getQName());
        getGetInvokerMethod(js, invoker.getQName(), map);
        getDispatcherInvokeMethod(js, invoker.getQName());
        return js;
    }
View Full Code Here

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

            throws RecognitionException, TokenStreamException, IOException {
        if (pNames.contains(pQName)) {
          return;
        }
        pNames.add(pQName);
        JavaSource js = loadSource(Thread.currentThread().getContextClassLoader(),
                               pQName.toString(), pFactory);
        if (js == null) {
          return;
        }
        pSources.add(js);
        JavaQName[] superInterfaces = js.getExtends();
        for (int i = 0;  i < superInterfaces.length;  i++) {
          loadSources(pClassLoader, superInterfaces[i],
                        pFactory, pSources, pNames);
        }
    }
View Full Code Here

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

         controllerDescription.setMandatory(true);
         interfaces[i] = controllerDescription;
      }

      ProxyGenerator proxyInterfaceGenerator = new ProxyInterfaceGenerator();
      JavaSource proxyInterface = proxyInterfaceGenerator.generate(pFactory, getChainInterface(), interfaces);
      proxyInterface.setType(JavaSource.INTERFACE);

      ProxyGenerator proxyImpGenerator = new ProxyImplementationGenerator();
      JavaSource proxyImplementation = proxyImpGenerator.generate(pFactory, getProxyClass(), interfaces);

      ProxyGenerator controllerImplementationGenerator = new ControllerImplementationGenerator();
      JavaSource controllerImplementation = controllerImplementationGenerator.generate(pFactory, getImplementationClass(), interfaces);

      return new JavaSource[]{controllerImplementation, proxyInterface, proxyImplementation};
   }
View Full Code Here

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

      SchemaSG schemaSG = generator.generate(schemaFiles[i]);
          if (producesFilesSet != null) {
            JavaSourceFactory jsf = schemaSG.getJavaSourceFactory();
            File targetDirectory = getTarget();
            for (Iterator iter = jsf.getJavaSources();  iter.hasNext()) {
              JavaSource js = (JavaSource) iter.next();
              File f = jsf.getLocation(targetDirectory, js).getAbsoluteFile();
              producesFilesSet.remove(f);
            }
            for (Iterator iter = jsf.getTextFiles();  iter.hasNext()) {
              TextFile tf = (TextFile) iter.next();
View Full Code Here

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

      return;
    }
    CustomTableData customTableData = (CustomTableData) pController.getProperty(jdbcSG.getKey());
    if (customTableData != null) {
      JavaQName qName = pController.getComplexTypeSG().getClassContext().getPMName();
      JavaSource js = pController.getSchema().getJavaSourceFactory().newJavaSource(qName, JavaSource.PUBLIC);
      getPMClass(pController, js, customTableData);
    }
  }
View Full Code Here

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

  public boolean isSequence(GroupSG pController) { return isSequence; }

  public JavaSource getXMLInterface(GroupSG pController) throws SAXException {
    JavaQName qName = pController.getClassContext().getXMLInterfaceName();
    JavaSourceFactory jsf = getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(qName, JavaSource.PUBLIC);
    js.setType(JavaSource.INTERFACE);
    pController.generateProperties(js);
    return js;
  }
View Full Code Here

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


  public JavaSource getXMLImplementation(GroupSG pController) throws SAXException {
    JavaQName qName = pController.getClassContext().getXMLImplementationName();
    JavaSourceFactory jsf = getSchema().getJavaSourceFactory();
    JavaSource js = jsf.newJavaSource(qName, JavaSource.PUBLIC);
    js.addImplements(pController.getClassContext().getXMLInterfaceName());
    pController.generateProperties(js);
    return js;
  }
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.