All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.smithy.traitcodegen.integrations.annotations.SmithyGeneratedAnnotationInterceptor Maven / Gradle / Ivy

/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

package software.amazon.smithy.traitcodegen.integrations.annotations;

import software.amazon.smithy.traitcodegen.sections.ClassSection;
import software.amazon.smithy.traitcodegen.writer.TraitCodegenWriter;
import software.amazon.smithy.utils.CodeInterceptor;
import software.amazon.smithy.utils.SmithyGenerated;

/**
 * Adds the {@link software.amazon.smithy.utils.SmithyGenerated} annotation to all generated classes.
 */
final class SmithyGeneratedAnnotationInterceptor
        implements CodeInterceptor.Prepender {
    @Override
    public Class sectionType() {
        return ClassSection.class;
    }

    @Override
    public void prepend(TraitCodegenWriter writer, ClassSection section) {
        writer.write("@$T", SmithyGenerated.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy