public boolean setUpperBounds(TypeBinding[] upperBounds, ReferenceBinding javaLangObject) {
   this.upperBounds = upperBounds;
   if (upperBounds.length > 0) this.firstBound = upperBounds[0];
   int numReferenceInterfaces = 0;
   if (!isConsistentIntersection(upperBounds)) return false;
   for (int i = 0; i < upperBounds.length; i++) {
     TypeBinding aBound = upperBounds[i];
     if (aBound instanceof ReferenceBinding) {
       if (this.superclass == null && aBound.isClass())
         this.superclass = (ReferenceBinding) aBound;
       else if (aBound.isInterface()) numReferenceInterfaces++;
     }
   }
   this.superInterfaces = new ReferenceBinding[numReferenceInterfaces];
   int idx = 0;
   for (int i = 0; i < upperBounds.length; i++) {
     TypeBinding aBound = upperBounds[i];
     if (aBound.isInterface()) this.superInterfaces[idx++] = (ReferenceBinding) aBound;
   }
   if (this.superclass == null) this.superclass = javaLangObject;
   return true;
 }