Class ChangedMemberTarget
java.lang.Object
software.amazon.smithy.diff.evaluators.AbstractDiffEvaluator
software.amazon.smithy.diff.evaluators.ChangedMemberTarget
- All Implemented Interfaces:
DiffEvaluator
Checks for changes in the shapes targeted by a member.
If the new target is not a compatible type, the emitted event will be an ERROR. The new target is not compatible if any of the following are true:
- The new target is a different shape type than the old target.
- The target is a shape type whose name is significant to code generation, such as structures and enums.
- The new target is a list whose member is not a compatible type with the old target's member.
- The new target is a map whose key or value is not a compatible type with the old target's key or value.
If the types are compatible, the emitted event will default to a WARNING. This is elevated if any trait changes would result in a higher severity.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(ClassLoader classLoader, Differences differences) evaluate(Differences differences) Returns validation events given two models and the detected differences between them.Methods inherited from class software.amazon.smithy.diff.evaluators.AbstractDiffEvaluator
danger, danger, error, error, getEventId, note, note, warning, warning
-
Constructor Details
-
ChangedMemberTarget
public ChangedMemberTarget()
-
-
Method Details
-
evaluate
Description copied from interface:DiffEvaluatorReturns validation events given two models and the detected differences between them.- Parameters:
differences- Detected differences.- Returns:
- Returns validation events that are relative to the new model.
-
evaluate
-