Class GenerateErrorDirective<C extends CodegenContext<S,?,?>,S>

Type Parameters:
C - CodegenContext type.
S - Codegen settings type.

public final class GenerateErrorDirective<C extends CodegenContext<S,?,?>,S> extends ShapeDirective<StructureShape,C,S>
Directive used to generate an error.
See Also:
  • Method Details

    • errorTrait

      public ErrorTrait errorTrait()
      Gets the error trait.

      This is equivalent to calling shape().expectTrait(ErrorTrait.class).

      Returns:
      Gets the ErrorTrait of the error.