Examples of ReflectionsException


Examples of org.givwenzen.reflections.ReflectionsException

    public static FileSystemManager getVFSManager() {
        try {
            return VFS.getManager();
        } catch (FileSystemException e) {
            throw new ReflectionsException("could not get VFS Manager", e);
        }
    }
View Full Code Here

Examples of org.givwenzen.reflections.ReflectionsException

        try {
            String descriptor = typeNameToDescriptor(typeName);
            return Class.forName(descriptor, true, Thread.currentThread().getContextClassLoader());
        } catch (ClassNotFoundException e) {
            throw new ReflectionsException("could not resolve type " + typeName, e);
        }
    }
View Full Code Here

Examples of org.givwenzen.reflections.ReflectionsException

                        }
                    } else {
                        urls.add(url);
                    }
                } catch (FileSystemException e) {
                    throw new ReflectionsException("could not create url from " + path, e);
                }
            }
        }

        return urls;
View Full Code Here

Examples of org.givwenzen.reflections.ReflectionsException

            try {
                if (Utils.getVFSManager().resolveFile(url.getPath()).getType().equals(FileType.FOLDER)) {
                    urls.add(url);
                }
            } catch (FileSystemException e) {
                throw new ReflectionsException("could not resolve url " + url, e);
            }
        }
        return urls;
    }
View Full Code Here

Examples of org.givwenzen.reflections.ReflectionsException

        try {
            return Lists.newArrayList(Iterators.forEnumeration(
                    Utils.getEffectiveClassLoader().getResources(
                            qNameToResourceName(packagePrefix))));
        } catch (IOException e) {
            throw new ReflectionsException("Can't resolve URL for package prefix " + packagePrefix, e);
        }
    }
View Full Code Here

Examples of org.givwenzen.reflections.ReflectionsException

            for (URL url : getUrlsForPackagePrefix(packagePrefix)) {
                FileObject[] files = Utils.getVFSManager().resolveFile(url.getPath()).findFiles(fileSelector);
                fileObjects.addAll(Lists.newArrayList(files));
            }
        } catch (FileSystemException e) {
            throw new ReflectionsException("could not collect", e);
        }

        return fileObjects;
    }
View Full Code Here

Examples of org.givwenzen.reflections.ReflectionsException

                        break;
                    case '-':
                        filter = new Exclude(pattern);
                        break;
                    default:
                        throw new ReflectionsException("includeExclude should start with either + or -");
                }

                filters.add(filter);
            }
View Full Code Here

Examples of org.givwenzen.reflections.ReflectionsException

            if (dis != null) {
                try {
                    dis.close();
                } catch (IOException e) {
                    //noinspection ThrowFromFinallyBlock
                    throw new ReflectionsException("could not close DataInputStream", e);
                }
            }
        }
    }
View Full Code Here

Examples of org.givwenzen.reflections.ReflectionsException

  public static <K, V> List<V> parallelTransform(ParallelStrategy parallelStrategy, Iterable<K> source, final Function<K, V> function) throws ReflectionsException {
    try {
      return parallelStrategy.transform(source.iterator(), function);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new ReflectionsException("Multi-threaded execution interrupted", e);
    } catch (ExecutionException e) {
      throw new ReflectionsException("Error in parallel function execution", e);
    }
  }
View Full Code Here

Examples of org.jboss.errai.reflections.ReflectionsException

        try {
            inputStream = file.openInputStream();
            final Object cls = configuration.getMetadataAdapter().createClassObject(inputStream);
            scan(cls);
        } catch (IOException e) {
            throw new ReflectionsException("could not create class file from " + file.getName(), e);
        } finally {
            Utils.close(inputStream);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.