Package org.apache.cxf.tools.util

Examples of org.apache.cxf.tools.util.ClassCollector


                    }
                }
            }
            context.put(ToolConstants.SCHEMA_MAP, schemas);
            context.put(ToolConstants.PORTTYPE_MAP, interfaces);
            context.put(ClassCollector.class, new ClassCollector());
            Processor processor = frontend.getProcessor();
            if (processor instanceof ClassNameProcessor) {
                processor.setEnvironment(context);
                for (ServiceInfo service : serviceList) {
View Full Code Here


                }
            }
        }
        context.put(ToolConstants.SCHEMA_MAP, schemas);
        context.put(ToolConstants.PORTTYPE_MAP, interfaces);
        context.put(ClassCollector.class, new ClassCollector());
        WSDLToJavaScriptProcessor processor = new WSDLToJavaScriptProcessor();

        for (ServiceInfo service : serviceList) {

            context.put(ServiceInfo.class, service);
View Full Code Here

    public void initialize(ToolContext c) throws ToolException {
        this.context = c;
       
        SchemaCompilerImpl schemaCompiler = (SchemaCompilerImpl)XJC.createSchemaCompiler();
        ClassCollector classCollector = context.get(ClassCollector.class);
       
        ClassNameAllocatorImpl allocator
            = new ClassNameAllocatorImpl(classCollector,
                                         c.optionSet(ToolConstants.CFG_AUTORESOLVE));
View Full Code Here

            }
        }
    }

    private boolean addedToClassCollector(String packageName) {
        ClassCollector classCollector = context.get(ClassCollector.class);
        List<String> files = (List<String>)classCollector.getGeneratedFileInfo();
        for (String file : files) {
            int dotIndex = file.lastIndexOf(".");
            String sub = file.substring(0, dotIndex - 1);
            if (sub.equals(packageName)) {
                return true;
View Full Code Here

            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()) {
View Full Code Here

        Options opts = null;
        opts = getOptions(schemaCompiler);
        hackInNewInternalizationLogic(schemaCompiler, catalog, opts);

        ClassCollector classCollector = context.get(ClassCollector.class);

        ClassNameAllocatorImpl allocator
            = new ClassNameAllocatorImpl(classCollector,
                                         c.optionSet(ToolConstants.CFG_AUTORESOLVE));
View Full Code Here

            }
        }
    }

    private boolean addedToClassCollector(String packageName) {
        ClassCollector classCollector = context.get(ClassCollector.class);
        Collection<String> files = classCollector.getGeneratedFileInfo();
        for (String file : files) {
            int dotIndex = file.lastIndexOf(".");
            String sub = dotIndex <= 0 ? "" : file.substring(0, dotIndex - 1);
            if (sub.equals(packageName)) {
                return true;
View Full Code Here

                                                                 (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()) {
View Full Code Here

        }
        context.put(ToolConstants.CFG_WSDLLOCATION, wsdlLocation);
    }
   
    private void processClientJar(ToolContext context) {
        ClassCollector oldCollector = context.get(ClassCollector.class);
        ClassCollector newCollector = new ClassCollector();
        String oldClassDir = (String)context.get(ToolConstants.CFG_CLASSDIR);
        File tmpDir = FileUtils.createTmpDir();
        context.put(ToolConstants.CFG_CLASSDIR, tmpDir.getAbsolutePath());
       
        newCollector.setTypesClassNames(oldCollector.getTypesClassNames());
        newCollector.setSeiClassNames(oldCollector.getSeiClassNames());
        newCollector.setExceptionClassNames(oldCollector.getExceptionClassNames());
        newCollector.setServiceClassNames(oldCollector.getServiceClassNames());
        context.put(ClassCollector.class, newCollector);
        new ClassUtils().compile(context);

        generateLocalWSDL(context);
       
View Full Code Here

    private boolean isNameCollision(String packageName, String className) {
        if (context.optionSet(ToolConstants.CFG_GEN_OVERWRITE)) {
            return false;
        }
        ClassCollector collector = context.get(ClassCollector.class);
        return collector.containTypesClass(packageName, className)
               || collector.containSeiClass(packageName, className)
               || collector.containExceptionClass(packageName, className);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.util.ClassCollector

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.