001/* _DynAnyStub.java --
002   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
003
004This file is part of GNU Classpath.
005
006GNU Classpath is free software; you can redistribute it and/or modify
007it under the terms of the GNU General Public License as published by
008the Free Software Foundation; either version 2, or (at your option)
009any later version.
010
011GNU Classpath is distributed in the hope that it will be useful, but
012WITHOUT ANY WARRANTY; without even the implied warranty of
013MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014General Public License for more details.
015
016You should have received a copy of the GNU General Public License
017along with GNU Classpath; see the file COPYING.  If not, write to the
018Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
01902110-1301 USA.
020
021Linking this library statically or dynamically with other modules is
022making a combined work based on this library.  Thus, the terms and
023conditions of the GNU General Public License cover the whole
024combination.
025
026As a special exception, the copyright holders of this library give you
027permission to link this library with independent modules to produce an
028executable, regardless of the license terms of these independent
029modules, and to copy and distribute the resulting executable under
030terms of your choice, provided that you also meet, for each linked
031independent module, the terms and conditions of the license of that
032module.  An independent module is a module which is not derived from
033or based on this library.  If you modify this library, you may extend
034this exception to your version of the library, but you are not
035obligated to do so.  If you do not wish to do so, delete this
036exception statement from your version. */
037
038
039package org.omg.DynamicAny;
040
041import java.io.Serializable;
042
043import org.omg.CORBA.Any;
044import org.omg.CORBA.MARSHAL;
045import org.omg.CORBA.TypeCode;
046import org.omg.CORBA.portable.ObjectImpl;
047import org.omg.DynamicAny.DynAnyPackage.InvalidValue;
048import org.omg.DynamicAny.DynAnyPackage.TypeMismatch;
049
050/**
051 * Should provide support for remote invocation of methods on DynAny. As
052 * DynAny can never be remote at least till 1.5 inclusive, this class is
053 * not in use.
054 *
055 * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
056 */
057public class _DynAnyStub
058  extends ObjectImpl
059  implements DynAny, Serializable
060{
061  /**
062   * Use serialVersionUID (v1.4) for interoperability.
063   */
064  private static final long serialVersionUID = -6521892777941121597L;
065
066  /**
067   * The purpose and value of this field are not documented.
068   */
069  public static final Class _opsClass = DynAnyOperations.class;
070
071  /**
072   * Create the DynAny stub.
073   */
074  public _DynAnyStub()
075  {
076  }
077
078  /**
079   * Return the array of repository ids for this object.
080   */
081  public String[] _ids()
082  {
083    return new String[] { DynAnyHelper.id() };
084  }
085
086  /**
087   * The remote call of DynAny methods is not possible.
088   *
089   * @throws MARSHAL, always.
090   */
091  public TypeCode type()
092  {
093    throw new MARSHAL(NOT_APPLICABLE);
094  }
095
096  /**
097   * The remote call of DynAny methods is not possible.
098   *
099   * @throws MARSHAL, always.
100   */
101  public boolean next()
102  {
103    throw new MARSHAL(NOT_APPLICABLE);
104  }
105
106  /**
107   * The remote call of DynAny methods is not possible.
108   *
109   * @throws MARSHAL, always.
110   */
111  public void destroy()
112  {
113  }
114
115  /**
116   * The remote call of DynAny methods is not possible.
117   *
118   * @throws MARSHAL, always.
119   */
120  public DynAny copy()
121  {
122    return this;
123  }
124
125  /**
126   * The remote call of DynAny methods is not possible.
127   *
128   * @throws MARSHAL, always.
129   */
130  public void rewind()
131  {
132  }
133
134  /**
135   * The remote call of DynAny methods is not possible.
136   *
137   * @throws MARSHAL, always.
138   */
139  public void assign(DynAny _0)
140              throws TypeMismatch
141  {
142  }
143
144  /**
145   * The remote call of DynAny methods is not possible.
146   *
147   * @throws MARSHAL, always.
148   */
149  public int component_count()
150  {
151    throw new MARSHAL(NOT_APPLICABLE);
152  }
153
154  /**
155   * The remote call of DynAny methods is not possible.
156   *
157   * @throws MARSHAL, always.
158   */
159  public DynAny current_component()
160                           throws TypeMismatch
161  {
162    throw new MARSHAL(NOT_APPLICABLE);
163  }
164
165  /**
166   * The remote call of DynAny methods is not possible.
167   *
168   * @throws MARSHAL, always.
169   */
170  public boolean equal(DynAny _0)
171  {
172    throw new MARSHAL(NOT_APPLICABLE);
173  }
174
175  /**
176   * The remote call of DynAny methods is not possible.
177   *
178   * @throws MARSHAL, always.
179   */
180  public void from_any(Any _0)
181                throws TypeMismatch, InvalidValue
182  {
183    throw new MARSHAL(NOT_APPLICABLE);
184  }
185
186  /**
187   * The remote call of DynAny methods is not possible.
188   *
189   * @throws MARSHAL, always.
190   */
191  public Any get_any()
192              throws TypeMismatch, InvalidValue
193  {
194    throw new MARSHAL(NOT_APPLICABLE);
195  }
196
197  /**
198   * The remote call of DynAny methods is not possible.
199   *
200   * @throws MARSHAL, always.
201   */
202  public boolean get_boolean()
203                      throws TypeMismatch, InvalidValue
204  {
205    throw new MARSHAL(NOT_APPLICABLE);
206  }
207
208  /**
209   * The remote call of DynAny methods is not possible.
210   *
211   * @throws MARSHAL, always.
212   */
213  public char get_char()
214                throws TypeMismatch, InvalidValue
215  {
216    throw new MARSHAL(NOT_APPLICABLE);
217  }
218
219  /**
220   * The remote call of DynAny methods is not possible.
221   *
222   * @throws MARSHAL, always.
223   */
224  public double get_double()
225                    throws TypeMismatch, InvalidValue
226  {
227    throw new MARSHAL(NOT_APPLICABLE);
228  }
229
230  /**
231   * The remote call of DynAny methods is not possible.
232   *
233   * @throws MARSHAL, always.
234   */
235  public DynAny get_dyn_any()
236                     throws TypeMismatch, InvalidValue
237  {
238    throw new MARSHAL(NOT_APPLICABLE);
239  }
240
241  /**
242   * The remote call of DynAny methods is not possible.
243   *
244   * @throws MARSHAL, always.
245   */
246  public float get_float()
247                  throws TypeMismatch, InvalidValue
248  {
249    throw new MARSHAL(NOT_APPLICABLE);
250  }
251
252  /**
253   * The remote call of DynAny methods is not possible.
254   *
255   * @throws MARSHAL, always.
256   */
257  public int get_long()
258               throws TypeMismatch, InvalidValue
259  {
260    throw new MARSHAL(NOT_APPLICABLE);
261  }
262
263  /**
264   * The remote call of DynAny methods is not possible.
265   *
266   * @throws MARSHAL, always.
267   */
268  public long get_longlong()
269                    throws TypeMismatch, InvalidValue
270  {
271    throw new MARSHAL(NOT_APPLICABLE);
272  }
273
274  /**
275   * The remote call of DynAny methods is not possible.
276   *
277   * @throws MARSHAL, always.
278   */
279  public byte get_octet()
280                 throws TypeMismatch, InvalidValue
281  {
282    throw new MARSHAL(NOT_APPLICABLE);
283  }
284
285  /**
286   * The remote call of DynAny methods is not possible.
287   *
288   * @throws MARSHAL, always.
289   */
290  public org.omg.CORBA.Object get_reference()
291                                     throws TypeMismatch, InvalidValue
292  {
293    throw new MARSHAL(NOT_APPLICABLE);
294  }
295
296  /**
297   * The remote call of DynAny methods is not possible.
298   *
299   * @throws MARSHAL, always.
300   */
301  public short get_short()
302                  throws TypeMismatch, InvalidValue
303  {
304    throw new MARSHAL(NOT_APPLICABLE);
305  }
306
307  /**
308   * The remote call of DynAny methods is not possible.
309   *
310   * @throws MARSHAL, always.
311   */
312  public String get_string()
313                    throws TypeMismatch, InvalidValue
314  {
315    throw new MARSHAL(NOT_APPLICABLE);
316  }
317
318  /**
319   * The remote call of DynAny methods is not possible.
320   *
321   * @throws MARSHAL, always.
322   */
323  public TypeCode get_typecode()
324                        throws TypeMismatch, InvalidValue
325  {
326    throw new MARSHAL(NOT_APPLICABLE);
327  }
328
329  /**
330   * The remote call of DynAny methods is not possible.
331   *
332   * @throws MARSHAL, always.
333   */
334  public int get_ulong()
335                throws TypeMismatch, InvalidValue
336  {
337    throw new MARSHAL(NOT_APPLICABLE);
338  }
339
340  /**
341   * The remote call of DynAny methods is not possible.
342   *
343   * @throws MARSHAL, always.
344   */
345  public long get_ulonglong()
346                     throws TypeMismatch, InvalidValue
347  {
348    throw new MARSHAL(NOT_APPLICABLE);
349  }
350
351  /**
352   * The remote call of DynAny methods is not possible.
353   *
354   * @throws MARSHAL, always.
355   */
356  public short get_ushort()
357                   throws TypeMismatch, InvalidValue
358  {
359    throw new MARSHAL(NOT_APPLICABLE);
360  }
361
362  /**
363   * The remote call of DynAny methods is not possible.
364   *
365   * @throws MARSHAL, always.
366   */
367  public Serializable get_val()
368                       throws TypeMismatch, InvalidValue
369  {
370    throw new MARSHAL(NOT_APPLICABLE);
371  }
372
373  /**
374   * The remote call of DynAny methods is not possible.
375   *
376   * @throws MARSHAL, always.
377   */
378  public char get_wchar()
379                 throws TypeMismatch, InvalidValue
380  {
381    throw new MARSHAL(NOT_APPLICABLE);
382  }
383
384  /**
385   * The remote call of DynAny methods is not possible.
386   *
387   * @throws MARSHAL, always.
388   */
389  public String get_wstring()
390                     throws TypeMismatch, InvalidValue
391  {
392    throw new MARSHAL(NOT_APPLICABLE);
393  }
394
395  /**
396   * The remote call of DynAny methods is not possible.
397   *
398   * @throws MARSHAL, always.
399   */
400  public void insert_any(Any _0)
401                  throws TypeMismatch, InvalidValue
402  {
403    throw new MARSHAL(NOT_APPLICABLE);
404  }
405
406  /**
407   * The remote call of DynAny methods is not possible.
408   *
409   * @throws MARSHAL, always.
410   */
411  public void insert_boolean(boolean _0)
412                      throws TypeMismatch, InvalidValue
413  {
414    throw new MARSHAL(NOT_APPLICABLE);
415  }
416
417  /**
418   * The remote call of DynAny methods is not possible.
419   *
420   * @throws MARSHAL, always.
421   */
422  public void insert_char(char _0)
423                   throws TypeMismatch, InvalidValue
424  {
425    throw new MARSHAL(NOT_APPLICABLE);
426  }
427
428  /**
429   * The remote call of DynAny methods is not possible.
430   *
431   * @throws MARSHAL, always.
432   */
433  public void insert_double(double _0)
434                     throws TypeMismatch, InvalidValue
435  {
436    throw new MARSHAL(NOT_APPLICABLE);
437  }
438
439  /**
440   * The remote call of DynAny methods is not possible.
441   *
442   * @throws MARSHAL, always.
443   */
444  public void insert_dyn_any(DynAny _0)
445                      throws TypeMismatch, InvalidValue
446  {
447    throw new MARSHAL(NOT_APPLICABLE);
448  }
449
450  /**
451   * The remote call of DynAny methods is not possible.
452   *
453   * @throws MARSHAL, always.
454   */
455  public void insert_float(float _0)
456                    throws TypeMismatch, InvalidValue
457  {
458    throw new MARSHAL(NOT_APPLICABLE);
459  }
460
461  /**
462   * The remote call of DynAny methods is not possible.
463   *
464   * @throws MARSHAL, always.
465   */
466  public void insert_long(int _0)
467                   throws TypeMismatch, InvalidValue
468  {
469    throw new MARSHAL(NOT_APPLICABLE);
470  }
471
472  /**
473   * The remote call of DynAny methods is not possible.
474   *
475   * @throws MARSHAL, always.
476   */
477  public void insert_longlong(long _0)
478                       throws TypeMismatch, InvalidValue
479  {
480    throw new MARSHAL(NOT_APPLICABLE);
481  }
482
483  /**
484   * The remote call of DynAny methods is not possible.
485   *
486   * @throws MARSHAL, always.
487   */
488  public void insert_octet(byte _0)
489                    throws TypeMismatch, InvalidValue
490  {
491    throw new MARSHAL(NOT_APPLICABLE);
492  }
493
494  /**
495   * The remote call of DynAny methods is not possible.
496   *
497   * @throws MARSHAL, always.
498   */
499  public void insert_reference(org.omg.CORBA.Object _0)
500                        throws TypeMismatch, InvalidValue
501  {
502    throw new MARSHAL(NOT_APPLICABLE);
503  }
504
505  /**
506   * The remote call of DynAny methods is not possible.
507   *
508   * @throws MARSHAL, always.
509   */
510  public void insert_short(short _0)
511                    throws TypeMismatch, InvalidValue
512  {
513    throw new MARSHAL(NOT_APPLICABLE);
514  }
515
516  /**
517   * The remote call of DynAny methods is not possible.
518   *
519   * @throws MARSHAL, always.
520   */
521  public void insert_string(String _0)
522                     throws TypeMismatch, InvalidValue
523  {
524    throw new MARSHAL(NOT_APPLICABLE);
525  }
526
527  /**
528   * The remote call of DynAny methods is not possible.
529   *
530   * @throws MARSHAL, always.
531   */
532  public void insert_typecode(TypeCode _0)
533                       throws TypeMismatch, InvalidValue
534  {
535    throw new MARSHAL(NOT_APPLICABLE);
536  }
537
538  /**
539   * The remote call of DynAny methods is not possible.
540   *
541   * @throws MARSHAL, always.
542   */
543  public void insert_ulong(int _0)
544                    throws TypeMismatch, InvalidValue
545  {
546    throw new MARSHAL(NOT_APPLICABLE);
547  }
548
549  /**
550   * The remote call of DynAny methods is not possible.
551   *
552   * @throws MARSHAL, always.
553   */
554  public void insert_ulonglong(long _0)
555                        throws TypeMismatch, InvalidValue
556  {
557    throw new MARSHAL(NOT_APPLICABLE);
558  }
559
560  /**
561   * The remote call of DynAny methods is not possible.
562   *
563   * @throws MARSHAL, always.
564   */
565  public void insert_ushort(short _0)
566                     throws TypeMismatch, InvalidValue
567  {
568    throw new MARSHAL(NOT_APPLICABLE);
569  }
570
571  /**
572   * The remote call of DynAny methods is not possible.
573   *
574   * @throws MARSHAL, always.
575   */
576  public void insert_val(Serializable _0)
577                  throws TypeMismatch, InvalidValue
578  {
579    throw new MARSHAL(NOT_APPLICABLE);
580  }
581
582  /**
583   * The remote call of DynAny methods is not possible.
584   *
585   * @throws MARSHAL, always.
586   */
587  public void insert_wchar(char _0)
588                    throws TypeMismatch, InvalidValue
589  {
590    throw new MARSHAL(NOT_APPLICABLE);
591  }
592
593  /**
594   * The remote call of DynAny methods is not possible.
595   *
596   * @throws MARSHAL, always.
597   */
598  public void insert_wstring(String _0)
599                      throws TypeMismatch, InvalidValue
600  {
601    throw new MARSHAL(NOT_APPLICABLE);
602  }
603
604  /**
605   * The remote call of DynAny methods is not possible.
606   *
607   * @throws MARSHAL, always.
608   */
609  public boolean seek(int _0)
610  {
611    throw new MARSHAL(NOT_APPLICABLE);
612  }
613
614  /**
615   * The remote call of DynAny methods is not possible.
616   *
617   * @throws MARSHAL, always.
618   */
619  public Any to_any()
620  {
621    throw new MARSHAL(NOT_APPLICABLE);
622  }
623
624  static String NOT_APPLICABLE =
625    "DynAnys are always local objects. " +
626    "They and are never accessed on remote side via stubs.";
627}