protected <T extends IService> void defineService(Class<? extends T> serviceClass, Class<? extends T> implClass ) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException { Constructor ctor = implClass.getDeclaredConstructor(); ctor.setAccessible( true ); T serviceImpl = (T)ctor.newInstance(); defineService( serviceClass, serviceImpl ); } /**
protected <T extends IService> void defineService(Class<? extends T> serviceClass, Class<? extends T> implClass ) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException { Constructor ctor = implClass.getDeclaredConstructor(); ctor.setAccessible( true ); T serviceImpl = (T)ctor.newInstance(); defineService( serviceClass, serviceImpl ); } /**