@Override public void setServiceClass(Class<?> serviceClass) { try { if (validateServiceClass(serviceClass)) { this.serviceClass = serviceClass; try { Class<?> clazz = undecorateServiceClass(serviceClass, getClassLoader()); getOriginalInstantiationStrategy().setServiceClass(clazz); } catch (Exception e) { throw new OpenlNotCheckedException( "Failed to set service class to instantiation strategy enhancer. Failed to get undecorated class.", e); } } else { throw new OpenlNotCheckedException( "Failed to set service class to instantiation strategy enhancer. Service class isn't supported by this strategy!"); } } catch (ValidationServiceClassException e) { throw new OpenlNotCheckedException( "Failed to set service class to instantiation strategy enhancer. Service class isn't supported by this strategy!", e); } }
@Override public void setServiceClass(Class<?> serviceClass) { try { if (validateServiceClass(serviceClass)) { this.serviceClass = serviceClass; try { Class<?> clazz = undecorateServiceClass(serviceClass, getClassLoader()); getOriginalInstantiationStrategy().setServiceClass(clazz); } catch (Exception e) { throw new OpenlNotCheckedException( "Failed to set service class to instantiation strategy enhancer. Failed to get undecorated class.", e); } } else { throw new OpenlNotCheckedException( "Failed to set service class to instantiation strategy enhancer. Service class isn't supported by this strategy!"); } } catch (ValidationServiceClassException e) { throw new OpenlNotCheckedException( "Failed to set service class to instantiation strategy enhancer. Service class isn't supported by this strategy!", e); } }