---
schema_version: "1"
id: 96991e1542aa9465dbd1db668344c17b9069821a2d78a39ecafb68fa17345a38
title: Core Annotations (dw::Core)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.9/dw-core-annotations.md
canonical_url: https://docs.mulesoft.com/dataweave/2.9/dw-core-annotations
source_site: docs.mulesoft.com
content_type: documentation
content_hash: af708ff23ff4a2818aa9ef22a4492609b8ad7c527a237ba5efa2629918bf0816
description: MuleSoft Documentation Site
release: "2.9"
latest: false
---
---
product: DataWeave
version: 2.9
---

# Core Annotations (dw::Core)

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Annotation</th><th>Definition</th><th>Description</th></tr></thead><tbody><tr><td><p>AnnotationTarget</p></td><td><div><div><p><code>@AnnotationTarget(targets: Array&lt;"Function" | "Parameter" | "Variable" | "Import" | "Type" | "Version" | "Namespace" | "KeyType" | "TypeExpression" | "Expression" | "Annotation"&gt;)</code></p></div></div></td><td><div><div><p>Annotation that limits the application of an annotation. An example is <code>@AnnotationTarget(targets = ["Function", "Variable"])</code>, which limits the scope of the annotation <code>annotation TailRec()</code> to functions and variables. If no <code>AnnotationTarget</code> is specified, an annotation can apply to any valid target.</p></div><div><p>Annotation Targets:</p></div><div><ul><li><p><code>Parameter</code>: For function parameters.</p></li><li><p><code>Function</code>: For function definitions.</p></li><li><p><code>Variable</code>: For variable definitions.</p></li><li><p><code>Import</code>: For import definitions.</p></li></ul></div></div></td></tr><tr><td><p>Deprecated</p></td><td><div><div><p><code>@Deprecated(since: String, replacement: String)</code></p></div></div></td><td><div><div><p>Annotation that marks a function as deprecated.</p></div><div><p><em>Introduced in DataWeave version 2.4.0.</em></p></div></div></td></tr><tr><td><p>DesignOnlyType</p></td><td><div><div><p><code>@DesignOnlyType()</code></p></div></div></td><td><div><div><p>Annotation that marks a parameter type as <em>design only</em> 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.</p></div></div></td></tr><tr><td><p>Experimental</p></td><td><div><div><p><code>@Experimental()</code></p></div></div></td><td><div><div><p>Annotation that identifies a feature as experimental and subject to change or removal in the future.</p></div><div><p><em>Introduced in DataWeave version 2.4.0.</em></p></div></div></td></tr><tr><td><p>GlobalDescription</p></td><td><div><div><p><code>@GlobalDescription()</code></p></div></div></td><td><div><div><p>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.</p></div><div><p><em>Introduced in DataWeave version 2.4.0.</em></p></div></div></td></tr><tr><td><p>Interceptor</p></td><td><div><div><p><code>@Interceptor(interceptorFunction: String | (annotationArgs: Object, targetFunctionName: String, args: Array&lt;Any&gt;, callback: (args: Array&lt;Any&gt;) -&gt; Any) -&gt; Any)</code></p></div></div></td><td><div><div><p>Annotation that marks another annotation as an Interceptor so that the marked annotation will wrap an annotated function with an <code>interceptorFunction</code>. An example is the <code>RuntimePrivilege</code> annotation, which is annotated by <code>@Interceptor(interceptorFunction = "@native system::SecurityManagerCheckFunctionValue")</code>. The <code>readUrl</code> function definition is annotated by <code>@RuntimePrivilege(requires = "Resource")</code>.</p></div><div><p><em>Experimental:</em> This experimental feature is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>Internal</p></td><td><div><div><p><code>@Internal(permits: Array&lt;String&gt;)</code></p></div></div></td><td><div><div><p>Annotation that marks a function as <em>internal</em> and not to be used.</p></div><div><div><pre>_Introduced in DataWeave 2.4.0. Supported by Mule 4.4.0 and later._</pre></div></div><div><p><em>Experimental:</em> This experimental feature is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr><tr><td><p>Labels</p></td><td><div><div><p><code>@Labels(labels: Array&lt;String&gt;)</code></p></div></div></td><td><div><div><p>Annotation for labeling a function or variable definition so that it becomes more easy to discover. An example is <code>@Labels(labels =["append", "concat"])</code>.</p></div><div><p><em>Introduced in DataWeave version 2.4.0.</em></p></div></div></td></tr><tr><td><p>Lazy</p></td><td><div><div><p><code>@Lazy()</code></p></div></div></td><td><div><div><p>Annotation that marks a variable declaration for lazy initialization.</p></div><div><p><em>Introduced in DataWeave version 2.3.0.</em></p></div></div></td></tr><tr><td><p>Metadata</p></td><td><div><div><p><code>@Metadata(key: String)</code></p></div></div></td><td><div><div><p>Annotation used to mark annotations that represent metadata.</p></div><div><p><em>Introduced in DataWeave version 2.8.0.</em></p></div></div></td></tr><tr><td><p>RuntimePrivilege</p></td><td><div><div><p><code>@RuntimePrivilege(requires: String)</code></p></div></div></td><td><div><div><p>Annotation used to indicate that a function requires runtime privileges to execute. An example is <code>@RuntimePrivilege(requires = "Resource")</code>, which annotates the <code>readUrl</code> function definition.</p></div></div></td></tr><tr><td><p>Since</p></td><td><div><div><p><code>@Since(version: String)</code></p></div></div></td><td><div><div><p>Annotation that identifies the DataWeave version in which the annotated functionality was introduced. An example is <code>@Since(version = "2.4.0")</code>.</p></div><div><p><em>Introduced in DataWeave 2.3.0. Supported by Mule 4.3 and later.</em></p></div></div></td></tr><tr><td><p>StreamCapable</p></td><td><div><div><p><code>@StreamCapable()</code></p></div></div></td><td><div><div><p>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 <code>@StreamCapable</code> fields are <code>map</code>, <code>mapObject</code>, and <code>pluck</code>.</p></div></div></td></tr><tr><td><p>TailRec</p></td><td><div><div><p><code>@TailRec()</code></p></div></div></td><td><div><div><p>Annotation that marks a function as tail recursive. If a function with this annotation is not tail recursive, the function will fail.</p></div></div></td></tr><tr><td><p>UntrustedCode</p></td><td><div><div><p><code>@UntrustedCode(privileges: Array&lt;String&gt;)</code></p></div></div></td><td><div><div><p>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.</p></div><div><p><em>Experimental:</em> This experimental feature is subject to change or removal from future versions of DataWeave.</p></div></div></td></tr></tbody></table>
