static Object newInstance(FastConstructor fc) { try { return assertNotNull(fc, "fastConstructor==null").newInstance(); } catch (InvocationTargetException e) { throw new DataResolverException("Failed to create instance of class " + fc.getDeclaringClass().getName(), e.getCause()); } } }
static Object newInstance(FastConstructor fc) { try { return assertNotNull(fc, "fastConstructor==null").newInstance(); } catch (InvocationTargetException e) { throw new DataResolverException("Failed to create instance of class " + fc.getDeclaringClass().getName(), e.getCause()); } } }
@Override public Object createInstance(Constructor constructor, Object... parameters) { net.sf.cglib.reflect.FastConstructor fastConstructor = findFastCreatorInstance(constructor); try { return fastConstructor.newInstance(parameters); } catch (InvocationTargetException e) { throw new RuntimeException(e); } }
static Object newInstance(FastConstructor fc) { try { return assertNotNull(fc, "fastConstructor==null").newInstance(); } catch (InvocationTargetException e) { throw new DataResolverException("Failed to create instance of class " + fc.getDeclaringClass().getName(), e.getCause()); } } }
public Remote createServiceEndpoint() throws ServiceException { //TODO figure out why this can't be called in readResolve! // synchronized (this) { // if (!initialized) { // initialize(); // initialized = true; // } // } final Service service = ((ServiceImpl) serviceImpl).getService(); final GenericServiceEndpoint serviceEndpoint = new GenericServiceEndpoint(portQName, service, location); final Callback callback = new ServiceEndpointMethodInterceptor(serviceEndpoint, sortedOperationInfos, credentialsName); final Callback[] callbacks = new Callback[]{NoOp.INSTANCE, callback}; Enhancer.registerCallbacks(serviceEndpointClass, callbacks); try { return (Remote) constructor.newInstance(new Object[]{serviceEndpoint}); } catch (final InvocationTargetException e) { throw (ServiceException) new ServiceException("Could not construct service instance", e.getTargetException()).initCause(e); } }
serviceInstance = this.serviceConstructor.newInstance(arguments); } catch (final InvocationTargetException e) { throw (NamingException) new NamingException("Could not construct service instance").initCause(e.getTargetException());