@Generated(value="jsii-pacmak/0.20.11 (build d4fd44f)", date="2019-12-17T13:05:19.631Z") @Stability(value=Experimental) 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:EXPERIMENTAL// This example is in TypeScript, examples in Java are coming soon. // Usage const roots = DependableTrait.get(construct).dependencyRoots; // Definition DependableTrait.implement(construct, { get dependencyRoots() { return []; } });
| 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.
|
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, jsiiCall, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticGet, jsiiStaticSetprotected DependableTrait(software.amazon.jsii.JsiiObjectRef objRef)
protected DependableTrait(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected DependableTrait()
@Stability(value=Experimental) public static DependableTrait get(IDependable instance)
instance - This parameter is required.@Stability(value=Experimental) public static void implement(IDependable instance, DependableTrait trait)
Should be called in the class constructor.
EXPERIMENTALinstance - This parameter is required.trait - This parameter is required.@Stability(value=Experimental) public List<IConstruct> getDependencyRoots()
All resources under all returned constructs are included in the ordering dependency.
EXPERIMENTALCopyright © 2019. All rights reserved.