// helper method for findSingleStaticImport()
  private MethodBinding findStaticMethod(ReferenceBinding currentType, char[] selector) {
    if (!currentType.canBeSeenBy(this)) return null;

    do {
      currentType.initializeForStaticImports();
      MethodBinding[] methods = currentType.getMethods(selector);
      if (methods != Binding.NO_METHODS) {
        for (int i = methods.length; --i >= 0; ) {
          MethodBinding method = methods[i];
          if (method.isStatic() && method.canBeSeenBy(this.fPackage)) return method;
        }
      }
    } while ((currentType = currentType.superclass()) != null);
    return null;
  }
  public void storeDependencyInfo() {
    // add the type hierarchy of each referenced supertype
    // cannot do early since the hierarchy may not be fully resolved
    for (int i = 0; i < this.referencedSuperTypes.size; i++) { // grows as more types are added
      ReferenceBinding type = (ReferenceBinding) this.referencedSuperTypes.elementAt(i);
      if (!this.referencedTypes.containsIdentical(type)) this.referencedTypes.add(type);

      if (!type.isLocalType()) {
        ReferenceBinding enclosing = type.enclosingType();
        if (enclosing != null) recordSuperTypeReference(enclosing);
      }
      ReferenceBinding superclass = type.superclass();
      if (superclass != null) recordSuperTypeReference(superclass);
      ReferenceBinding[] interfaces = type.superInterfaces();
      if (interfaces != null)
        for (int j = 0, length = interfaces.length; j < length; j++)
          recordSuperTypeReference(interfaces[j]);
    }

    for (int i = 0, l = this.referencedTypes.size; i < l; i++) {
      ReferenceBinding type = (ReferenceBinding) this.referencedTypes.elementAt(i);
      if (!type.isLocalType())
        recordQualifiedReference(
            type.isMemberType()
                ? CharOperation.splitOn('.', type.readableName())
                : type.compoundName);
    }

    int size = this.qualifiedReferences.size;
    char[][][] qualifiedRefs = new char[size][][];
    for (int i = 0; i < size; i++) qualifiedRefs[i] = this.qualifiedReferences.elementAt(i);
    this.referenceContext.compilationResult.qualifiedReferences = qualifiedRefs;

    size = this.simpleNameReferences.size;
    char[][] simpleRefs = new char[size][];
    for (int i = 0; i < size; i++) simpleRefs[i] = this.simpleNameReferences.elementAt(i);
    this.referenceContext.compilationResult.simpleNameReferences = simpleRefs;

    size = this.rootReferences.size;
    char[][] rootRefs = new char[size][];
    for (int i = 0; i < size; i++) rootRefs[i] = this.rootReferences.elementAt(i);
    this.referenceContext.compilationResult.rootReferences = rootRefs;
  }