Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.util
[Java] Class Eval

    java.lang.Object
      groovy.util.Eval

    public class Eval
    extends Object

Allow easy integration from Groovy into Java through convenience methods.

Authors:
  Dierk Koenig

Method Summary
`static Object` | `me(String expression)` @param expression the Groovy expression to evaluate
`static Object` | `me(String symbol, Object object, String expression)` evaluate expression and make object available inside the expression as 'symbol'
`static Object` | `x(Object x, String expression)` evaluate expression and make x available inside the expression as 'x'
`static Object` | `xy(Object x, Object y, String expression)` evaluate expression and make x and y available inside the expression as 'x' and 'y'
`static Object` | `xyz(Object x, Object y, Object z, String expression)` evaluate expression and make x,y,z available inside the expression as 'x','y','z'

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Method Detail

### me

    public static Object me(String expression)

  throws:
    CompilationFailedException if expression is no proper Groovy
  Parameters:
    `expression` - the Groovy expression to evaluate
  Returns:
    the result of the expression

### me

    public static Object me(String symbol, Object object, String expression)

  evaluate expression and make object available inside the expression as 'symbol'
  throws:
    CompilationFailedException if expression is no proper Groovy
  Parameters:
    `expression` - the Groovy expression to evaluate
  Returns:
    the result of the expression

### x

    public static Object x(Object x, String expression)

  evaluate expression and make x available inside the expression as 'x'
  throws:
    CompilationFailedException if expression is no proper Groovy
  Parameters:
    `expression` - the Groovy expression to evaluate
  Returns:
    the result of the expression

### xy

    public static Object xy(Object x, Object y, String expression)

  evaluate expression and make x and y available inside the expression as 'x' and 'y'
  throws:
    CompilationFailedException if expression is no proper Groovy
  Parameters:
    `expression` - the Groovy expression to evaluate
  Returns:
    the result of the expression

### xyz

    public static Object xyz(Object x, Object y, Object z, String expression)

  evaluate expression and make x,y,z available inside the expression as 'x','y','z'
  throws:
    CompilationFailedException if expression is no proper Groovy
  Parameters:
    `expression` - the Groovy expression to evaluate
  Returns:
    the result of the expression

Copyright © 2003-2010 The Codehaus. All rights reserved.