com.sun.tools.internal.ws.processor.model.Model Java Examples

The following examples show how to use com.sun.tools.internal.ws.processor.model.Model. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PluginImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
    JCodeModel cm = wo.getCodeModel();
    // we want this to work without requiring JSR-250 jar.
    annotation = cm.ref("javax.annotation.Generated");

    for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
        for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
            annotate(j.next());
        }
    }

    return true;
}
 
Example #2
Source File: CustomExceptionGenerator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void generate(Model model,
    WsimportOptions options,
    ErrorReceiver receiver){
    CustomExceptionGenerator exceptionGen = new CustomExceptionGenerator();
    exceptionGen.init(model, options, receiver);
    exceptionGen.doGeneration();
}
 
Example #3
Source File: GeneratorBase.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
    this.model = model;
    this.options = options;
    this.destDir = options.destDir;
    this.receiver = receiver;
    this.wsdlLocation = options.wsdlLocation;
    this.targetVersion = options.target.getVersion();
    this.cm = options.getCodeModel();
}
 
Example #4
Source File: GeneratorBase.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
    this.model = model;
    this.options = options;
    this.destDir = options.destDir;
    this.receiver = receiver;
    this.wsdlLocation = options.wsdlLocation;
    this.targetVersion = options.target.getVersion();
    this.cm = options.getCodeModel();
}
 
Example #5
Source File: GeneratorBase.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
    this.model = model;
    this.options = options;
    this.destDir = options.destDir;
    this.receiver = receiver;
    this.wsdlLocation = options.wsdlLocation;
    this.targetVersion = options.target.getVersion();
    this.cm = options.getCodeModel();
}
 
Example #6
Source File: PluginImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
    JCodeModel cm = wo.getCodeModel();
    // we want this to work without requiring JSR-250 jar.
    annotation = cm.ref("javax.annotation.Generated");

    for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
        for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
            annotate(j.next());
        }
    }

    return true;
}
 
Example #7
Source File: CustomExceptionGenerator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static void generate(Model model,
    WsimportOptions options,
    ErrorReceiver receiver){
    CustomExceptionGenerator exceptionGen = new CustomExceptionGenerator();
    exceptionGen.init(model, options, receiver);
    exceptionGen.doGeneration();
}
 
Example #8
Source File: PluginImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
    JCodeModel cm = wo.getCodeModel();
    // we want this to work without requiring JSR-250 jar.
    annotation = cm.ref("javax.annotation.Generated");

    for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
        for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
            annotate(j.next());
        }
    }

    return true;
}
 
Example #9
Source File: PluginImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
    JCodeModel cm = wo.getCodeModel();
    // we want this to work without requiring JSR-250 jar.
    annotation = cm.ref("javax.annotation.Generated");

    for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
        for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
            annotate(j.next());
        }
    }

    return true;
}
 
Example #10
Source File: PluginImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
    JCodeModel cm = wo.getCodeModel();
    // we want this to work without requiring JSR-250 jar.
    annotation = cm.ref("javax.annotation.Generated");

    for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
        for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
            annotate(j.next());
        }
    }

    return true;
}
 
Example #11
Source File: AnnotationProcessorContext.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #12
Source File: AnnotationProcessorContext.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #13
Source File: GeneratorBase.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
    this.model = model;
    this.options = options;
    this.destDir = options.destDir;
    this.receiver = receiver;
    this.wsdlLocation = options.wsdlLocation;
    this.targetVersion = options.target.getVersion();
    this.cm = options.getCodeModel();
}
 
Example #14
Source File: AnnotationProcessorContext.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #15
Source File: AnnotationProcessorContext.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #16
Source File: CustomExceptionGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static void generate(Model model,
    WsimportOptions options,
    ErrorReceiver receiver){
    CustomExceptionGenerator exceptionGen = new CustomExceptionGenerator();
    exceptionGen.init(model, options, receiver);
    exceptionGen.doGeneration();
}
 
Example #17
Source File: GeneratorBase.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
    this.model = model;
    this.options = options;
    this.destDir = options.destDir;
    this.receiver = receiver;
    this.wsdlLocation = options.wsdlLocation;
    this.targetVersion = options.target.getVersion();
    this.cm = options.getCodeModel();
}
 
Example #18
Source File: GeneratorBase.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
    this.model = model;
    this.options = options;
    this.destDir = options.destDir;
    this.receiver = receiver;
    this.wsdlLocation = options.wsdlLocation;
    this.targetVersion = options.target.getVersion();
    this.cm = options.getCodeModel();
}
 
Example #19
Source File: CustomExceptionGenerator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static void generate(Model model,
    WsimportOptions options,
    ErrorReceiver receiver){
    CustomExceptionGenerator exceptionGen = new CustomExceptionGenerator();
    exceptionGen.init(model, options, receiver);
    exceptionGen.doGeneration();
}
 
Example #20
Source File: AnnotationProcessorContext.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #21
Source File: PluginImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
    JCodeModel cm = wo.getCodeModel();
    // we want this to work without requiring JSR-250 jar.
    annotation = cm.ref("javax.annotation.Generated");

    for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
        for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
            annotate(j.next());
        }
    }

    return true;
}
 
Example #22
Source File: AnnotationProcessorContext.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #23
Source File: PluginImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
    JCodeModel cm = wo.getCodeModel();
    // we want this to work without requiring JSR-250 jar.
    annotation = cm.ref("javax.annotation.Generated");

    for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
        for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
            annotate(j.next());
        }
    }

    return true;
}
 
Example #24
Source File: CustomExceptionGenerator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static void generate(Model model,
    WsimportOptions options,
    ErrorReceiver receiver){
    CustomExceptionGenerator exceptionGen = new CustomExceptionGenerator();
    exceptionGen.init(model, options, receiver);
    exceptionGen.doGeneration();
}
 
Example #25
Source File: GeneratorBase.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
    this.model = model;
    this.options = options;
    this.destDir = options.destDir;
    this.receiver = receiver;
    this.wsdlLocation = options.wsdlLocation;
    this.targetVersion = options.target.getVersion();
    this.cm = options.getCodeModel();
}
 
Example #26
Source File: GeneratorBase.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void init(Model model, WsimportOptions options, ErrorReceiver receiver){
    this.model = model;
    this.options = options;
    this.destDir = options.destDir;
    this.receiver = receiver;
    this.wsdlLocation = options.wsdlLocation;
    this.targetVersion = options.target.getVersion();
    this.cm = options.getCodeModel();
}
 
Example #27
Source File: AnnotationProcessorContext.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static boolean isEncoded(Model model) {
    if (model == null)
        return false;
    for (Service service : model.getServices()) {
        for (Port port : service.getPorts()) {
            for (Operation operation : port.getOperations()) {
                if (operation.getUse() != null && operation.getUse().equals(SOAPUse.LITERAL))
                    return false;
            }
        }
    }
    return true;
}
 
Example #28
Source File: CustomExceptionGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static void generate(Model model,
    WsimportOptions options,
    ErrorReceiver receiver){
    CustomExceptionGenerator exceptionGen = new CustomExceptionGenerator();
    exceptionGen.init(model, options, receiver);
    exceptionGen.doGeneration();
}
 
Example #29
Source File: PluginImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public boolean run(Model model, WsimportOptions wo, ErrorReceiver er) throws SAXException {
    JCodeModel cm = wo.getCodeModel();
    // we want this to work without requiring JSR-250 jar.
    annotation = cm.ref("javax.annotation.Generated");

    for (Iterator<JPackage> i = cm.packages(); i.hasNext();) {
        for (Iterator<JDefinedClass> j = i.next().classes(); j.hasNext();) {
            annotate(j.next());
        }
    }

    return true;
}
 
Example #30
Source File: CustomExceptionGenerator.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public GeneratorBase getGenerator(Model model, WsimportOptions options, ErrorReceiver receiver) {
    GeneratorBase g = new CustomExceptionGenerator();
    g.init(model, options, receiver);
    return g;
}