public ReferenceBinding[] convertToRawTypes(ReferenceBinding[] originalTypes,boolean forceErasure,boolean forceRawEnclosingType){
  if (originalTypes == null)   return null;
  ReferenceBinding[] convertedTypes=originalTypes;
  for (int i=0, length=originalTypes.length; i < length; i++) {
    ReferenceBinding originalType=originalTypes[i];
    ReferenceBinding convertedType=(ReferenceBinding)convertToRawType(forceErasure ? originalType.erasure() : originalType,forceRawEnclosingType);
    if (convertedType != originalType) {
      if (convertedTypes == originalTypes) {
        System.arraycopy(originalTypes,0,convertedTypes=new ReferenceBinding[length],0,i);
      }
      convertedTypes[i]=convertedType;
    }
 else     if (convertedTypes != originalTypes) {
      convertedTypes[i]=originalType;
    }
  }
  return convertedTypes;
}

public ReferenceBinding [ ] convertToRawTypes ( ReferenceBinding [ ] originalTypes , boolean forceErasure , boolean forceRawEnclosingType ) { if ( originalTypes == null ) return null ; ReferenceBinding [ ] convertedTypes = originalTypes ; for ( int i = 0 , length = originalTypes . length ; i < length ; i ++ ) { ReferenceBinding originalType = originalTypes [ i ] ; ReferenceBinding convertedType = ( ReferenceBinding ) convertToRawType ( forceErasure ? originalType . erasure ( ) : originalType , forceRawEnclosingType ) ; if ( convertedType != originalType ) { if ( convertedTypes == originalTypes ) { System . arraycopy ( originalTypes , 0 , convertedTypes = new ReferenceBinding [ length ] , 0 , i ) ; } convertedTypes [ i ] = convertedType ; } else if ( convertedTypes != originalTypes ) { convertedTypes [ i ] = originalType ; } } return convertedTypes ; }
convert an array of types in raw forms . only allocate an array if anything is different .
