@SuppressWarnings("unchecked") public T newInstance() throws RulesInstantiationException, ProjectResolvingException, ClassNotFoundException { return (T) getRulesInstantiationStrategy().instantiate(); }
@SuppressWarnings("unchecked") public T newInstance() throws RulesInstantiationException, ProjectResolvingException, ClassNotFoundException { return (T) getRulesInstantiationStrategy().instantiate(); }
@Override public final Object instantiate() throws RulesInstantiationException, ClassNotFoundException { try { Object originalInstance = getOriginalInstantiationStrategy().instantiate(); InvocationHandler invocationHandler = makeInvocationHandler(originalInstance); return Proxy.newProxyInstance(getClassLoader(), getProxyInterfaces(originalInstance), invocationHandler); } catch (Exception e) { throw new RulesInstantiationException(e.getMessage(), e); } }
@Override public final Object instantiate() throws RulesInstantiationException, ClassNotFoundException { try { Object originalInstance = getOriginalInstantiationStrategy().instantiate(); InvocationHandler invocationHandler = makeInvocationHandler(originalInstance); return Proxy.newProxyInstance(getClassLoader(), getProxyInterfaces(originalInstance), invocationHandler); } catch (Exception e) { throw new RulesInstantiationException(e.getMessage(), e); } }
CompiledOpenClass compiledOpenClass = instantiationStrategy.compile(); service.setOpenClass(compiledOpenClass.getOpenClass()); Object serviceBean = instantiationStrategy.instantiate();
CompiledOpenClass compiledOpenClass = instantiationStrategy.compile(); service.setOpenClass(compiledOpenClass.getOpenClass()); Object serviceBean = instantiationStrategy.instantiate();