Пример #1
0
  private static List getInvocationsForMethod(BinMethod method) {
    ManagingIndexer supervisor = new ManagingIndexer();

    new MethodIndexer(
        supervisor,
        method,
        new BinMethodSearchFilter(true, true, true, true, false, false, false, false, false));
    supervisor.visit(method.getProject());

    return supervisor.getInvocations();
  }
Пример #2
0
  public ManagingIndexer getSupervisor(BinField field) {
    if ((supervisor == null) || (accessorsChanged)) {
      supervisor = new ManagingIndexer();
      new EncapsulateFieldIndexer(supervisor, field, getterName, setterName);

      // Find usages
      if (field.isPrivate()) {
        supervisor.visit(field.getCompilationUnit());
      } else {
        supervisor.visit(field.getOwner().getProject());
      }
    }
    this.accessorsChanged = false;
    return supervisor;
  }