Package com.sun.codemodel

Examples of com.sun.codemodel.JDefinedClass.annotate()


       
        JDefinedClass servCls = model._class(portName);
        servCls._extends(javax.xml.ws.Service.class);
       
        String wsdlUrl = context.getWsdlLocation();
        JAnnotationUse clientAnn = servCls.annotate(WebServiceClient.class);
        clientAnn.param("targetNamespace", ns);
        clientAnn.param("name", name);
        clientAnn.param("wsdlLocation", wsdlUrl);
       
        JType qnameType = model._ref(QName.class);
View Full Code Here


            constructor6.varParam(WebServiceFeature.class, "features");
            constructor6.body().directStatement("super(wsdlLocation, serviceName, features);");
        }

        //@WebService
        JAnnotationUse webServiceClientAnn = cls.annotate(cm.ref(WebServiceClient.class));
        writeWebServiceClientAnnotation(service, webServiceClientAnn);

        //@HandlerChain
        writeHandlerConfig(Names.customJavaTypeClassName(service.getJavaInterface()), cls, options);
View Full Code Here

        }
       
        cls._extends(java.lang.Exception.class);

        //@WebFault
        JAnnotationUse faultAnn = cls.annotate(WebFault.class);
        faultAnn.param("name", fault.getBlock().getName().getLocalPart());
        faultAnn.param("targetNamespace", fault.getBlock().getName().getNamespaceURI());

        JType faultBean = fault.getBlock().getType().getJavaType().getType().getType();
View Full Code Here

            } catch (MirroredTypeException e) {
                lead = e.getTypeMirror().toString();
            }

            JDefinedClass seed = cm._class(clz.getQualifiedName()+"Seed");
            JAnnotationUse a = seed.annotate(CompanionSeed.class);

            a.param("lead",cm.ref(lead));
            a.param("companion",cm.ref(clz.getQualifiedName()));
        } catch (JClassAlreadyExistsException e) {
            env.getMessager().printError(clz.getPosition(),e.toString());
View Full Code Here

        }
       
        cls._extends(java.lang.Exception.class);

        //@WebFault
        JAnnotationUse faultAnn = cls.annotate(WebFault.class);
        faultAnn.param("name", fault.getBlock().getName().getLocalPart());
        faultAnn.param("targetNamespace", fault.getBlock().getName().getNamespaceURI());

        JType faultBean = fault.getBlock().getType().getJavaType().getType().getType();
View Full Code Here

            constructor6.varParam(WebServiceFeature.class, "features");
            constructor6.body().directStatement("super(wsdlLocation, serviceName, features);");
        }

        //@WebService
        JAnnotationUse webServiceClientAnn = cls.annotate(cm.ref(WebServiceClient.class));
        writeWebServiceClientAnnotation(service, webServiceClientAnn);

        // additional annotations
        for (GeneratorExtension f:ServiceFinder.find(GeneratorExtension.class)) {
            f.writeWebServiceClientAnnotation(options, cm, cls);
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.