# AspectApplication

Object respresenting an Aspect application.

Stores the Aspect, the pointer to the construct it was applied
to, and the priority value of that Aspect.

- Source: [`core/lib/aspect.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/core/lib/aspect.ts#L146)
- Type last changed: v2.172.0 · 7 Dec 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import * as constructs from 'constructs';

declare const aspect: cdk.IAspect;
declare const construct: constructs.Construct;
const aspectApplication = new cdk.AspectApplication(construct, aspect, 123);
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
import constructs as constructs

# aspect: cdk.IAspect
# construct: constructs.Construct

aspect_application = cdk.AspectApplication(construct, aspect, 123)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.constructs.*;

IAspect aspect;
Construct construct;

AspectApplication aspectApplication = new AspectApplication(construct, aspect, 123);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Constructs;

IAspect aspect;
Construct construct;
var aspectApplication = new AspectApplication(construct, aspect, 123);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import constructs "github.com/aws/constructs-go/constructs"

var aspect IAspect
var construct Construct

aspectApplication := cdk.NewAspectApplication(construct, aspect, jsii.Number(123))
```

## Initializer

TypeScript:

```ts
new AspectApplication(construct: IConstruct, aspect: IAspect, priority: number)
```

Python:

```python
AspectApplication(construct: IConstruct, aspect: IAspect, priority: int | float)
```

Java:

```java
new AspectApplication(IConstruct construct, IAspect aspect, Number priority)
```

C# / .NET:

```csharp
new AspectApplication(IConstruct construct, IAspect aspect, double priority)
```

Golang:

```go
NewAspectApplication(Construct IConstruct, Aspect IAspect, Priority *float64)
```

## Properties

- `aspect`: [IAspect](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IAspect.html) — The Aspect that was applied.

- `construct`: [IConstruct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IConstruct.html) — The construct that the Aspect was applied to.

- `priority`: number — Gets the priority value.

  Sets the priority value.
