@Generated(value="jsii-pacmak/1.29.0 (build 41df200)", date="2021-05-14T22:39:37.346Z") @Stability(value=Stable) public abstract class DependableTrait extends software.amazon.jsii.JsiiObject
Traits are interfaces that are privately implemented by objects. Instead of showing up in the public interface of a class, they need to be queried explicitly. This is used to implement certain framework features that are not intended to be used by Construct consumers, and so should be hidden from accidental use.
Example:
// Example automatically generated. See https://github.com/aws/jsii/issues/826 // Usage Array roots = DependableTrait.get(construct).getDependencyRoots(); // Definition public class TraitImplementation implements DependableTrait { public final Array dependencyRoots; public TraitImplementation() { this.dependencyRoots = asList(constructA, constructB, constructC); } } DependableTrait.implement(construct, new TraitImplementation());
| Modifier | Constructor and Description |
|---|---|
protected |
DependableTrait() |
protected |
DependableTrait(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DependableTrait(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static DependableTrait |
get(IDependable instance)
Return the matching DependableTrait for the given class instance.
|
abstract List<IConstruct> |
getDependencyRoots()
The set of constructs that form the root of this dependable.
|
static void |
implement(IDependable instance,
DependableTrait trait)
Register `instance` to have the given DependableTrait.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected DependableTrait(software.amazon.jsii.JsiiObjectRef objRef)
protected DependableTrait(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) protected DependableTrait()
@Stability(value=Stable) @NotNull public static DependableTrait get(@NotNull IDependable instance)
instance - This parameter is required.@Stability(value=Stable)
public static void implement(@NotNull
IDependable instance,
@NotNull
DependableTrait trait)
Should be called in the class constructor.
instance - This parameter is required.trait - This parameter is required.@Stability(value=Stable) @NotNull public abstract List<IConstruct> getDependencyRoots()
All resources under all returned constructs are included in the ordering dependency.
Copyright © 2021. All rights reserved.