use of com.google.inject.persist.finder.DynamicFinder in project guice by google.
the class JpaPersistModule method isDynamicFinderValid.
private boolean isDynamicFinderValid(Class<?> iface) {
boolean valid = true;
if (!iface.isInterface()) {
addError(iface + " is not an interface. Dynamic Finders must be interfaces.");
valid = false;
}
for (Method method : iface.getMethods()) {
DynamicFinder finder = DynamicFinder.from(method);
if (null == finder) {
addError("Dynamic Finder methods must be annotated with @Finder, but " + iface + "." + method.getName() + " was not");
valid = false;
}
}
return valid;
}
use of com.google.inject.persist.finder.DynamicFinder in project roboguice by roboguice.
the class JpaPersistModule method isDynamicFinderValid.
private boolean isDynamicFinderValid(Class<?> iface) {
boolean valid = true;
if (!iface.isInterface()) {
addError(iface + " is not an interface. Dynamic Finders must be interfaces.");
valid = false;
}
for (Method method : iface.getMethods()) {
DynamicFinder finder = DynamicFinder.from(method);
if (null == finder) {
addError("Dynamic Finder methods must be annotated with @Finder, but " + iface + "." + method.getName() + " was not");
valid = false;
}
}
return valid;
}
Aggregations