Examples of ReflectionsException


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 {
            XMLWriter xmlWriter = new XMLWriter(new FileOutputStream(file), OutputFormat.createPrettyPrint());
            xmlWriter.write(document);
            xmlWriter.close();
        } catch (IOException e) {
            throw new ReflectionsException("could not save to file " + filename, e);
        }

        return file;
    }
View Full Code Here

Examples of org.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.reflections.ReflectionsException

    public void scan(Vfs.File file) {
        try {
            final Object classObject = getMetadataAdapter().getOfCreateClassObject(file);
            scan(classObject);
        } catch (Exception e) {
            throw new ReflectionsException("could not create class file from " + file.getName(), e);
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

                    Reflections.log.warn("could not create Dir using " + type + " from url " + url.toExternalForm() + ". skipping.", e);
                }
            }
        }

        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

    public void scan(Vfs.File file) {
        try {
            Object cls = getMetadataAdapter().getOfCreateClassObject(file);
            scan(cls, file);
        } catch (Exception e) {
            throw new ReflectionsException("could not create class file from " + file.getName(), e);
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

        try {
            inputStream = file.openInputStream();
            DataInputStream dis = new DataInputStream(new BufferedInputStream(inputStream));
            return new ClassFile(dis);
        } catch (IOException e) {
            throw new ReflectionsException("could not create class file from " + file.getName(), e);
        } finally {
            Utils.close(inputStream);
        }
    }
View Full Code Here

Examples of org.reflections.ReflectionsException

                return null; //todo add support
            } else {
                return aClass.getDeclaredMethod(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 ReflectionUtils.forName(className, classLoaders).getDeclaredField(fieldName);
        } catch (NoSuchFieldException e) {
            throw new ReflectionsException("Can't resolve field named " + fieldName, 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.