1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 package com.sun.star.uno; 25 26 /** 27 * The <code>ITypeDescription</code> allows to examine a type 28 * in detail (e.g. it is used for marshaling/unmarshaling). 29 * 30 * @deprecated This interface does not cover all the features supported by the 31 * corresponding (unpublished) implementation. But no client code should need 32 * to access this functionality, anyway. 33 */ 34 public interface ITypeDescription { 35 /** 36 * Gets the <code>ITypeDescription</code> of the 37 * super, if it exists. 38 * <p> 39 * @return the <code>ITypeDescription</code>. 40 */ getSuperType()41 ITypeDescription getSuperType(); 42 43 /** 44 * Gets the <code>IMethodDescription</code> for every 45 * method, if this type is an interface. Otherwise 46 * returns <code>null</code>. 47 * <p> 48 * @return the <code>IMethodDescription[]</code>. 49 */ getMethodDescriptions()50 IMethodDescription []getMethodDescriptions(); 51 52 /** 53 * Gets the <code>IMethodDescription</code> for the 54 * method with index methodId, if it exists, otherwise 55 * returns <code>null</code>. 56 * <p> 57 * @return the <code>IMethodDescription</code>. 58 */ getMethodDescription(int methodId)59 IMethodDescription getMethodDescription(int methodId); 60 61 /** 62 * Gets the <code>IMethodDescription</code> for the 63 * method with the name <code>name</code>, if it exists, 64 * otherwise returns <code>null</code>. 65 * <p> 66 * @return the <code>IMethodDescription</code>. 67 */ getMethodDescription(String name)68 IMethodDescription getMethodDescription(String name); 69 70 /** 71 * Gets the <code>IFieldDescription</code> for every 72 * field, if this type is an interface. Otherwise 73 * returns <code>null</code>. 74 * <p> 75 * @return the <code>IFieldDescription[]</code>. 76 */ getFieldDescriptions()77 IFieldDescription []getFieldDescriptions(); 78 79 /** 80 * Gets the <code>IFieldDescription</code> for the 81 * field with the name <code>name</code>, if it exists, 82 * otherwise returns <code>null</code>. 83 * <p> 84 * @return the <code>IFieldDescription</code>. 85 */ getFieldDescription(String name)86 IFieldDescription getFieldDescription(String name); 87 88 /** 89 * Gets the IDL <code>TypeClass</code> of the type. 90 * <p> 91 * @return the <code>TypeClass</code>. 92 */ getTypeClass()93 TypeClass getTypeClass(); 94 95 /** 96 * Gets the component <code>ITypeDescription</code> if 97 * this is an array type, otherwise returns <code>null</code>. 98 * <p> 99 * @return the <code>ITypeDescription</code> 100 */ getComponentType()101 ITypeDescription getComponentType(); 102 103 /** 104 * Gets the (UNO) type name. 105 * 106 * <table> 107 * <caption>The following table lists how UNO types map to type names:</caption> 108 * <thead> 109 * <tr><th>UNO type</th><th>type name</th></tr> 110 * </thead> 111 * <tbody> 112 * <tr><td>VOID</td><td><code>"void"</code></td></tr> 113 * <tr><td>BOOLEAN</td><td><code>"boolean"</code></td></tr> 114 * <tr><td>CHAR</td><td><code>"char"</code></td></tr> 115 * <tr><td>BYTE</td><td><code>"byte"</code></td></tr> 116 * <tr><td>SHORT</td><td><code>"short"</code></td></tr> 117 * <tr> 118 * <td>UNSIGNED SHORT</td><td><code>"unsigned short"</code></td> 119 * </tr> 120 * <tr><td>LONG</td><td><code>"long"</code></td></tr> 121 * <tr><td>UNSIGNED LONG</td><td><code>"unsigned long"</code></td></tr> 122 * <tr><td>HYPER</td><td><code>"hyper"</code></td></tr> 123 * <tr> 124 * <td>UNSIGNED HYPER</td><td><code>"unsigned hyper"</code></td> 125 * </tr> 126 * <tr><td>FLOAT</td><td><code>"float"</code></td></tr> 127 * <tr><td>DOUBLE</td><td><code>"double"</code></td></tr> 128 * <tr><td>STRING</td><td><code>"string"</code></td></tr> 129 * <tr><td>TYPE</td><td><code>"type"</code></td></tr> 130 * <tr><td>ANY</td><td><code>"any"</code></td></tr> 131 * <tr> 132 * <td>sequence type of base type <var>T</var></td> 133 * <td><code>"[]"</code> followed by type name for <var>T</var></td> 134 * </tr> 135 * <tr> 136 * <td>enum type named <var>N</var></td> 137 * <td><var>N</var> (see below)</td> 138 * </tr> 139 * <tr> 140 * <td>struct type named <var>N</var></td> 141 * <td><var>N</var> (see below)</td> 142 * </tr> 143 * <tr> 144 * <td>exception type named <var>N</var> 145 * </td><td><var>N</var> (see below)</td> 146 * </tr> 147 * <tr> 148 * <td>interface type named <var>N</var></td> 149 * <td><var>N</var> (see below)</td> 150 * </tr> 151 * </tbody> 152 * </table> 153 * <p>For a UNO type named <var>N</var>, consisting of a sequence of module 154 * names <var>M<sub>1</sub></var>, ..., <var>M<sub>n</sub></var> followed by 155 * a simple name <var>S</var>, the corresponding type name consists of the 156 * same sequence of module names and simple name, with <code>"."</code> 157 * seperating the individual elements.</p> 158 * 159 * @return the type name. 160 */ getTypeName()161 String getTypeName(); 162 163 /** 164 * Gets the (Java) array type name. 165 * 166 * <p>The array type name is defined to be the Java class name (as returned 167 * by <code>Class.forName</code>) of the Java array class that corresponds 168 * to the UNO sequence type with this type (the UNO type represented by this 169 * <code>ITypeDescription</code> instance) as base type. For an 170 * <code>ITypeDescription</code> instance representing the UNO type VOID, 171 * the array type name is defined to be 172 * <code>"[Ljava.lang.Void;"</code>.</p> 173 * 174 * @return the array type name. 175 */ getArrayTypeName()176 String getArrayTypeName(); 177 178 /** 179 * Gets the corresponding java class for the type. 180 * <p> 181 * @return the corresponding java class. 182 */ getZClass()183 Class getZClass(); 184 } 185