Package com.sun.tools.xjc.api

Examples of com.sun.tools.xjc.api.S2JJAXBModel


       
        JavaExceptionClass expClass = new JavaExceptionClass(model);
        expClass.setName(name);
        expClass.setNamespace(namespace);
        expClass.setPackageName(packageName);
        S2JJAXBModel jaxbModel = (S2JJAXBModel)env.get(ToolConstants.RAW_JAXB_MODEL);
        for (Part part : faultValues) {

            String fName = part.getName();
            String fType = ProcessorUtil.resolvePartType(part, jaxbModel);
            String fNamespace = ProcessorUtil.resolvePartNamespace(part);
View Full Code Here


        throws ToolException {
        if (part == null) {
            return new ArrayList<Property>();
        }

        S2JJAXBModel jaxbModel = (S2JJAXBModel)env.get(ToolConstants.RAW_JAXB_MODEL);

        // QName element = getMappedElementName(part, env);
        QName element = getElementName(part);

        if (element != null && jaxbModel != null) {
            com.sun.tools.xjc.api.Mapping mapping = jaxbModel.get(element);
            if (mapping != null) {
                return mapping.getWrapperStyleDrilldown();
            } else {
                org.objectweb.celtix.common.i18n.Message msg =
                    new org.objectweb.celtix.common.i18n.Message("ELEMENT_MISSING",
View Full Code Here

    //
    // the non-wrapper style will get the type info from the part directly
    //
    public static String getFullClzName(Part part, ProcessorEnvironment env, boolean boxify,
                                        ClassCollector collector) {
        S2JJAXBModel jaxbModel = (S2JJAXBModel)env.get(ToolConstants.RAW_JAXB_MODEL);

        QName xmlTypeName = getElementName(part);
        String jtype = BuiltInTypesJavaMappingUtil.getJType(xmlTypeName, jaxbModel, boxify);
        String namespace = xmlTypeName.getNamespaceURI();
        String type = resolvePartType(part, jaxbModel);
View Full Code Here

        if (rawJaxbModelGenCode == null) {
            return;
        }
        try {
            if (rawJaxbModelGenCode instanceof S2JJAXBModel) {
                S2JJAXBModel schem2JavaJaxbModel = (S2JJAXBModel)rawJaxbModelGenCode;
                JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);
                String dir = (String)env.get(ToolConstants.CFG_OUTPUTDIR);
                FileCodeWriter fileCodeWriter = new FileCodeWriter(new File(dir));
                jcodeModel.build(fileCodeWriter);
            } else {
                return;
View Full Code Here

            String dir = (String)context.get(ToolConstants.CFG_OUTPUTDIR);

            TypesCodeWriter fileCodeWriter = new TypesCodeWriter(new File(dir), context.getExcludePkgList());

            if (rawJaxbModelGenCode instanceof S2JJAXBModel) {
                S2JJAXBModel schem2JavaJaxbModel = (S2JJAXBModel)rawJaxbModelGenCode;

                ClassCollector classCollector = context.get(ClassCollector.class);
                for (JClass cls : schem2JavaJaxbModel.getAllObjectFactories()) {
                    classCollector.getTypesPackages().add(cls._package().name());
                }

                JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);

                if (!isSuppressCodeGen()) {
                    jcodeModel.build(fileCodeWriter);
                }
View Full Code Here

        compiler.setClassNameAllocator(allocator);

        addSchemas(wsdlUrl, schemas, compiler);
        addBindingFiles(bindingFiles, compiler);
        S2JJAXBModel intermediateModel = compiler.bind();
        JCodeModel codeModel = intermediateModel.generateCode(null, elForRun);
        StringBuilder sb = new StringBuilder();
        boolean firstnt = false;

        for (Iterator<JPackage> packages = codeModel.packages(); packages.hasNext();) {
            JPackage jpackage = packages.next();
View Full Code Here

            TypesCodeWriter fileCodeWriter = new TypesCodeWriter(new File(dir),
                                                                 context.getExcludePkgList(),
                                                                 (String)context.get(ToolConstants.CFG_ENCODING),
                                                                 context.get(OutputStreamCreator.class));

            S2JJAXBModel schem2JavaJaxbModel = rawJaxbModelGenCode;

            ClassCollector classCollector = context.get(ClassCollector.class);
            for (JClass cls : schem2JavaJaxbModel.getAllObjectFactories()) {
                classCollector.getTypesPackages().add(cls._package().name());
            }

            JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);

            if (!isSuppressCodeGen()) {
                jcodeModel.build(fileCodeWriter);
            }
View Full Code Here

            String dir = (String)context.get(ToolConstants.CFG_OUTPUTDIR);

            TypesCodeWriter fileCodeWriter = new TypesCodeWriter(new File(dir), context.getExcludePkgList());

            if (rawJaxbModelGenCode instanceof S2JJAXBModel) {
                S2JJAXBModel schem2JavaJaxbModel = (S2JJAXBModel)rawJaxbModelGenCode;
                JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);

                if (!isSuppressCodeGen()) {
                    jcodeModel.build(fileCodeWriter);
                }
View Full Code Here

            String dir = (String)context.get(ToolConstants.CFG_OUTPUTDIR);

            TypesCodeWriter fileCodeWriter = new TypesCodeWriter(new File(dir), context.getExcludePkgList());

            if (rawJaxbModelGenCode instanceof S2JJAXBModel) {
                S2JJAXBModel schem2JavaJaxbModel = (S2JJAXBModel)rawJaxbModelGenCode;

                ClassCollector classCollector = context.get(ClassCollector.class);
                for (JClass cls : schem2JavaJaxbModel.getAllObjectFactories()) {
                    classCollector.getTypesPackages().add(cls._package().name());
                }

                JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);

                if (!isSuppressCodeGen()) {
                    jcodeModel.build(fileCodeWriter);
                }
View Full Code Here

            String dir = (String)context.get(ToolConstants.CFG_OUTPUTDIR);

            TypesCodeWriter fileCodeWriter = new TypesCodeWriter(new File(dir), context.getExcludePkgList());

            if (rawJaxbModelGenCode instanceof S2JJAXBModel) {
                S2JJAXBModel schem2JavaJaxbModel = (S2JJAXBModel)rawJaxbModelGenCode;

                ClassCollector classCollector = context.get(ClassCollector.class);
                for (JClass cls : schem2JavaJaxbModel.getAllObjectFactories()) {
                    classCollector.getTypesPackages().add(cls._package().name());
                }

                JCodeModel jcodeModel = schem2JavaJaxbModel.generateCode(null, null);

                if (!isSuppressCodeGen()) {
                    jcodeModel.build(fileCodeWriter);
                }
View Full Code Here

TOP

Related Classes of com.sun.tools.xjc.api.S2JJAXBModel

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.