1 /*
2  * %CopyrightBegin%
3  *
4  * Copyright Ericsson AB 1999-2016. All Rights Reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * %CopyrightEnd%
19  *
20  */
21 package com.ericsson.otp.ic;
22 
23 /**
24 
25 Holder class for Any, according to OMG-IDL java mapping.
26 <p>Instead for _write,_read methods, the methods _marshal respective
27 _unmarshal are used to denote the implementation difference.
28 
29 **/
30 
31 final public class AnyHolder {
32 
33   // Instance variables
34   public Any value;
35 
36   // Constructors
AnyHolder()37   public AnyHolder() {}
38 
AnyHolder(Any initial)39   public AnyHolder(Any initial) {
40     value = initial;
41   }
42 
43   // Methods
44   /**
45     Marshal method for the Any class, encodes the Any object to the output stream.
46     **/
_marshal(com.ericsson.otp.erlang.OtpOutputStream out)47   public void _marshal(com.ericsson.otp.erlang.OtpOutputStream out)
48     throws java.lang.Exception {
49       AnyHelper.marshal(out, value);
50   }
51 
52   /**
53     Unmarshal method for the Any class, decodes an Any object from the stream and
54     assigns it to the Holder value.
55     **/
_unmarshal(com.ericsson.otp.erlang.OtpInputStream in)56   public void _unmarshal(com.ericsson.otp.erlang.OtpInputStream in)
57     throws java.lang.Exception {
58       value = AnyHelper.unmarshal(in);
59   }
60 
61 }
62