private void addDependencies(DirectClassFile classFile) {
    for (Constant constant : classFile.getConstantPool().getEntries()) {
      if (constant instanceof CstType) {
        checkDescriptor(((CstType) constant).getClassType().getDescriptor());
      } else if (constant instanceof CstFieldRef) {
        checkDescriptor(((CstFieldRef) constant).getType().getDescriptor());
      } else if (constant instanceof CstBaseMethodRef) {
        checkPrototype(((CstBaseMethodRef) constant).getPrototype());
      }
    }

    FieldList fields = classFile.getFields();
    int nbField = fields.size();
    for (int i = 0; i < nbField; i++) {
      checkDescriptor(fields.get(i).getDescriptor().getString());
    }

    MethodList methods = classFile.getMethods();
    int nbMethods = methods.size();
    for (int i = 0; i < nbMethods; i++) {
      checkPrototype(Prototype.intern(methods.get(i).getDescriptor().getString()));
    }
  }
@param jarOfRoots Archive containing the class files resulting of the tracing, typically this
    is the result of running ProGuard.
android/android_framework/dex-maker/src/main/java/com/android/multidex/ClassReferenceListBuilder.java