Package net.csdn.mongo.enhancer

Examples of net.csdn.mongo.enhancer.MongoEnhancer


*/
public class DocumentLoader implements Loader {

    @Override
    public void load(Settings settings) throws Exception {
        final Enhancer enhancer = new MongoEnhancer(settings);
        final List<CtClass> classList = new ArrayList<CtClass>();
        ServiceFramwork.scanService.scanArchives(settings.get("application.document"), new ScanService.LoadClassEnhanceCallBack() {

            public Class loaded(DataInputStream classFile) {
                try {
                    classList.add(enhancer.enhanceThisClass(classFile));
                } catch (Exception e) {
                    e.printStackTrace();
                }
                return null;
            }
        });

        enhancer.enhanceThisClass2(classList);

    }
View Full Code Here


    }

    public static class MongoDocumentLoader {

        public void load() throws Exception {
            final Enhancer enhancer = new MongoEnhancer(settings());
            final List<CtClass> classList = new ArrayList<CtClass>();
            ScanService scanService = new DefaultScanService();
            scanService.setLoader(mongoConfiguration.classLoader);
            scanService.scanArchives(settings().get("application.document"), new ScanService.LoadClassEnhanceCallBack() {

                public Class loaded(DataInputStream classFile) {
                    try {
                        classList.add(enhancer.enhanceThisClass(classFile));
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                    return null;
                }
            });

            enhancer.enhanceThisClass2(classList);

        }
View Full Code Here

TOP

Related Classes of net.csdn.mongo.enhancer.MongoEnhancer

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.