Class DocValidationEventDecorator

java.lang.Object
software.amazon.smithy.docgen.validation.DocValidationEventDecorator
All Implemented Interfaces:
ValidationEventDecorator

public class DocValidationEventDecorator extends Object implements ValidationEventDecorator
Adds context to validation events describing how they impact docs.
  • Constructor Details

    • DocValidationEventDecorator

      public DocValidationEventDecorator()
  • Method Details

    • canDecorate

      public boolean canDecorate(ValidationEvent event)
      Description copied from interface: ValidationEventDecorator
      Returns true if this decorator knows how to decorate this event, usually by looking at the event id.
      Specified by:
      canDecorate in interface ValidationEventDecorator
      Parameters:
      event - The event to test against
      Returns:
      true if this decorator knows how to decorate this event
    • decorate

      public ValidationEvent decorate(ValidationEvent event)
      Description copied from interface: ValidationEventDecorator
      Takes an event and potentially updates it to decorate it. Returns the same event if this decorators does not know how to handle the event.
      Specified by:
      decorate in interface ValidationEventDecorator
      Returns:
      The decorated event or the original one if no decoration took place.