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.lib.uno.typedesc;
25 
26 import com.sun.star.uno.IFieldDescription;
27 import com.sun.star.uno.ITypeDescription;
28 import java.lang.reflect.Field;
29 
30 final class FieldDescription implements IFieldDescription {
FieldDescription( String name, int index, ITypeDescription typeDescription, Field field)31     public FieldDescription(
32         String name, int index, ITypeDescription typeDescription, Field field)
33     {
34         this.name = name;
35         this.index = index;
36         this.typeDescription = typeDescription;
37         this.field = field;
38     }
39 
getName()40     public String getName() {
41         return name;
42     }
43 
isUnsigned()44     public boolean isUnsigned() {
45         return MemberDescriptionHelper.isUnsigned(typeDescription);
46     }
47 
isAny()48     public boolean isAny() {
49         return MemberDescriptionHelper.isAny(typeDescription);
50     }
51 
isInterface()52     public boolean isInterface() {
53         return MemberDescriptionHelper.isInterface(typeDescription);
54     }
55 
getIndex()56     public int getIndex() {
57         return index;
58     }
59 
getTypeDescription()60     public ITypeDescription getTypeDescription() {
61         return typeDescription;
62     }
63 
getField()64     public Field getField() {
65         return field;
66     }
67 
68     private final String name;
69     private final int index;
70     private final ITypeDescription typeDescription;
71     private final Field field;
72 }
73