Ejemplo n.º 1
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;
  }
Ejemplo n.º 2
0
 private void emitDefault(TypeElement baseType, Log log, Message message) {
   TypeElement rootEnclosing = Utils.findRootEnclosingType(getMessageElement());
   if (rootEnclosing != null
       && Utils.typeEquals(baseType.asType(), rootEnclosing.asType())
       && this == message.getOriginalContainer()) {
     log.message(
         message.getKind(),
         getMessageElement(),
         getMessageAnnotation(),
         getMessageAnnotationValue(),
         message.getText());
   } else {
     MessageContainer original = message.getOriginalContainer();
     log.message(
         message.getKind(),
         baseType,
         null,
         null,
         wrapText(
             original.getMessageElement(), original.getMessageAnnotation(), message.getText()));
   }
 }