KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > ir > gui > typesystem > remote > IRPrimitive


1 /*
2  * JacORB - a free Java ORB
3  *
4  * Copyright (C) 1999-2004 Gerald Brose
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the Free
18  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  */

21
22 package org.jacorb.ir.gui.typesystem.remote;
23
24
25 import org.omg.CORBA.*;
26
27 /**
28  * This class was generated by a SmartGuide.
29  *
30  */

31 public class IRPrimitive extends IRNode {
32
33
34
35 /**
36  * IRPrimitive constructor comment.
37  */

38 protected IRPrimitive() {
39     super();
40 }
41 /**
42  * IRPrimitive constructor comment.
43  * @param irObject org.omg.CORBA.IRObject
44  */

45 protected IRPrimitive(org.omg.CORBA.IRObject JavaDoc irObject) {
46     super(irObject);
47     PrimitiveDef primitiveDef = PrimitiveDefHelper.narrow((org.omg.CORBA.Object JavaDoc)irObject);
48     switch (primitiveDef.kind().value()) {
49         case PrimitiveKind._pk_null:
50             setName("null"); // gibt's nicht laut CORBA Spez.
51
break;
52         case PrimitiveKind._pk_void:
53             setName("void");
54             break;
55         case PrimitiveKind._pk_short :
56             setName("short");
57             break;
58         case PrimitiveKind._pk_long:
59             setName("long");
60             break;
61         case PrimitiveKind._pk_ushort:
62             setName("unsigned short");
63             break;
64         case PrimitiveKind._pk_ulong:
65             setName("usigned long");
66             break;
67         case PrimitiveKind._pk_float:
68             setName("float");
69             break;
70         case PrimitiveKind._pk_double:
71             setName("double");
72             break;
73         case PrimitiveKind._pk_boolean:
74             setName("boolean");
75             break;
76         case PrimitiveKind._pk_char:
77             setName("char");
78             break;
79         case PrimitiveKind._pk_octet:
80             setName("octet");
81             break;
82         case PrimitiveKind._pk_any:
83             setName("any");
84             break;
85         case PrimitiveKind._pk_TypeCode:
86             setName("typecode");
87             break;
88         case PrimitiveKind._pk_Principal:
89             setName("Principal");
90             break;
91         case PrimitiveKind._pk_string:
92             setName("string");
93             break;
94         case PrimitiveKind._pk_objref:
95             setName("objref");
96             break;
97         case PrimitiveKind._pk_longlong:
98             setName("long long");
99             break;
100         case PrimitiveKind._pk_ulonglong:
101             setName("unsigned long long");
102             break;
103         case PrimitiveKind._pk_longdouble:
104             setName("long double");
105             break;
106         case PrimitiveKind._pk_wchar:
107             setName("wchar");
108             break;
109         case PrimitiveKind._pk_wstring:
110             setName("wstring");
111             break;
112         default:
113             setName("unknown Primitive??");
114             break;
115     }
116     setAbsoluteName(getName());
117 }
118 /**
119  * This method was created by a SmartGuide.
120  * @return java.lang.String
121  */

122 public static String JavaDoc nodeTypeName() {
123     return "primitive";
124 }
125 }
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Popular Tags