static ValidationEventDecorator compose(List<ValidationEventDecorator> decorators) {
        if (decorators.isEmpty()) {
            return IDENTITY;
        } else {
            return new ValidationEventDecorator() {
                @Override
                public boolean canDecorate(ValidationEvent ev) {
                    for (ValidationEventDecorator decorator : decorators) {
                        if (decorator.canDecorate(ev)) {
                            return true;
                        }
                    }
                    return false;
                }

                @Override
                public ValidationEvent decorate(ValidationEvent ev) {
                    ValidationEvent decoratedEvent = ev;
                    for (ValidationEventDecorator decorator : decorators) {
                        if (decorator.canDecorate(ev)) {
                            decoratedEvent = decorator.decorate(decoratedEvent);
                        }
                    }
                    return decoratedEvent;
                }
            };
        }
    }
Creates a decorator composed of one or more decorators.

@param decorators Decorators to compose.
@return Returns the composed decorator.
smithy-model/src/main/java/software/amazon/smithy/model/validation/ValidationEventDecorator.java