DependableTrait
Trait for IDependable.
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 from non-compiling source. May contain errors.
// Usage
Object roots = DependableTrait.get(construct).getDependencyRoots();
// Definition
DependableTrait.implement(construct, Map.of(get dependencyRoots() { return []; }));
Initializers
import com.aliyun.ros.cdk.core.DependableTrait;
new DependableTrait();
| Name | Type | Description |
|---|---|---|
Static Functions
| Name | Description |
|---|---|
get |
Return the matching DependableTrait for the given class instance. |
implement |
Register instance to have the given DependableTrait. |
get
import com.aliyun.ros.cdk.core.DependableTrait;
DependableTrait.get(IDependable instance)
Return the matching DependableTrait for the given class instance.
- Type: IDependable
implement
import com.aliyun.ros.cdk.core.DependableTrait;
DependableTrait.implement(IDependable instance, DependableTrait trait)
Register instance to have the given DependableTrait.
Should be called in the class constructor.
- Type: IDependable
- Type: DependableTrait
Properties
| Name | Type | Description |
|---|---|---|
dependencyRoots |
java.util.List<IConstruct> |
The set of constructs that form the root of this dependable. |
dependencyRootsRequired
public java.util.List<IConstruct> getDependencyRoots();
- Type: java.util.List<IConstruct>
The set of constructs that form the root of this dependable.
All resources under all returned constructs are included in the ordering dependency.