corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Helper24.java
equal
deleted
inserted
replaced
68 } // ctor |
68 } // ctor |
69 |
69 |
70 /** |
70 /** |
71 * Generate the heading, including package, imports, class statements, |
71 * Generate the heading, including package, imports, class statements, |
72 * and open curly. |
72 * and open curly. |
73 * <d62023> - don't implement ValueHelper, make non-boxed helpers abstract |
73 * d62023 - don't implement ValueHelper, make non-boxed helpers abstract |
74 **/ |
74 **/ |
75 protected void writeHeading () |
75 protected void writeHeading () |
76 { |
76 { |
77 Util.writePackage (stream, entry, Util.HelperFile); |
77 Util.writePackage (stream, entry, Util.HelperFile); |
78 Util.writeProlog (stream, stream.name ()); |
78 Util.writeProlog (stream, stream.name ()); |
90 stream.println ('{'); |
90 stream.println ('{'); |
91 } |
91 } |
92 |
92 |
93 /** |
93 /** |
94 * Generate the instance variables. |
94 * Generate the instance variables. |
95 * <d62023> - no helper instance except for boxed valuetypes. |
95 * <pre> |
96 * - move truncatable_ids to mapped class. |
96 * d62023 - no helper instance except for boxed valuetypes; |
|
97 * - move truncatable_ids to mapped class. |
|
98 * </pre> |
97 **/ |
99 **/ |
98 protected void writeInstVars () |
100 protected void writeInstVars () |
99 { |
101 { |
100 stream.println (" private static String _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";"); |
102 stream.println (" private static String _id = \"" + Util.stripLeadingUnderscoresFromID (entry.repositoryID ().ID ()) + "\";"); |
101 if (entry instanceof ValueEntry) |
103 if (entry instanceof ValueEntry) |
108 } |
110 } |
109 stream.println (); |
111 stream.println (); |
110 } // writeInstVars |
112 } // writeInstVars |
111 |
113 |
112 /** |
114 /** |
113 * <d62023> generate members of BoxedValueHelper interface if boxed |
115 * d62023 - generate members of BoxedValueHelper interface if boxed |
114 * |
116 * |
115 * <d62023> Hook in here to write factory methods for non-boxed ValueTypes |
117 * d62023 - hook in here to write factory methods for non-boxed ValueTypes |
116 * into Helper. |
118 * into Helper. |
117 **/ |
119 **/ |
118 protected void writeValueHelperInterface () |
120 protected void writeValueHelperInterface () |
119 { |
121 { |
120 if (entry instanceof ValueBoxEntry) { |
122 if (entry instanceof ValueBoxEntry) { |
141 } |
143 } |
142 } |
144 } |
143 } // writeHelperFactories |
145 } // writeHelperFactories |
144 |
146 |
145 /** |
147 /** |
146 * <d62023> Generate constructors only for boxed valuetype helpers |
148 * d62023 - generate constructors only for boxed valuetype helpers. |
147 * All other helpers are abstract. |
149 * All other helpers are abstract. |
148 **/ |
150 **/ |
149 protected void writeCtors () |
151 protected void writeCtors () |
150 { |
152 { |
151 if (entry instanceof ValueBoxEntry) { |
153 if (entry instanceof ValueBoxEntry) { |
152 stream.println (" public " + helperClass + "()"); |
154 stream.println (" public " + helperClass + "()"); |