Package org.jtester.exception

Examples of org.jtester.exception.FindBeanImplClassException


        implClazz = ImplementorFinder.getImplClass(beanClazz, beanMapping);
      } catch (FindBeanImplClassException e) {
        String message = String.format("Look for spring bean for property[%s] of class[%s] error!", beanName,
            ownerClazz.getName());
        JTesterLogger.warn(message);
        throw new FindBeanImplClassException(message, e);
      }
    }

    if (implClazz == null || ClazzHelper.isInterfaceOrAbstract(implClazz)) {
      return null;
    }
    try {
      Constructor c = implClazz.getDeclaredConstructor(new Class[] {});
      if (c == null) {
        return null;
      }
      return implClazz;
    } catch (Throwable e) {
      String error = String.format("find default constructor function of class[%s] error.", implClazz.getName());
      throw new FindBeanImplClassException(error, e);
    }
  }
View Full Code Here


        exceptions.add(message);
      }
    }
    if (beanImplClazz == null) {
      if (exceptions.size() == 0) {
        throw new FindBeanImplClassException("can't find rule to find implement class for " + beanClazzName);
      } else {
        throw new FindBeanImplClassException(ArrayHelper.toString(exceptions.toArray(new String[0])));
      }
    } else {
      return beanImplClazz;
    }
  }
View Full Code Here

TOP

Related Classes of org.jtester.exception.FindBeanImplClassException

Copyright © 2018 www.massapicom. 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.