} else if (o instanceof DispatchObject) {
return new Variant(((DispatchObject) o).getDispatch());
} else if (o instanceof Double) {
return new Variant((Double) o);
} else {
throw new ObjectTypeNotSupported(o.getClass().toString(),
"Integer, Long, String, Boolean, DispatchObject, Double");
}
} catch (JacobException e) {
throw JitcaCOMException.handle(e);
}