From 7ddad3dc8261dc376da36e233d99df083beca77d Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Fri, 4 Jun 2004 01:51:15 +0000 Subject: [PATCH] INTEGRATION: CWS sb18 (1.2.8); FILE MERGED 2004/05/11 16:50:47 sb 1.2.8.1: #i21150# Adapted to instantiated polymorphic struct types. --- .../lib/uno/typeinfo/AttributeTypeInfo.java | 46 +++++++++++++++++-- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/ridljar/com/sun/star/lib/uno/typeinfo/AttributeTypeInfo.java b/ridljar/com/sun/star/lib/uno/typeinfo/AttributeTypeInfo.java index 6a220a6bafe2..ec0c2ca56aea 100644 --- a/ridljar/com/sun/star/lib/uno/typeinfo/AttributeTypeInfo.java +++ b/ridljar/com/sun/star/lib/uno/typeinfo/AttributeTypeInfo.java @@ -2,9 +2,9 @@ * * $RCSfile: AttributeTypeInfo.java,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: rt $ $Date: 2004-03-30 16:36:04 $ + * last change: $Author: obo $ $Date: 2004-06-04 02:51:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,16 +60,38 @@ ************************************************************************/ package com.sun.star.lib.uno.typeinfo; +import com.sun.star.uno.Type; public class AttributeTypeInfo extends TypeInfo { protected int m_index; + private final Type m_unoType; // @since UDK 3.2 + + /** + Create an attribute type info with a UNO type that cannot unambiguously + be represented as a Java 1.2 type. + + @param name the name of this attribute; must not be null + + @param index the index among the direct members + + @param flags any flags (READONLY, BOUND, + UNSIGNED, ANY, INTERFACE) + + @param unoType the exact UNO type; or null if the UNO type + is already unambiguously represented by the Java 1.2 type + + @since UDK 3.2 + */ + public AttributeTypeInfo(String name, int index, int flags, Type unoType) { + super(name, flags); + m_index = index; + m_unoType = unoType; + } public AttributeTypeInfo(String name, int index, int flags) { - super(name, flags); - - m_index = index; + this(name, index, flags, null); } public int getIndex() @@ -90,4 +112,18 @@ public class AttributeTypeInfo extends TypeInfo public final boolean isBound() { return (m_flags & TypeInfo.BOUND) != 0; } + + /** + Get the exact UNO type of this attribute type info, in case it cannot + unambiguously be represented as a Java 1.2 type. + + @return the exact UNO type of this attribute type info, or + null 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; + } }