public static StructType createStructTypeForRuntimeIterators(List runTimeIterators){
  Support.Assert(runTimeIterators.size() > 1,"The number of Iterators passed should be greater than 1 to create a structSet");
  int len=runTimeIterators.size();
  String fieldNames[]=new String[len];
  String[] indexAlternativeFieldNames=new String[len];
  ObjectType fieldTypes[]=new ObjectType[len];
  Iterator itr=runTimeIterators.iterator();
  int i=0;
  while (itr.hasNext()) {
    RuntimeIterator iter=(RuntimeIterator)itr.next();
    fieldNames[i]=iter.getInternalId();
    indexAlternativeFieldNames[i]=iter.getIndexInternalID();
    fieldTypes[i++]=iter.getElementType();
  }
  StructTypeImpl type=new StructTypeImpl(fieldNames,indexAlternativeFieldNames,fieldTypes);
  return type;
}

public static StructType createStructTypeForRuntimeIterators ( List runTimeIterators ) { Support . Assert ( runTimeIterators . size ( ) > 1 , "The number of Iterators passed should be greater than 1 to create a structSet" ) ; int len = runTimeIterators . size ( ) ; String fieldNames [ ] = new String [ len ] ; String [ ] indexAlternativeFieldNames = new String [ len ] ; ObjectType fieldTypes [ ] = new ObjectType [ len ] ; Iterator itr = runTimeIterators . iterator ( ) ; int i = 0 ; while ( itr . hasNext ( ) ) { RuntimeIterator iter = ( RuntimeIterator ) itr . next ( ) ; fieldNames [ i ] = iter . getInternalId ( ) ; indexAlternativeFieldNames [ i ] = iter . getIndexInternalID ( ) ; fieldTypes [ i ++ ] = iter . getElementType ( ) ; } StructTypeImpl type = new StructTypeImpl ( fieldNames , indexAlternativeFieldNames , fieldTypes ) ; return type ; }
asif : this function creates a structtype using internal ids of the iterators as the field names for the structtype . it should be invoked iff the iterators size is greater than 1
