Class MemberShapeTargetValidator

java.lang.Object
software.amazon.awssdk.codegen.validation.MemberShapeTargetValidator

public final class MemberShapeTargetValidator extends Object
Validates that every member which is expected to reference a model shape actually resolves to one after member-to-shape linking. A member can be left referencing a target shape that no longer exists in the intermediate model (missing from the service model, removed by a customization, or misspelled), which otherwise surfaces as a cryptic NullPointerException deep inside code emission.

The classification of which members reference a shape mirrors RemoveUnusedShapes.resolveMemberShapes so that validation and shape retention never disagree.

  • Method Details

    • validate

      public static void validate(IntermediateModel model)
      Collects every member whose target shape cannot be resolved and, if any are found, throws a single ModelInvalidException carrying one entry per distinct offending member.
      Throws:
      ModelInvalidException - if any member references a shape that does not exist in the model.