com.sun.corba.se.spi.ior.TaggedProfileTemplate Java Examples

The following examples show how to use com.sun.corba.se.spi.ior.TaggedProfileTemplate. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IORTemplateImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #2
Source File: IORInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #3
Source File: IORInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #4
Source File: IORTemplateImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #5
Source File: IORTemplateImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #6
Source File: IORTemplateImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #7
Source File: IORInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #8
Source File: IORTemplateImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #9
Source File: IORInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #10
Source File: IORInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #11
Source File: IORTemplateImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #12
Source File: IORTemplateImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #13
Source File: IORInfoImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #14
Source File: IORTemplateImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #15
Source File: IORInfoImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #16
Source File: IORTemplateImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #17
Source File: IORInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #18
Source File: IORTemplateImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public boolean isEquivalent( IORFactory other )
{
    if (!(other instanceof IORTemplate))
        return false ;

    IORTemplate list = (IORTemplate)other ;

    Iterator thisIterator = iterator() ;
    Iterator listIterator = list.iterator() ;
    while (thisIterator.hasNext() && listIterator.hasNext()) {
        TaggedProfileTemplate thisTemplate =
            (TaggedProfileTemplate)thisIterator.next() ;
        TaggedProfileTemplate listTemplate =
            (TaggedProfileTemplate)listIterator.next() ;
        if (!thisTemplate.isEquivalent( listTemplate ))
            return false ;
    }

    return (thisIterator.hasNext() == listIterator.hasNext()) &&
        getObjectKeyTemplate().equals( list.getObjectKeyTemplate() ) ;
}
 
Example #19
Source File: IORInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #20
Source File: IORInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Internal utility method to add an IOR component to the set of profiles
 * present in the iterator.
 */
private void addIORComponentToProfileInternal(
    TaggedComponent tagged_component, Iterator iterator )
{
    // Convert the given IOP::TaggedComponent into the appropriate
    // type for the TaggedProfileTemplate
    TaggedComponentFactoryFinder finder =
        orb.getTaggedComponentFactoryFinder();
    Object newTaggedComponent = finder.create( orb, tagged_component );

    // Iterate through TaggedProfileTemplates and add the given tagged
    // component to the appropriate one(s).
    boolean found = false;
    while( iterator.hasNext() ) {
        found = true;
        TaggedProfileTemplate taggedProfileTemplate =
            (TaggedProfileTemplate)iterator.next();
        taggedProfileTemplate.add( newTaggedComponent );
    }

    // If no profile was found with the given id, throw a BAD_PARAM:
    // (See orbos/00-08-06, section 21.5.3.3.)
    if( !found ) {
        throw omgWrapper.invalidProfileId() ;
    }
}
 
Example #21
Source File: IORImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void initializeIORTemplateList()
{
    // Maps ObjectKeyTemplate to IORTemplate
    Map oktempToIORTemplate = new HashMap() ;

    iortemps = IORFactories.makeIORTemplateList() ;
    Iterator iter = iterator() ;
    ObjectId oid = null ; // used to check that all profiles have the same oid.
    while (iter.hasNext()) {
        TaggedProfile prof = (TaggedProfile)(iter.next()) ;
        TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate() ;
        ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate() ;

        // Check that all oids for all profiles are the same: if they are not,
        // throw exception.
        if (oid == null)
            oid = prof.getObjectId() ;
        else if (!oid.equals( prof.getObjectId() ))
            throw wrapper.badOidInIorTemplateList() ;

        // Find or create the IORTemplate for oktemp.
        IORTemplate iortemp = (IORTemplate)(oktempToIORTemplate.get( oktemp )) ;
        if (iortemp == null) {
            iortemp = IORFactories.makeIORTemplate( oktemp ) ;
            oktempToIORTemplate.put( oktemp, iortemp ) ;
            iortemps.add( iortemp ) ;
        }

        iortemp.add( ptemp ) ;
    }

    iortemps.makeImmutable() ;
}
 
Example #22
Source File: IORImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private void addTaggedProfiles( IORTemplate iortemp, ObjectId id )
{
    ObjectKeyTemplate oktemp = iortemp.getObjectKeyTemplate() ;
    Iterator templateIterator = iortemp.iterator() ;

    while (templateIterator.hasNext()) {
        TaggedProfileTemplate ptemp =
            (TaggedProfileTemplate)(templateIterator.next()) ;

        TaggedProfile profile = ptemp.create( oktemp, id ) ;

        add( profile ) ;
    }
}
 
Example #23
Source File: IORImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void initializeIORTemplateList()
{
    // Maps ObjectKeyTemplate to IORTemplate
    Map oktempToIORTemplate = new HashMap() ;

    iortemps = IORFactories.makeIORTemplateList() ;
    Iterator iter = iterator() ;
    ObjectId oid = null ; // used to check that all profiles have the same oid.
    while (iter.hasNext()) {
        TaggedProfile prof = (TaggedProfile)(iter.next()) ;
        TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate() ;
        ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate() ;

        // Check that all oids for all profiles are the same: if they are not,
        // throw exception.
        if (oid == null)
            oid = prof.getObjectId() ;
        else if (!oid.equals( prof.getObjectId() ))
            throw wrapper.badOidInIorTemplateList() ;

        // Find or create the IORTemplate for oktemp.
        IORTemplate iortemp = (IORTemplate)(oktempToIORTemplate.get( oktemp )) ;
        if (iortemp == null) {
            iortemp = IORFactories.makeIORTemplate( oktemp ) ;
            oktempToIORTemplate.put( oktemp, iortemp ) ;
            iortemps.add( iortemp ) ;
        }

        iortemp.add( ptemp ) ;
    }

    iortemps.makeImmutable() ;
}
 
Example #24
Source File: IORImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private void addTaggedProfiles( IORTemplate iortemp, ObjectId id )
{
    ObjectKeyTemplate oktemp = iortemp.getObjectKeyTemplate() ;
    Iterator templateIterator = iortemp.iterator() ;

    while (templateIterator.hasNext()) {
        TaggedProfileTemplate ptemp =
            (TaggedProfileTemplate)(templateIterator.next()) ;

        TaggedProfile profile = ptemp.create( oktemp, id ) ;

        add( profile ) ;
    }
}
 
Example #25
Source File: IORImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void addTaggedProfiles( IORTemplate iortemp, ObjectId id )
{
    ObjectKeyTemplate oktemp = iortemp.getObjectKeyTemplate() ;
    Iterator templateIterator = iortemp.iterator() ;

    while (templateIterator.hasNext()) {
        TaggedProfileTemplate ptemp =
            (TaggedProfileTemplate)(templateIterator.next()) ;

        TaggedProfile profile = ptemp.create( oktemp, id ) ;

        add( profile ) ;
    }
}
 
Example #26
Source File: IORImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private void initializeIORTemplateList()
{
    // Maps ObjectKeyTemplate to IORTemplate
    Map oktempToIORTemplate = new HashMap() ;

    iortemps = IORFactories.makeIORTemplateList() ;
    Iterator iter = iterator() ;
    ObjectId oid = null ; // used to check that all profiles have the same oid.
    while (iter.hasNext()) {
        TaggedProfile prof = (TaggedProfile)(iter.next()) ;
        TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate() ;
        ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate() ;

        // Check that all oids for all profiles are the same: if they are not,
        // throw exception.
        if (oid == null)
            oid = prof.getObjectId() ;
        else if (!oid.equals( prof.getObjectId() ))
            throw wrapper.badOidInIorTemplateList() ;

        // Find or create the IORTemplate for oktemp.
        IORTemplate iortemp = (IORTemplate)(oktempToIORTemplate.get( oktemp )) ;
        if (iortemp == null) {
            iortemp = IORFactories.makeIORTemplate( oktemp ) ;
            oktempToIORTemplate.put( oktemp, iortemp ) ;
            iortemps.add( iortemp ) ;
        }

        iortemp.add( ptemp ) ;
    }

    iortemps.makeImmutable() ;
}
 
Example #27
Source File: IIOPProfileTemplateImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public boolean isEquivalent( TaggedProfileTemplate temp )
{
    if (!(temp instanceof IIOPProfileTemplateImpl))
        return false ;

    IIOPProfileTemplateImpl tempimp = (IIOPProfileTemplateImpl)temp ;

    return primary.equals( tempimp.primary )  ;
}
 
Example #28
Source File: IIOPProfileTemplateImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public boolean isEquivalent( TaggedProfileTemplate temp )
{
    if (!(temp instanceof IIOPProfileTemplateImpl))
        return false ;

    IIOPProfileTemplateImpl tempimp = (IIOPProfileTemplateImpl)temp ;

    return primary.equals( tempimp.primary )  ;
}
 
Example #29
Source File: IORImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private void initializeIORTemplateList()
{
    // Maps ObjectKeyTemplate to IORTemplate
    Map oktempToIORTemplate = new HashMap() ;

    iortemps = IORFactories.makeIORTemplateList() ;
    Iterator iter = iterator() ;
    ObjectId oid = null ; // used to check that all profiles have the same oid.
    while (iter.hasNext()) {
        TaggedProfile prof = (TaggedProfile)(iter.next()) ;
        TaggedProfileTemplate ptemp = prof.getTaggedProfileTemplate() ;
        ObjectKeyTemplate oktemp = prof.getObjectKeyTemplate() ;

        // Check that all oids for all profiles are the same: if they are not,
        // throw exception.
        if (oid == null)
            oid = prof.getObjectId() ;
        else if (!oid.equals( prof.getObjectId() ))
            throw wrapper.badOidInIorTemplateList() ;

        // Find or create the IORTemplate for oktemp.
        IORTemplate iortemp = (IORTemplate)(oktempToIORTemplate.get( oktemp )) ;
        if (iortemp == null) {
            iortemp = IORFactories.makeIORTemplate( oktemp ) ;
            oktempToIORTemplate.put( oktemp, iortemp ) ;
            iortemps.add( iortemp ) ;
        }

        iortemp.add( ptemp ) ;
    }

    iortemps.makeImmutable() ;
}
 
Example #30
Source File: IIOPProfileTemplateImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public boolean isEquivalent( TaggedProfileTemplate temp )
{
    if (!(temp instanceof IIOPProfileTemplateImpl))
        return false ;

    IIOPProfileTemplateImpl tempimp = (IIOPProfileTemplateImpl)temp ;

    return primary.equals( tempimp.primary )  ;
}