Examples of ReflectionsException


Examples of org.reflections.ReflectionsException

      public Vfs.Dir createDir(URL url) {
        VirtualFile content;
        try {
          content = (VirtualFile) url.openConnection().getContent();
        } catch (Throwable e) {
          throw new ReflectionsException(
              "could not open url connection as VirtualFile ["
                  + url + "]", e);
        }

        Vfs.Dir dir = null;
View Full Code Here

Examples of org.reflections.ReflectionsException

        for (UrlType type : urlTypes) {
            if (type.matches(url)) {
                try {
                    return type.createDir(url);
                } catch (Exception e) {
                    throw new ReflectionsException("could not create Dir using " + type.getClass().getName() +" from url " + url.toExternalForm());
                }
            }
        }

        throw new ReflectionsException("could not create Vfs.Dir from url, no matching UrlType was found [" + url.toExternalForm() + "]\n" +
                "either use fromURL(final URL url, final List<UrlType> urlTypes) or " +
                "use the static setDefaultURLTypes(final List<UrlType> urlTypes) or addDefaultURLTypes(UrlType urlType) " +
                "with your specialized UrlType.");
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

                return null; //todo add support
            } else {
                return aClass.getMethod(methodName, parameterTypes);
            }
        } catch (NoSuchMethodException e) {
            throw new ReflectionsException("Can't resolve method named " + methodName, e);
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

        String fieldName = field.substring(field.lastIndexOf('.') + 1);

        try {
            return forName(className).getDeclaredField(fieldName);
        } catch (NoSuchFieldException e) {
            throw new ReflectionsException("Can't resolve field named " + fieldName, e);
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

            try {
                if (inputStream != null) {
                    inputStream.close();
                }
            } catch (IOException e) {
                throw new ReflectionsException("could not close input stream", e);
            }
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

    public static Class<?> resolveClass(final Class<? extends IClass> aClass) {
        try {
            return resolveClassOf(aClass);
        } catch (Exception e) {
            throw new ReflectionsException("could not resolve to class " + aClass.getName(), e);
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

    public static Field resolveField(final Class<? extends IField> aField) {
        try {
            String name = aField.getSimpleName();
            return resolveClassOf(aField).getDeclaredField(name);
        } catch (Exception e) {
            throw new ReflectionsException("could not resolve to field " + aField.getName(), e);
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

                paramTypes = null;
            }

            return resolveClassOf(aMethod).getDeclaredMethod(methodName, paramTypes);
        } catch (Exception e) {
            throw new ReflectionsException("could not resolve to method " + aMethod.getName(), e);
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

            try {
                if (inputStream != null) {
                    inputStream.close();
                }
            } catch (IOException e) {
                throw new ReflectionsException("could not close input stream", e);
            }
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

            List<URL> urls = Lists.newArrayList(Iterators.forEnumeration(urlEnumeration));

            return getBaseUrls(urls, getUrlsForCurrentClasspath());

        } catch (IOException e) {
            throw new ReflectionsException("Can't resolve URL for package prefix " + packagePrefix, e);
        }
    }
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.