Java 类com.google.inject.persist.finder.DynamicFinder 实例源码

项目:guice    文件:JpaPersistModule.java   
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;
}
项目:guice-old    文件:JpaPersistModule.java   
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;
}
项目:google-guice    文件:JpaPersistModule.java   
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;
}