diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-05-04 07:05:08 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-05-04 07:05:08 +0000 |
commit | 1f669e49a990b419dfdd41f3252cc7e5f17db29c (patch) | |
tree | 5ba04859ec7644a1dc6af02d95f8aa2e4ea7cd8c /ridljar | |
parent | c7b41980abc23fb61382e4cb48088514d26613dc (diff) |
INTEGRATION: CWS mmt7 (1.9.2); FILE MERGED
2006/02/14 12:25:09 sb 1.9.2.2: #i60643# Missing @since tags.
2006/02/14 12:15:56 sb 1.9.2.1: #i60643# Added Any.complete, UnoRuntime.completeValue, extended UnoRuntime.areSame, and restructured building of ridl.jar due to new cyclic inter-package dependencies.
Diffstat (limited to 'ridljar')
-rw-r--r-- | ridljar/com/sun/star/uno/Any.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/ridljar/com/sun/star/uno/Any.java b/ridljar/com/sun/star/uno/Any.java index 06a81b30af13..6beceae2f59e 100644 --- a/ridljar/com/sun/star/uno/Any.java +++ b/ridljar/com/sun/star/uno/Any.java @@ -4,9 +4,9 @@ * * $RCSfile: Any.java,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: hr $ $Date: 2006-01-26 17:41:46 $ + * last change: $Author: rt $ $Date: 2006-05-04 08:05:08 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -46,7 +46,7 @@ package com.sun.star.uno; * an explicit interface type, so the remote counterpart doesn't need to invoke * a queryInterface). * <p> - * @version $Revision: 1.9 $ $ $Date: 2006-01-26 17:41:46 $ + * @version $Revision: 1.10 $ $ $Date: 2006-05-04 08:05:08 $ */ public class Any { /** @@ -92,6 +92,24 @@ public class Any { } /** + Complete a UNO <code>ANY</code> (make sure it is wrapped up as an + <code>Any</code> instance). + + @param any a Java value representing a UNO <code>ANY</code> value. + + @return a complete Java value (that is, an <code>Any</code> instance) + representing the same UNO <code>ANY</code> value as the given argument. + + @since UDK 3.2.3 + */ + public static final Any complete(Object any) { + return any instanceof Any + ? (Any) any + : new Any( + new Type(any == null ? XInterface.class : any.getClass()), any); + } + + /** * Gets the type of the value within the any. * <p> * @return the type of the value within the any. |