> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Java: Aspects

> CDKTN Core API Reference for Aspects in Java.

Aspects can be applied to CDK tree scopes and can operate on the tree before synthesis.

## Methods <a name="Methods" id="Methods" />

| **Name**                                          | **Description**                                      |
| ------------------------------------------------- | ---------------------------------------------------- |
| <code><a href="#cdktn.Aspects.add">add</a></code> | Adds an aspect to apply this scope before synthesis. |

***

### `add` <a name="add" id="cdktn.Aspects.add" />

```java theme={null}
public void add(IAspect aspect)
```

Adds an aspect to apply this scope before synthesis.

#### `aspect`<sup>Required</sup> <a name="aspect" id="cdktn.Aspects.add.parameter.aspect" />

* *Type:* <a href="#cdktn.IAspect">IAspect</a>

The aspect to add.

***

## Static Functions <a name="Static Functions" id="Static Functions" />

| **Name**                                        | **Description**                                                 |
| ----------------------------------------------- | --------------------------------------------------------------- |
| <code><a href="#cdktn.Aspects.of">of</a></code> | Returns the `Aspects` object associated with a construct scope. |

***

### `of` <a name="of" id="cdktn.Aspects.of" />

```java theme={null}
import io.cdktn.cdktn.Aspects;

Aspects.of(IConstruct scope)
```

Returns the `Aspects` object associated with a construct scope.

#### `scope`<sup>Required</sup> <a name="scope" id="cdktn.Aspects.of.parameter.scope" />

* *Type:* software.constructs.IConstruct

The scope for which these aspects will apply.

***

## Properties <a name="Properties" id="Properties" />

| **Name**                                                   | **Type**                                                           | **Description**                                                |
| ---------------------------------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------- |
| <code><a href="#cdktn.Aspects.property.all">all</a></code> | <code>java.util.List\<<a href="#cdktn.IAspect">IAspect</a>></code> | The list of aspects which were directly applied on this scope. |

***

### `all`<sup>Required</sup> <a name="all" id="cdktn.Aspects.property.all" />

```java theme={null}
public java.util.List<IAspect> getAll();
```

* *Type:* java.util.List\<<a href="#cdktn.IAspect">IAspect</a>>

The list of aspects which were directly applied on this scope.

***
