class PackageUtil {

    public static List<String> getResourceInPackage(String packageName) throws IOException {
        if (StringUtil.isBlank(packageName)) {
            return null;
        }

        boolean recursive = packageName.endsWith(".*");
        String packagePath = getPackagePath(packageName);
        List<String> resources = CollectionUtil.createArrayList();
        String packageDirName = packagePath.replace('.', '/');

        URL[] dirs = ClassLoaderUtil.getResources(packageDirName);
        for (URL url : dirs) {
            String protocol = url.getProtocol();
            if ("file".equals(protocol)) {
                findResourceInDirPackage(packagePath, URLDecoder.decode(url.getFile(), "UTF-8"), resources);
            } else if ("jar".equals(protocol)) {
                findResourceInJarPackage(url, packageName, packageDirName, recursive, resources);
            }

        }
        return resources;
    }

}