diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-06-04 01:52:11 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-06-04 01:52:11 +0000 |
commit | 3cdc669ab686f8199bf9b75b1f3bffbef83670b7 (patch) | |
tree | a449215f202f7d622b24e12db958ef9ff2cf4eb8 /ridljar/com/sun/star/lib | |
parent | 1e2d55691c4302e7ef802b162765031480ad477d (diff) |
INTEGRATION: CWS sb18 (1.1.142); FILE MERGED
2004/05/12 14:58:58 sb 1.1.142.2: #i21150# Added clarifying comment.
2004/05/11 16:50:48 sb 1.1.142.1: #i21150# Adapted to instantiated polymorphic struct types.
Diffstat (limited to 'ridljar/com/sun/star/lib')
-rw-r--r-- | ridljar/com/sun/star/lib/uno/typeinfo/ParameterTypeInfo.java | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/ridljar/com/sun/star/lib/uno/typeinfo/ParameterTypeInfo.java b/ridljar/com/sun/star/lib/uno/typeinfo/ParameterTypeInfo.java index 09b7938fb50d..31bddcd7c66d 100644 --- a/ridljar/com/sun/star/lib/uno/typeinfo/ParameterTypeInfo.java +++ b/ridljar/com/sun/star/lib/uno/typeinfo/ParameterTypeInfo.java @@ -2,9 +2,9 @@ * * $RCSfile: ParameterTypeInfo.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jsc $ $Date: 2000-11-08 15:38:23 $ + * last change: $Author: obo $ $Date: 2004-06-04 02:52:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,17 +60,44 @@ ************************************************************************/ package com.sun.star.lib.uno.typeinfo; +import com.sun.star.uno.Type; public class ParameterTypeInfo extends TypeInfo { protected int m_index; protected String m_methodName; + private final Type m_unoType; // @since UDK 3.2 - public ParameterTypeInfo(String name, String methodName, int index, int flags) + /** + Create a parameter type info with a UNO type that cannot unambiguously be + represented as a Java 1.2 type. + + @param name the name of this parameter; must not be <code>null</code> + + @param methodName the name of the method; must not be <code>null</code> + + @param index the index among the parameters + + @param flags any flags (<code>IN</code>, <code>OUT</code>, + <code>UNSIGNED</code>, <code>ANY</code>, <code>INTERFACE</code>) + + @param unoType the exact UNO type; or <code>null</code> if the UNO type + is already unambiguously represented by the Java 1.2 type + + @since UDK 3.2 + */ + public ParameterTypeInfo( + String name, String methodName, int index, int flags, Type unoType) { super(name, flags); m_index = index; m_methodName = methodName; + m_unoType = unoType; + } + + public ParameterTypeInfo(String name, String methodName, int index, int flags) + { + this(name, methodName, index, flags, null); } public String getMethodName() @@ -98,6 +125,24 @@ public class ParameterTypeInfo extends TypeInfo { return (m_flags & (TypeInfo.IN | TypeInfo.OUT)) == (TypeInfo.IN | TypeInfo.OUT); } + + /** + Get the exact UNO type of this parameter type info, in case it cannot + unambiguously be represented as a Java 1.2 type. + + <p>If this is an out or in–out parameter, the UNO type must be a + sequence type, taking into account that such a parameter is represented + in Java as a parameter of array type.</p> + + @return the exact UNO type of this parameter type info, or + <code>null</code> if the UNO type is already unambiguously represented by + the Java 1.2 type + + @since UDK 3.2 + */ + public final Type getUnoType() { + return m_unoType; + } } |