Package org.apache.jdo.impl.enhancer.util

Examples of org.apache.jdo.impl.enhancer.util.ResourceLocator


            if (jdoFileNames != null && !jdoFileNames.isEmpty()) {
                final StringBuffer s = new StringBuffer();
                for (Iterator i = jdoFileNames.iterator(); i.hasNext();) {
                    s.append(" " + i.next());
                }
                final ResourceLocator jdos
                    = new ListResourceLocator(out, verbose, jdoFileNames);
                //printMessage(getI18N("enhancer.metadata.using_jdo_files",
                //                     s.toString()));
                locators.add(jdos);
            }

            // create resource locator for specified jar files
            if (jarFileNames != null && !jarFileNames.isEmpty()) {
                final StringBuffer s = new StringBuffer();
                final Iterator i = jarFileNames.iterator();
                s.append(i.next());
                while (i.hasNext()) {
                    s.append(File.pathSeparator + i.next());
                }
                final PathResourceLocator jars
                    = new PathResourceLocator(out, verbose, s.toString());
                //printMessage(getI18N("enhancer.metadata.using_jar_files",
                //                     s.toString()));
                locators.add(jars);
                classLoader = jars.getClassLoader();
            }

            // create resource locator for specified source path
            if (sourcePath != null && sourcePath.length() > 0) {
                final PathResourceLocator path
                    = new PathResourceLocator(out, verbose, sourcePath);
                //printMessage(getI18N("enhancer.metadata.using_source_path",
                //                     sourcePath));
                locators.add(path);
                classLoader = path.getClassLoader();
            }

            if (classLoader == null) {
                // use the current class loader as the default, if there is
                // no -s option and no archives specified.
                classLoader = EnhancerMetaDataJDOModelImpl.class.getClassLoader();
            }

            // print warning if no meta-data source specified
            if (locators.isEmpty()) {
                printWarning(getI18N("enhancer.metadata.using_no_metadata"));
            }

            // create JavaModel with combined resource locators
            final ResourceLocator locator
                = new CombinedResourceLocator(out, verbose, locators);
            //^olsen: wrap with timing jdo file locator
            //if (options.doTiming.value) {
            //    classLocator = new ResourceLocatorTimer(classLocator);
            //}
View Full Code Here


        try {
            final List locators = new ArrayList();

            // create resource locator for specified class files
            if (classFileNames != null && !classFileNames.isEmpty()) {
                final ResourceLocator classes
                    = new ListResourceLocator(out, verbose, classFileNames);
                if (verbose) {
                    out.println("Class Locator: using class files: {");
                    for (Iterator i = classFileNames.iterator(); i.hasNext();) {
                        out.println("    " + i.next());
                    }
                    out.println("}");
                }
                locators.add(classes);
            }

            // create resource locator for specified zip files
            if (zipFileNames != null && !zipFileNames.isEmpty()) {
                final StringBuffer s = new StringBuffer();
                final Iterator i = zipFileNames.iterator();
                s.append(i.next());
                while (i.hasNext()) {
                    s.append(File.pathSeparator + i.next());
                }
                final ResourceLocator zips
                    = new PathResourceLocator(out, verbose, s.toString());
                if (verbose)
                    out.println("Class Locator: using jar/zip files: "
                                + s.toString());
                locators.add(zips);
            }

            // create resource locator for specified source path
            if (sourcePath != null && sourcePath.length() > 0) {
                final ResourceLocator path
                    = new PathResourceLocator(out, verbose, sourcePath);
                if (verbose)
                    out.println("Class Locator: using source path: "
                                + sourcePath);
                locators.add(path);
View Full Code Here

        try {
            final List locators = new ArrayList();

            // create resource locator for specified class files
            if (classFileNames != null && !classFileNames.isEmpty()) {
                final ResourceLocator classes
                    = new ListResourceLocator(out, verbose, classFileNames);
                if (verbose) {
                    out.println("Class Locator: using class files: {");
                    for (Iterator i = classFileNames.iterator(); i.hasNext();) {
                        out.println("    " + i.next());
                    }
                    out.println("}");
                }
                locators.add(classes);
            }

            // create resource locator for specified zip files
            if (zipFileNames != null && !zipFileNames.isEmpty()) {
                final StringBuffer s = new StringBuffer();
                final Iterator i = zipFileNames.iterator();
                s.append(i.next());
                while (i.hasNext()) {
                    s.append(File.pathSeparator + i.next());
                }
                final ResourceLocator zips
                    = new PathResourceLocator(out, verbose, s.toString());
                if (verbose)
                    out.println("Class Locator: using jar/zip files: "
                                + s.toString());
                locators.add(zips);
            }

            // create resource locator for specified source path
            if (sourcePath != null && sourcePath.length() > 0) {
                final ResourceLocator path
                    = new PathResourceLocator(out, verbose, sourcePath);
                if (verbose)
                    out.println("Class Locator: using source path: "
                                + sourcePath);
                locators.add(path);
View Full Code Here

            if (jdoFileNames != null && !jdoFileNames.isEmpty()) {
                final StringBuffer s = new StringBuffer();
                for (Iterator i = jdoFileNames.iterator(); i.hasNext();) {
                    s.append(" " + i.next());
                }
                final ResourceLocator jdos
                    = new ListResourceLocator(out, verbose, jdoFileNames);
                //printMessage(getI18N("enhancer.metadata.using_jdo_files",
                //                     s.toString()));
                locators.add(jdos);
            }

            // create resource locator for specified jar files
            if (jarFileNames != null && !jarFileNames.isEmpty()) {
                final StringBuffer s = new StringBuffer();
                final Iterator i = jarFileNames.iterator();
                s.append(i.next());
                while (i.hasNext()) {
                    s.append(File.pathSeparator + i.next());
                }
                final PathResourceLocator jars
                    = new PathResourceLocator(out, verbose, s.toString());
                //printMessage(getI18N("enhancer.metadata.using_jar_files",
                //                     s.toString()));
                locators.add(jars);
                classLoader = jars.getClassLoader();
            }

            // create resource locator for specified source path
            if (sourcePath != null && sourcePath.length() > 0) {
                final PathResourceLocator path
                    = new PathResourceLocator(out, verbose, sourcePath);
                //printMessage(getI18N("enhancer.metadata.using_source_path",
                //                     sourcePath));
                locators.add(path);
                classLoader = path.getClassLoader();
            }

            if (classLoader == null) {
                // use the current class loader as the default, if there is
                // no -s option and no archives specified.
                classLoader = EnhancerMetaDataJDOModelImpl.class.getClassLoader();
            }

            // print warning if no meta-data source specified
            if (locators.isEmpty()) {
                printWarning(getI18N("enhancer.metadata.using_no_metadata"));
            }

            // create JavaModel with combined resource locators
            final ResourceLocator locator
                = new CombinedResourceLocator(out, verbose, locators);
            //^olsen: wrap with timing jdo file locator
            //if (options.doTiming.value) {
            //    classLocator = new ResourceLocatorTimer(classLocator);
            //}
View Full Code Here

TOP

Related Classes of org.apache.jdo.impl.enhancer.util.ResourceLocator

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.