Class GenerateErrorDirective<C extends CodegenContext<S,?,?>,S>
java.lang.Object
software.amazon.smithy.codegen.core.directed.Directive<S>
software.amazon.smithy.codegen.core.directed.ContextualDirective<C,S>
software.amazon.smithy.codegen.core.directed.ShapeDirective<software.amazon.smithy.model.shapes.StructureShape,C,S>
software.amazon.smithy.codegen.core.directed.GenerateErrorDirective<C,S>
- Type Parameters:
C- CodegenContext type.S- Codegen settings type.
public final class GenerateErrorDirective<C extends CodegenContext<S,?,?>,S>
extends ShapeDirective<software.amazon.smithy.model.shapes.StructureShape,C,S>
Directive used to generate an error.
-
Method Summary
Modifier and TypeMethodDescriptionsoftware.amazon.smithy.model.traits.ErrorTraitGets theerrortrait.Methods inherited from class software.amazon.smithy.codegen.core.directed.ShapeDirective
shape, symbolMethods inherited from class software.amazon.smithy.codegen.core.directed.ContextualDirective
context, fileManifest, symbolProviderMethods inherited from class software.amazon.smithy.codegen.core.directed.Directive
connectedShapes, model, operations, service, settings
-
Method Details
-
errorTrait
public software.amazon.smithy.model.traits.ErrorTrait errorTrait()Gets theerrortrait.This is equivalent to calling
shape().expectTrait(ErrorTrait.class).- Returns:
- Gets the
ErrorTraitof the error.
-