Esempio n. 1
0
  private void collectMessagesImpl(
      List<Message> collectedMessages, Set<MessageContainer> visitedSinks) {
    collectedMessages.addAll(getMessages());
    for (MessageContainer sink : findChildContainers()) {
      if (visitedSinks.contains(sink)) {
        return;
      }

      visitedSinks.add(sink);
      sink.collectMessagesImpl(collectedMessages, visitedSinks);
    }
  }
Esempio n. 2
0
  private void emitMessagesImpl(
      TypeElement baseElement, Log log, Set<MessageContainer> visitedSinks) {
    for (Message message : getMessages()) {
      emitDefault(baseElement, log, message);
    }

    for (MessageContainer sink : findChildContainers()) {
      if (visitedSinks.contains(sink)) {
        continue;
      }

      visitedSinks.add(sink);
      sink.emitMessagesImpl(baseElement, log, visitedSinks);
    }
  }
Esempio n. 3
0
  private boolean hasErrorsImpl(Set<MessageContainer> visitedSinks) {
    for (Message msg : getMessages()) {
      if (msg.getKind() == Kind.ERROR) {
        return true;
      }
    }
    for (MessageContainer sink : findChildContainers()) {
      if (visitedSinks.contains(sink)) {
        return false;
      }

      visitedSinks.add(sink);

      if (sink.hasErrorsImpl(visitedSinks)) {
        return true;
      }
    }
    return false;
  }