@@ -0,0 +1,2608 @@
+/*%0A * Copyright (C) 2008 feilong%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.feilong.core.lang;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A/**%0A * The Class ClassLoaderUtilTest.%0A * %0A * @author %3Ca href=%22http://feitianbenyue.iteye.com/%22%3Efeilong%3C/a%3E%0A */%0Apublic class ClassLoaderUtilTemp%7B%0A%0A    /** The Constant LOGGER. */%0A    private static final Logger LOGGER = LoggerFactory.getLogger(ClassLoaderUtilTemp.class);%0A%0A    /**%0A     * Load resources.%0A     * %0A     * %3Cp%3E%0A     * This method will try to load the resource using the following methods (in order):%0A     * %3C/p%3E%0A     * %3Cul%3E%0A     * %3Cli%3EFrom %7B@link Thread#getContextClassLoader() Thread.currentThread().getContextClassLoader()%7D%0A     * %3Cli%3EFrom %7B@link Class#getClassLoader() ClassLoaderUtil.class.getClassLoader()%7D%0A     * %3Cli%3EFrom %7B@link Class#getClassLoader() callingClass.getClassLoader() %7D%0A     * %3C/ul%3E%0A     * %0A     * @param resourceName%0A     *            the resource name%0A     * @param callingClass%0A     *            the calling class%0A     * @return the resources%0A     * @see java.lang.ClassLoader#getResources(String)%0A     */%0A    //    public static Enumeration%3CURL%3E getResources(String resourceName,Class%3C?%3E callingClass)%7B%0A    //        try%7B%0A    //            List%3CClassLoader%3E classLoaderList = getAllClassLoaderList(callingClass);%0A    //            for (ClassLoader classLoader : classLoaderList)%7B%0A    //                Enumeration%3CURL%3E resourcesEnumeration = classLoader.getResources(resourceName);%0A    //                if (null == resourcesEnumeration)%7B%0A    //                    LOGGER.warn(getLogInfo(resourceName, classLoader, false));%0A    //                %7Delse%7B%0A    //                    LOGGER.debug(getLogInfo(resourceName, classLoader, true));%0A    //                    return resourcesEnumeration;%0A    //                %7D%0A    //            %7D%0A    //            LOGGER.warn(%22resourceName:%5B%7B%7D%5D in all ClassLoader not found%22, resourceName);%0A    //            return null;%0A    //        %7Dcatch (IOException e)%7B%0A    //            throw new UncheckedIOException(e);%0A    //        %7D%0A    //    %7D%0A%7D%0A

add ClassLoaderUtilTemp