예제 #1
0
 public <E> E createNewInstance(Class<E> eClass) {
   try {
     return eClass.getConstructor(null).newInstance(null);
   } catch (Exception e) {
     throw new IllegalArgumentException(e.getMessage(), e);
   }
 }
예제 #2
0
  private BaseFacade getFacadeBy0(Class eClass) {
    try {
      String name = "get" + eClass.getSimpleName().replaceAll("Entity", "") + "Facade";

      Method method = this.getClass().getMethod(name, null);

      return (BaseFacade) method.invoke(null, null);
    } catch (Exception e) {
      throw new IllegalArgumentException(e);
    }
  }
예제 #3
0
 private <T> T getBean(Class<T> aClass) {
   String name = aClass.getSimpleName();
   name = StringUtils.lowerCase(name.substring(0, 1)) + name.substring(1);
   return (T) applicationContext.getBean(name);
 }