xref: /trunk/main/ridljar/java/ridl/src/main/java/com/sun/star/lib/uno/typeinfo/TypeInfo.java (revision 3309286857f19787ae62bd793a98b5af4edd2ad3)
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 package com.sun.star.lib.uno.typeinfo;
24 
25 
26 /** Defines a class to describe additional type information.
27  */
28 public class TypeInfo
29 {
30     public static final int IN          = 0x00000001;
31     public static final int OUT         = 0x00000002;
32     public static final int UNSIGNED    = 0x00000004;
33     public static final int READONLY    = 0x00000008;
34     public static final int ONEWAY      = 0x00000010;
35     public static final int CONST       = 0x00000020;
36     public static final int ANY         = 0x00000040;
37     public static final int INTERFACE   = 0x00000080;
38 
39     /**
40        Marks an extended attribute of an interface type as bound.
41 
42        <p>Only used in the <code>flags</code> argument of the
43        <code>AttributeTypeInfo</code> constructors.</p>
44 
45        @since UDK 3.2
46      */
47     public static final int BOUND = 0x00000100;
48 
49     protected int       m_flags;
50     protected String    m_name;
51 
TypeInfo(String name, int flags)52     public TypeInfo(String name, int flags)
53     {
54         m_name = name;
55         m_flags = flags;
56     }
57 
getName()58     public String getName()
59     {
60         return m_name;
61     }
62 
getFlags()63     public int getFlags() {
64         return m_flags;
65     }
66 
isUnsigned()67     public boolean isUnsigned()
68     {
69         return (m_flags & TypeInfo.UNSIGNED) != 0;
70     }
71 
isAny()72     public boolean isAny()
73     {
74         return (m_flags & TypeInfo.ANY) != 0;
75     }
76 
isInterface()77     public boolean isInterface()
78     {
79         return (m_flags & TypeInfo.INTERFACE) != 0;
80     }
81 }
82