Package com.sun.tools.ws.processor.model.java

Examples of com.sun.tools.ws.processor.model.java.JavaInterface


        if (port.isProvider()) {
          continue; // Not generating for Provider based endpoint
        }
        SEIInfo seiInfo = new SEIInfo();

        JavaInterface intf = port.getJavaInterface();
        // fqn class name
        String className = intf.getName();
        // If the interface has already been defined, just skip it.
        if (interfaceClassNames.contains(className)) {
          continue;
        }
        interfaceClassNames.add(className);
       
        // package name of this interface
        String packageName = ClassNameUtil.getPackageName(className);
        seiInfo.setPackageName(packageName);
        // simple class name
        // String simpleName = intf.getSimpleName();
        String simpleName = ClassNameUtil.stripQualifier(className);
        seiInfo.setName(simpleName);
        // java doc of this interface
        String ptDoc = intf.getJavaDoc();
        seiInfo.setDocComment(ptDoc);
       
        // @WebService
        seiInfo.setWebServiceAnnotation(getWebServiceAnnotation(port));
       
View Full Code Here


        super(model, options, receiver);
    }

    @Override
    public void visit(Service service) {
        JavaInterface intf = service.getJavaInterface();
        String className = Names.customJavaTypeClassName(intf);
        if (donotOverride && GeneratorUtil.classExists(options, className)) {
            log("Class " + className + " exists. Not overriding.");
            return;
        }
View Full Code Here

        this.extension = new JavaGeneratorExtensionFacade(extensionHandlers.toArray(new TJavaGeneratorExtension[0]));
    }

    private void write(Port port) {
        JavaInterface intf = port.getJavaInterface();
        String className = Names.customJavaTypeClassName(intf);

        if (donotOverride && GeneratorUtil.classExists(options, className)) {
            log("Class " + className + " exists. Not overriding.");
            return;
        }


        JDefinedClass cls = null;
        try {
            cls = getClass(className, ClassType.INTERFACE);
        } catch (JClassAlreadyExistsException e) {
            QName portTypeName =
                (QName) port.getProperty(
                        ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
            Locator loc = null;
            if(portTypeName != null){
                PortType pt = port.portTypes.get(portTypeName);
                if(pt!=null)
                    loc = pt.getLocator();
            }
            receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(intf.getName(), portTypeName));
            return;           
        }
        // If the class has methods it has already been defined
        // so skip it.
        if (!cls.methods().isEmpty())
            return;

        //write class comment - JAXWS warning
        JDocComment comment = cls.javadoc();

        String ptDoc = intf.getJavaDoc();
        if(ptDoc != null){
            comment.add(ptDoc);
            comment.add("\n\n");
        }
View Full Code Here

        this.extension = new JavaGeneratorExtensionFacade(extensionHandlers.toArray(new TJavaGeneratorExtension[0]));
    }

    private void write(Port port) {
        JavaInterface intf = port.getJavaInterface();
        String className = Names.customJavaTypeClassName(intf);

        if (donotOverride && GeneratorUtil.classExists(options, className)) {
            log("Class " + className + " exists. Not overriding.");
            return;
        }


        JDefinedClass cls = null;
        try {
            cls = getClass(className, ClassType.INTERFACE);
        } catch (JClassAlreadyExistsException e) {
            QName portTypeName =
                (QName) port.getProperty(
                        ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
            Locator loc = null;
            if(portTypeName != null){
                PortType pt = port.portTypes.get(portTypeName);
                if(pt!=null)
                    loc = pt.getLocator();
            }
            receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(intf.getName(), portTypeName));
            return;           
        }
        // If the class has methods it has already been defined
        // so skip it.
        if (!cls.methods().isEmpty())
            return;

        //write class comment - JAXWS warning
        JDocComment comment = cls.javadoc();

        String ptDoc = intf.getJavaDoc();
        if(ptDoc != null){
            comment.add(ptDoc);
            comment.add("\n\n");
        }
View Full Code Here

        super(model, options, receiver);
    }

    @Override
    public void visit(Service service) {
        JavaInterface intf = service.getJavaInterface();
        String className = Names.customJavaTypeClassName(intf);
        if (donotOverride && GeneratorUtil.classExists(options, className)) {
            log("Class " + className + " exists. Not overriding.");
            return;
        }
View Full Code Here

    public void accept(ModelVisitor visitor) throws Exception {
        visitor.visit(this);
    }

    public boolean isProvider() {
        JavaInterface intf = getJavaInterface();
        if (intf != null) {
            String sei = intf.getName();
            if (sei.equals(javax.xml.ws.Provider.class.getName())) {
                return true;
            }
        }
        return false;
View Full Code Here

    public void accept(ModelVisitor visitor) throws Exception {
        visitor.visit(this);
    }

    public boolean isProvider() {
        JavaInterface intf = getJavaInterface();
        if (intf != null) {
            String sei = intf.getName();
            if (sei.equals(javax.xml.ws.Provider.class.getName())) {
                return true;
            }
        }
        return false;
View Full Code Here

        this.extension = new JavaGeneratorExtensionFacade(extensionHandlers.toArray(new TJavaGeneratorExtension[extensionHandlers.size()]));
    }

    private void write(Port port) {
        JavaInterface intf = port.getJavaInterface();
        String className = Names.customJavaTypeClassName(intf);

        if (donotOverride && GeneratorUtil.classExists(options, className)) {
            log("Class " + className + " exists. Not overriding.");
            return;
        }


        JDefinedClass cls;
        try {
            cls = getClass(className, ClassType.INTERFACE);
        } catch (JClassAlreadyExistsException e) {
            QName portTypeName =
                (QName) port.getProperty(
                        ModelProperties.PROPERTY_WSDL_PORT_TYPE_NAME);
            Locator loc = null;
            if(portTypeName != null){
                PortType pt = port.portTypes.get(portTypeName);
                if (pt!=null) {
                    loc = pt.getLocator();
                }
            }
            receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(intf.getName(), portTypeName));
            return;           
        }
        // If the class has methods it has already been defined
        // so skip it.
        if (!cls.methods().isEmpty()) {
            return;
        }

        //write class comment - JAXWS warning
        JDocComment comment = cls.javadoc();

        String ptDoc = intf.getJavaDoc();
        if(ptDoc != null){
            comment.add(ptDoc);
            comment.add("\n\n");
        }
View Full Code Here

            + "].");
        return;
      }

      // Each serviceImpl will implements one port interface
      JavaInterface portIntf = port.getJavaInterface();
      String portClassName = Names.customJavaTypeClassName(portIntf);
      JDefinedClass portCls = null;
      try {
        portCls = getClass(portClassName, ClassType.INTERFACE);
      } catch (JClassAlreadyExistsException e) {
View Full Code Here

        init(model, options, receiver);
    }

    @Override
    public void visit(Service service) {
        JavaInterface intf = service.getJavaInterface();
        String className = Names.customJavaTypeClassName(intf);
        if (donotOverride && GeneratorUtil.classExists(options, className)) {
            log("Class " + className + " exists. Not overriding.");
            return;
        }
View Full Code Here

TOP

Related Classes of com.sun.tools.ws.processor.model.java.JavaInterface

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.