KickJava   Java API By Example, From Geeks To Geeks.

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


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 package org.jacorb.ir.gui.typesystem.remote;
22
23 import org.omg.CORBA.*;
24
25 /**
26  * This class was generated by a SmartGuide.
27  *
28  */

29 public class IRParameter extends IRNodeWithType
30 {
31     private ParameterDescription parDesc;
32
33     /**
34      * IRParameter constructor comment.
35      */

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

43     protected IRParameter(org.omg.CORBA.ParameterDescription JavaDoc parDesc) {
44     setName(parDesc.name);
45     setAssociatedTypeSystemNode(RemoteTypeSystem.createTypeSystemNode(parDesc.type_def));
46     this.parDesc = parDesc;
47     }
48     public ParameterMode getMode() {
49     return parDesc.mode;
50     }
51     /**
52      * This method was created by a SmartGuide.
53      * @return org.omg.CORBA.TypeCode
54      */

55     public TypeCode getTypeCode() {
56     return parDesc.type;
57     }
58
59     public String JavaDoc getInstanceNodeTypeName ( ) {
60     String JavaDoc result = super.getInstanceNodeTypeName();
61     String JavaDoc suffix = null;
62     switch (parDesc.mode.value()) {
63         case ParameterMode._PARAM_IN:
64             suffix = "in";
65             break;
66         case ParameterMode._PARAM_OUT:
67             suffix = "out";
68             break;
69         case ParameterMode._PARAM_INOUT:
70             suffix = "inout";
71             break;
72         default:
73     }
74     if (suffix!=null) {
75             result = suffix + " " + result;
76     }
77     return result;
78     }
79
80     public static String JavaDoc nodeTypeName() {
81     return "";
82     }
83
84
85 }
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
Popular Tags