public Object invokeConstructor(Reference ref, Object[] params)
			throws InterpreterException, InvocationTargetException {
		Constructor c;
		try {
			String[] paramTypeSigs = TypeSignature.getParameterTypes(ref
					.getType());
			Class clazz = TypeSignature.getClass(ref.getClazz());
			Class[] paramTypes = new Class[paramTypeSigs.length];
			for (int i = 0; i < paramTypeSigs.length; i++) {
				params[i] = toReflectType(paramTypeSigs[i], params[i]);
				paramTypes[i] = TypeSignature.getClass(paramTypeSigs[i]);
			}
			try {
				c = clazz.getConstructor(paramTypes);
			} catch (NoSuchMethodException ex) {
				c = clazz.getDeclaredConstructor(paramTypes);
			}
		} catch (ClassNotFoundException ex) {
			throw new InterpreterException(ref + ": Class not found");
		} catch (NoSuchMethodException ex) {
			throw new InterpreterException("Constructor " + ref + " not found");
		} catch (SecurityException ex) {
			throw new InterpreterException(ref + ": Security exception");
		}

		try {
			return c.newInstance(params);
		} catch (IllegalAccessException ex) {
			throw new InterpreterException("Constructor " + ref
					+ " not accessible");
		} catch (InstantiationException ex) {
			throw new InterpreterException("InstantiationException in " + ref
					+ ".");
		}
	}