View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.api.annotations.expressions;
8   
9   import org.mule.api.annotations.meta.Evaluator;
10  
11  import java.lang.annotation.Documented;
12  import java.lang.annotation.ElementType;
13  import java.lang.annotation.Retention;
14  import java.lang.annotation.RetentionPolicy;
15  import java.lang.annotation.Target;
16  
17  /**
18   * Allows method parameters to be configured with result of one or more Mule expressions
19   *
20   * public Object save(Object foo, @Expr("#[header:X-User]-#[function:UUID]") String id)
21   *
22   * @see org.mule.expression.FunctionExpressionEvaluator
23   */
24  @Target(ElementType.PARAMETER)
25  @Retention(RetentionPolicy.RUNTIME)
26  @Documented
27  @Evaluator("string")
28  public @interface Expr
29  {
30      String value();
31  
32      boolean optional() default false;
33  }