Class AnyImpl

    • Field Detail

      • orb

        @Copy(IDENTITY)
        protected transient ORB orb
      • value

        private long value
      • object

        private java.lang.Object object
      • isInitialized

        private boolean isInitialized
      • isStreamed

        static boolean[] isStreamed
    • Constructor Detail

      • AnyImpl

        public AnyImpl​(ORB orb)
        A constructor that sets the Any to contain a null. It also marks the value as being invalid so that extractions throw an exception until an insertion has been performed.
        Parameters:
        orb - ORB to use for this any
      • AnyImpl

        public AnyImpl​(ORB orb,
                       Any obj)
    • Method Detail

      • readObject

        private void readObject​(java.io.ObjectInputStream is)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • type

        public TypeCode type()
        returns the type of the element contained in the Any.
        Specified by:
        type in class Any
        Returns:
        the TypeCode for the element in the Any
      • realType

        private TypeCode realType()
      • type

        public void type​(TypeCode tc)
        sets the type of the element to be contained in the Any.
        Specified by:
        type in class Any
        Parameters:
        tc - the TypeCode for the element in the Any
      • create_output_stream

        public OutputStream create_output_stream()
        returns an output stream that an Any value can be marshaled into.
        Specified by:
        create_output_stream in class Any
        Returns:
        the OutputStream to marshal value of Any into
      • create_input_stream

        public InputStream create_input_stream()
        returns an input stream that an Any value can be marshaled out of.
        Specified by:
        create_input_stream in class Any
        Returns:
        the InputStream to marshal value of Any out of.
      • read_value

        public void read_value​(InputStream in,
                               TypeCode tc)
        Description copied from class: Any
        Reads off (unmarshals) the value of an Any object from the given input stream using the given typecode.
        Specified by:
        read_value in class Any
        Parameters:
        in - the org.omg.CORBA.portable.InputStream object from which to read the value contained in this Any object
        tc - a TypeCode object containing type information about the value to be read
      • write_value

        public void write_value​(OutputStream out)
        Description copied from class: Any
        Writes out the value of this Any object to the given output stream. If both typecode and value need to be written, use create_output_stream() to create an OutputStream, then use write_any on the OutputStream.

        If this method is called on an Any object that has not had a value inserted into its value field, it will throw the exception java.lang.NullPointerException.

        Specified by:
        write_value in class Any
        Parameters:
        out - the org.omg.CORBA.portable.OutputStream object into which to marshal the value of this Any object
      • insert_short

        public void insert_short​(short s)
        See the description of the general Any operations.
        Specified by:
        insert_short in class Any
        Parameters:
        s - the short to insert into this Any object
      • getTCKindName

        private java.lang.String getTCKindName​(int tc)
      • checkExtractBadOperation

        private void checkExtractBadOperation​(int expected)
      • checkExtractBadOperationList

        private void checkExtractBadOperationList​(int[] expected)
      • insert_long

        public void insert_long​(int l)
        See the description of the general Any operations.
        Specified by:
        insert_long in class Any
        Parameters:
        l - the int to insert into this Any object
      • insert_ushort

        public void insert_ushort​(short s)
        See the description of the general Any operations.
        Specified by:
        insert_ushort in class Any
        Parameters:
        s - the short to insert into this Any object
      • insert_ulong

        public void insert_ulong​(int l)
        See the description of the general Any operations.
        Specified by:
        insert_ulong in class Any
        Parameters:
        l - the int to insert into this Any object
      • insert_float

        public void insert_float​(float f)
        See the description of the general Any operations.
        Specified by:
        insert_float in class Any
        Parameters:
        f - the float to insert into this Any object
      • insert_double

        public void insert_double​(double d)
        See the description of the general Any operations.
        Specified by:
        insert_double in class Any
        Parameters:
        d - the double to insert into this Any object
      • insert_longlong

        public void insert_longlong​(long l)
        See the description of the general Any operations.
        Specified by:
        insert_longlong in class Any
        Parameters:
        l - the long to insert into this Any object
      • insert_ulonglong

        public void insert_ulonglong​(long l)
        See the description of the general Any operations.
        Specified by:
        insert_ulonglong in class Any
        Parameters:
        l - the long to insert into this Any object
      • insert_boolean

        public void insert_boolean​(boolean b)
        See the description of the general Any operations.
        Specified by:
        insert_boolean in class Any
        Parameters:
        b - the boolean to insert into this Any object
      • insert_char

        public void insert_char​(char c)
        See the description of the general Any operations.
        Specified by:
        insert_char in class Any
        Parameters:
        c - the char to insert into this Any object
      • insert_wchar

        public void insert_wchar​(char c)
        See the description of the general Any operations.
        Specified by:
        insert_wchar in class Any
        Parameters:
        c - the char to insert into this Any object
      • insert_octet

        public void insert_octet​(byte b)
        See the description of the general Any operations.
        Specified by:
        insert_octet in class Any
        Parameters:
        b - the byte to insert into this Any object
      • insert_string

        public void insert_string​(java.lang.String s)
        See the description of the general Any operations.
        Specified by:
        insert_string in class Any
        Parameters:
        s - the String object to insert into this Any object
      • extract_string

        public java.lang.String extract_string()
        See the description of the general Any operations.
        Specified by:
        extract_string in class Any
        Returns:
        the String object stored in this Any object
      • insert_wstring

        public void insert_wstring​(java.lang.String s)
        See the description of the general Any operations.
        Specified by:
        insert_wstring in class Any
        Parameters:
        s - the String object to insert into this Any object
      • extract_wstring

        public java.lang.String extract_wstring()
        See the description of the general Any operations.
        Specified by:
        extract_wstring in class Any
        Returns:
        the String object stored in this Any object
      • insert_any

        public void insert_any​(Any a)
        See the description of the general Any operations.
        Specified by:
        insert_any in class Any
        Parameters:
        a - the Any object to insert into this Any object
      • insert_Object

        public void insert_Object​(Object o)
        See the description of the general Any operations.
        Specified by:
        insert_Object in class Any
        Parameters:
        o - the org.omg.CORBA.Object object to insert into this Any object
      • insert_Object

        public void insert_Object​(Object o,
                                  TypeCode tc)
        A variant of the insertion operation that takes a typecode argument as well.
        Specified by:
        insert_Object in class Any
        Parameters:
        tc - TypeCode to insert into o.
        o - the org.omg.CORBA.Object instance to insert into this Any object
      • extract_Value

        public java.io.Serializable extract_Value()
        Note that the Serializable really should be an IDLEntity of some kind. It shouldn't just be an RMI-IIOP type. Currently, we accept and will produce RMI repIds with the latest calculations if given a non-IDLEntity Serializable.
        Specified by:
        extract_Value in class Any
        Returns:
        the java.io.Serializable object stored in this Any object
      • insert_Value

        public void insert_Value​(java.io.Serializable v)
        Description copied from class: Any
        Inserts the given java.io.Serializable object into this Any object's value field.
        Specified by:
        insert_Value in class Any
        Parameters:
        v - the java.io.Serializable object to insert into this Any object
      • insert_Value

        public void insert_Value​(java.io.Serializable v,
                                 TypeCode t)
        Description copied from class: Any
        Inserts the given java.io.Serializable object into this Any object's value field.
        Specified by:
        insert_Value in class Any
        Parameters:
        v - the java.io.Serializable object to insert into this Any object
        t - the TypeCode object that is to be inserted into this Any object's type field and that describes the java.io.Serializable object being inserted
      • insert_fixed

        public void insert_fixed​(java.math.BigDecimal value,
                                 TypeCode type)
        Description copied from class: Any
        Throws an org.omg.CORBA.NO_IMPLEMENT exception.

        Inserts the given java.math.BigDecimal object into this Any object's value field.

        Overrides:
        insert_fixed in class Any
        Parameters:
        value - the java.math.BigDecimal object to insert into this Any object
        type - the TypeCode object that is to be inserted into this Any object's type field and that describes the java.math.BigDecimal object being inserted
        See Also:
        CORBA package comments for unimplemented features
      • createTypeCodeForClass

        public static TypeCode createTypeCodeForClass​(java.lang.Class c,
                                                      ORB tcORB)
        Utility method for insert_Value and Util.writeAny. The ORB passed in should have the desired ORBVersion. It is used to generate the type codes.
        Parameters:
        c - The Class for which a TypeCode is needed.
        tcORB - ORB to use when creating TypeCode.
        Returns:
        The newly created TypeCode.
      • getPrimitiveTypeCodeForClass

        private static TypeCode getPrimitiveTypeCodeForClass​(java.lang.Class c,
                                                             ORB tcORB)
        It looks like this was copied from io.ValueUtility at some point. It's used by createTypeCodeForClass. The tcORB passed in should have the desired ORB version, and is used to create the type codes.
        Parameters:
        c - the class
        tcORB - the orb to use to find the type code
        Returns:
        the appropriate primitive type code
      • isInitialized

        public boolean isInitialized()