public boolean hasTrait(Class<? extends Trait> traitClass) {
        return getTrait(traitClass).isPresent();
    }
Checks if the shape has a specific trait by class.

@param traitClass Trait class to check.
@return Returns true if the shape has the given trait.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/Shape.java