diff options
author | Kay Ramme <kr@openoffice.org> | 2001-02-08 08:14:28 +0000 |
---|---|---|
committer | Kay Ramme <kr@openoffice.org> | 2001-02-08 08:14:28 +0000 |
commit | 215f06a52d72d5ffd55d85b9a0217e3dc7c556e6 (patch) | |
tree | b93b7afeb0a89ad5c7aa3027a3ce3aeb416a6e0a /ridljar | |
parent | 5222c7f41c3c629daee9f3bfa8be4ac864224262 (diff) |
getComponentType now takes care of being an array
Diffstat (limited to 'ridljar')
-rw-r--r-- | ridljar/com/sun/star/lib/uno/typedesc/TypeDescription.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/ridljar/com/sun/star/lib/uno/typedesc/TypeDescription.java b/ridljar/com/sun/star/lib/uno/typedesc/TypeDescription.java index a09cb0ac5b95..6ed1827bb088 100644 --- a/ridljar/com/sun/star/lib/uno/typedesc/TypeDescription.java +++ b/ridljar/com/sun/star/lib/uno/typedesc/TypeDescription.java @@ -2,9 +2,9 @@ * * $RCSfile: TypeDescription.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kr $ $Date: 2000-12-22 10:43:54 $ + * last change: $Author: kr $ $Date: 2001-02-08 09:14:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -94,7 +94,7 @@ import com.sun.star.lib.uno.typeinfo.TypeInfo; * methods, which may be changed or moved in the furture, so please * do not use these methods. * <p> - * @version $Revision: 1.1 $ $ $Date: 2000-12-22 10:43:54 $ + * @version $Revision: 1.2 $ $ $Date: 2001-02-08 09:14:28 $ * @author Kay Ramme * @since UDK2.0 */ @@ -650,8 +650,20 @@ public class TypeDescription { return _typeClass; } + /** + * Gets the component <code>TypeDescription</code> if + * this is an array type. + * <p> + * @return the <code>TypeDescription</code> + */ public TypeDescription getComponentType() throws com.sun.star.uno.Exception { - return getTypeDescription(getZClass().getComponentType()); + TypeDescription componentTypeDescription = null; + + Class componentClass = getZClass().getComponentType(); + if(componentClass != null) + componentTypeDescription = getTypeDescription(componentClass); + + return componentTypeDescription; } /** |