Package com.sun.codemodel

Examples of com.sun.codemodel.JCodeModel.ref()


        geBody._return(geInvoke);
       
        /**
         * Collection getEndpoints()
         */
        JType collectionType = model.ref(Collection.class);
        JMethod getEndpoints = servCls.method(JMod.PUBLIC, collectionType, "getEndpoints");
        geBody = getEndpoints.body();
       
        geBody._return(endpointsVar.invoke("values"));
       
View Full Code Here


       
        /*
         * Add endpoints to constructor
         */
        JBlock consBody = constructor.body();
        JType qnameType = model.ref(QName.class);
       
        JDefinedClass serviceIntf = (JDefinedClass) service.getProperty(ServiceInterfaceGenerator.SERVICE_INTERFACE);

        JInvocation addEndpointInv = serviceVar.invoke("addEndpoint");
        JInvocation newQN = JExpr._new(qnameType);
View Full Code Here

        addEndpointInv.arg(newQN);
        addEndpointInv.arg(bindingQN);
        addEndpointInv.arg(endpoint.getUrl());

        JType endpointType = model.ref(Endpoint.class);
        JVar epVar = consBody.decl(endpointType, javify(endpoint.getName().getLocalPart()) + "EP", addEndpointInv);

        JInvocation addEndpoint = endpointsVar.invoke("put").arg(newQN).arg(epVar);
        consBody.add(addEndpoint);
       
View Full Code Here

    JClass xmlMixedModelClass = codeModel.ref(XmlMixed.class);
    JClass xmlElementRefModelClass = codeModel.ref(XmlElementRef.class);
    JClass xmlElementRefsModelClass = codeModel.ref(XmlElementRefs.class);
    JClass xmlElementsModelClass = codeModel.ref(XmlElements.class);
    JClass xmlJavaTypeAdapterModelClass = codeModel.ref(XmlJavaTypeAdapter.class);
    JClass xmlTypeModelClass = codeModel.ref(XmlType.class);
    xmlElementDeclModelClass = codeModel.ref(XmlElementDecl.class);

    logger.debug("JAXB Process Model (run)...");

    Configuration globalConfiguration = new Configuration(logger);
View Full Code Here

    JClass xmlElementRefModelClass = codeModel.ref(XmlElementRef.class);
    JClass xmlElementRefsModelClass = codeModel.ref(XmlElementRefs.class);
    JClass xmlElementsModelClass = codeModel.ref(XmlElements.class);
    JClass xmlJavaTypeAdapterModelClass = codeModel.ref(XmlJavaTypeAdapter.class);
    JClass xmlTypeModelClass = codeModel.ref(XmlType.class);
    xmlElementDeclModelClass = codeModel.ref(XmlElementDecl.class);

    logger.debug("JAXB Process Model (run)...");

    Configuration globalConfiguration = new Configuration(logger);
View Full Code Here

        List<JClass> fieldTypeParametrisations = candidate.getFieldClass().getTypeParameters();

        // Create the new interface and collection classes using the specified interface and
        // collection classes (configuration) with an element type corresponding to
        // the element type from the collection present in the candidate class (narrowing).
        JClass collectionInterfaceClass = codeModel.ref(fieldConfiguration.getCollectionInterfaceClass())
                    .narrow(fieldTypeParametrisations);
        JClass collectionImplClass = codeModel.ref(fieldConfiguration.getCollectionImplClass()).narrow(
                    fieldTypeParametrisations);

        boolean pluralFormWasApplied = false;
View Full Code Here

        // Create the new interface and collection classes using the specified interface and
        // collection classes (configuration) with an element type corresponding to
        // the element type from the collection present in the candidate class (narrowing).
        JClass collectionInterfaceClass = codeModel.ref(fieldConfiguration.getCollectionInterfaceClass())
                    .narrow(fieldTypeParametrisations);
        JClass collectionImplClass = codeModel.ref(fieldConfiguration.getCollectionImplClass()).narrow(
                    fieldTypeParametrisations);

        boolean pluralFormWasApplied = false;

        // Apply the plural form if there are no customizations. Assuming that customization is correct as may define the
View Full Code Here

    }
  }

  private void runInternal(Outline outline) throws IOException, ClassNotFoundException {
    JCodeModel codeModel = outline.getCodeModel();
    JClass xmlElementWrapperModelClass = codeModel.ref(XmlElementWrapper.class);
    JClass xmlElementModelClass = codeModel.ref(XmlElement.class);
    JClass xmlAnyElementModelClass = codeModel.ref(XmlAnyElement.class);
    JClass xmlMixedModelClass = codeModel.ref(XmlMixed.class);
    JClass xmlElementRefModelClass = codeModel.ref(XmlElementRef.class);
    JClass xmlElementRefsModelClass = codeModel.ref(XmlElementRefs.class);
View Full Code Here

  }

  private void runInternal(Outline outline) throws IOException, ClassNotFoundException {
    JCodeModel codeModel = outline.getCodeModel();
    JClass xmlElementWrapperModelClass = codeModel.ref(XmlElementWrapper.class);
    JClass xmlElementModelClass = codeModel.ref(XmlElement.class);
    JClass xmlAnyElementModelClass = codeModel.ref(XmlAnyElement.class);
    JClass xmlMixedModelClass = codeModel.ref(XmlMixed.class);
    JClass xmlElementRefModelClass = codeModel.ref(XmlElementRef.class);
    JClass xmlElementRefsModelClass = codeModel.ref(XmlElementRefs.class);
    JClass xmlElementsModelClass = codeModel.ref(XmlElements.class);
View Full Code Here

  private void runInternal(Outline outline) throws IOException, ClassNotFoundException {
    JCodeModel codeModel = outline.getCodeModel();
    JClass xmlElementWrapperModelClass = codeModel.ref(XmlElementWrapper.class);
    JClass xmlElementModelClass = codeModel.ref(XmlElement.class);
    JClass xmlAnyElementModelClass = codeModel.ref(XmlAnyElement.class);
    JClass xmlMixedModelClass = codeModel.ref(XmlMixed.class);
    JClass xmlElementRefModelClass = codeModel.ref(XmlElementRef.class);
    JClass xmlElementRefsModelClass = codeModel.ref(XmlElementRefs.class);
    JClass xmlElementsModelClass = codeModel.ref(XmlElements.class);
    JClass xmlJavaTypeAdapterModelClass = codeModel.ref(XmlJavaTypeAdapter.class);
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.