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); } }
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); }