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

# 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"&gt;)</code></p></div></div></td><td><div><div><p>Annotation that limits the scope of an annotation. For example, the <code>Lazy</code> annotation applies only to variables, and the <code>StreamCapable</code> annotation applies only to parameters and variables. If no <code>AnnotationTarget</code> is specified, an annotation can apply to any valid target. An example is <code>@AnnotationTarget(targets = ["Function", "Variable"])</code> to limit the scope of the annotation <code>annotation TailRec()</code>.</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 marks a function 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 which functions gets the function description from the function’s documentation section. 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><p><em>Introduced in DataWeave 2.4.0.</em></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>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 so that the labelled target becomes more easy to discover. An example is <code>@Labels(labels = ["foreach", "transform"])</code>, which annotates definitions of <code>map</code> and <code>mapObject</code> functions.</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>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 the annotated field consumes 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()</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, the 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>
