code: private IndexTermTarget genTarget() {
          final IndexTermTarget target = new IndexTermTarget();
          String fragment;
  
          if (topicIdStack.peek() == null) {
              fragment = null;
          } else {
              fragment = topicIdStack.peek();
          }
  
          if (title != null) {
              target.setTargetName(title);
          } else {
              target.setTargetName(targetFile);
          }
          if (fragment != null) {
              target.setTargetURI(setFragment(targetFile, fragment));
          } else {
              target.setTargetURI(targetFile);
          }
          return target;
      }
docs: This method is used to create a target which refers to current topic.
  @return instance of IndexTermTarget created