Package org.omg.DynamicAny.DynAnyPackage

Examples of org.omg.DynamicAny.DynAnyPackage.TypeMismatch


    {
        checkDestroyed ();

        if (isEmptyEx ())
        {
            throw new TypeMismatch ();
        }
        if (pos == -1)
        {
            throw new InvalidValue ();
        }
View Full Code Here


        try
        {
            /*  special case for empty exceptions */
            if( isEmptyEx () )
            {
                throw new TypeMismatch ();
            }

            if( pos == -1 )
            {
                return null;
View Full Code Here

       org.omg.CORBA.TypeCode _type = TypeCode.originalType( type );

       if( _type.kind() != org.omg.CORBA.TCKind.tk_sequence )
       {
           throw new TypeMismatch();
       }

       try
       {
           typeCode = _type;
View Full Code Here

      {
         org.omg.CORBA.TypeCode tc = TypeCode.originalType( value[i].type() );

         if( tc.kind() != elementType.kind() )
         {
            throw new TypeMismatch();
         }
      }

      /** ok now */
      length = value.length;
View Full Code Here

      org.omg.CORBA.TypeCode _type = TypeCode.originalType( type );

      if( _type.kind().value() != org.omg.CORBA.TCKind._tk_fixed )
      {
         throw new TypeMismatch();
      }

      typeCode = _type;
      pos = -1;
View Full Code Here

      throws InvalidValue, TypeMismatch
   {
      checkDestroyed ();
      if( ! value.type().equivalent( type()) )
      {
         throw new TypeMismatch();
      }

      typeCode = TypeCode.originalType( value.type() );

      anyRepresentation = (org.jacorb.orb.Any)orb.create_any();
View Full Code Here

   public boolean set_value( String value )
      throws TypeMismatch, InvalidValue
   {
      if ( value == null )
      {
         throw new TypeMismatch();
      }
      String val = value.trim();
      if ( val.endsWith ("D") || val.endsWith ("d") )
      {
         val = val.substring( 0, val.length() - 1 );
      }

      BigDecimal fixed_value = null;
      try
      {
         fixed_value = new BigDecimal( val );
      }
      catch ( NumberFormatException ex )
      {
         throw new TypeMismatch();
      }

      boolean truncate = false;
      try
      {
View Full Code Here

    public void set_boxed_value(org.omg.CORBA.Any boxed)
        throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
    {
        if ( ! isNull && ! boxed.type().equal(this.type())) {
            throw new TypeMismatch();
        }
        clearData();
        any = boxed;
        representations = REPRESENTATION_ANY;
        index = 0;
View Full Code Here

    public void set_boxed_value_as_dyn_any(DynAny boxed)
        throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch
    {
        if ( ! isNull && ! boxed.type().equal(this.type())) {
            throw new TypeMismatch();
        }
        clearData();
        components = new DynAny[] {boxed};
        representations = REPRESENTATION_COMPONENTS;
        index = 0;
View Full Code Here

                } catch (Bounds bounds) { // impossible
                }
                if ( ! (expectedMemberName.equals(memberName) || memberName.equals(""))) {
                    clearData();
                    // _REVISIT_ More info
                    throw new TypeMismatch();
                }
                memberAny = value[i].value;
                TypeCode expectedMemberType = null;
                try {
                    expectedMemberType = expectedTypeCode.member_type(i);
                } catch (BadKind badKind) { // impossible
                } catch (Bounds bounds) { // impossible
                }
                if (! expectedMemberType.equal(memberAny.type())) {
                    clearData();
                    // _REVISIT_ More info
                    throw new TypeMismatch();
                }
                try {
                    // Creates the appropriate subtype without copying the Any
                    memberDynAny = DynAnyUtil.createMostDerivedDynAny(memberAny, orb, false);
                } catch (InconsistentTypeCode itc) {
View Full Code Here

TOP

Related Classes of org.omg.DynamicAny.DynAnyPackage.TypeMismatch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.