diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-06-04 01:51:45 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-06-04 01:51:45 +0000 |
commit | 40f2b40ecd5198e0c94ffc5b13bd97056e63bac0 (patch) | |
tree | a7ea41b8bbb3607864ce226dfbbb6902865c248d /ridljar/com/sun/star/lib | |
parent | ee7721942e8acd2f676671863aff1d0d64293494 (diff) |
INTEGRATION: CWS sb18 (1.2.120); FILE MERGED
2004/05/11 16:50:47 sb 1.2.120.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/MemberTypeInfo.java | 65 |
1 files changed, 62 insertions, 3 deletions
diff --git a/ridljar/com/sun/star/lib/uno/typeinfo/MemberTypeInfo.java b/ridljar/com/sun/star/lib/uno/typeinfo/MemberTypeInfo.java index 6c9723aebb4d..c5a7993213c9 100644 --- a/ridljar/com/sun/star/lib/uno/typeinfo/MemberTypeInfo.java +++ b/ridljar/com/sun/star/lib/uno/typeinfo/MemberTypeInfo.java @@ -2,9 +2,9 @@ * * $RCSfile: MemberTypeInfo.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jbu $ $Date: 2001-10-26 11:43:05 $ + * last change: $Author: obo $ $Date: 2004-06-04 02:51:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,21 +60,80 @@ ************************************************************************/ package com.sun.star.lib.uno.typeinfo; +import com.sun.star.uno.Type; public class MemberTypeInfo extends TypeInfo { int m_index; + private final Type m_unoType; // @since UDK 3.2 + private final int m_typeParameterIndex; // @since UDK 3.2 - public MemberTypeInfo(String name, int index, int flags ) + /** + Create a member type info with a UNO type that cannot unambiguously be + represented as a Java 1.2 type. + + @param name the name of this member; must not be <code>null</code> + + @param index the index among the direct members + + @param flags any flags (<code>UNSIGNED</code>, <code>ANY</code>, + <code>INTERFACE</code>, <code>TYPE_PARAMETER</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 + + @param typeParameterIndex the index of the type parameter that determines + the type of this parameterized member; or <code>-1</code> if this member + is of an explicit type, or is the member of a plain struct type + + @since UDK 3.2 + */ + public MemberTypeInfo( + String name, int index, int flags, Type unoType, int typeParameterIndex) { super(name, flags); m_index = index; + m_unoType = unoType; + m_typeParameterIndex = typeParameterIndex; + } + + public MemberTypeInfo(String name, int index, int flags ) + { + this(name, index, flags, null, -1); } public int getIndex() { return m_index; } + + /** + Get the exact UNO type of this member type info, in case it cannot + unambiguously be represented as a Java 1.2 type. + + @return the exact UNO type of this member 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; + } + + /** + Returns the index of the type parameter that determines the parameterized + type of this member. + + @return the index of the type parameter that determines the type of this + parameterized member; if this member is of an explicit type, or is the + member of a plain struct type, <code>-1</code> is returned + + @since UDK 3.2 + */ + public final int getTypeParameterIndex() { + return m_typeParameterIndex; + } } |