Class GenerateStructureDirective<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<StructureShape,C,S>
software.amazon.smithy.codegen.core.directed.GenerateStructureDirective<C,S>
- Type Parameters:
C
- CodegenContext type.S
- Codegen settings type.
public final class GenerateStructureDirective<C extends CodegenContext<S,?,?>,S>
extends ShapeDirective<StructureShape,C,S>
Directive used to generate a structure.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if this is a shape used exclusively for input.boolean
Check if this is a shape used exclusively for output.Methods inherited from class software.amazon.smithy.codegen.core.directed.ShapeDirective
shape, symbol
Methods inherited from class software.amazon.smithy.codegen.core.directed.ContextualDirective
context, fileManifest, symbolProvider
Methods inherited from class software.amazon.smithy.codegen.core.directed.Directive
connectedShapes, model, operations, service, settings
-
Method Details
-
isInputShape
public boolean isInputShape()Check if this is a shape used exclusively for input.This is equivalent to calling
shape().hasTrait(InputTrait.class)
.Use the
CodegenDirector.createDedicatedInputsAndOutputs()
method to ensure that every operation has a unique input shape marked with the input trait.- Returns:
- Returns true if the shape is marked with the
input
trait. - See Also:
-
isOutputShape
public boolean isOutputShape()Check if this is a shape used exclusively for output.This is equivalent to calling
shape().hasTrait(OutputTrait.class)
.Use the
CodegenDirector.createDedicatedInputsAndOutputs()
method to ensure that every operation has a unique output shape marked with the output trait.- Returns:
- Returns true if the shape is marked with the
output
trait. - See Also:
-