@AnnotationTarget(targets: Array<"Function" | "Parameter" | "Variable" | "Import">)
Core Annotations (dw::Core)
Annotation | Definition | Description |
---|---|---|
AnnotationTarget |
Annotation that limits the scope of an annotation. For example, the Annotation Targets:
|
|
Deprecated |
|
Annotation that marks a function as deprecated. Introduced in DataWeave version 2.4.0. |
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 |
|
Annotation that marks a function as experimental and subject to change or removal in the future. Introduced in DataWeave version 2.4.0. |
GlobalDescription |
|
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. Introduced in DataWeave version 2.4.0. |
Interceptor |
|
Annotation that marks another annotation as an Interceptor so that the
marked annotation will wrap an annotated function with an Experimental: This experimental feature is subject to change or removal from future versions of DataWeave. |
Internal |
|
Annotation that marks a function as internal and not to be used. Introduced in DataWeave 2.4.0. Experimental: This experimental feature is subject to change or removal from future versions of DataWeave. |
Labels |
|
Annotation for labeling a function or variable so that the
labelled target becomes more easy to discover. An example is
Introduced in DataWeave version 2.4.0. |
Lazy |
|
Annotation that marks a variable declaration for lazy initialization. Introduced in DataWeave version 2.3.0. |
RuntimePrivilege |
|
Annotation used to indicate that a function requires runtime privileges to
execute. An example is |
Since |
|
Annotation that identifies the DataWeave version in which the annotated
functionality was introduced. An example is Introduced in DataWeave 2.3.0. Supported by Mule 4.3 and later. |
StreamCapable |
|
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 |
TailRec |
|
Annotation that marks a function as tail recursive. If a function with this annotation is not tail recursive, the function will fail. |
UntrustedCode |
|
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. Experimental: This experimental feature is subject to change or removal from future versions of DataWeave. |