![JAR search and dependency download from the Maven repository](/logo.png)
org.mule.api.annotations.expressions.Function Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mule-module-annotations Show documentation
Show all versions of mule-module-annotations Show documentation
Annotations for configuring Mule at various levels such as services, entry points, transformers and
expressions.
/*
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.api.annotations.expressions;
import org.mule.api.annotations.meta.Evaluator;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This evaluator allows for predefined functions
* to be called and returns a result. The functions it supports are:
*
* - now - Returns a {@link java.sql.Timestamp} with the current time.
* - date - Returns a {@link java.util.Date} with the current time.
* - dateStamp - Returns a {@link java.lang.String} that contains the current date formatted according to {@link org.mule.expression.FunctionExpressionEvaluator#DEFAULT_DATE_FORMAT}.
* - dateStamp-dd-MM-yyyy - Returns a {@link java.lang.String} that contains the current date formatted according to the format passed into the function.
* - uuid - Returns a globally unique identifier
* - hostname - Returns the hostname of the machine Mule is running on
* - ip - Returns the IP address of the machine Mule is running on
* - count - Returns a local count that will increment for each call. If the server is restarted, the counter will return to zero.
* - payloadClass - Returns a fuly qualified class name of the payload as a string.
* - shortPayloadClass - Returns just the class name of the payload as a string.
*
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Evaluator("function")
public @interface Function
{
/**
* @return the function expression to execute
*/
String value();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy