Package org.omg.CORBA

Examples of org.omg.CORBA.INTF_REPOS


                return ir2scopes ("", id, loader);
            }
        }
        else
        {
           throw new INTF_REPOS ("Unrecognized RepositoryID: " + repId);
        }
    }
View Full Code Here


                kind = PrimitiveKind.pk_objref;
                break;
            }
        default:
            {
                throw new INTF_REPOS ("Unrecognized kind: " + kind );
            }
        }
    }
View Full Code Here

                type = org.omg.CORBA.ORB.init().get_primitive_tc( org.omg.CORBA.TCKind.tk_objref );
                break;
            }
        default:
            {
                throw new INTF_REPOS ("Unrecognized kind: " + kind );
            }
        }
    }
View Full Code Here

        }

        def_kind = org.omg.CORBA.DefinitionKind.dk_Module;
        if (ir == null)
        {
           throw new INTF_REPOS ("No repository!");
        }

        containing_repository = ir;
        defined_in = def_in;

        try
        {
            id( RepositoryID.toRepositoryID( full_name, false, loader ));
            if( full_name.indexOf( "." ) > 0 )
            {
                name( full_name.substring( full_name.lastIndexOf( "." ) + 1 ));

                if( defined_in instanceof org.omg.CORBA.Contained)
                {
                    absolute_name =
                        ((org.omg.CORBA.Contained)defined_in).absolute_name() +
                        "::" + name();

                    if (this.logger.isDebugEnabled())
                    {
                        this.logger.debug("New ModuleDef 1a) name " +
                                          name() + " absolute: " +
                                          absolute_name);
                    }
                }
                else
                {
                    absolute_name = "::" + name();

                    if (this.logger.isDebugEnabled())
                    {
                        this.logger.debug("New ModuleDef 1b) name " +
                                          name() + " absolute: " +
                                          absolute_name + " defined_in : " +
                                          defined_in.getClass().getName());
                    }
                }
            }
            else
            {
                defined_in = containing_repository;
                name( full_name );
                absolute_name = "::" + name();

                if (this.logger.isDebugEnabled())
                {
                    this.logger.debug("New ModuleDef 2) name " +
                                      name() +
                                      " absolute:" + absolute_name);
                }
            }
            delegate = new Container( this, path, full_name, loader, poa, this.logger );

        }
        catch ( Exception e )
        {
            this.logger.error("Caught Exception", e);
            throw new INTF_REPOS( ErrorMsg.IR_Not_Implemented,
                                  org.omg.CORBA.CompletionStatus.COMPLETED_NO);
        }
    }
View Full Code Here

        Logger logger,
        POA poa )
    {
        if ( containedObject == null)
        {
            throw new INTF_REPOS ("Precondition violated in Contained createContainedReference");
        }

        org.omg.PortableServer.Servant servant = null;

        switch ( containedObject.def_kind().value() )
View Full Code Here

                        Logger logger,
                        POA poa )
    {
        if (tc.kind () != org.omg.CORBA.TCKind.tk_sequence)
        {
           throw new INTF_REPOS ("Precondition volation: TypeCode must be of kind sequence");
        }
       
        this.logger = logger;
        this.poa = poa;
        type = tc;
        def_kind = org.omg.CORBA.DefinitionKind.dk_Sequence;
        this.ir = ir;
        String name = "<unknown>";
        try
        {
            element_type = tc.content_type();
            bound = tc.length();
            name = element_type.name();
        }
        catch( org.omg.CORBA.TypeCodePackage.BadKind bk )
        {
            // cannot happen because of above test
        }

        element_type_def = IDLType.create( element_type, ir,
                                           this.logger, this.poa);

        if (element_type_def == null)
        {
            throw new INTF_REPOS ("Element type " + name  + " null in SequenceDef " + name );
        }

        this.logger.debug("New SequenceDef");
    }
View Full Code Here

        containing_repository = ir;
        defined_in = _defined_in;
        this.path = path;
        if (defined_in == null)
        {
            throw new INTF_REPOS ("defined_in = null");
        }
        if (containing_repository == null)
        {
            throw new INTF_REPOS ("containing_repository = null");
        }

        try
        {
            String classId = c.getName();
            myClass = c;
            version( "1.0" );
            full_name = classId;

            if( classId.indexOf('.') > 0 )
            {
                name( classId.substring( classId.lastIndexOf('.')+1 ) );
                absolute_name =
                    org.omg.CORBA.ContainedHelper.narrow( defined_in ).absolute_name() +
                    "::" + name;
            }
            else
            {
                name( classId );
                absolute_name = "::" + name;
            }

            helperClass = this.loader.loadClass( classId + "Helper") ;
            id( (String)helperClass.getDeclaredMethod( "id", (Class[]) null ).invoke( null, (Object[]) null ));

            type = (org.omg.CORBA.TypeCode)helperClass.getDeclaredMethod(
                                                   "type",
                                                   (Class[]) null ).invoke( null, (Object[]) null );

            members = new org.omg.CORBA.StructMember[ type.member_count() ];
            for( int i = 0; i < members.length; i++ )
            {
                org.omg.CORBA.TypeCode type_code = type.member_type(i);
                String member_name = type.member_name(i);

                if (this.logger.isDebugEnabled())
                {
                    this.logger.debug("StructDef " + absolute_name  +
                                      " member " + member_name);
                }

                members[i] = new org.omg.CORBA.StructMember( member_name,
                                                             type_code,
                                                             null );
            }
            /* get directory for nested definitions' classes */
            File f = new File( path + fileSeparator +
                               classId.replace('.', fileSeparator) + "Package" );

            if( f.exists() && f.isDirectory() )
                my_dir = f;

            if (this.logger.isDebugEnabled())
            {
                this.logger.debug("StructDef: " + absolute_name);
            }
        }
        catch ( Exception e )
        {
            logger.error("Caught Exception", e);
            throw new INTF_REPOS( ErrorMsg.IR_Not_Implemented,
                                  org.omg.CORBA.CompletionStatus.COMPLETED_NO);
        }
    }
View Full Code Here

    public void loadContents()
    {
        // read from the  class (operations and atributes)
        if (getReference () == null)
        {
            throw new INTF_REPOS ("getReference returns null");
        }

        org.omg.CORBA.StructDef myReference =
            org.omg.CORBA.StructDefHelper.narrow( getReference());

        if (myReference == null)
        {
            throw new INTF_REPOS ("narrow failed for " + getReference() );
        }

        /* load nested definitions from interfacePackage directory */

        String[] classes = null;
View Full Code Here

                IDLType.create( members[i].type, containing_repository,
                                this.logger, this.poa);

            if (members[i].type_def == null)
            {
                throw new INTF_REPOS ("No type_def for member " + members[i].name +
                                      " in struct " +  full_name );
            }
        }
        defined = true;
View Full Code Here

    org.omg.CORBA.TypeDescription describe_struct()
    {
        if ( ! defined)
        {
            throw new INTF_REPOS ("Struct " + full_name + " not defined! ");
        }

        return new org.omg.CORBA.TypeDescription(name(),
                                                 id(),
                                                 org.omg.CORBA.ContainedHelper.narrow( defined_in ).id(),
View Full Code Here

TOP

Related Classes of org.omg.CORBA.INTF_REPOS

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.