Package software.amazon.awscdk
Interface AspectOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
AspectOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:30.808Z")
@Stability(Stable)
public interface AspectOptions
extends software.amazon.jsii.JsiiSerializable
Options when Applying an Aspect.
Example:
public class MutatingAspect implements IAspect {
public void visit(IConstruct node) {
}
}
public class ValidationAspect implements IAspect {
public void visit(IConstruct node) {
}
}
Stack stack = new Stack();
Aspects.of(stack).add(new MutatingAspect(), AspectOptions.builder().priority(AspectPriority.MUTATING).build()); // Run first (mutating aspects)
Aspects.of(stack).add(new ValidationAspect(), AspectOptions.builder().priority(AspectPriority.READONLY).build());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forAspectOptionsstatic final classAn implementation forAspectOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic AspectOptions.Builderbuilder()default NumberThe priority value to apply on an Aspect.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPriority
The priority value to apply on an Aspect. Priority must be a non-negative integer.Aspects that have same priority value are not guaranteed to be executed in a consistent order.
Default: AspectPriority.DEFAULT
-
builder
- Returns:
- a
AspectOptions.BuilderofAspectOptions
-