Core Annotations (dw::Core) | MuleSoft Documentation
# Core Annotations (dw::Core)
Annotation | Definition | Description  
---|---|---  
AnnotationTarget |  `@AnnotationTarget(targets: Array<"Function" | "Parameter" | "Variable" | "Import" | "Type" | "Version" | "Namespace" | "KeyType" | "TypeExpression" | "Expression" | "Annotation">)` |  Annotation that limits the application of an annotation. An example is `@AnnotationTarget(targets = ["Function", "Variable"])`, which limits the scope of the annotation `annotation TailRec()` to functions and variables. If no `AnnotationTarget` is specified, an annotation can apply to any valid target. Annotation Targets:
  * `Parameter`: For function parameters.
  * `Function`: For function definitions.
  * `Variable`: For variable definitions.
  * `Import`: For import definitions.

  
Deprecated |  `@Deprecated(since: String, replacement: String)` |  Annotation that marks a function as deprecated. _Introduced in DataWeave version 2.4.0._  
DesignOnlyType |  `@DesignOnlyType()` |  Annotation that marks a parameter type as _design only_ to indicate that the field type is validated only at design time. At runtime, only minimal type validation takes place. This annotation is useful for performance, especially with complex Object types.  
Experimental |  `@Experimental()` |  Annotation that identifies a feature as experimental and subject to change or removal in the future. _Introduced in DataWeave version 2.4.0._  
GlobalDescription |  `@GlobalDescription()` |  Annotation used to identify the function description to use for the function’s documentation. This annotation is useful for selecting the correct function description when the function is overloaded. _Introduced in DataWeave version 2.4.0._  
Interceptor |  `@Interceptor(interceptorFunction: String | (annotationArgs: Object, targetFunctionName: String, args: Array<Any>, callback: (args: Array<Any>) -> Any) -> Any)` |  Annotation that marks another annotation as an Interceptor so that the marked annotation will wrap an annotated function with an `interceptorFunction`. An example is the `RuntimePrivilege` annotation, which is annotated by `@Interceptor(interceptorFunction = "@native system::SecurityManagerCheckFunctionValue")`. The `readUrl` function definition is annotated by `@RuntimePrivilege(requires = "Resource")`. _Experimental:_ This experimental feature is subject to change or removal from future versions of DataWeave.  
Internal |  `@Internal(permits: Array<String>)` |  Annotation that marks a function as _internal_ and not to be used. ```
_Introduced in DataWeave 2.4.0. Supported by Mule 4.4.0 and later._
```
_Experimental:_ This experimental feature is subject to change or removal from future versions of DataWeave.  
`@Labels(labels: Array<String>)` |  Annotation for labeling a function or variable definition so that it becomes more easy to discover. An example is `@Labels(labels =["append", "concat"])`. _Introduced in DataWeave version 2.4.0._  
Annotation that marks a variable declaration for lazy initialization. _Introduced in DataWeave version 2.3.0._  
Metadata |  `@Metadata(key: String)` |  Annotation used to mark annotations that represent metadata. _Introduced in DataWeave version 2.8.0._  
RuntimePrivilege |  `@RuntimePrivilege(requires: String)` |  Annotation used to indicate that a function requires runtime privileges to execute. An example is `@RuntimePrivilege(requires = "Resource")`, which annotates the `readUrl` function definition.  
`@Since(version: String)` |  Annotation that identifies the DataWeave version in which the annotated functionality was introduced. An example is `@Since(version = "2.4.0")`. _Introduced in DataWeave 2.3.0. Supported by Mule 4.3 and later._  
StreamCapable |  `@StreamCapable()` |  Annotation that marks a parameter as stream capable, which means that this field will consume an array of objects in a forward-only manner. Examples of functions with `@StreamCapable` fields are `map`, `mapObject`, and `pluck`.  
Annotation that marks a function as tail recursive. If a function with this annotation is not tail recursive, the function will fail.  
UntrustedCode |  `@UntrustedCode(privileges: Array<String>)` |  Annotation that marks a script as untrusted, which means that the script has no privileges. For example, such a script cannot gain access to environment variables or read a resource from a URL. _Experimental:_ This experimental feature is subject to change or removal from future versions of DataWeave.