Interface AspectOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AspectOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-09-02T11:25:24.798Z") @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());
 
  • Method Details

    • getPriority

      @Stability(Stable) @Nullable default Number 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

      @Stability(Stable) static AspectOptions.Builder builder()
      Returns:
      a AspectOptions.Builder of AspectOptions