class Shims
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Shims |
Go | github.com/aws/aws-cdk-go/awscdk/v2#Shims |
Java | software.amazon.awscdk.Shims |
Python | aws_cdk.Shims |
TypeScript (source) | aws-cdk-lib » Shims |
Converts between Mixins and Aspects.
Since Mixins and Aspects are both implementations of the visitor pattern, they can be converted from each other. Mixins are applied immediately (imperative), while Aspects are applied during synthesis (declarative).
Methods
| Name | Description |
|---|---|
| static as | Wraps a Mixin as an Aspect. |
| static as | Wraps an Aspect as a Mixin. |
static asAspect(mixin)
public static asAspect(mixin: IMixin): IAspect
Parameters
- mixin
IMixin— The Mixin to wrap.
Returns
Wraps a Mixin as an Aspect.
The resulting Aspect defers the Mixin's application to the synthesis phase.
The Mixin's supports() method is used to filter which constructs are visited.
static asMixin(aspect)
public static asMixin(aspect: IAspect): IMixin
Parameters
- aspect
IAspect— The Aspect to wrap.
Returns
Wraps an Aspect as a Mixin.
The resulting Mixin applies the Aspect's visit() immediately to every node.
The Aspect is applied to all constructs since Aspects don't have a supports() filter.

.NET
Go
Java
Python
TypeScript (